@modelcontextprotocol/server-scenario-modeler 1.3.1 → 1.3.2

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/mcp-app.html CHANGED
@@ -97,7 +97,7 @@ Boolean requesting whether a visible border and background is provided by the ho
97
97
  - omitted: host decides border`)});j({method:R("ui/request-display-mode"),params:j({mode:Xo.describe("The display mode being requested.")})});var sA=j({mode:Xo.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),aA=wt([R("model"),R("app")]).describe("Tool visibility scope - who can access the tool.");j({resourceUri:N().optional(),visibility:mt(aA).optional().describe(`Who can access this tool. Default: ["model", "app"]
98
98
  - "model": Tool visible to and callable by the agent
99
99
  - "app": Tool callable by the app from this server only`)});j({mimeTypes:mt(N()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});j({method:R("ui/download-file"),params:j({contents:mt(wt([R_,D_])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})});j({method:R("ui/message"),params:j({role:R("user").describe('Message role, currently only "user" is supported.'),content:mt(cl).describe("Message content blocks (text, image, etc.).")})});j({method:R("ui/notifications/sandbox-resource-ready"),params:j({html:N().describe("HTML content to load into the inner iframe."),sandbox:N().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:dd.optional().describe("CSP configuration from resource metadata."),permissions:md.optional().describe("Sandbox permissions from resource metadata.")})});var oA=j({method:R("ui/notifications/tool-result"),params:xc.describe("Standard MCP tool execution result.")}),j_=j({toolInfo:j({id:il.optional().describe("JSON-RPC id of the tools/call request."),tool:hd.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:YO.optional().describe("Current color theme preference."),styles:tA.optional().describe("Style configuration for theming the app."),displayMode:Xo.optional().describe("How the UI is currently displayed."),availableDisplayModes:mt(Xo).optional().describe("Display modes the host supports."),containerDimensions:wt([j({height:vt().describe("Fixed container height in pixels.")}),j({maxHeight:wt([vt(),_h()]).optional().describe("Maximum container height in pixels.")})]).and(wt([j({width:vt().describe("Fixed container width in pixels.")}),j({maxWidth:wt([vt(),_h()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
100
- container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:N().optional().describe("User's language and region preference in BCP 47 format."),timeZone:N().optional().describe("User's timezone in IANA format."),userAgent:N().optional().describe("Host application identifier."),platform:wt([R("web"),R("desktop"),R("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:j({touch:Gt().optional().describe("Whether the device supports touch input."),hover:Gt().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:j({top:vt().describe("Top safe area inset in pixels."),right:vt().describe("Right safe area inset in pixels."),bottom:vt().describe("Bottom safe area inset in pixels."),left:vt().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),lA=j({method:R("ui/notifications/host-context-changed"),params:j_.describe("Partial context update containing only changed fields.")});j({method:R("ui/update-model-context"),params:j({content:mt(cl).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:Yt(N(),It().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});j({method:R("ui/initialize"),params:j({appInfo:vc.describe("App identification (name and version)."),appCapabilities:iA.describe("Features and capabilities this app provides."),protocolVersion:N().describe("Protocol version this app supports.")})});var rA=j({protocolVersion:N().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:vc.describe("Host application identification and version."),hostCapabilities:nA.describe("Features and capabilities provided by the host."),hostContext:j_.describe("Rich context about the host environment.")}).passthrough();class cA extends qO{constructor(n,s={},o={autoResize:!0}){super(o);J(this,"_appInfo");J(this,"_capabilities");J(this,"options");J(this,"_hostCapabilities");J(this,"_hostInfo");J(this,"_hostContext");J(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=s,this.options=o,this.setRequestHandler(Sc,r=>(console.log("Received ping:",r.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(QO,s=>n(s.params))}set ontoolinputpartial(n){this.setNotificationHandler(JO,s=>n(s.params))}set ontoolresult(n){this.setNotificationHandler(oA,s=>n(s.params))}set ontoolcancelled(n){this.setNotificationHandler(KO,s=>n(s.params))}set onhostcontextchanged(n){this.setNotificationHandler(lA,s=>{this._hostContext={...this._hostContext,...s.params},n(s.params)})}set onteardown(n){this.setRequestHandler(eA,(s,o)=>n(s.params,o))}set oncalltool(n){this.setRequestHandler(N_,(s,o)=>n(s.params,o))}set onlisttools(n){this.setRequestHandler(C_,(s,o)=>n(s.params,o))}assertCapabilityForMethod(n){}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,s){if(typeof n=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${n}"). Did you mean: callServerTool({ name: "${n}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:n},xc,s)}async readServerResource(n,s){return await this.request({method:"resources/read",params:n},k_,s)}async listServerResources(n,s){return await this.request({method:"resources/list",params:n},E_,s)}sendMessage(n,s){return this.request({method:"ui/message",params:n},FO,s)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,s){return this.request({method:"ui/update-model-context",params:n},Jh,s)}openLink(n,s){return this.request({method:"ui/open-link",params:n},XO,s)}downloadFile(n,s){return this.request({method:"ui/download-file",params:n},GO,s)}requestTeardown(n={}){return this.notification({method:"ui/notifications/request-teardown",params:n})}requestDisplayMode(n,s){return this.request({method:"ui/request-display-mode",params:n},sA,s)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,s=0,o=0,r=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let f=document.documentElement,h=f.style.width,m=f.style.height;f.style.width="fit-content",f.style.height="max-content";let g=f.getBoundingClientRect();f.style.width=h,f.style.height=m;let b=window.innerWidth-f.clientWidth,_=Math.ceil(g.width+b),v=Math.ceil(g.height);(_!==s||v!==o)&&(s=_,o=v,this.sendSizeChanged({width:_,height:v}))}))};r();let c=new ResizeObserver(r);return c.observe(document.documentElement),c.observe(document.body),()=>c.disconnect()}async connect(n=new H_(window.parent,window.parent),s){var o;if(this.transport)throw Error("App is already connected. Call close() before connecting again.");await super.connect(n);try{let r=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:VO}},rA,s);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);this._hostCapabilities=r.hostCapabilities,this._hostInfo=r.hostInfo,this._hostContext=r.hostContext,await this.notification({method:"ui/notifications/initialized"}),(o=this.options)!=null&&o.autoResize&&this.setupSizeChangedNotifications()}catch(r){throw this.close(),r}}}function uA({appInfo:e,capabilities:t,onAppCreated:n}){let[s,o]=ne.useState(null),[r,c]=ne.useState(!1),[f,h]=ne.useState(null);return ne.useEffect(()=>{let m=!0;async function g(){try{let b=new H_(window.parent,window.parent),_=new cA(e,t);n==null||n(_),await _.connect(b),m&&(o(_),c(!0),h(null))}catch(b){m&&(o(null),c(!1),h(b instanceof Error?b:Error("Failed to connect")))}}return g(),()=>{m=!1}},[]),{app:s,isConnected:r,error:f}}var Wf={exports:{}},Mo={},th={exports:{}},eh={};/**
100
+ container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:N().optional().describe("User's language and region preference in BCP 47 format."),timeZone:N().optional().describe("User's timezone in IANA format."),userAgent:N().optional().describe("Host application identifier."),platform:wt([R("web"),R("desktop"),R("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:j({touch:Gt().optional().describe("Whether the device supports touch input."),hover:Gt().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:j({top:vt().describe("Top safe area inset in pixels."),right:vt().describe("Right safe area inset in pixels."),bottom:vt().describe("Bottom safe area inset in pixels."),left:vt().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),lA=j({method:R("ui/notifications/host-context-changed"),params:j_.describe("Partial context update containing only changed fields.")});j({method:R("ui/update-model-context"),params:j({content:mt(cl).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:Yt(N(),It().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});j({method:R("ui/initialize"),params:j({appInfo:vc.describe("App identification (name and version)."),appCapabilities:iA.describe("Features and capabilities this app provides."),protocolVersion:N().describe("Protocol version this app supports.")})});var rA=j({protocolVersion:N().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:vc.describe("Host application identification and version."),hostCapabilities:nA.describe("Features and capabilities provided by the host."),hostContext:j_.describe("Rich context about the host environment.")}).passthrough();class cA extends qO{constructor(n,s={},o={autoResize:!0}){super(o);J(this,"_appInfo");J(this,"_capabilities");J(this,"options");J(this,"_hostCapabilities");J(this,"_hostInfo");J(this,"_hostContext");J(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=s,this.options=o,this.setRequestHandler(Sc,r=>(console.log("Received ping:",r.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(QO,s=>n(s.params))}set ontoolinputpartial(n){this.setNotificationHandler(JO,s=>n(s.params))}set ontoolresult(n){this.setNotificationHandler(oA,s=>n(s.params))}set ontoolcancelled(n){this.setNotificationHandler(KO,s=>n(s.params))}set onhostcontextchanged(n){this.setNotificationHandler(lA,s=>{this._hostContext={...this._hostContext,...s.params},n(s.params)})}set onteardown(n){this.setRequestHandler(eA,(s,o)=>n(s.params,o))}set oncalltool(n){this.setRequestHandler(N_,(s,o)=>n(s.params,o))}set onlisttools(n){this.setRequestHandler(C_,(s,o)=>n(s.params,o))}assertCapabilityForMethod(n){}assertRequestHandlerCapability(n){switch(n){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${n})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${n} registered`)}}assertNotificationCapability(n){}assertTaskCapability(n){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(n){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(n,s){if(typeof n=="string")throw Error(`callServerTool() expects an object as its first argument, but received a string ("${n}"). Did you mean: callServerTool({ name: "${n}", arguments: { ... } })?`);return await this.request({method:"tools/call",params:n},xc,s)}async readServerResource(n,s){return await this.request({method:"resources/read",params:n},k_,s)}async listServerResources(n,s){return await this.request({method:"resources/list",params:n},E_,s)}sendMessage(n,s){return this.request({method:"ui/message",params:n},FO,s)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,s){return this.request({method:"ui/update-model-context",params:n},Jh,s)}openLink(n,s){return this.request({method:"ui/open-link",params:n},XO,s)}downloadFile(n,s){return this.request({method:"ui/download-file",params:n},GO,s)}requestTeardown(n={}){return this.notification({method:"ui/notifications/request-teardown",params:n})}requestDisplayMode(n,s){return this.request({method:"ui/request-display-mode",params:n},sA,s)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,s=0,o=0,r=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let f=document.documentElement,h=f.style.height;f.style.height="max-content";let m=Math.ceil(f.getBoundingClientRect().height);f.style.height=h;let g=Math.ceil(window.innerWidth);(g!==s||m!==o)&&(s=g,o=m,this.sendSizeChanged({width:g,height:m}))}))};r();let c=new ResizeObserver(r);return c.observe(document.documentElement),c.observe(document.body),()=>c.disconnect()}async connect(n=new H_(window.parent,window.parent),s){var o;if(this.transport)throw Error("App is already connected. Call close() before connecting again.");await super.connect(n);try{let r=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:VO}},rA,s);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);this._hostCapabilities=r.hostCapabilities,this._hostInfo=r.hostInfo,this._hostContext=r.hostContext,await this.notification({method:"ui/notifications/initialized"}),(o=this.options)!=null&&o.autoResize&&this.setupSizeChangedNotifications()}catch(r){throw this.close(),r}}}function uA({appInfo:e,capabilities:t,onAppCreated:n}){let[s,o]=ne.useState(null),[r,c]=ne.useState(!1),[f,h]=ne.useState(null);return ne.useEffect(()=>{let m=!0;async function g(){try{let b=new H_(window.parent,window.parent),_=new cA(e,t);n==null||n(_),await _.connect(b),m&&(o(_),c(!0),h(null))}catch(b){m&&(o(null),c(!1),h(b instanceof Error?b:Error("Failed to connect")))}}return g(),()=>{m=!1}},[]),{app:s,isConnected:r,error:f}}var Wf={exports:{}},Mo={},th={exports:{}},eh={};/**
101
101
  * @license React
102
102
  * scheduler.production.js
103
103
  *
package/dist/server.js CHANGED
@@ -147,22 +147,22 @@ var require_code = __commonJS((exports) => {
147
147
  i2++;
148
148
  }
149
149
  }
150
- function mergeExprItems(a2, b) {
151
- if (b === '""')
150
+ function mergeExprItems(a2, b2) {
151
+ if (b2 === '""')
152
152
  return a2;
153
153
  if (a2 === '""')
154
- return b;
154
+ return b2;
155
155
  if (typeof a2 == "string") {
156
- if (b instanceof Name || a2[a2.length - 1] !== '"')
156
+ if (b2 instanceof Name || a2[a2.length - 1] !== '"')
157
157
  return;
158
- if (typeof b != "string")
159
- return `${a2.slice(0, -1)}${b}"`;
160
- if (b[0] === '"')
161
- return a2.slice(0, -1) + b.slice(1);
158
+ if (typeof b2 != "string")
159
+ return `${a2.slice(0, -1)}${b2}"`;
160
+ if (b2[0] === '"')
161
+ return a2.slice(0, -1) + b2.slice(1);
162
162
  return;
163
163
  }
164
- if (typeof b == "string" && b[0] === '"' && !(a2 instanceof Name))
165
- return `"${a2}${b.slice(1)}`;
164
+ if (typeof b2 == "string" && b2[0] === '"' && !(a2 instanceof Name))
165
+ return `"${a2}${b2.slice(1)}`;
166
166
  return;
167
167
  }
168
168
  function strConcat(c1, c2) {
@@ -527,17 +527,17 @@ var require_codegen = __commonJS((exports) => {
527
527
  this.nodes = nodes;
528
528
  }
529
529
  render(opts) {
530
- return this.nodes.reduce((code, n) => code + n.render(opts), "");
530
+ return this.nodes.reduce((code, n2) => code + n2.render(opts), "");
531
531
  }
532
532
  optimizeNodes() {
533
533
  const { nodes } = this;
534
534
  let i2 = nodes.length;
535
535
  while (i2--) {
536
- const n = nodes[i2].optimizeNodes();
537
- if (Array.isArray(n))
538
- nodes.splice(i2, 1, ...n);
539
- else if (n)
540
- nodes[i2] = n;
536
+ const n2 = nodes[i2].optimizeNodes();
537
+ if (Array.isArray(n2))
538
+ nodes.splice(i2, 1, ...n2);
539
+ else if (n2)
540
+ nodes[i2] = n2;
541
541
  else
542
542
  nodes.splice(i2, 1);
543
543
  }
@@ -547,16 +547,16 @@ var require_codegen = __commonJS((exports) => {
547
547
  const { nodes } = this;
548
548
  let i2 = nodes.length;
549
549
  while (i2--) {
550
- const n = nodes[i2];
551
- if (n.optimizeNames(names, constants))
550
+ const n2 = nodes[i2];
551
+ if (n2.optimizeNames(names, constants))
552
552
  continue;
553
- subtractNames(names, n.names);
553
+ subtractNames(names, n2.names);
554
554
  nodes.splice(i2, 1);
555
555
  }
556
556
  return nodes.length > 0 ? this : undefined;
557
557
  }
558
558
  get names() {
559
- return this.nodes.reduce((names, n) => addNames(names, n.names), {});
559
+ return this.nodes.reduce((names, n2) => addNames(names, n2.names), {});
560
560
  }
561
561
  }
562
562
 
@@ -951,8 +951,8 @@ var require_codegen = __commonJS((exports) => {
951
951
  endFunc() {
952
952
  return this._endBlockNode(Func);
953
953
  }
954
- optimize(n = 1) {
955
- while (n-- > 0) {
954
+ optimize(n2 = 1) {
955
+ while (n2-- > 0) {
956
956
  this._root.optimizeNodes();
957
957
  this._root.optimizeNames(this._root.names, this._constants);
958
958
  }
@@ -966,19 +966,19 @@ var require_codegen = __commonJS((exports) => {
966
966
  this._nodes.push(node);
967
967
  }
968
968
  _endBlockNode(N1, N2) {
969
- const n = this._currNode;
970
- if (n instanceof N1 || N2 && n instanceof N2) {
969
+ const n2 = this._currNode;
970
+ if (n2 instanceof N1 || N2 && n2 instanceof N2) {
971
971
  this._nodes.pop();
972
972
  return this;
973
973
  }
974
974
  throw new Error(`CodeGen: not in block "${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}"`);
975
975
  }
976
976
  _elseNode(node) {
977
- const n = this._currNode;
978
- if (!(n instanceof If)) {
977
+ const n2 = this._currNode;
978
+ if (!(n2 instanceof If)) {
979
979
  throw new Error('CodeGen: "else" without "if"');
980
980
  }
981
- this._currNode = n.else = node;
981
+ this._currNode = n2.else = node;
982
982
  return this;
983
983
  }
984
984
  get _root() {
@@ -995,8 +995,8 @@ var require_codegen = __commonJS((exports) => {
995
995
  }
996
996
  exports.CodeGen = CodeGen;
997
997
  function addNames(names, from) {
998
- for (const n in from)
999
- names[n] = (names[n] || 0) + (from[n] || 0);
998
+ for (const n2 in from)
999
+ names[n2] = (names[n2] || 0) + (from[n2] || 0);
1000
1000
  return names;
1001
1001
  }
1002
1002
  function addExprNames(names, from) {
@@ -1016,11 +1016,11 @@ var require_codegen = __commonJS((exports) => {
1016
1016
  items.push(c);
1017
1017
  return items;
1018
1018
  }, []));
1019
- function replaceName(n) {
1020
- const c = constants[n.str];
1021
- if (c === undefined || names[n.str] !== 1)
1022
- return n;
1023
- delete names[n.str];
1019
+ function replaceName(n2) {
1020
+ const c = constants[n2.str];
1021
+ if (c === undefined || names[n2.str] !== 1)
1022
+ return n2;
1023
+ delete names[n2.str];
1024
1024
  return c;
1025
1025
  }
1026
1026
  function canOptimize(e2) {
@@ -1028,8 +1028,8 @@ var require_codegen = __commonJS((exports) => {
1028
1028
  }
1029
1029
  }
1030
1030
  function subtractNames(names, from) {
1031
- for (const n in from)
1032
- names[n] = (names[n] || 0) - (from[n] || 0);
1031
+ for (const n2 in from)
1032
+ names[n2] = (names[n2] || 0) - (from[n2] || 0);
1033
1033
  }
1034
1034
  function not(x) {
1035
1035
  return typeof x == "boolean" || typeof x == "number" || x === null ? !x : (0, code_1._)`!${par(x)}`;
@@ -1182,7 +1182,7 @@ var require_util = __commonJS((exports) => {
1182
1182
  }
1183
1183
  exports.evaluatedPropsToName = evaluatedPropsToName;
1184
1184
  function setEvaluated(gen, props, ps) {
1185
- Object.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));
1185
+ Object.keys(ps).forEach((p2) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p2)}`, true));
1186
1186
  }
1187
1187
  exports.setEvaluated = setEvaluated;
1188
1188
  var snippets = {};
@@ -1718,11 +1718,11 @@ var require_code2 = __commonJS((exports) => {
1718
1718
  }
1719
1719
  exports.noPropertyInData = noPropertyInData;
1720
1720
  function allSchemaProperties(schemaMap) {
1721
- return schemaMap ? Object.keys(schemaMap).filter((p) => p !== "__proto__") : [];
1721
+ return schemaMap ? Object.keys(schemaMap).filter((p2) => p2 !== "__proto__") : [];
1722
1722
  }
1723
1723
  exports.allSchemaProperties = allSchemaProperties;
1724
1724
  function schemaProperties(it, schemaMap) {
1725
- return allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));
1725
+ return allSchemaProperties(schemaMap).filter((p2) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p2]));
1726
1726
  }
1727
1727
  exports.schemaProperties = schemaProperties;
1728
1728
  function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {
@@ -1741,13 +1741,13 @@ var require_code2 = __commonJS((exports) => {
1741
1741
  exports.callValidateCode = callValidateCode;
1742
1742
  var newRegExp = (0, codegen_1._)`new RegExp`;
1743
1743
  function usePattern({ gen, it: { opts } }, pattern) {
1744
- const u2 = opts.unicodeRegExp ? "u" : "";
1744
+ const u = opts.unicodeRegExp ? "u" : "";
1745
1745
  const { regExp } = opts.code;
1746
- const rx = regExp(pattern, u2);
1746
+ const rx = regExp(pattern, u);
1747
1747
  return gen.scopeValue("pattern", {
1748
1748
  key: rx.toString(),
1749
1749
  ref: rx,
1750
- code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u2})`
1750
+ code: (0, codegen_1._)`${regExp.code === "new RegExp" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`
1751
1751
  });
1752
1752
  }
1753
1753
  exports.usePattern = usePattern;
@@ -1997,43 +1997,43 @@ var require_subschema = __commonJS((exports) => {
1997
1997
 
1998
1998
  // ../../node_modules/fast-deep-equal/index.js
1999
1999
  var require_fast_deep_equal = __commonJS((exports, module) => {
2000
- module.exports = function equal(a2, b) {
2001
- if (a2 === b)
2000
+ module.exports = function equal(a2, b2) {
2001
+ if (a2 === b2)
2002
2002
  return true;
2003
- if (a2 && b && typeof a2 == "object" && typeof b == "object") {
2004
- if (a2.constructor !== b.constructor)
2003
+ if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
2004
+ if (a2.constructor !== b2.constructor)
2005
2005
  return false;
2006
2006
  var length, i2, keys;
2007
2007
  if (Array.isArray(a2)) {
2008
2008
  length = a2.length;
2009
- if (length != b.length)
2009
+ if (length != b2.length)
2010
2010
  return false;
2011
2011
  for (i2 = length;i2-- !== 0; )
2012
- if (!equal(a2[i2], b[i2]))
2012
+ if (!equal(a2[i2], b2[i2]))
2013
2013
  return false;
2014
2014
  return true;
2015
2015
  }
2016
2016
  if (a2.constructor === RegExp)
2017
- return a2.source === b.source && a2.flags === b.flags;
2017
+ return a2.source === b2.source && a2.flags === b2.flags;
2018
2018
  if (a2.valueOf !== Object.prototype.valueOf)
2019
- return a2.valueOf() === b.valueOf();
2019
+ return a2.valueOf() === b2.valueOf();
2020
2020
  if (a2.toString !== Object.prototype.toString)
2021
- return a2.toString() === b.toString();
2021
+ return a2.toString() === b2.toString();
2022
2022
  keys = Object.keys(a2);
2023
2023
  length = keys.length;
2024
- if (length !== Object.keys(b).length)
2024
+ if (length !== Object.keys(b2).length)
2025
2025
  return false;
2026
2026
  for (i2 = length;i2-- !== 0; )
2027
- if (!Object.prototype.hasOwnProperty.call(b, keys[i2]))
2027
+ if (!Object.prototype.hasOwnProperty.call(b2, keys[i2]))
2028
2028
  return false;
2029
2029
  for (i2 = length;i2-- !== 0; ) {
2030
2030
  var key = keys[i2];
2031
- if (!equal(a2[key], b[key]))
2031
+ if (!equal(a2[key], b2[key]))
2032
2032
  return false;
2033
2033
  }
2034
2034
  return true;
2035
2035
  }
2036
- return a2 !== a2 && b !== b;
2036
+ return a2 !== a2 && b2 !== b2;
2037
2037
  };
2038
2038
  });
2039
2039
 
@@ -2193,12 +2193,12 @@ var require_resolve = __commonJS((exports) => {
2193
2193
  function getFullPath(resolver, id = "", normalize) {
2194
2194
  if (normalize !== false)
2195
2195
  id = normalizeId(id);
2196
- const p = resolver.parse(id);
2197
- return _getFullPath(resolver, p);
2196
+ const p2 = resolver.parse(id);
2197
+ return _getFullPath(resolver, p2);
2198
2198
  }
2199
2199
  exports.getFullPath = getFullPath;
2200
- function _getFullPath(resolver, p) {
2201
- const serialized = resolver.serialize(p);
2200
+ function _getFullPath(resolver, p2) {
2201
+ const serialized = resolver.serialize(p2);
2202
2202
  return serialized.split("#")[0] + "#";
2203
2203
  }
2204
2204
  exports._getFullPath = _getFullPath;
@@ -2963,11 +2963,11 @@ var require_compile = __commonJS((exports) => {
2963
2963
  return sch || this.schemas[ref] || resolveSchema.call(this, root, ref);
2964
2964
  }
2965
2965
  function resolveSchema(root, ref) {
2966
- const p = this.opts.uriResolver.parse(ref);
2967
- const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);
2966
+ const p2 = this.opts.uriResolver.parse(ref);
2967
+ const refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p2);
2968
2968
  let baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, undefined);
2969
2969
  if (Object.keys(root.schema).length > 0 && refPath === baseId) {
2970
- return getJsonPointer.call(this, p, root);
2970
+ return getJsonPointer.call(this, p2, root);
2971
2971
  }
2972
2972
  const id = (0, resolve_1.normalizeId)(refPath);
2973
2973
  const schOrRef = this.refs[id] || this.schemas[id];
@@ -2975,7 +2975,7 @@ var require_compile = __commonJS((exports) => {
2975
2975
  const sch = resolveSchema.call(this, root, schOrRef);
2976
2976
  if (typeof (sch === null || sch === undefined ? undefined : sch.schema) !== "object")
2977
2977
  return;
2978
- return getJsonPointer.call(this, p, sch);
2978
+ return getJsonPointer.call(this, p2, sch);
2979
2979
  }
2980
2980
  if (typeof (schOrRef === null || schOrRef === undefined ? undefined : schOrRef.schema) !== "object")
2981
2981
  return;
@@ -2989,7 +2989,7 @@ var require_compile = __commonJS((exports) => {
2989
2989
  baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);
2990
2990
  return new SchemaEnv({ schema, schemaId, root, baseId });
2991
2991
  }
2992
- return getJsonPointer.call(this, p, schOrRef);
2992
+ return getJsonPointer.call(this, p2, schOrRef);
2993
2993
  }
2994
2994
  exports.resolveSchema = resolveSchema;
2995
2995
  var PREVENT_SCOPE_CHANGE = new Set([
@@ -3888,17 +3888,17 @@ var require_core = __commonJS((exports) => {
3888
3888
  return this.opts.defaultMeta = typeof meta3 == "object" ? meta3[schemaId] || meta3 : undefined;
3889
3889
  }
3890
3890
  validate(schemaKeyRef, data) {
3891
- let v2;
3891
+ let v;
3892
3892
  if (typeof schemaKeyRef == "string") {
3893
- v2 = this.getSchema(schemaKeyRef);
3894
- if (!v2)
3893
+ v = this.getSchema(schemaKeyRef);
3894
+ if (!v)
3895
3895
  throw new Error(`no schema with key or ref "${schemaKeyRef}"`);
3896
3896
  } else {
3897
- v2 = this.compile(schemaKeyRef);
3897
+ v = this.compile(schemaKeyRef);
3898
3898
  }
3899
- const valid = v2(data);
3900
- if (!("$async" in v2))
3901
- this.errors = v2.errors;
3899
+ const valid = v(data);
3900
+ if (!("$async" in v))
3901
+ this.errors = v.errors;
3902
3902
  return valid;
3903
3903
  }
3904
3904
  compile(schema, _meta) {
@@ -3945,9 +3945,9 @@ var require_core = __commonJS((exports) => {
3945
3945
  this.addSchema(_schema, ref, meta3);
3946
3946
  }
3947
3947
  async function _loadSchema(ref) {
3948
- const p = this._loading[ref];
3949
- if (p)
3950
- return p;
3948
+ const p2 = this._loading[ref];
3949
+ if (p2)
3950
+ return p2;
3951
3951
  try {
3952
3952
  return await (this._loading[ref] = loadSchema(ref));
3953
3953
  } finally {
@@ -4370,8 +4370,8 @@ var require_ref = __commonJS((exports) => {
4370
4370
  return callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);
4371
4371
  }
4372
4372
  function callValidate(sch) {
4373
- const v2 = getValidate(cxt, sch);
4374
- callRef(cxt, v2, sch, sch.$async);
4373
+ const v = getValidate(cxt, sch);
4374
+ callRef(cxt, v, sch, sch.$async);
4375
4375
  }
4376
4376
  function inlineRefSchema(sch) {
4377
4377
  const schName = gen.scopeValue("schema", opts.code.source === true ? { ref: sch, code: (0, codegen_1.stringify)(sch) } : { ref: sch });
@@ -4393,7 +4393,7 @@ var require_ref = __commonJS((exports) => {
4393
4393
  return sch.validate ? gen.scopeValue("validate", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue("wrapper", { ref: sch })}.validate`;
4394
4394
  }
4395
4395
  exports.getValidate = getValidate;
4396
- function callRef(cxt, v2, sch, $async) {
4396
+ function callRef(cxt, v, sch, $async) {
4397
4397
  const { gen, it } = cxt;
4398
4398
  const { allErrors, schemaEnv: env, opts } = it;
4399
4399
  const passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;
@@ -4406,8 +4406,8 @@ var require_ref = __commonJS((exports) => {
4406
4406
  throw new Error("async schema referenced by sync schema");
4407
4407
  const valid = gen.let("valid");
4408
4408
  gen.try(() => {
4409
- gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v2, passCxt)}`);
4410
- addEvaluatedFrom(v2);
4409
+ gen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);
4410
+ addEvaluatedFrom(v);
4411
4411
  if (!allErrors)
4412
4412
  gen.assign(valid, true);
4413
4413
  }, (e2) => {
@@ -4419,7 +4419,7 @@ var require_ref = __commonJS((exports) => {
4419
4419
  cxt.ok(valid);
4420
4420
  }
4421
4421
  function callSyncRef() {
4422
- cxt.result((0, code_1.callValidateCode)(cxt, v2, passCxt), () => addEvaluatedFrom(v2), () => addErrorsFrom(v2));
4422
+ cxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));
4423
4423
  }
4424
4424
  function addErrorsFrom(source) {
4425
4425
  const errs = (0, codegen_1._)`${source}.errors`;
@@ -4598,8 +4598,8 @@ var require_pattern = __commonJS((exports) => {
4598
4598
  error: error48,
4599
4599
  code(cxt) {
4600
4600
  const { data, $data, schema, schemaCode, it } = cxt;
4601
- const u2 = it.opts.unicodeRegExp ? "u" : "";
4602
- const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u2}))` : (0, code_1.usePattern)(cxt, schema);
4601
+ const u = it.opts.unicodeRegExp ? "u" : "";
4602
+ const regExp = $data ? (0, codegen_1._)`(new RegExp(${schemaCode}, ${u}))` : (0, code_1.usePattern)(cxt, schema);
4603
4603
  cxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);
4604
4604
  }
4605
4605
  };
@@ -4870,7 +4870,7 @@ var require_enum = __commonJS((exports) => {
4870
4870
  cxt.pass(valid);
4871
4871
  function loopEnum() {
4872
4872
  gen.assign(valid, false);
4873
- gen.forOf("v", schemaCode, (v2) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v2})`, () => gen.assign(valid, true).break()));
4873
+ gen.forOf("v", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));
4874
4874
  }
4875
4875
  function equalCode(vSchema, i2) {
4876
4876
  const sch = schema[i2];
@@ -5321,12 +5321,12 @@ var require_additionalProperties = __commonJS((exports) => {
5321
5321
  const propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, "properties");
5322
5322
  definedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);
5323
5323
  } else if (props.length) {
5324
- definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));
5324
+ definedProp = (0, codegen_1.or)(...props.map((p2) => (0, codegen_1._)`${key} === ${p2}`));
5325
5325
  } else {
5326
5326
  definedProp = codegen_1.nil;
5327
5327
  }
5328
5328
  if (patProps.length) {
5329
- definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));
5329
+ definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p2) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p2)}.test(${key})`));
5330
5330
  }
5331
5331
  return (0, codegen_1.not)(definedProp);
5332
5332
  }
@@ -5403,7 +5403,7 @@ var require_properties = __commonJS((exports) => {
5403
5403
  if (it.opts.unevaluated && allProps.length && it.props !== true) {
5404
5404
  it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);
5405
5405
  }
5406
- const properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));
5406
+ const properties = allProps.filter((p2) => !(0, util_1.alwaysValidSchema)(it, schema[p2]));
5407
5407
  if (properties.length === 0)
5408
5408
  return;
5409
5409
  const valid = gen.name("valid");
@@ -5450,7 +5450,7 @@ var require_patternProperties = __commonJS((exports) => {
5450
5450
  const { gen, schema, data, parentSchema, it } = cxt;
5451
5451
  const { opts } = it;
5452
5452
  const patterns = (0, code_1.allSchemaProperties)(schema);
5453
- const alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));
5453
+ const alwaysValidPatterns = patterns.filter((p2) => (0, util_1.alwaysValidSchema)(it, schema[p2]));
5454
5454
  if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
5455
5455
  return;
5456
5456
  }
@@ -6167,7 +6167,7 @@ var require_ajv = __commonJS((exports, module) => {
6167
6167
  class Ajv extends core_1.default {
6168
6168
  _addVocabularies() {
6169
6169
  super._addVocabularies();
6170
- draft7_1.default.forEach((v2) => this.addVocabulary(v2));
6170
+ draft7_1.default.forEach((v) => this.addVocabulary(v));
6171
6171
  if (this.opts.discriminator)
6172
6172
  this.addKeyword(discriminator_1.default);
6173
6173
  }
@@ -26984,8 +26984,8 @@ function mergeCapabilities(base, additional) {
26984
26984
  }
26985
26985
 
26986
26986
  // ../../node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js
26987
- var F = "2026-01-26";
26988
- var z2 = "ui/notifications/tool-input-partial";
26987
+ var Y = "2026-01-26";
26988
+ var F = "ui/notifications/tool-input-partial";
26989
26989
 
26990
26990
  class j {
26991
26991
  eventTarget;
@@ -27012,7 +27012,7 @@ class j {
27012
27012
  window.addEventListener("message", this.messageListener);
27013
27013
  }
27014
27014
  async send(Z, $) {
27015
- if (Z.method !== z2)
27015
+ if (Z.method !== F)
27016
27016
  console.debug("Sending message", Z);
27017
27017
  this.eventTarget.postMessage(Z, "*");
27018
27018
  }
@@ -27025,10 +27025,10 @@ class j {
27025
27025
  sessionId;
27026
27026
  setProtocolVersion;
27027
27027
  }
27028
- var g = exports_external.union([exports_external.literal("light"), exports_external.literal("dark")]).describe("Color theme preference for the host environment.");
27028
+ var M = exports_external.union([exports_external.literal("light"), exports_external.literal("dark")]).describe("Color theme preference for the host environment.");
27029
27029
  var G = exports_external.union([exports_external.literal("inline"), exports_external.literal("fullscreen"), exports_external.literal("pip")]).describe("Display mode for UI presentation.");
27030
- 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.");
27031
- var o = exports_external.record(i.describe(`Style variables for theming MCP apps.
27030
+ var p = 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.");
27031
+ var r = exports_external.record(p.describe(`Style variables for theming MCP apps.
27032
27032
 
27033
27033
  Individual style keys are optional - hosts may provide any subset of these values.
27034
27034
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -27047,30 +27047,30 @@ Values are strings containing CSS values (colors, sizes, font stacks, etc.).
27047
27047
 
27048
27048
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
27049
27049
  for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);
27050
- var a = exports_external.object({ method: exports_external.literal("ui/open-link"), params: exports_external.object({ url: exports_external.string().describe("URL to open in the host's browser") }) });
27051
- var O = exports_external.object({ isError: exports_external.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough();
27052
- var I = exports_external.object({ isError: exports_external.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough();
27053
- var w = exports_external.object({ isError: exports_external.boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough();
27054
- var s = exports_external.object({ method: exports_external.literal("ui/notifications/sandbox-proxy-ready"), params: exports_external.object({}) });
27050
+ var n = exports_external.object({ method: exports_external.literal("ui/open-link"), params: exports_external.object({ url: exports_external.string().describe("URL to open in the host's browser") }) });
27051
+ var q = exports_external.object({ isError: exports_external.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough();
27052
+ var O = exports_external.object({ isError: exports_external.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough();
27053
+ var I = exports_external.object({ isError: exports_external.boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough();
27054
+ var i = exports_external.object({ method: exports_external.literal("ui/notifications/sandbox-proxy-ready"), params: exports_external.object({}) });
27055
27055
  var B = exports_external.object({ connectDomains: exports_external.array(exports_external.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
27056
27056
 
27057
27057
  - Maps to CSP \`connect-src\` directive
27058
27058
  - Empty or omitted → no network connections (secure default)`), resourceDomains: exports_external.array(exports_external.string()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"), frameDomains: exports_external.array(exports_external.string()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"), baseUriDomains: exports_external.array(exports_external.string()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)") });
27059
27059
  var K = exports_external.object({ camera: exports_external.object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."), microphone: exports_external.object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."), geolocation: exports_external.object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."), clipboardWrite: exports_external.object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.") });
27060
- var t = exports_external.object({ method: exports_external.literal("ui/notifications/size-changed"), params: exports_external.object({ width: exports_external.number().optional().describe("New width in pixels."), height: exports_external.number().optional().describe("New height in pixels.") }) });
27061
- 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.") }) });
27062
- 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).") }) });
27063
- 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").') }) });
27064
- var S = exports_external.object({ fonts: exports_external.string().optional() });
27065
- 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.") });
27066
- var _ = exports_external.object({ method: exports_external.literal("ui/resource-teardown"), params: exports_external.object({}) });
27067
- var e = exports_external.record(exports_external.string(), exports_external.unknown());
27068
- 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.") });
27069
- var QQ = exports_external.object({ method: exports_external.literal("ui/notifications/request-teardown"), params: exports_external.object({}).optional() });
27070
- 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.") });
27071
- 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.") });
27072
- var ZQ = exports_external.object({ method: exports_external.literal("ui/notifications/initialized"), params: exports_external.object({}).optional() });
27073
- 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.
27060
+ var o = exports_external.object({ method: exports_external.literal("ui/notifications/size-changed"), params: exports_external.object({ width: exports_external.number().optional().describe("New width in pixels."), height: exports_external.number().optional().describe("New height in pixels.") }) });
27061
+ var w = 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.") }) });
27062
+ var A = 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).") }) });
27063
+ var P = 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").') }) });
27064
+ var b = exports_external.object({ fonts: exports_external.string().optional() });
27065
+ var g = exports_external.object({ variables: r.optional().describe("CSS variables for theming the app."), css: b.optional().describe("CSS blocks that apps can inject.") });
27066
+ var H = exports_external.object({ method: exports_external.literal("ui/resource-teardown"), params: exports_external.object({}) });
27067
+ var a = exports_external.record(exports_external.string(), exports_external.unknown());
27068
+ var z2 = 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.") });
27069
+ var s = exports_external.object({ method: exports_external.literal("ui/notifications/request-teardown"), params: exports_external.object({}).optional() });
27070
+ var S = 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: z2.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."), message: z2.optional().describe("Host supports receiving content messages (ui/message) from the view.") });
27071
+ var y = 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.") });
27072
+ var t = exports_external.object({ method: exports_external.literal("ui/notifications/initialized"), params: exports_external.object({}).optional() });
27073
+ var e = 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.
27074
27074
 
27075
27075
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
27076
27076
 
@@ -27085,27 +27085,27 @@ Boolean requesting whether a visible border and background is provided by the ho
27085
27085
  - \`true\`: request visible border + background
27086
27086
  - \`false\`: request no visible border + background
27087
27087
  - omitted: host decides border`) });
27088
- 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.") }) });
27089
- var T = exports_external.object({ mode: G.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
27090
- var u = exports_external.union([exports_external.literal("model"), exports_external.literal("app")]).describe("Tool visibility scope - who can access the tool.");
27091
- 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"]
27088
+ var QQ = exports_external.object({ method: exports_external.literal("ui/request-display-mode"), params: exports_external.object({ mode: G.describe("The display mode being requested.") }) });
27089
+ var _ = exports_external.object({ mode: G.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
27090
+ var C = exports_external.union([exports_external.literal("model"), exports_external.literal("app")]).describe("Tool visibility scope - who can access the tool.");
27091
+ var ZQ = exports_external.object({ resourceUri: exports_external.string().optional(), visibility: exports_external.array(C).optional().describe(`Who can access this tool. Default: ["model", "app"]
27092
27092
  - "model": Tool visible to and callable by the agent
27093
27093
  - "app": Tool callable by the app from this server only`) });
27094
- 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.') });
27095
- 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.") }) });
27096
- 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.).") }) });
27097
- 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.") }) });
27098
- var E = exports_external.object({ method: exports_external.literal("ui/notifications/tool-result"), params: CallToolResultSchema.describe("Standard MCP tool execution result.") });
27099
- 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
27094
+ var TQ = 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.') });
27095
+ var $Q = 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.") }) });
27096
+ var JQ = 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.).") }) });
27097
+ var XQ = 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.") }) });
27098
+ var T = exports_external.object({ method: exports_external.literal("ui/notifications/tool-result"), params: CallToolResultSchema.describe("Standard MCP tool execution result.") });
27099
+ var E = 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: M.optional().describe("Current color theme preference."), styles: g.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
27100
27100
  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();
27101
- var R = exports_external.object({ method: exports_external.literal("ui/notifications/host-context-changed"), params: k.describe("Partial context update containing only changed fields.") });
27102
- 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.") }) });
27103
- 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.") }) });
27104
- 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();
27105
- var v = "ui/resourceUri";
27106
- var d = "text/html;profile=mcp-app";
27101
+ var k = exports_external.object({ method: exports_external.literal("ui/notifications/host-context-changed"), params: E.describe("Partial context update containing only changed fields.") });
27102
+ var VQ = 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.") }) });
27103
+ var WQ = exports_external.object({ method: exports_external.literal("ui/initialize"), params: exports_external.object({ appInfo: ImplementationSchema.describe("App identification (name and version)."), appCapabilities: y.describe("Features and capabilities this app provides."), protocolVersion: exports_external.string().describe("Protocol version this app supports.") }) });
27104
+ 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: S.describe("Features and capabilities provided by the host."), hostContext: E.describe("Rich context about the host environment.") }).passthrough();
27105
+ var U = "ui/resourceUri";
27106
+ var f = "text/html;profile=mcp-app";
27107
27107
 
27108
- class OQ extends Protocol {
27108
+ class FQ extends Protocol {
27109
27109
  _appInfo;
27110
27110
  _capabilities;
27111
27111
  options;
@@ -27131,24 +27131,24 @@ class OQ extends Protocol {
27131
27131
  return this._hostContext;
27132
27132
  }
27133
27133
  set ontoolinput(Z) {
27134
- this.setNotificationHandler(A, ($) => Z($.params));
27134
+ this.setNotificationHandler(w, ($) => Z($.params));
27135
27135
  }
27136
27136
  set ontoolinputpartial(Z) {
27137
- this.setNotificationHandler(P, ($) => Z($.params));
27137
+ this.setNotificationHandler(A, ($) => Z($.params));
27138
27138
  }
27139
27139
  set ontoolresult(Z) {
27140
- this.setNotificationHandler(E, ($) => Z($.params));
27140
+ this.setNotificationHandler(T, ($) => Z($.params));
27141
27141
  }
27142
27142
  set ontoolcancelled(Z) {
27143
- this.setNotificationHandler(H, ($) => Z($.params));
27143
+ this.setNotificationHandler(P, ($) => Z($.params));
27144
27144
  }
27145
27145
  set onhostcontextchanged(Z) {
27146
- this.setNotificationHandler(R, ($) => {
27146
+ this.setNotificationHandler(k, ($) => {
27147
27147
  this._hostContext = { ...this._hostContext, ...$.params }, Z($.params);
27148
27148
  });
27149
27149
  }
27150
27150
  set onteardown(Z) {
27151
- this.setRequestHandler(_, ($, J) => Z($.params, J));
27151
+ this.setRequestHandler(H, ($, J) => Z($.params, J));
27152
27152
  }
27153
27153
  set oncalltool(Z) {
27154
27154
  this.setRequestHandler(CallToolRequestSchema, ($, J) => Z($.params, J));
@@ -27190,7 +27190,7 @@ class OQ extends Protocol {
27190
27190
  return await this.request({ method: "resources/list", params: Z }, ListResourcesResultSchema, $);
27191
27191
  }
27192
27192
  sendMessage(Z, $) {
27193
- return this.request({ method: "ui/message", params: Z }, w, $);
27193
+ return this.request({ method: "ui/message", params: Z }, I, $);
27194
27194
  }
27195
27195
  sendLog(Z) {
27196
27196
  return this.notification({ method: "notifications/message", params: Z });
@@ -27199,17 +27199,17 @@ class OQ extends Protocol {
27199
27199
  return this.request({ method: "ui/update-model-context", params: Z }, EmptyResultSchema, $);
27200
27200
  }
27201
27201
  openLink(Z, $) {
27202
- return this.request({ method: "ui/open-link", params: Z }, O, $);
27202
+ return this.request({ method: "ui/open-link", params: Z }, q, $);
27203
27203
  }
27204
27204
  sendOpenLink = this.openLink;
27205
27205
  downloadFile(Z, $) {
27206
- return this.request({ method: "ui/download-file", params: Z }, I, $);
27206
+ return this.request({ method: "ui/download-file", params: Z }, O, $);
27207
27207
  }
27208
27208
  requestTeardown(Z = {}) {
27209
27209
  return this.notification({ method: "ui/notifications/request-teardown", params: Z });
27210
27210
  }
27211
27211
  requestDisplayMode(Z, $) {
27212
- return this.request({ method: "ui/request-display-mode", params: Z }, T, $);
27212
+ return this.request({ method: "ui/request-display-mode", params: Z }, _, $);
27213
27213
  }
27214
27214
  sendSizeChanged(Z) {
27215
27215
  return this.notification({ method: "ui/notifications/size-changed", params: Z });
@@ -27220,25 +27220,25 @@ class OQ extends Protocol {
27220
27220
  return;
27221
27221
  Z = true, requestAnimationFrame(() => {
27222
27222
  Z = false;
27223
- let V = document.documentElement, L = V.style.width, W = V.style.height;
27224
- V.style.width = "fit-content", V.style.height = "max-content";
27225
- let x = V.getBoundingClientRect();
27226
- V.style.width = L, V.style.height = W;
27227
- let h = window.innerWidth - V.clientWidth, N = Math.ceil(x.width + h), Y = Math.ceil(x.height);
27228
- if (N !== $ || Y !== J)
27229
- $ = N, J = Y, this.sendSizeChanged({ width: N, height: Y });
27223
+ let W = document.documentElement, L = W.style.height;
27224
+ W.style.height = "max-content";
27225
+ let D = Math.ceil(W.getBoundingClientRect().height);
27226
+ W.style.height = L;
27227
+ let N = Math.ceil(window.innerWidth);
27228
+ if (N !== $ || D !== J)
27229
+ $ = N, J = D, this.sendSizeChanged({ width: N, height: D });
27230
27230
  });
27231
27231
  };
27232
27232
  X();
27233
- let D = new ResizeObserver(X);
27234
- return D.observe(document.documentElement), D.observe(document.body), () => D.disconnect();
27233
+ let V = new ResizeObserver(X);
27234
+ return V.observe(document.documentElement), V.observe(document.body), () => V.disconnect();
27235
27235
  }
27236
27236
  async connect(Z = new j(window.parent, window.parent), $) {
27237
27237
  if (this.transport)
27238
27238
  throw Error("App is already connected. Call close() before connecting again.");
27239
27239
  await super.connect(Z);
27240
27240
  try {
27241
- let J = await this.request({ method: "ui/initialize", params: { appCapabilities: this._capabilities, appInfo: this._appInfo, protocolVersion: F } }, U, $);
27241
+ let J = await this.request({ method: "ui/initialize", params: { appCapabilities: this._capabilities, appInfo: this._appInfo, protocolVersion: Y } }, R, $);
27242
27242
  if (J === undefined)
27243
27243
  throw Error(`Server sent invalid initialize result: ${J}`);
27244
27244
  if (this._hostCapabilities = J.hostCapabilities, this._hostInfo = J.hostInfo, this._hostContext = J.hostContext, await this.notification({ method: "ui/notifications/initialized" }), this.options?.autoResize)
@@ -27248,16 +27248,16 @@ class OQ extends Protocol {
27248
27248
  }
27249
27249
  }
27250
27250
  }
27251
- function hZ(Z, $, J, X) {
27252
- let D = J._meta, V = D.ui, L = D[v], W = D;
27253
- if (V?.resourceUri && !L)
27254
- W = { ...D, [v]: V.resourceUri };
27255
- else if (L && !V?.resourceUri)
27256
- W = { ...D, ui: { ...V, resourceUri: L } };
27257
- return Z.registerTool($, { ...J, _meta: W }, X);
27251
+ function fZ(Z, $, J, X) {
27252
+ let V = J._meta, W = V.ui, L = V[U], D = V;
27253
+ if (W?.resourceUri && !L)
27254
+ D = { ...V, [U]: W.resourceUri };
27255
+ else if (L && !W?.resourceUri)
27256
+ D = { ...V, ui: { ...W, resourceUri: L } };
27257
+ return Z.registerTool($, { ...J, _meta: D }, X);
27258
27258
  }
27259
- function mZ(Z, $, J, X, D) {
27260
- return Z.registerResource($, J, { mimeType: d, ...X }, D);
27259
+ function uZ(Z, $, J, X, V) {
27260
+ return Z.registerResource($, J, { mimeType: f, ...X }, V);
27261
27261
  }
27262
27262
 
27263
27263
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
@@ -28246,7 +28246,7 @@ class McpServer {
28246
28246
  };
28247
28247
  this._registeredResourceTemplates[name] = registeredResourceTemplate;
28248
28248
  const variableNames = template.uriTemplate.variableNames;
28249
- const hasCompleter = Array.isArray(variableNames) && variableNames.some((v2) => !!template.completeCallback(v2));
28249
+ const hasCompleter = Array.isArray(variableNames) && variableNames.some((v) => !!template.completeCallback(v));
28250
28250
  if (hasCompleter) {
28251
28251
  this.setCompletionRequestHandler();
28252
28252
  }
@@ -28571,11 +28571,11 @@ function calculateProjections(inputs) {
28571
28571
  function calculateSummary(projections, inputs) {
28572
28572
  const endingMRR = projections[11].mrr;
28573
28573
  const arr = endingMRR * 12;
28574
- const totalRevenue = projections.reduce((sum, p) => sum + p.mrr, 0);
28575
- const totalProfit = projections.reduce((sum, p) => sum + p.netProfit, 0);
28574
+ const totalRevenue = projections.reduce((sum, p2) => sum + p2.mrr, 0);
28575
+ const totalProfit = projections.reduce((sum, p2) => sum + p2.netProfit, 0);
28576
28576
  const mrrGrowthPct = (endingMRR - inputs.startingMRR) / inputs.startingMRR * 100;
28577
28577
  const avgMargin = totalProfit / totalRevenue * 100;
28578
- const breakEvenProjection = projections.find((p) => p.netProfit >= 0);
28578
+ const breakEvenProjection = projections.find((p2) => p2.netProfit >= 0);
28579
28579
  const breakEvenMonth = breakEvenProjection?.month ?? null;
28580
28580
  return {
28581
28581
  endingMRR,
@@ -28679,7 +28679,7 @@ function createServer() {
28679
28679
  });
28680
28680
  {
28681
28681
  const resourceUri = "ui://scenario-modeler/mcp-app.html";
28682
- hZ(server, "get-scenario-data", {
28682
+ fZ(server, "get-scenario-data", {
28683
28683
  title: "Get Scenario Data",
28684
28684
  description: "Returns SaaS scenario templates and optionally computes custom projections for given inputs",
28685
28685
  inputSchema: GetScenarioDataInputSchema.shape,
@@ -28707,13 +28707,13 @@ function createServer() {
28707
28707
  }
28708
28708
  };
28709
28709
  });
28710
- mZ(server, resourceUri, resourceUri, { mimeType: d, description: "SaaS Scenario Modeler UI" }, async () => {
28710
+ uZ(server, resourceUri, resourceUri, { mimeType: f, description: "SaaS Scenario Modeler UI" }, async () => {
28711
28711
  const html = await fs.readFile(path.join(DIST_DIR, "mcp-app.html"), "utf-8");
28712
28712
  return {
28713
28713
  contents: [
28714
28714
  {
28715
28715
  uri: resourceUri,
28716
- mimeType: d,
28716
+ mimeType: f,
28717
28717
  text: html
28718
28718
  }
28719
28719
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/server-scenario-modeler",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "type": "module",
5
5
  "description": "Financial scenario modeling MCP App Server",
6
6
  "repository": {