@modelcontextprotocol/server-system-monitor 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mcp-app.html CHANGED
@@ -64,7 +64,7 @@ Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Rec
64
64
  for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);v({method:_("ui/open-link"),params:v({url:y().describe("URL to open in the host's browser")})});var Xg=v({isError:K().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),Kg=v({isError:K().optional().describe("True if the download failed (e.g., user cancelled or host denied).")}).passthrough(),Gg=v({isError:K().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();v({method:_("ui/notifications/sandbox-proxy-ready"),params:v({})});var Ui=v({connectDomains:I(y()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
65
65
 
66
66
  - Maps to CSP \`connect-src\` directive
67
- - Empty or omitted → no network connections (secure default)`),resourceDomains:I(y()).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:I(y()).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:I(y()).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'`)")}),Yi=v({camera:v({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:v({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:v({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:v({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});v({method:_("ui/notifications/size-changed"),params:v({width:L().optional().describe("New width in pixels."),height:L().optional().describe("New height in pixels.")})});var Qg=v({method:_("ui/notifications/tool-input"),params:v({arguments:Y(y(),J().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),tm=v({method:_("ui/notifications/tool-input-partial"),params:v({arguments:Y(y(),J().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),em=v({method:_("ui/notifications/tool-cancelled"),params:v({reason:y().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),nm=v({fonts:y().optional()}),sm=v({variables:Jg.optional().describe("CSS variables for theming the app."),css:nm.optional().describe("CSS blocks that apps can inject.")}),im=v({method:_("ui/resource-teardown"),params:v({})});Y(y(),J());var Do=v({text:v({}).optional().describe("Host supports text content blocks."),image:v({}).optional().describe("Host supports image content blocks."),audio:v({}).optional().describe("Host supports audio content blocks."),resource:v({}).optional().describe("Host supports resource content blocks."),resourceLink:v({}).optional().describe("Host supports resource link content blocks."),structuredContent:v({}).optional().describe("Host supports structured content.")}),om=v({experimental:v({}).optional().describe("Experimental features (structure TBD)."),openLinks:v({}).optional().describe("Host supports opening external URLs."),downloadFile:v({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:v({listChanged:K().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:v({listChanged:K().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:v({}).optional().describe("Host accepts log messages."),sandbox:v({permissions:Yi.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Ui.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Do.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Do.optional().describe("Host supports receiving content messages (ui/message) from the view.")}),rm=v({experimental:v({}).optional().describe("Experimental features (structure TBD)."),tools:v({listChanged:K().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:I(hn).optional().describe("Display modes the app supports.")});v({method:_("ui/notifications/initialized"),params:v({}).optional()});v({csp:Ui.optional().describe("Content Security Policy configuration for UI resources."),permissions:Yi.optional().describe("Sandbox permissions requested by the UI resource."),domain:y().optional().describe(`Dedicated origin for view sandbox.
67
+ - Empty or omitted → no network connections (secure default)`),resourceDomains:I(y()).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:I(y()).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:I(y()).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'`)")}),Yi=v({camera:v({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),microphone:v({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),geolocation:v({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),clipboardWrite:v({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")});v({method:_("ui/notifications/size-changed"),params:v({width:L().optional().describe("New width in pixels."),height:L().optional().describe("New height in pixels.")})});var Qg=v({method:_("ui/notifications/tool-input"),params:v({arguments:Y(y(),J().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),tm=v({method:_("ui/notifications/tool-input-partial"),params:v({arguments:Y(y(),J().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),em=v({method:_("ui/notifications/tool-cancelled"),params:v({reason:y().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),nm=v({fonts:y().optional()}),sm=v({variables:Jg.optional().describe("CSS variables for theming the app."),css:nm.optional().describe("CSS blocks that apps can inject.")}),im=v({method:_("ui/resource-teardown"),params:v({})});Y(y(),J());var Do=v({text:v({}).optional().describe("Host supports text content blocks."),image:v({}).optional().describe("Host supports image content blocks."),audio:v({}).optional().describe("Host supports audio content blocks."),resource:v({}).optional().describe("Host supports resource content blocks."),resourceLink:v({}).optional().describe("Host supports resource link content blocks."),structuredContent:v({}).optional().describe("Host supports structured content.")});v({method:_("ui/notifications/request-teardown"),params:v({}).optional()});var om=v({experimental:v({}).optional().describe("Experimental features (structure TBD)."),openLinks:v({}).optional().describe("Host supports opening external URLs."),downloadFile:v({}).optional().describe("Host supports file downloads via ui/download-file."),serverTools:v({listChanged:K().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:v({listChanged:K().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:v({}).optional().describe("Host accepts log messages."),sandbox:v({permissions:Yi.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:Ui.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Do.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Do.optional().describe("Host supports receiving content messages (ui/message) from the view.")}),rm=v({experimental:v({}).optional().describe("Experimental features (structure TBD)."),tools:v({listChanged:K().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:I(hn).optional().describe("Display modes the app supports.")});v({method:_("ui/notifications/initialized"),params:v({}).optional()});v({csp:Ui.optional().describe("Content Security Policy configuration for UI resources."),permissions:Yi.optional().describe("Sandbox permissions requested by the UI resource."),domain:y().optional().describe(`Dedicated origin for view sandbox.
68
68
 
69
69
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
70
70
 
@@ -81,7 +81,7 @@ Boolean requesting whether a visible border and background is provided by the ho
81
81
  - omitted: host decides border`)});v({method:_("ui/request-display-mode"),params:v({mode:hn.describe("The display mode being requested.")})});var am=v({mode:hn.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),cm=$([_("model"),_("app")]).describe("Tool visibility scope - who can access the tool.");v({resourceUri:y().optional(),visibility:I(cm).optional().describe(`Who can access this tool. Default: ["model", "app"]
82
82
  - "model": Tool visible to and callable by the agent
83
83
  - "app": Tool callable by the app from this server only`)});v({mimeTypes:I(y()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});v({method:_("ui/download-file"),params:v({contents:I($([nc,sc])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.")})});v({method:_("ui/message"),params:v({role:_("user").describe('Message role, currently only "user" is supported.'),content:I(Cn).describe("Message content blocks (text, image, etc.).")})});v({method:_("ui/notifications/sandbox-resource-ready"),params:v({html:y().describe("HTML content to load into the inner iframe."),sandbox:y().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:Ui.optional().describe("CSP configuration from resource metadata."),permissions:Yi.optional().describe("Sandbox permissions from resource metadata.")})});var lm=v({method:_("ui/notifications/tool-result"),params:Cs.describe("Standard MCP tool execution result.")}),ac=v({toolInfo:v({id:kn.optional().describe("JSON-RPC id of the tools/call request."),tool:qi.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:Ug.optional().describe("Current color theme preference."),styles:sm.optional().describe("Style configuration for theming the app."),displayMode:hn.optional().describe("How the UI is currently displayed."),availableDisplayModes:I(hn).optional().describe("Display modes the host supports."),containerDimensions:$([v({height:L().describe("Fixed container height in pixels.")}),v({maxHeight:$([L(),ei()]).optional().describe("Maximum container height in pixels.")})]).and($([v({width:L().describe("Fixed container width in pixels.")}),v({maxWidth:$([L(),ei()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
84
- container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:y().optional().describe("User's language and region preference in BCP 47 format."),timeZone:y().optional().describe("User's timezone in IANA format."),userAgent:y().optional().describe("Host application identifier."),platform:$([_("web"),_("desktop"),_("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:v({touch:K().optional().describe("Whether the device supports touch input."),hover:K().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:v({top:L().describe("Top safe area inset in pixels."),right:L().describe("Right safe area inset in pixels."),bottom:L().describe("Bottom safe area inset in pixels."),left:L().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),um=v({method:_("ui/notifications/host-context-changed"),params:ac.describe("Partial context update containing only changed fields.")});v({method:_("ui/update-model-context"),params:v({content:I(Cn).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:Y(y(),J().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});v({method:_("ui/initialize"),params:v({appInfo:Ps.describe("App identification (name and version)."),appCapabilities:rm.describe("Features and capabilities this app provides."),protocolVersion:y().describe("Protocol version this app supports.")})});var hm=v({protocolVersion:y().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Ps.describe("Host application identification and version."),hostCapabilities:om.describe("Features and capabilities provided by the host."),hostContext:ac.describe("Rich context about the host environment.")}).passthrough();class dm extends Zg{constructor(n,s={},i={autoResize:!0}){super(i);T(this,"_appInfo");T(this,"_capabilities");T(this,"options");T(this,"_hostCapabilities");T(this,"_hostInfo");T(this,"_hostContext");T(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=s,this.options=i,this.setRequestHandler(Ts,o=>(console.log("Received ping:",o.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(Qg,s=>n(s.params))}set ontoolinputpartial(n){this.setNotificationHandler(tm,s=>n(s.params))}set ontoolresult(n){this.setNotificationHandler(lm,s=>n(s.params))}set ontoolcancelled(n){this.setNotificationHandler(em,s=>n(s.params))}set onhostcontextchanged(n){this.setNotificationHandler(um,s=>{this._hostContext={...this._hostContext,...s.params},n(s.params)})}set onteardown(n){this.setRequestHandler(im,(s,i)=>n(s.params,i))}set oncalltool(n){this.setRequestHandler(oc,(s,i)=>n(s.params,i))}set onlisttools(n){this.setRequestHandler(ic,(s,i)=>n(s.params,i))}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},Cs,s)}async readServerResource(n,s){return await this.request({method:"resources/read",params:n},ec,s)}async listServerResources(n,s){return await this.request({method:"resources/list",params:n},tc,s)}sendMessage(n,s){return this.request({method:"ui/message",params:n},Gg,s)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,s){return this.request({method:"ui/update-model-context",params:n},Ri,s)}openLink(n,s){return this.request({method:"ui/open-link",params:n},Xg,s)}downloadFile(n,s){return this.request({method:"ui/download-file",params:n},Kg,s)}requestDisplayMode(n,s){return this.request({method:"ui/request-display-mode",params:n},am,s)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,s=0,i=0,o=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let a=document.documentElement,c=a.style.width,l=a.style.height;a.style.width="fit-content",a.style.height="max-content";let u=a.getBoundingClientRect();a.style.width=c,a.style.height=l;let h=window.innerWidth-a.clientWidth,d=Math.ceil(u.width+h),f=Math.ceil(u.height);(d!==s||f!==i)&&(s=d,i=f,this.sendSizeChanged({width:d,height:f}))}))};o();let r=new ResizeObserver(o);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(n=new qg(window.parent,window.parent),s){var i;if(this.transport)throw Error("App is already connected. Call close() before connecting again.");await super.connect(n);try{let o=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Vg}},hm,s);if(o===void 0)throw Error(`Server sent invalid initialize result: ${o}`);this._hostCapabilities=o.hostCapabilities,this._hostInfo=o.hostInfo,this._hostContext=o.hostContext,await this.notification({method:"ui/notifications/initialized"}),(i=this.options)!=null&&i.autoResize&&this.setupSizeChangedNotifications()}catch(o){throw this.close(),o}}}/*!
84
+ container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:y().optional().describe("User's language and region preference in BCP 47 format."),timeZone:y().optional().describe("User's timezone in IANA format."),userAgent:y().optional().describe("Host application identifier."),platform:$([_("web"),_("desktop"),_("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:v({touch:K().optional().describe("Whether the device supports touch input."),hover:K().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:v({top:L().describe("Top safe area inset in pixels."),right:L().describe("Right safe area inset in pixels."),bottom:L().describe("Bottom safe area inset in pixels."),left:L().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),um=v({method:_("ui/notifications/host-context-changed"),params:ac.describe("Partial context update containing only changed fields.")});v({method:_("ui/update-model-context"),params:v({content:I(Cn).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:Y(y(),J().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});v({method:_("ui/initialize"),params:v({appInfo:Ps.describe("App identification (name and version)."),appCapabilities:rm.describe("Features and capabilities this app provides."),protocolVersion:y().describe("Protocol version this app supports.")})});var hm=v({protocolVersion:y().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Ps.describe("Host application identification and version."),hostCapabilities:om.describe("Features and capabilities provided by the host."),hostContext:ac.describe("Rich context about the host environment.")}).passthrough();class dm extends Zg{constructor(n,s={},i={autoResize:!0}){super(i);T(this,"_appInfo");T(this,"_capabilities");T(this,"options");T(this,"_hostCapabilities");T(this,"_hostInfo");T(this,"_hostContext");T(this,"sendOpenLink",this.openLink);this._appInfo=n,this._capabilities=s,this.options=i,this.setRequestHandler(Ts,o=>(console.log("Received ping:",o.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(n){this.setNotificationHandler(Qg,s=>n(s.params))}set ontoolinputpartial(n){this.setNotificationHandler(tm,s=>n(s.params))}set ontoolresult(n){this.setNotificationHandler(lm,s=>n(s.params))}set ontoolcancelled(n){this.setNotificationHandler(em,s=>n(s.params))}set onhostcontextchanged(n){this.setNotificationHandler(um,s=>{this._hostContext={...this._hostContext,...s.params},n(s.params)})}set onteardown(n){this.setRequestHandler(im,(s,i)=>n(s.params,i))}set oncalltool(n){this.setRequestHandler(oc,(s,i)=>n(s.params,i))}set onlisttools(n){this.setRequestHandler(ic,(s,i)=>n(s.params,i))}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},Cs,s)}async readServerResource(n,s){return await this.request({method:"resources/read",params:n},ec,s)}async listServerResources(n,s){return await this.request({method:"resources/list",params:n},tc,s)}sendMessage(n,s){return this.request({method:"ui/message",params:n},Gg,s)}sendLog(n){return this.notification({method:"notifications/message",params:n})}updateModelContext(n,s){return this.request({method:"ui/update-model-context",params:n},Ri,s)}openLink(n,s){return this.request({method:"ui/open-link",params:n},Xg,s)}downloadFile(n,s){return this.request({method:"ui/download-file",params:n},Kg,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},am,s)}sendSizeChanged(n){return this.notification({method:"ui/notifications/size-changed",params:n})}setupSizeChangedNotifications(){let n=!1,s=0,i=0,o=()=>{n||(n=!0,requestAnimationFrame(()=>{n=!1;let a=document.documentElement,c=a.style.width,l=a.style.height;a.style.width="fit-content",a.style.height="max-content";let u=a.getBoundingClientRect();a.style.width=c,a.style.height=l;let h=window.innerWidth-a.clientWidth,d=Math.ceil(u.width+h),f=Math.ceil(u.height);(d!==s||f!==i)&&(s=d,i=f,this.sendSizeChanged({width:d,height:f}))}))};o();let r=new ResizeObserver(o);return r.observe(document.documentElement),r.observe(document.body),()=>r.disconnect()}async connect(n=new qg(window.parent,window.parent),s){var i;if(this.transport)throw Error("App is already connected. Call close() before connecting again.");await super.connect(n);try{let o=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Vg}},hm,s);if(o===void 0)throw Error(`Server sent invalid initialize result: ${o}`);this._hostCapabilities=o.hostCapabilities,this._hostInfo=o.hostInfo,this._hostContext=o.hostContext,await this.notification({method:"ui/notifications/initialized"}),(i=this.options)!=null&&i.autoResize&&this.setupSizeChangedNotifications()}catch(o){throw this.close(),o}}}/*!
85
85
  * @kurkle/color v0.3.4
86
86
  * https://github.com/kurkle/color#readme
87
87
  * (c) 2024 Jukka Kurkela
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
 
@@ -6694,8 +6694,8 @@ var require_util2 = __commonJS((exports) => {
6694
6694
  const stringify = {};
6695
6695
  for (let i2 = 0;i2 < obj.length; i2++) {
6696
6696
  let keys = Object.keys(obj[i2]);
6697
- keys.sort((a2, b2) => {
6698
- return a2 - b2;
6697
+ keys.sort((a2, b) => {
6698
+ return a2 - b;
6699
6699
  });
6700
6700
  let str = "";
6701
6701
  for (let j2 = 0;j2 < keys.length; j2++) {
@@ -6710,12 +6710,12 @@ var require_util2 = __commonJS((exports) => {
6710
6710
  return uniques;
6711
6711
  }
6712
6712
  function sortByKey(array3, keys) {
6713
- return array3.sort((a2, b2) => {
6713
+ return array3.sort((a2, b) => {
6714
6714
  let x = "";
6715
6715
  let y2 = "";
6716
6716
  keys.forEach((key) => {
6717
6717
  x = x + a2[key];
6718
- y2 = y2 + b2[key];
6718
+ y2 = y2 + b[key];
6719
6719
  });
6720
6720
  return x < y2 ? -1 : x > y2 ? 1 : 0;
6721
6721
  });
@@ -7351,8 +7351,8 @@ var require_util2 = __commonJS((exports) => {
7351
7351
  const dirs = getDirectories(source2);
7352
7352
  const files = dirs.map((dir) => {
7353
7353
  return getFilesRecursively(dir);
7354
- }).reduce((a2, b2) => {
7355
- return a2.concat(b2);
7354
+ }).reduce((a2, b) => {
7355
+ return a2.concat(b);
7356
7356
  }, []);
7357
7357
  return files.concat(getFiles(source2));
7358
7358
  } catch {
@@ -10305,11 +10305,11 @@ var require_osinfo = __commonJS((exports) => {
10305
10305
  });
10306
10306
  }
10307
10307
  }
10308
- macs = macs.sort((a2, b2) => {
10309
- if (a2 < b2) {
10308
+ macs = macs.sort((a2, b) => {
10309
+ if (a2 < b) {
10310
10310
  return -1;
10311
10311
  }
10312
- if (a2 > b2) {
10312
+ if (a2 > b) {
10313
10313
  return 1;
10314
10314
  }
10315
10315
  return 0;
@@ -12478,7 +12478,7 @@ var require_cpu = __commonJS((exports) => {
12478
12478
  }
12479
12479
  if (result2.cores.length > 0) {
12480
12480
  if (result2.main === null) {
12481
- result2.main = Math.round(result2.cores.reduce((a2, b2) => a2 + b2, 0) / result2.cores.length);
12481
+ result2.main = Math.round(result2.cores.reduce((a2, b) => a2 + b, 0) / result2.cores.length);
12482
12482
  }
12483
12483
  let maxtmp = Math.max.apply(Math, result2.cores);
12484
12484
  result2.max = maxtmp > result2.main ? maxtmp : result2.main;
@@ -12541,7 +12541,7 @@ var require_cpu = __commonJS((exports) => {
12541
12541
  }
12542
12542
  });
12543
12543
  if (result2.cores.length > 0) {
12544
- result2.main = Math.round(result2.cores.reduce((a2, b2) => a2 + b2, 0) / result2.cores.length);
12544
+ result2.main = Math.round(result2.cores.reduce((a2, b) => a2 + b, 0) / result2.cores.length);
12545
12545
  const maxtmp = Math.max.apply(Math, result2.cores);
12546
12546
  result2.max = maxtmp > result2.main ? maxtmp : result2.main;
12547
12547
  } else {
@@ -14400,10 +14400,10 @@ var require_graphics = __commonJS((exports) => {
14400
14400
  const bus = parseInt(device["CL_DEVICE_PCI_BUS_ID_NV"]);
14401
14401
  const slot = parseInt(device["CL_DEVICE_PCI_SLOT_ID_NV"]);
14402
14402
  if (!isNaN(bus) && !isNaN(slot)) {
14403
- const b2 = bus & 255;
14403
+ const b = bus & 255;
14404
14404
  const d2 = slot >> 3 & 255;
14405
14405
  const f2 = slot & 7;
14406
- busAddress = `${b2.toString().padStart(2, "0")}:${d2.toString().padStart(2, "0")}.${f2}`;
14406
+ busAddress = `${b.toString().padStart(2, "0")}:${d2.toString().padStart(2, "0")}.${f2}`;
14407
14407
  }
14408
14408
  }
14409
14409
  if (busAddress) {
@@ -42233,7 +42233,6 @@ function date4(params) {
42233
42233
 
42234
42234
  // ../../node_modules/zod/v4/classic/external.js
42235
42235
  config(en_default2());
42236
-
42237
42236
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
42238
42237
  var LATEST_PROTOCOL_VERSION = "2025-11-25";
42239
42238
  var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
@@ -45181,6 +45180,7 @@ function mergeCapabilities(base, additional) {
45181
45180
  }
45182
45181
  return result2;
45183
45182
  }
45183
+
45184
45184
  // ../../node_modules/@modelcontextprotocol/ext-apps/dist/src/server/index.js
45185
45185
  var F = "2026-01-26";
45186
45186
  var z2 = "ui/notifications/tool-input-partial";
@@ -45223,8 +45223,8 @@ class j {
45223
45223
  sessionId;
45224
45224
  setProtocolVersion;
45225
45225
  }
45226
- var b = exports_external.union([exports_external.literal("light"), exports_external.literal("dark")]).describe("Color theme preference for the host environment.");
45227
- var L = exports_external.union([exports_external.literal("inline"), exports_external.literal("fullscreen"), exports_external.literal("pip")]).describe("Display mode for UI presentation.");
45226
+ var g = exports_external.union([exports_external.literal("light"), exports_external.literal("dark")]).describe("Color theme preference for the host environment.");
45227
+ var G = exports_external.union([exports_external.literal("inline"), exports_external.literal("fullscreen"), exports_external.literal("pip")]).describe("Display mode for UI presentation.");
45228
45228
  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.");
45229
45229
  var o = exports_external.record(i.describe(`Style variables for theming MCP apps.
45230
45230
 
@@ -45259,15 +45259,16 @@ var t = exports_external.object({ method: exports_external.literal("ui/notificat
45259
45259
  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.") }) });
45260
45260
  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).") }) });
45261
45261
  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").') }) });
45262
- var g = exports_external.object({ fonts: exports_external.string().optional() });
45263
- 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.") });
45262
+ var S = exports_external.object({ fonts: exports_external.string().optional() });
45263
+ 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.") });
45264
45264
  var _ = exports_external.object({ method: exports_external.literal("ui/resource-teardown"), params: exports_external.object({}) });
45265
45265
  var e = exports_external.record(exports_external.string(), exports_external.unknown());
45266
45266
  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.") });
45267
- 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.") });
45268
- 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.") });
45269
- var QQ = exports_external.object({ method: exports_external.literal("ui/notifications/initialized"), params: exports_external.object({}).optional() });
45270
- 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.
45267
+ var QQ = exports_external.object({ method: exports_external.literal("ui/notifications/request-teardown"), params: exports_external.object({}).optional() });
45268
+ 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.") });
45269
+ 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.") });
45270
+ var ZQ = exports_external.object({ method: exports_external.literal("ui/notifications/initialized"), params: exports_external.object({}).optional() });
45271
+ 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.
45271
45272
 
45272
45273
  Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
45273
45274
 
@@ -45282,27 +45283,27 @@ Boolean requesting whether a visible border and background is provided by the ho
45282
45283
  - \`true\`: request visible border + background
45283
45284
  - \`false\`: request no visible border + background
45284
45285
  - omitted: host decides border`) });
45285
- 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.") }) });
45286
- var T = exports_external.object({ mode: L.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
45287
- var f = exports_external.union([exports_external.literal("model"), exports_external.literal("app")]).describe("Tool visibility scope - who can access the tool.");
45288
- 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"]
45286
+ 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.") }) });
45287
+ var T = exports_external.object({ mode: G.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
45288
+ var u = exports_external.union([exports_external.literal("model"), exports_external.literal("app")]).describe("Tool visibility scope - who can access the tool.");
45289
+ 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"]
45289
45290
  - "model": Tool visible to and callable by the agent
45290
45291
  - "app": Tool callable by the app from this server only`) });
45291
- 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.') });
45292
- 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.") }) });
45293
- 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.).") }) });
45294
- 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.") }) });
45295
- var U = exports_external.object({ method: exports_external.literal("ui/notifications/tool-result"), params: CallToolResultSchema.describe("Standard MCP tool execution result.") });
45296
- 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
45292
+ 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.') });
45293
+ 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.") }) });
45294
+ 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.).") }) });
45295
+ 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.") }) });
45296
+ var E = exports_external.object({ method: exports_external.literal("ui/notifications/tool-result"), params: CallToolResultSchema.describe("Standard MCP tool execution result.") });
45297
+ 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
45297
45298
  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();
45298
- var E = exports_external.object({ method: exports_external.literal("ui/notifications/host-context-changed"), params: k.describe("Partial context update containing only changed fields.") });
45299
+ var R = exports_external.object({ method: exports_external.literal("ui/notifications/host-context-changed"), params: k.describe("Partial context update containing only changed fields.") });
45299
45300
  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.") }) });
45300
- 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.") }) });
45301
- 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();
45301
+ 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.") }) });
45302
+ 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();
45302
45303
  var v = "ui/resourceUri";
45303
45304
  var d = "text/html;profile=mcp-app";
45304
45305
 
45305
- class qQ extends Protocol {
45306
+ class OQ extends Protocol {
45306
45307
  _appInfo;
45307
45308
  _capabilities;
45308
45309
  options;
@@ -45334,13 +45335,13 @@ class qQ extends Protocol {
45334
45335
  this.setNotificationHandler(P, ($) => Z($.params));
45335
45336
  }
45336
45337
  set ontoolresult(Z) {
45337
- this.setNotificationHandler(U, ($) => Z($.params));
45338
+ this.setNotificationHandler(E, ($) => Z($.params));
45338
45339
  }
45339
45340
  set ontoolcancelled(Z) {
45340
45341
  this.setNotificationHandler(H, ($) => Z($.params));
45341
45342
  }
45342
45343
  set onhostcontextchanged(Z) {
45343
- this.setNotificationHandler(E, ($) => {
45344
+ this.setNotificationHandler(R, ($) => {
45344
45345
  this._hostContext = { ...this._hostContext, ...$.params }, Z($.params);
45345
45346
  });
45346
45347
  }
@@ -45402,6 +45403,9 @@ class qQ extends Protocol {
45402
45403
  downloadFile(Z, $) {
45403
45404
  return this.request({ method: "ui/download-file", params: Z }, I, $);
45404
45405
  }
45406
+ requestTeardown(Z = {}) {
45407
+ return this.notification({ method: "ui/notifications/request-teardown", params: Z });
45408
+ }
45405
45409
  requestDisplayMode(Z, $) {
45406
45410
  return this.request({ method: "ui/request-display-mode", params: Z }, T, $);
45407
45411
  }
@@ -45414,11 +45418,11 @@ class qQ extends Protocol {
45414
45418
  return;
45415
45419
  Z = true, requestAnimationFrame(() => {
45416
45420
  Z = false;
45417
- let V = document.documentElement, G = V.style.width, W = V.style.height;
45421
+ let V = document.documentElement, L = V.style.width, W = V.style.height;
45418
45422
  V.style.width = "fit-content", V.style.height = "max-content";
45419
- let M = V.getBoundingClientRect();
45420
- V.style.width = G, V.style.height = W;
45421
- let h = window.innerWidth - V.clientWidth, N = Math.ceil(M.width + h), Y = Math.ceil(M.height);
45423
+ let x = V.getBoundingClientRect();
45424
+ V.style.width = L, V.style.height = W;
45425
+ let h = window.innerWidth - V.clientWidth, N = Math.ceil(x.width + h), Y = Math.ceil(x.height);
45422
45426
  if (N !== $ || Y !== J)
45423
45427
  $ = N, J = Y, this.sendSizeChanged({ width: N, height: Y });
45424
45428
  });
@@ -45432,7 +45436,7 @@ class qQ extends Protocol {
45432
45436
  throw Error("App is already connected. Call close() before connecting again.");
45433
45437
  await super.connect(Z);
45434
45438
  try {
45435
- let J = await this.request({ method: "ui/initialize", params: { appCapabilities: this._capabilities, appInfo: this._appInfo, protocolVersion: F } }, R, $);
45439
+ let J = await this.request({ method: "ui/initialize", params: { appCapabilities: this._capabilities, appInfo: this._appInfo, protocolVersion: F } }, U, $);
45436
45440
  if (J === undefined)
45437
45441
  throw Error(`Server sent invalid initialize result: ${J}`);
45438
45442
  if (this._hostCapabilities = J.hostCapabilities, this._hostInfo = J.hostInfo, this._hostContext = J.hostContext, await this.notification({ method: "ui/notifications/initialized" }), this.options?.autoResize)
@@ -45442,15 +45446,15 @@ class qQ extends Protocol {
45442
45446
  }
45443
45447
  }
45444
45448
  }
45445
- function uZ(Z, $, J, X) {
45446
- let D = J._meta, V = D.ui, G = D[v], W = D;
45447
- if (V?.resourceUri && !G)
45449
+ function hZ(Z, $, J, X) {
45450
+ let D = J._meta, V = D.ui, L = D[v], W = D;
45451
+ if (V?.resourceUri && !L)
45448
45452
  W = { ...D, [v]: V.resourceUri };
45449
- else if (G && !V?.resourceUri)
45450
- W = { ...D, ui: { ...V, resourceUri: G } };
45453
+ else if (L && !V?.resourceUri)
45454
+ W = { ...D, ui: { ...V, resourceUri: L } };
45451
45455
  return Z.registerTool($, { ...J, _meta: W }, X);
45452
45456
  }
45453
- function fZ(Z, $, J, X, D) {
45457
+ function mZ(Z, $, J, X, D) {
45454
45458
  return Z.registerResource($, J, { mimeType: d, ...X }, D);
45455
45459
  }
45456
45460
 
@@ -45970,7 +45974,6 @@ class ExperimentalMcpServerTasks {
45970
45974
  return mcpServerInternal._createRegisteredTool(name, config2.title, config2.description, config2.inputSchema, config2.outputSchema, config2.annotations, execution, config2._meta, handler);
45971
45975
  }
45972
45976
  }
45973
-
45974
45977
  // ../../node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js
45975
45978
  class McpServer {
45976
45979
  constructor(serverInfo, options) {
@@ -46774,7 +46777,7 @@ function createServer() {
46774
46777
  version: "1.0.0"
46775
46778
  });
46776
46779
  const resourceUri = "ui://system-monitor/mcp-app.html";
46777
- uZ(server, "get-system-info", {
46780
+ hZ(server, "get-system-info", {
46778
46781
  title: "Get System Info",
46779
46782
  description: "Returns system information, including hostname, platform, CPU info, and memory.",
46780
46783
  inputSchema: {},
@@ -46787,7 +46790,7 @@ function createServer() {
46787
46790
  structuredContent: info
46788
46791
  };
46789
46792
  });
46790
- uZ(server, "poll-system-stats", {
46793
+ hZ(server, "poll-system-stats", {
46791
46794
  title: "Poll System Stats",
46792
46795
  description: "Returns dynamic system metrics for polling: per-core CPU timing, memory usage, and uptime. App-only.",
46793
46796
  inputSchema: {},
@@ -46800,7 +46803,7 @@ function createServer() {
46800
46803
  structuredContent: stats
46801
46804
  };
46802
46805
  });
46803
- fZ(server, resourceUri, resourceUri, { mimeType: d, description: "System Monitor UI" }, async () => {
46806
+ mZ(server, resourceUri, resourceUri, { mimeType: d, description: "System Monitor UI" }, async () => {
46804
46807
  const html = await fs.readFile(path.join(DIST_DIR, "mcp-app.html"), "utf-8");
46805
46808
  return {
46806
46809
  contents: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modelcontextprotocol/server-system-monitor",
3
- "version": "1.2.1",
3
+ "version": "1.3.0",
4
4
  "type": "module",
5
5
  "description": "System monitor MCP App Server with real-time stats",
6
6
  "repository": {