sunpeak 0.18.2 → 0.18.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/bin/commands/inspect.mjs +392 -4
  2. package/bin/lib/sandbox-server.mjs +11 -1
  3. package/dist/chatgpt/index.cjs +1 -1
  4. package/dist/chatgpt/index.js +1 -1
  5. package/dist/claude/index.cjs +1 -1
  6. package/dist/claude/index.js +1 -1
  7. package/dist/hooks/index.d.ts +1 -0
  8. package/dist/hooks/use-request-teardown.d.ts +21 -0
  9. package/dist/host/chatgpt/index.cjs +1 -1
  10. package/dist/host/chatgpt/index.js +1 -1
  11. package/dist/index.cjs +110 -70
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.js +68 -31
  15. package/dist/index.js.map +1 -1
  16. package/dist/inspector/hosts.d.ts +12 -0
  17. package/dist/inspector/index.cjs +1 -1
  18. package/dist/inspector/index.js +1 -1
  19. package/dist/inspector/mcp-app-host.d.ts +3 -0
  20. package/dist/inspector/simple-sidebar.d.ts +1 -1
  21. package/dist/inspector/use-mcp-connection.d.ts +9 -1
  22. package/dist/{inspector-ClhpqKLi.js → inspector-CjSoXm6N.js} +497 -117
  23. package/dist/inspector-CjSoXm6N.js.map +1 -0
  24. package/dist/{inspector-CByJjmPD.cjs → inspector-DRD_Q66E.cjs} +498 -118
  25. package/dist/inspector-DRD_Q66E.cjs.map +1 -0
  26. package/dist/mcp/index.cjs +38 -33
  27. package/dist/mcp/index.cjs.map +1 -1
  28. package/dist/mcp/index.js +35 -30
  29. package/dist/mcp/index.js.map +1 -1
  30. package/dist/style.css +8 -0
  31. package/dist/{use-app-X7JbGskk.js → use-app-BNbz1uzj.js} +51 -42
  32. package/dist/use-app-BNbz1uzj.js.map +1 -0
  33. package/dist/{use-app-D2h-aiyr.cjs → use-app-Dqh20JPP.cjs} +93 -72
  34. package/dist/use-app-Dqh20JPP.cjs.map +1 -0
  35. package/package.json +2 -2
  36. package/template/dist/albums/albums.html +3 -3
  37. package/template/dist/albums/albums.json +1 -1
  38. package/template/dist/carousel/carousel.html +3 -3
  39. package/template/dist/carousel/carousel.json +1 -1
  40. package/template/dist/map/map.html +3 -3
  41. package/template/dist/map/map.json +1 -1
  42. package/template/dist/review/review.html +3 -3
  43. package/template/dist/review/review.json +1 -1
  44. package/template/node_modules/.vite/deps/_metadata.json +3 -3
  45. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +51 -42
  46. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
  47. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +56 -50
  48. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
  49. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +52 -43
  50. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
  51. package/template/node_modules/.vite-mcp/deps/_metadata.json +22 -22
  52. package/template/tests/e2e/albums.spec.ts +19 -15
  53. package/template/tests/live/albums.spec.ts +10 -0
  54. package/dist/inspector-CByJjmPD.cjs.map +0 -1
  55. package/dist/inspector-ClhpqKLi.js.map +0 -1
  56. package/dist/use-app-D2h-aiyr.cjs.map +0 -1
  57. package/dist/use-app-X7JbGskk.js.map +0 -1
@@ -12,5 +12,5 @@
12
12
  }
13
13
  },
14
14
  "name": "review",
15
- "uri": "ui://review-mn5fqqli"
15
+ "uri": "ui://review-mn6s60jd"
16
16
  }
@@ -1,8 +1,8 @@
1
1
  {
2
- "hash": "1ce9cdb5",
2
+ "hash": "19eba736",
3
3
  "configHash": "6bb870ac",
4
- "lockfileHash": "a41e63ba",
5
- "browserHash": "33b5a01f",
4
+ "lockfileHash": "bd15fa0f",
5
+ "browserHash": "6925dced",
6
6
  "optimized": {},
7
7
  "chunks": {}
8
8
  }
@@ -1,7 +1,7 @@
1
1
  import { Cn as object, In as string, Jn as union, Sn as number, St as _undefined, Tt as array, Yn as unknown, jn as record, kt as boolean, ln as literal } from "./schemas-NsgmY9QV.js";
2
2
  import { S as ResourceLinkSchema, T as ToolSchema, _ as PingRequestSchema, a as EmbeddedResourceSchema, b as ReadResourceResultSchema, c as JSONRPCMessageSchema, h as ListToolsRequestSchema, i as ContentBlockSchema, m as ListResourcesResultSchema, n as CallToolRequestSchema, o as EmptyResultSchema, r as CallToolResultSchema, s as ImplementationSchema, t as Protocol, x as RequestIdSchema } from "./protocol-CTflwIfG.js";
3
- //#region ../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.2.2_@modelcontextprotocol+sdk@1.27.1_zod@4.3.6__react-_e9bf7657371391a829fe8b4e289b253c/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js
4
- var L = "2026-01-26", d = "ui/open-link", h = "ui/download-file", m = "ui/message", i = "ui/notifications/sandbox-proxy-ready", c = "ui/notifications/sandbox-resource-ready", p = "ui/notifications/size-changed", r = "ui/notifications/tool-input", W = "ui/notifications/tool-input-partial", l = "ui/notifications/tool-result", n = "ui/notifications/tool-cancelled", a = "ui/notifications/host-context-changed", o = "ui/resource-teardown", s = "ui/initialize", e = "ui/notifications/initialized", t = "ui/request-display-mode";
3
+ //#region ../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.1_@modelcontextprotocol+sdk@1.27.1_zod@4.3.6__react-_cd1fb28fd87e0bddd0a29eba0721855d/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js
4
+ var W = "2026-01-26", d = "ui/open-link", h = "ui/download-file", m = "ui/message", i = "ui/notifications/sandbox-proxy-ready", l = "ui/notifications/sandbox-resource-ready", r = "ui/notifications/size-changed", p = "ui/notifications/tool-input", z = "ui/notifications/tool-input-partial", c = "ui/notifications/tool-result", n = "ui/notifications/tool-cancelled", a = "ui/notifications/host-context-changed", o = "ui/notifications/request-teardown", s = "ui/resource-teardown", t = "ui/initialize", e = "ui/notifications/initialized", QQ = "ui/request-display-mode";
5
5
  var K = class {
6
6
  eventTarget;
7
7
  eventSource;
@@ -36,11 +36,11 @@ var K = class {
36
36
  sessionId;
37
37
  setProtocolVersion;
38
38
  };
39
- var k = union([literal("light"), literal("dark")]).describe("Color theme preference for the host environment."), J = union([
39
+ var b = union([literal("light"), literal("dark")]).describe("Color theme preference for the host environment."), J = union([
40
40
  literal("inline"),
41
41
  literal("fullscreen"),
42
42
  literal("pip")
43
- ]).describe("Display mode for UI presentation."), KQ = record(union([
43
+ ]).describe("Display mode for UI presentation."), GQ = record(union([
44
44
  literal("--color-background-primary"),
45
45
  literal("--color-background-secondary"),
46
46
  literal("--color-background-tertiary"),
@@ -135,10 +135,10 @@ Individual style keys are optional - hosts may provide any subset of these value
135
135
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
136
136
 
137
137
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
138
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`), GQ = object({
138
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`), VQ = object({
139
139
  method: literal("ui/open-link"),
140
140
  params: object({ url: string().describe("URL to open in the host's browser") })
141
- }), B = object({ isError: boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough(), _ = object({ isError: boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough(), O = object({ isError: boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough(), VQ = object({
141
+ }), B = object({ isError: boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough(), _ = object({ isError: boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough(), O = object({ isError: boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough(), NQ = object({
142
142
  method: literal("ui/notifications/sandbox-proxy-ready"),
143
143
  params: object({})
144
144
  }), G = object({
@@ -154,7 +154,7 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
154
154
  microphone: object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),
155
155
  geolocation: object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),
156
156
  clipboardWrite: object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")
157
- }), NQ = object({
157
+ }), jQ = object({
158
158
  method: literal("ui/notifications/size-changed"),
159
159
  params: object({
160
160
  width: number().optional().describe("New width in pixels."),
@@ -169,19 +169,22 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
169
169
  }), A = object({
170
170
  method: literal("ui/notifications/tool-cancelled"),
171
171
  params: object({ reason: string().optional().describe("Optional reason for the cancellation (e.g., \"user action\", \"timeout\").") })
172
- }), b = object({ fonts: string().optional() }), C = object({
173
- variables: KQ.optional().describe("CSS variables for theming the app."),
174
- css: b.optional().describe("CSS blocks that apps can inject.")
172
+ }), k = object({ fonts: string().optional() }), C = object({
173
+ variables: GQ.optional().describe("CSS variables for theming the app."),
174
+ css: k.optional().describe("CSS blocks that apps can inject.")
175
175
  }), F = object({
176
176
  method: literal("ui/resource-teardown"),
177
177
  params: object({})
178
- }), jQ = record(string(), unknown()), z = object({
178
+ }), EQ = record(string(), unknown()), L = object({
179
179
  text: object({}).optional().describe("Host supports text content blocks."),
180
180
  image: object({}).optional().describe("Host supports image content blocks."),
181
181
  audio: object({}).optional().describe("Host supports audio content blocks."),
182
182
  resource: object({}).optional().describe("Host supports resource content blocks."),
183
183
  resourceLink: object({}).optional().describe("Host supports resource link content blocks."),
184
184
  structuredContent: object({}).optional().describe("Host supports structured content.")
185
+ }), WQ = object({
186
+ method: literal("ui/notifications/request-teardown"),
187
+ params: object({}).optional()
185
188
  }), x = object({
186
189
  experimental: object({}).optional().describe("Experimental features (structure TBD)."),
187
190
  openLinks: object({}).optional().describe("Host supports opening external URLs."),
@@ -193,13 +196,13 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
193
196
  permissions: V.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),
194
197
  csp: G.optional().describe("CSP domains approved by the host.")
195
198
  }).optional().describe("Sandbox configuration applied by the host."),
196
- updateModelContext: z.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
197
- message: z.optional().describe("Host supports receiving content messages (ui/message) from the view.")
198
- }), S = object({
199
+ updateModelContext: L.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
200
+ message: L.optional().describe("Host supports receiving content messages (ui/message) from the view.")
201
+ }), g = object({
199
202
  experimental: object({}).optional().describe("Experimental features (structure TBD)."),
200
203
  tools: object({ listChanged: boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."),
201
204
  availableDisplayModes: array(J).optional().describe("Display modes the app supports.")
202
- }), EQ = object({
205
+ }), zQ = object({
203
206
  method: literal("ui/notifications/initialized"),
204
207
  params: object({}).optional()
205
208
  }), LQ = object({
@@ -221,26 +224,26 @@ Boolean requesting whether a visible border and background is provided by the ho
221
224
  - \`true\`: request visible border + background
222
225
  - \`false\`: request no visible border + background
223
226
  - omitted: host decides border`)
224
- }), WQ = object({
227
+ }), BQ = object({
225
228
  method: literal("ui/request-display-mode"),
226
229
  params: object({ mode: J.describe("The display mode being requested.") })
227
- }), P = object({ mode: J.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough(), g = union([literal("model"), literal("app")]).describe("Tool visibility scope - who can access the tool."), zQ = object({
230
+ }), P = object({ mode: J.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough(), S = union([literal("model"), literal("app")]).describe("Tool visibility scope - who can access the tool."), _Q = object({
228
231
  resourceUri: string().optional(),
229
- visibility: array(g).optional().describe(`Who can access this tool. Default: ["model", "app"]
232
+ visibility: array(S).optional().describe(`Who can access this tool. Default: ["model", "app"]
230
233
  - "model": Tool visible to and callable by the agent
231
234
  - "app": Tool callable by the app from this server only`)
232
235
  });
233
236
  object({ mimeTypes: array(string()).optional().describe("Array of supported MIME types for UI resources.\nMust include `\"text/html;profile=mcp-app\"` for MCP Apps support.") });
234
- var BQ = object({
237
+ var OQ = object({
235
238
  method: literal("ui/download-file"),
236
239
  params: object({ contents: array(union([EmbeddedResourceSchema, ResourceLinkSchema])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.") })
237
- }), _Q = object({
240
+ }), IQ = object({
238
241
  method: literal("ui/message"),
239
242
  params: object({
240
243
  role: literal("user").describe("Message role, currently only \"user\" is supported."),
241
244
  content: array(ContentBlockSchema).describe("Message content blocks (text, image, etc.).")
242
245
  })
243
- }), OQ = object({
246
+ }), wQ = object({
244
247
  method: literal("ui/notifications/sandbox-resource-ready"),
245
248
  params: object({
246
249
  html: string().describe("HTML content to load into the inner iframe."),
@@ -248,15 +251,15 @@ var BQ = object({
248
251
  csp: G.optional().describe("CSP configuration from resource metadata."),
249
252
  permissions: V.optional().describe("Sandbox permissions from resource metadata.")
250
253
  })
251
- }), T = object({
254
+ }), q = object({
252
255
  method: literal("ui/notifications/tool-result"),
253
256
  params: CallToolResultSchema.describe("Standard MCP tool execution result.")
254
- }), q = object({
257
+ }), T = object({
255
258
  toolInfo: object({
256
259
  id: RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."),
257
260
  tool: ToolSchema.describe("Tool definition including name, inputSchema, etc.")
258
261
  }).optional().describe("Metadata of the tool call that instantiated this App."),
259
- theme: k.optional().describe("Current color theme preference."),
262
+ theme: b.optional().describe("Current color theme preference."),
260
263
  styles: C.optional().describe("Style configuration for theming the app."),
261
264
  displayMode: J.optional().describe("How the UI is currently displayed."),
262
265
  availableDisplayModes: array(J).optional().describe("Display modes the host supports."),
@@ -280,47 +283,47 @@ container holding the app. Specify either width or maxWidth, and either height o
280
283
  bottom: number().describe("Bottom safe area inset in pixels."),
281
284
  left: number().describe("Left safe area inset in pixels.")
282
285
  }).optional().describe("Mobile safe area boundaries in pixels.")
283
- }).passthrough(), U = object({
286
+ }).passthrough(), R = object({
284
287
  method: literal("ui/notifications/host-context-changed"),
285
- params: q.describe("Partial context update containing only changed fields.")
286
- }), IQ = object({
288
+ params: T.describe("Partial context update containing only changed fields.")
289
+ }), AQ = object({
287
290
  method: literal("ui/update-model-context"),
288
291
  params: object({
289
292
  content: array(ContentBlockSchema).optional().describe("Context content blocks (text, image, etc.)."),
290
293
  structuredContent: record(string(), unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")
291
294
  })
292
- }), wQ = object({
295
+ }), FQ = object({
293
296
  method: literal("ui/initialize"),
294
297
  params: object({
295
298
  appInfo: ImplementationSchema.describe("App identification (name and version)."),
296
- appCapabilities: S.describe("Features and capabilities this app provides."),
299
+ appCapabilities: g.describe("Features and capabilities this app provides."),
297
300
  protocolVersion: string().describe("Protocol version this app supports.")
298
301
  })
299
- }), R = object({
302
+ }), U = object({
300
303
  protocolVersion: string().describe("Negotiated protocol version string (e.g., \"2025-11-21\")."),
301
304
  hostInfo: ImplementationSchema.describe("Host application identification and version."),
302
305
  hostCapabilities: x.describe("Features and capabilities provided by the host."),
303
- hostContext: q.describe("Rich context about the host environment.")
306
+ hostContext: T.describe("Rich context about the host environment.")
304
307
  }).passthrough();
305
- function AQ() {
308
+ function PQ() {
306
309
  let X = document.documentElement.getAttribute("data-theme");
307
310
  if (X === "dark" || X === "light") return X;
308
311
  return document.documentElement.classList.contains("dark") ? "dark" : "light";
309
312
  }
310
- function FQ(X) {
313
+ function qQ(X) {
311
314
  let Y = document.documentElement;
312
315
  Y.setAttribute("data-theme", X), Y.style.colorScheme = X;
313
316
  }
314
- function PQ(X, Y = document.documentElement) {
317
+ function TQ(X, Y = document.documentElement) {
315
318
  for (let [Z, $] of Object.entries(X)) if ($ !== void 0) Y.style.setProperty(Z, $);
316
319
  }
317
- function TQ(X) {
320
+ function RQ(X) {
318
321
  if (document.getElementById("__mcp-host-fonts")) return;
319
322
  let Z = document.createElement("style");
320
323
  Z.id = "__mcp-host-fonts", Z.textContent = X, document.head.appendChild(Z);
321
324
  }
322
- var UX = "ui/resourceUri", RX = "text/html;profile=mcp-app";
323
- var CQ = class extends Protocol {
325
+ var MX = "ui/resourceUri", vX = "text/html;profile=mcp-app";
326
+ var gQ = class extends Protocol {
324
327
  _appInfo;
325
328
  _capabilities;
326
329
  options;
@@ -352,13 +355,13 @@ var CQ = class extends Protocol {
352
355
  this.setNotificationHandler(w, (Y) => X(Y.params));
353
356
  }
354
357
  set ontoolresult(X) {
355
- this.setNotificationHandler(T, (Y) => X(Y.params));
358
+ this.setNotificationHandler(q, (Y) => X(Y.params));
356
359
  }
357
360
  set ontoolcancelled(X) {
358
361
  this.setNotificationHandler(A, (Y) => X(Y.params));
359
362
  }
360
363
  set onhostcontextchanged(X) {
361
- this.setNotificationHandler(U, (Y) => {
364
+ this.setNotificationHandler(R, (Y) => {
362
365
  this._hostContext = {
363
366
  ...this._hostContext,
364
367
  ...Y.params
@@ -443,6 +446,12 @@ var CQ = class extends Protocol {
443
446
  params: X
444
447
  }, _, Y);
445
448
  }
449
+ requestTeardown(X = {}) {
450
+ return this.notification({
451
+ method: "ui/notifications/request-teardown",
452
+ params: X
453
+ });
454
+ }
446
455
  requestDisplayMode(X, Y) {
447
456
  return this.request({
448
457
  method: "ui/request-display-mode",
@@ -484,9 +493,9 @@ var CQ = class extends Protocol {
484
493
  params: {
485
494
  appCapabilities: this._capabilities,
486
495
  appInfo: this._appInfo,
487
- protocolVersion: L
496
+ protocolVersion: W
488
497
  }
489
- }, R, Y);
498
+ }, U, Y);
490
499
  if (Z === void 0) throw Error(`Server sent invalid initialize result: ${Z}`);
491
500
  if (this._hostCapabilities = Z.hostCapabilities, this._hostInfo = Z.hostInfo, this._hostContext = Z.hostContext, await this.notification({ method: "ui/notifications/initialized" }), this.options?.autoResize) this.setupSizeChangedNotifications();
492
501
  } catch (Z) {
@@ -495,6 +504,6 @@ var CQ = class extends Protocol {
495
504
  }
496
505
  };
497
506
  //#endregion
498
- export { CQ as App, h as DOWNLOAD_FILE_METHOD, a as HOST_CONTEXT_CHANGED_METHOD, e as INITIALIZED_METHOD, s as INITIALIZE_METHOD, L as LATEST_PROTOCOL_VERSION, m as MESSAGE_METHOD, S as McpUiAppCapabilitiesSchema, J as McpUiDisplayModeSchema, BQ as McpUiDownloadFileRequestSchema, _ as McpUiDownloadFileResultSchema, x as McpUiHostCapabilitiesSchema, U as McpUiHostContextChangedNotificationSchema, q as McpUiHostContextSchema, b as McpUiHostCssSchema, C as McpUiHostStylesSchema, wQ as McpUiInitializeRequestSchema, R as McpUiInitializeResultSchema, EQ as McpUiInitializedNotificationSchema, _Q as McpUiMessageRequestSchema, O as McpUiMessageResultSchema, GQ as McpUiOpenLinkRequestSchema, B as McpUiOpenLinkResultSchema, WQ as McpUiRequestDisplayModeRequestSchema, P as McpUiRequestDisplayModeResultSchema, G as McpUiResourceCspSchema, LQ as McpUiResourceMetaSchema, V as McpUiResourcePermissionsSchema, F as McpUiResourceTeardownRequestSchema, jQ as McpUiResourceTeardownResultSchema, VQ as McpUiSandboxProxyReadyNotificationSchema, OQ as McpUiSandboxResourceReadyNotificationSchema, NQ as McpUiSizeChangedNotificationSchema, z as McpUiSupportedContentBlockModalitiesSchema, k as McpUiThemeSchema, A as McpUiToolCancelledNotificationSchema, I as McpUiToolInputNotificationSchema, w as McpUiToolInputPartialNotificationSchema, zQ as McpUiToolMetaSchema, T as McpUiToolResultNotificationSchema, g as McpUiToolVisibilitySchema, IQ as McpUiUpdateModelContextRequestSchema, d as OPEN_LINK_METHOD, K as PostMessageTransport, t as REQUEST_DISPLAY_MODE_METHOD, RX as RESOURCE_MIME_TYPE, o as RESOURCE_TEARDOWN_METHOD, UX as RESOURCE_URI_META_KEY, i as SANDBOX_PROXY_READY_METHOD, c as SANDBOX_RESOURCE_READY_METHOD, p as SIZE_CHANGED_METHOD, n as TOOL_CANCELLED_METHOD, r as TOOL_INPUT_METHOD, W as TOOL_INPUT_PARTIAL_METHOD, l as TOOL_RESULT_METHOD, FQ as applyDocumentTheme, TQ as applyHostFonts, PQ as applyHostStyleVariables, AQ as getDocumentTheme };
507
+ export { gQ as App, h as DOWNLOAD_FILE_METHOD, a as HOST_CONTEXT_CHANGED_METHOD, e as INITIALIZED_METHOD, t as INITIALIZE_METHOD, W as LATEST_PROTOCOL_VERSION, m as MESSAGE_METHOD, g as McpUiAppCapabilitiesSchema, J as McpUiDisplayModeSchema, OQ as McpUiDownloadFileRequestSchema, _ as McpUiDownloadFileResultSchema, x as McpUiHostCapabilitiesSchema, R as McpUiHostContextChangedNotificationSchema, T as McpUiHostContextSchema, k as McpUiHostCssSchema, C as McpUiHostStylesSchema, FQ as McpUiInitializeRequestSchema, U as McpUiInitializeResultSchema, zQ as McpUiInitializedNotificationSchema, IQ as McpUiMessageRequestSchema, O as McpUiMessageResultSchema, VQ as McpUiOpenLinkRequestSchema, B as McpUiOpenLinkResultSchema, BQ as McpUiRequestDisplayModeRequestSchema, P as McpUiRequestDisplayModeResultSchema, WQ as McpUiRequestTeardownNotificationSchema, G as McpUiResourceCspSchema, LQ as McpUiResourceMetaSchema, V as McpUiResourcePermissionsSchema, F as McpUiResourceTeardownRequestSchema, EQ as McpUiResourceTeardownResultSchema, NQ as McpUiSandboxProxyReadyNotificationSchema, wQ as McpUiSandboxResourceReadyNotificationSchema, jQ as McpUiSizeChangedNotificationSchema, L as McpUiSupportedContentBlockModalitiesSchema, b as McpUiThemeSchema, A as McpUiToolCancelledNotificationSchema, I as McpUiToolInputNotificationSchema, w as McpUiToolInputPartialNotificationSchema, _Q as McpUiToolMetaSchema, q as McpUiToolResultNotificationSchema, S as McpUiToolVisibilitySchema, AQ as McpUiUpdateModelContextRequestSchema, d as OPEN_LINK_METHOD, K as PostMessageTransport, QQ as REQUEST_DISPLAY_MODE_METHOD, o as REQUEST_TEARDOWN_METHOD, vX as RESOURCE_MIME_TYPE, s as RESOURCE_TEARDOWN_METHOD, MX as RESOURCE_URI_META_KEY, i as SANDBOX_PROXY_READY_METHOD, l as SANDBOX_RESOURCE_READY_METHOD, r as SIZE_CHANGED_METHOD, n as TOOL_CANCELLED_METHOD, p as TOOL_INPUT_METHOD, z as TOOL_INPUT_PARTIAL_METHOD, c as TOOL_RESULT_METHOD, qQ as applyDocumentTheme, RQ as applyHostFonts, TQ as applyHostStyleVariables, PQ as getDocumentTheme };
499
508
 
500
509
  //# sourceMappingURL=@modelcontextprotocol_ext-apps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"@modelcontextprotocol_ext-apps.js","names":["QQ","Q.union","Q.literal","Q.record","Q.string","Q.undefined","Q.object","Q.boolean","Q.array","Q.number","Q.unknown","YQ","$Q","M","XQ","ZQ","DQ","v","qQ","kQ","UQ","vQ","RQ","bQ","MQ","HQ"],"sources":["../../../../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.2.2_@modelcontextprotocol+sdk@1.27.1_zod@4.3.6__react-_e9bf7657371391a829fe8b4e289b253c/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js"],"sourcesContent":["import{Protocol as qQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";import{CallToolRequestSchema as UQ,CallToolResultSchema as RQ,EmptyResultSchema as HQ,ListResourcesResultSchema as MQ,ListToolsRequestSchema as vQ,PingRequestSchema as kQ,ReadResourceResultSchema as bQ}from\"@modelcontextprotocol/sdk/types.js\";import{JSONRPCMessageSchema as QQ}from\"@modelcontextprotocol/sdk/types.js\";var L=\"2026-01-26\",d=\"ui/open-link\",h=\"ui/download-file\",m=\"ui/message\",i=\"ui/notifications/sandbox-proxy-ready\",c=\"ui/notifications/sandbox-resource-ready\",p=\"ui/notifications/size-changed\",r=\"ui/notifications/tool-input\",W=\"ui/notifications/tool-input-partial\",l=\"ui/notifications/tool-result\",n=\"ui/notifications/tool-cancelled\",a=\"ui/notifications/host-context-changed\",o=\"ui/resource-teardown\",s=\"ui/initialize\",e=\"ui/notifications/initialized\",t=\"ui/request-display-mode\";class K{eventTarget;eventSource;messageListener;constructor(X=window.parent,Y){this.eventTarget=X;this.eventSource=Y;this.messageListener=(Z)=>{if(Y&&Z.source!==this.eventSource){console.debug(\"Ignoring message from unknown source\",Z);return}let $=QQ.safeParse(Z.data);if($.success)console.debug(\"Parsed message\",$.data),this.onmessage?.($.data);else if(Z.data?.jsonrpc!==\"2.0\")console.debug(\"Ignoring non-JSON-RPC message\",$.error.message,Z);else console.error(\"Failed to parse message\",$.error.message,Z),this.onerror?.(Error(\"Invalid JSON-RPC message received: \"+$.error.message))}}async start(){window.addEventListener(\"message\",this.messageListener)}async send(X,Y){if(X.method!==W)console.debug(\"Sending message\",X);this.eventTarget.postMessage(X,\"*\")}async close(){window.removeEventListener(\"message\",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}import{z as Q}from\"zod/v4\";import{ContentBlockSchema as M,CallToolResultSchema as XQ,EmbeddedResourceSchema as YQ,ImplementationSchema as v,RequestIdSchema as ZQ,ResourceLinkSchema as $Q,ToolSchema as DQ}from\"@modelcontextprotocol/sdk/types.js\";var k=Q.union([Q.literal(\"light\"),Q.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),J=Q.union([Q.literal(\"inline\"),Q.literal(\"fullscreen\"),Q.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),JQ=Q.union([Q.literal(\"--color-background-primary\"),Q.literal(\"--color-background-secondary\"),Q.literal(\"--color-background-tertiary\"),Q.literal(\"--color-background-inverse\"),Q.literal(\"--color-background-ghost\"),Q.literal(\"--color-background-info\"),Q.literal(\"--color-background-danger\"),Q.literal(\"--color-background-success\"),Q.literal(\"--color-background-warning\"),Q.literal(\"--color-background-disabled\"),Q.literal(\"--color-text-primary\"),Q.literal(\"--color-text-secondary\"),Q.literal(\"--color-text-tertiary\"),Q.literal(\"--color-text-inverse\"),Q.literal(\"--color-text-ghost\"),Q.literal(\"--color-text-info\"),Q.literal(\"--color-text-danger\"),Q.literal(\"--color-text-success\"),Q.literal(\"--color-text-warning\"),Q.literal(\"--color-text-disabled\"),Q.literal(\"--color-border-primary\"),Q.literal(\"--color-border-secondary\"),Q.literal(\"--color-border-tertiary\"),Q.literal(\"--color-border-inverse\"),Q.literal(\"--color-border-ghost\"),Q.literal(\"--color-border-info\"),Q.literal(\"--color-border-danger\"),Q.literal(\"--color-border-success\"),Q.literal(\"--color-border-warning\"),Q.literal(\"--color-border-disabled\"),Q.literal(\"--color-ring-primary\"),Q.literal(\"--color-ring-secondary\"),Q.literal(\"--color-ring-inverse\"),Q.literal(\"--color-ring-info\"),Q.literal(\"--color-ring-danger\"),Q.literal(\"--color-ring-success\"),Q.literal(\"--color-ring-warning\"),Q.literal(\"--font-sans\"),Q.literal(\"--font-mono\"),Q.literal(\"--font-weight-normal\"),Q.literal(\"--font-weight-medium\"),Q.literal(\"--font-weight-semibold\"),Q.literal(\"--font-weight-bold\"),Q.literal(\"--font-text-xs-size\"),Q.literal(\"--font-text-sm-size\"),Q.literal(\"--font-text-md-size\"),Q.literal(\"--font-text-lg-size\"),Q.literal(\"--font-heading-xs-size\"),Q.literal(\"--font-heading-sm-size\"),Q.literal(\"--font-heading-md-size\"),Q.literal(\"--font-heading-lg-size\"),Q.literal(\"--font-heading-xl-size\"),Q.literal(\"--font-heading-2xl-size\"),Q.literal(\"--font-heading-3xl-size\"),Q.literal(\"--font-text-xs-line-height\"),Q.literal(\"--font-text-sm-line-height\"),Q.literal(\"--font-text-md-line-height\"),Q.literal(\"--font-text-lg-line-height\"),Q.literal(\"--font-heading-xs-line-height\"),Q.literal(\"--font-heading-sm-line-height\"),Q.literal(\"--font-heading-md-line-height\"),Q.literal(\"--font-heading-lg-line-height\"),Q.literal(\"--font-heading-xl-line-height\"),Q.literal(\"--font-heading-2xl-line-height\"),Q.literal(\"--font-heading-3xl-line-height\"),Q.literal(\"--border-radius-xs\"),Q.literal(\"--border-radius-sm\"),Q.literal(\"--border-radius-md\"),Q.literal(\"--border-radius-lg\"),Q.literal(\"--border-radius-xl\"),Q.literal(\"--border-radius-full\"),Q.literal(\"--border-width-regular\"),Q.literal(\"--shadow-hairline\"),Q.literal(\"--shadow-sm\"),Q.literal(\"--shadow-md\"),Q.literal(\"--shadow-lg\")]).describe(\"CSS variable keys available to MCP apps for theming.\"),KQ=Q.record(JQ.describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Q.union([Q.string(),Q.undefined()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),GQ=Q.object({method:Q.literal(\"ui/open-link\"),params:Q.object({url:Q.string().describe(\"URL to open in the host's browser\")})}),B=Q.object({isError:Q.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),_=Q.object({isError:Q.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),O=Q.object({isError:Q.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),VQ=Q.object({method:Q.literal(\"ui/notifications/sandbox-proxy-ready\"),params:Q.object({})}),G=Q.object({connectDomains:Q.array(Q.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted → no network connections (secure default)`),resourceDomains:Q.array(Q.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:Q.array(Q.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:Q.array(Q.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'`)\")}),V=Q.object({camera:Q.object({}).optional().describe(\"Request camera access.\\n\\nMaps to Permission Policy `camera` feature.\"),microphone:Q.object({}).optional().describe(\"Request microphone access.\\n\\nMaps to Permission Policy `microphone` feature.\"),geolocation:Q.object({}).optional().describe(\"Request geolocation access.\\n\\nMaps to Permission Policy `geolocation` feature.\"),clipboardWrite:Q.object({}).optional().describe(\"Request clipboard write access.\\n\\nMaps to Permission Policy `clipboard-write` feature.\")}),NQ=Q.object({method:Q.literal(\"ui/notifications/size-changed\"),params:Q.object({width:Q.number().optional().describe(\"New width in pixels.\"),height:Q.number().optional().describe(\"New height in pixels.\")})}),I=Q.object({method:Q.literal(\"ui/notifications/tool-input\"),params:Q.object({arguments:Q.record(Q.string(),Q.unknown().describe(\"Complete tool call arguments as key-value pairs.\")).optional().describe(\"Complete tool call arguments as key-value pairs.\")})}),w=Q.object({method:Q.literal(\"ui/notifications/tool-input-partial\"),params:Q.object({arguments:Q.record(Q.string(),Q.unknown().describe(\"Partial tool call arguments (incomplete, may change).\")).optional().describe(\"Partial tool call arguments (incomplete, may change).\")})}),A=Q.object({method:Q.literal(\"ui/notifications/tool-cancelled\"),params:Q.object({reason:Q.string().optional().describe('Optional reason for the cancellation (e.g., \"user action\", \"timeout\").')})}),b=Q.object({fonts:Q.string().optional()}),C=Q.object({variables:KQ.optional().describe(\"CSS variables for theming the app.\"),css:b.optional().describe(\"CSS blocks that apps can inject.\")}),F=Q.object({method:Q.literal(\"ui/resource-teardown\"),params:Q.object({})}),jQ=Q.record(Q.string(),Q.unknown()),z=Q.object({text:Q.object({}).optional().describe(\"Host supports text content blocks.\"),image:Q.object({}).optional().describe(\"Host supports image content blocks.\"),audio:Q.object({}).optional().describe(\"Host supports audio content blocks.\"),resource:Q.object({}).optional().describe(\"Host supports resource content blocks.\"),resourceLink:Q.object({}).optional().describe(\"Host supports resource link content blocks.\"),structuredContent:Q.object({}).optional().describe(\"Host supports structured content.\")}),x=Q.object({experimental:Q.object({}).optional().describe(\"Experimental features (structure TBD).\"),openLinks:Q.object({}).optional().describe(\"Host supports opening external URLs.\"),downloadFile:Q.object({}).optional().describe(\"Host supports file downloads via ui/download-file.\"),serverTools:Q.object({listChanged:Q.boolean().optional().describe(\"Host supports tools/list_changed notifications.\")}).optional().describe(\"Host can proxy tool calls to the MCP server.\"),serverResources:Q.object({listChanged:Q.boolean().optional().describe(\"Host supports resources/list_changed notifications.\")}).optional().describe(\"Host can proxy resource reads to the MCP server.\"),logging:Q.object({}).optional().describe(\"Host accepts log messages.\"),sandbox:Q.object({permissions:V.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:G.optional().describe(\"CSP domains approved by the host.\")}).optional().describe(\"Sandbox configuration applied by the host.\"),updateModelContext:z.optional().describe(\"Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.\"),message:z.optional().describe(\"Host supports receiving content messages (ui/message) from the view.\")}),S=Q.object({experimental:Q.object({}).optional().describe(\"Experimental features (structure TBD).\"),tools:Q.object({listChanged:Q.boolean().optional().describe(\"App supports tools/list_changed notifications.\")}).optional().describe(\"App exposes MCP-style tools that the host can call.\"),availableDisplayModes:Q.array(J).optional().describe(\"Display modes the app supports.\")}),EQ=Q.object({method:Q.literal(\"ui/notifications/initialized\"),params:Q.object({}).optional()}),LQ=Q.object({csp:G.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:V.optional().describe(\"Sandbox permissions requested by the UI resource.\"),domain:Q.string().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Q.boolean().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),WQ=Q.object({method:Q.literal(\"ui/request-display-mode\"),params:Q.object({mode:J.describe(\"The display mode being requested.\")})}),P=Q.object({mode:J.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),g=Q.union([Q.literal(\"model\"),Q.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),zQ=Q.object({resourceUri:Q.string().optional(),visibility:Q.array(g).optional().describe(`Who can access this tool. Default: [\"model\", \"app\"]\n- \"model\": Tool visible to and callable by the agent\n- \"app\": Tool callable by the app from this server only`)}),mQ=Q.object({mimeTypes:Q.array(Q.string()).optional().describe('Array of supported MIME types for UI resources.\\nMust include `\"text/html;profile=mcp-app\"` for MCP Apps support.')}),BQ=Q.object({method:Q.literal(\"ui/download-file\"),params:Q.object({contents:Q.array(Q.union([YQ,$Q])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),_Q=Q.object({method:Q.literal(\"ui/message\"),params:Q.object({role:Q.literal(\"user\").describe('Message role, currently only \"user\" is supported.'),content:Q.array(M).describe(\"Message content blocks (text, image, etc.).\")})}),OQ=Q.object({method:Q.literal(\"ui/notifications/sandbox-resource-ready\"),params:Q.object({html:Q.string().describe(\"HTML content to load into the inner iframe.\"),sandbox:Q.string().optional().describe(\"Optional override for the inner iframe's sandbox attribute.\"),csp:G.optional().describe(\"CSP configuration from resource metadata.\"),permissions:V.optional().describe(\"Sandbox permissions from resource metadata.\")})}),T=Q.object({method:Q.literal(\"ui/notifications/tool-result\"),params:XQ.describe(\"Standard MCP tool execution result.\")}),q=Q.object({toolInfo:Q.object({id:ZQ.optional().describe(\"JSON-RPC id of the tools/call request.\"),tool:DQ.describe(\"Tool definition including name, inputSchema, etc.\")}).optional().describe(\"Metadata of the tool call that instantiated this App.\"),theme:k.optional().describe(\"Current color theme preference.\"),styles:C.optional().describe(\"Style configuration for theming the app.\"),displayMode:J.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:Q.array(J).optional().describe(\"Display modes the host supports.\"),containerDimensions:Q.union([Q.object({height:Q.number().describe(\"Fixed container height in pixels.\")}),Q.object({maxHeight:Q.union([Q.number(),Q.undefined()]).optional().describe(\"Maximum container height in pixels.\")})]).and(Q.union([Q.object({width:Q.number().describe(\"Fixed container width in pixels.\")}),Q.object({maxWidth:Q.union([Q.number(),Q.undefined()]).optional().describe(\"Maximum container width in pixels.\")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:Q.string().optional().describe(\"User's language and region preference in BCP 47 format.\"),timeZone:Q.string().optional().describe(\"User's timezone in IANA format.\"),userAgent:Q.string().optional().describe(\"Host application identifier.\"),platform:Q.union([Q.literal(\"web\"),Q.literal(\"desktop\"),Q.literal(\"mobile\")]).optional().describe(\"Platform type for responsive design decisions.\"),deviceCapabilities:Q.object({touch:Q.boolean().optional().describe(\"Whether the device supports touch input.\"),hover:Q.boolean().optional().describe(\"Whether the device supports hover interactions.\")}).optional().describe(\"Device input capabilities.\"),safeAreaInsets:Q.object({top:Q.number().describe(\"Top safe area inset in pixels.\"),right:Q.number().describe(\"Right safe area inset in pixels.\"),bottom:Q.number().describe(\"Bottom safe area inset in pixels.\"),left:Q.number().describe(\"Left safe area inset in pixels.\")}).optional().describe(\"Mobile safe area boundaries in pixels.\")}).passthrough(),U=Q.object({method:Q.literal(\"ui/notifications/host-context-changed\"),params:q.describe(\"Partial context update containing only changed fields.\")}),IQ=Q.object({method:Q.literal(\"ui/update-model-context\"),params:Q.object({content:Q.array(M).optional().describe(\"Context content blocks (text, image, etc.).\"),structuredContent:Q.record(Q.string(),Q.unknown().describe(\"Structured content for machine-readable context data.\")).optional().describe(\"Structured content for machine-readable context data.\")})}),wQ=Q.object({method:Q.literal(\"ui/initialize\"),params:Q.object({appInfo:v.describe(\"App identification (name and version).\"),appCapabilities:S.describe(\"Features and capabilities this app provides.\"),protocolVersion:Q.string().describe(\"Protocol version this app supports.\")})}),R=Q.object({protocolVersion:Q.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:v.describe(\"Host application identification and version.\"),hostCapabilities:x.describe(\"Features and capabilities provided by the host.\"),hostContext:q.describe(\"Rich context about the host environment.\")}).passthrough();function AQ(){let X=document.documentElement.getAttribute(\"data-theme\");if(X===\"dark\"||X===\"light\")return X;return document.documentElement.classList.contains(\"dark\")?\"dark\":\"light\"}function FQ(X){let Y=document.documentElement;Y.setAttribute(\"data-theme\",X),Y.style.colorScheme=X}function PQ(X,Y=document.documentElement){for(let[Z,$]of Object.entries(X))if($!==void 0)Y.style.setProperty(Z,$)}function TQ(X){if(document.getElementById(\"__mcp-host-fonts\"))return;let Z=document.createElement(\"style\");Z.id=\"__mcp-host-fonts\",Z.textContent=X,document.head.appendChild(Z)}var UX=\"ui/resourceUri\",RX=\"text/html;profile=mcp-app\";class CQ extends qQ{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;constructor(X,Y={},Z={autoResize:!0}){super(Z);this._appInfo=X;this._capabilities=Y;this.options=Z;this.setRequestHandler(kQ,($)=>{return console.log(\"Received ping:\",$.params),{}}),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(X){this.setNotificationHandler(I,(Y)=>X(Y.params))}set ontoolinputpartial(X){this.setNotificationHandler(w,(Y)=>X(Y.params))}set ontoolresult(X){this.setNotificationHandler(T,(Y)=>X(Y.params))}set ontoolcancelled(X){this.setNotificationHandler(A,(Y)=>X(Y.params))}set onhostcontextchanged(X){this.setNotificationHandler(U,(Y)=>{this._hostContext={...this._hostContext,...Y.params},X(Y.params)})}set onteardown(X){this.setRequestHandler(F,(Y,Z)=>X(Y.params,Z))}set oncalltool(X){this.setRequestHandler(UQ,(Y,Z)=>X(Y.params,Z))}set onlisttools(X){this.setRequestHandler(vQ,(Y,Z)=>X(Y.params,Z))}assertCapabilityForMethod(X){}assertRequestHandlerCapability(X){switch(X){case\"tools/call\":case\"tools/list\":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${X})`);return;case\"ping\":case\"ui/resource-teardown\":return;default:throw Error(`No handler for method ${X} registered`)}}assertNotificationCapability(X){}assertTaskCapability(X){throw Error(\"Tasks are not supported in MCP Apps\")}assertTaskHandlerCapability(X){throw Error(\"Task handlers are not supported in MCP Apps\")}async callServerTool(X,Y){if(typeof X===\"string\")throw Error(`callServerTool() expects an object as its first argument, but received a string (\"${X}\"). Did you mean: callServerTool({ name: \"${X}\", arguments: { ... } })?`);return await this.request({method:\"tools/call\",params:X},RQ,Y)}async readServerResource(X,Y){return await this.request({method:\"resources/read\",params:X},bQ,Y)}async listServerResources(X,Y){return await this.request({method:\"resources/list\",params:X},MQ,Y)}sendMessage(X,Y){return this.request({method:\"ui/message\",params:X},O,Y)}sendLog(X){return this.notification({method:\"notifications/message\",params:X})}updateModelContext(X,Y){return this.request({method:\"ui/update-model-context\",params:X},HQ,Y)}openLink(X,Y){return this.request({method:\"ui/open-link\",params:X},B,Y)}sendOpenLink=this.openLink;downloadFile(X,Y){return this.request({method:\"ui/download-file\",params:X},_,Y)}requestDisplayMode(X,Y){return this.request({method:\"ui/request-display-mode\",params:X},P,Y)}sendSizeChanged(X){return this.notification({method:\"ui/notifications/size-changed\",params:X})}setupSizeChangedNotifications(){let X=!1,Y=0,Z=0,$=()=>{if(X)return;X=!0,requestAnimationFrame(()=>{X=!1;let D=document.documentElement,y=D.style.width,u=D.style.height;D.style.width=\"fit-content\",D.style.height=\"max-content\";let H=D.getBoundingClientRect();D.style.width=y,D.style.height=u;let f=window.innerWidth-D.clientWidth,j=Math.ceil(H.width+f),E=Math.ceil(H.height);if(j!==Y||E!==Z)Y=j,Z=E,this.sendSizeChanged({width:j,height:E})})};$();let N=new ResizeObserver($);return N.observe(document.documentElement),N.observe(document.body),()=>N.disconnect()}async connect(X=new K(window.parent,window.parent),Y){if(this.transport)throw Error(\"App is already connected. Call close() before connecting again.\");await super.connect(X);try{let Z=await this.request({method:\"ui/initialize\",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:L}},R,Y);if(Z===void 0)throw Error(`Server sent invalid initialize result: ${Z}`);if(this._hostCapabilities=Z.hostCapabilities,this._hostInfo=Z.hostInfo,this._hostContext=Z.hostContext,await this.notification({method:\"ui/notifications/initialized\"}),this.options?.autoResize)this.setupSizeChangedNotifications()}catch(Z){throw this.close(),Z}}}export{AQ as getDocumentTheme,PQ as applyHostStyleVariables,TQ as applyHostFonts,FQ as applyDocumentTheme,l as TOOL_RESULT_METHOD,W as TOOL_INPUT_PARTIAL_METHOD,r as TOOL_INPUT_METHOD,n as TOOL_CANCELLED_METHOD,p as SIZE_CHANGED_METHOD,c as SANDBOX_RESOURCE_READY_METHOD,i as SANDBOX_PROXY_READY_METHOD,UX as RESOURCE_URI_META_KEY,o as RESOURCE_TEARDOWN_METHOD,RX as RESOURCE_MIME_TYPE,t as REQUEST_DISPLAY_MODE_METHOD,K as PostMessageTransport,d as OPEN_LINK_METHOD,IQ as McpUiUpdateModelContextRequestSchema,g as McpUiToolVisibilitySchema,T as McpUiToolResultNotificationSchema,zQ as McpUiToolMetaSchema,w as McpUiToolInputPartialNotificationSchema,I as McpUiToolInputNotificationSchema,A as McpUiToolCancelledNotificationSchema,k as McpUiThemeSchema,z as McpUiSupportedContentBlockModalitiesSchema,NQ as McpUiSizeChangedNotificationSchema,OQ as McpUiSandboxResourceReadyNotificationSchema,VQ as McpUiSandboxProxyReadyNotificationSchema,jQ as McpUiResourceTeardownResultSchema,F as McpUiResourceTeardownRequestSchema,V as McpUiResourcePermissionsSchema,LQ as McpUiResourceMetaSchema,G as McpUiResourceCspSchema,P as McpUiRequestDisplayModeResultSchema,WQ as McpUiRequestDisplayModeRequestSchema,B as McpUiOpenLinkResultSchema,GQ as McpUiOpenLinkRequestSchema,O as McpUiMessageResultSchema,_Q as McpUiMessageRequestSchema,EQ as McpUiInitializedNotificationSchema,R as McpUiInitializeResultSchema,wQ as McpUiInitializeRequestSchema,C as McpUiHostStylesSchema,b as McpUiHostCssSchema,q as McpUiHostContextSchema,U as McpUiHostContextChangedNotificationSchema,x as McpUiHostCapabilitiesSchema,_ as McpUiDownloadFileResultSchema,BQ as McpUiDownloadFileRequestSchema,J as McpUiDisplayModeSchema,S as McpUiAppCapabilitiesSchema,m as MESSAGE_METHOD,L as LATEST_PROTOCOL_VERSION,s as INITIALIZE_METHOD,e as INITIALIZED_METHOD,a as HOST_CONTEXT_CHANGED_METHOD,h as DOWNLOAD_FILE_METHOD,CQ as App};\n"],"x_google_ignoreList":[0],"mappings":";;;AAAuY,IAAI,IAAE,cAAa,IAAE,gBAAe,IAAE,oBAAmB,IAAE,cAAa,IAAE,wCAAuC,IAAE,2CAA0C,IAAE,iCAAgC,IAAE,+BAA8B,IAAE,uCAAsC,IAAE,gCAA+B,IAAE,mCAAkC,IAAE,yCAAwC,IAAE,wBAAuB,IAAE,iBAAgB,IAAE,gCAA+B,IAAE;AAA0B,IAAM,IAAN,MAAO;CAAC;CAAY;CAAY;CAAgB,YAAY,IAAE,OAAO,QAAO,GAAE;AAAC,OAAK,cAAY;AAAE,OAAK,cAAY;AAAE,OAAK,mBAAiB,MAAI;AAAC,OAAG,KAAG,E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Q","JQ","v","UQ","CQ","HQ","kQ","MQ","xQ","bQ","vQ"],"sources":["../../../../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.1_@modelcontextprotocol+sdk@1.27.1_zod@4.3.6__react-_cd1fb28fd87e0bddd0a29eba0721855d/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js"],"sourcesContent":["import{Protocol as UQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";import{CallToolRequestSchema as HQ,CallToolResultSchema as MQ,EmptyResultSchema as vQ,ListResourcesResultSchema as bQ,ListToolsRequestSchema as kQ,PingRequestSchema as CQ,ReadResourceResultSchema as xQ}from\"@modelcontextprotocol/sdk/types.js\";import{JSONRPCMessageSchema as XQ}from\"@modelcontextprotocol/sdk/types.js\";var W=\"2026-01-26\",d=\"ui/open-link\",h=\"ui/download-file\",m=\"ui/message\",i=\"ui/notifications/sandbox-proxy-ready\",l=\"ui/notifications/sandbox-resource-ready\",r=\"ui/notifications/size-changed\",p=\"ui/notifications/tool-input\",z=\"ui/notifications/tool-input-partial\",c=\"ui/notifications/tool-result\",n=\"ui/notifications/tool-cancelled\",a=\"ui/notifications/host-context-changed\",o=\"ui/notifications/request-teardown\",s=\"ui/resource-teardown\",t=\"ui/initialize\",e=\"ui/notifications/initialized\",QQ=\"ui/request-display-mode\";class K{eventTarget;eventSource;messageListener;constructor(X=window.parent,Y){this.eventTarget=X;this.eventSource=Y;this.messageListener=(Z)=>{if(Y&&Z.source!==this.eventSource){console.debug(\"Ignoring message from unknown source\",Z);return}let $=XQ.safeParse(Z.data);if($.success)console.debug(\"Parsed message\",$.data),this.onmessage?.($.data);else if(Z.data?.jsonrpc!==\"2.0\")console.debug(\"Ignoring non-JSON-RPC message\",$.error.message,Z);else console.error(\"Failed to parse message\",$.error.message,Z),this.onerror?.(Error(\"Invalid JSON-RPC message received: \"+$.error.message))}}async start(){window.addEventListener(\"message\",this.messageListener)}async send(X,Y){if(X.method!==z)console.debug(\"Sending message\",X);this.eventTarget.postMessage(X,\"*\")}async close(){window.removeEventListener(\"message\",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}import{z as Q}from\"zod/v4\";import{ContentBlockSchema as M,CallToolResultSchema as YQ,EmbeddedResourceSchema as ZQ,ImplementationSchema as v,RequestIdSchema as $Q,ResourceLinkSchema as DQ,ToolSchema as JQ}from\"@modelcontextprotocol/sdk/types.js\";var b=Q.union([Q.literal(\"light\"),Q.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),J=Q.union([Q.literal(\"inline\"),Q.literal(\"fullscreen\"),Q.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),KQ=Q.union([Q.literal(\"--color-background-primary\"),Q.literal(\"--color-background-secondary\"),Q.literal(\"--color-background-tertiary\"),Q.literal(\"--color-background-inverse\"),Q.literal(\"--color-background-ghost\"),Q.literal(\"--color-background-info\"),Q.literal(\"--color-background-danger\"),Q.literal(\"--color-background-success\"),Q.literal(\"--color-background-warning\"),Q.literal(\"--color-background-disabled\"),Q.literal(\"--color-text-primary\"),Q.literal(\"--color-text-secondary\"),Q.literal(\"--color-text-tertiary\"),Q.literal(\"--color-text-inverse\"),Q.literal(\"--color-text-ghost\"),Q.literal(\"--color-text-info\"),Q.literal(\"--color-text-danger\"),Q.literal(\"--color-text-success\"),Q.literal(\"--color-text-warning\"),Q.literal(\"--color-text-disabled\"),Q.literal(\"--color-border-primary\"),Q.literal(\"--color-border-secondary\"),Q.literal(\"--color-border-tertiary\"),Q.literal(\"--color-border-inverse\"),Q.literal(\"--color-border-ghost\"),Q.literal(\"--color-border-info\"),Q.literal(\"--color-border-danger\"),Q.literal(\"--color-border-success\"),Q.literal(\"--color-border-warning\"),Q.literal(\"--color-border-disabled\"),Q.literal(\"--color-ring-primary\"),Q.literal(\"--color-ring-secondary\"),Q.literal(\"--color-ring-inverse\"),Q.literal(\"--color-ring-info\"),Q.literal(\"--color-ring-danger\"),Q.literal(\"--color-ring-success\"),Q.literal(\"--color-ring-warning\"),Q.literal(\"--font-sans\"),Q.literal(\"--font-mono\"),Q.literal(\"--font-weight-normal\"),Q.literal(\"--font-weight-medium\"),Q.literal(\"--font-weight-semibold\"),Q.literal(\"--font-weight-bold\"),Q.literal(\"--font-text-xs-size\"),Q.literal(\"--font-text-sm-size\"),Q.literal(\"--font-text-md-size\"),Q.literal(\"--font-text-lg-size\"),Q.literal(\"--font-heading-xs-size\"),Q.literal(\"--font-heading-sm-size\"),Q.literal(\"--font-heading-md-size\"),Q.literal(\"--font-heading-lg-size\"),Q.literal(\"--font-heading-xl-size\"),Q.literal(\"--font-heading-2xl-size\"),Q.literal(\"--font-heading-3xl-size\"),Q.literal(\"--font-text-xs-line-height\"),Q.literal(\"--font-text-sm-line-height\"),Q.literal(\"--font-text-md-line-height\"),Q.literal(\"--font-text-lg-line-height\"),Q.literal(\"--font-heading-xs-line-height\"),Q.literal(\"--font-heading-sm-line-height\"),Q.literal(\"--font-heading-md-line-height\"),Q.literal(\"--font-heading-lg-line-height\"),Q.literal(\"--font-heading-xl-line-height\"),Q.literal(\"--font-heading-2xl-line-height\"),Q.literal(\"--font-heading-3xl-line-height\"),Q.literal(\"--border-radius-xs\"),Q.literal(\"--border-radius-sm\"),Q.literal(\"--border-radius-md\"),Q.literal(\"--border-radius-lg\"),Q.literal(\"--border-radius-xl\"),Q.literal(\"--border-radius-full\"),Q.literal(\"--border-width-regular\"),Q.literal(\"--shadow-hairline\"),Q.literal(\"--shadow-sm\"),Q.literal(\"--shadow-md\"),Q.literal(\"--shadow-lg\")]).describe(\"CSS variable keys available to MCP apps for theming.\"),GQ=Q.record(KQ.describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),Q.union([Q.string(),Q.undefined()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),VQ=Q.object({method:Q.literal(\"ui/open-link\"),params:Q.object({url:Q.string().describe(\"URL to open in the host's browser\")})}),B=Q.object({isError:Q.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),_=Q.object({isError:Q.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),O=Q.object({isError:Q.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),NQ=Q.object({method:Q.literal(\"ui/notifications/sandbox-proxy-ready\"),params:Q.object({})}),G=Q.object({connectDomains:Q.array(Q.string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted → no network connections (secure default)`),resourceDomains:Q.array(Q.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:Q.array(Q.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:Q.array(Q.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'`)\")}),V=Q.object({camera:Q.object({}).optional().describe(\"Request camera access.\\n\\nMaps to Permission Policy `camera` feature.\"),microphone:Q.object({}).optional().describe(\"Request microphone access.\\n\\nMaps to Permission Policy `microphone` feature.\"),geolocation:Q.object({}).optional().describe(\"Request geolocation access.\\n\\nMaps to Permission Policy `geolocation` feature.\"),clipboardWrite:Q.object({}).optional().describe(\"Request clipboard write access.\\n\\nMaps to Permission Policy `clipboard-write` feature.\")}),jQ=Q.object({method:Q.literal(\"ui/notifications/size-changed\"),params:Q.object({width:Q.number().optional().describe(\"New width in pixels.\"),height:Q.number().optional().describe(\"New height in pixels.\")})}),I=Q.object({method:Q.literal(\"ui/notifications/tool-input\"),params:Q.object({arguments:Q.record(Q.string(),Q.unknown().describe(\"Complete tool call arguments as key-value pairs.\")).optional().describe(\"Complete tool call arguments as key-value pairs.\")})}),w=Q.object({method:Q.literal(\"ui/notifications/tool-input-partial\"),params:Q.object({arguments:Q.record(Q.string(),Q.unknown().describe(\"Partial tool call arguments (incomplete, may change).\")).optional().describe(\"Partial tool call arguments (incomplete, may change).\")})}),A=Q.object({method:Q.literal(\"ui/notifications/tool-cancelled\"),params:Q.object({reason:Q.string().optional().describe('Optional reason for the cancellation (e.g., \"user action\", \"timeout\").')})}),k=Q.object({fonts:Q.string().optional()}),C=Q.object({variables:GQ.optional().describe(\"CSS variables for theming the app.\"),css:k.optional().describe(\"CSS blocks that apps can inject.\")}),F=Q.object({method:Q.literal(\"ui/resource-teardown\"),params:Q.object({})}),EQ=Q.record(Q.string(),Q.unknown()),L=Q.object({text:Q.object({}).optional().describe(\"Host supports text content blocks.\"),image:Q.object({}).optional().describe(\"Host supports image content blocks.\"),audio:Q.object({}).optional().describe(\"Host supports audio content blocks.\"),resource:Q.object({}).optional().describe(\"Host supports resource content blocks.\"),resourceLink:Q.object({}).optional().describe(\"Host supports resource link content blocks.\"),structuredContent:Q.object({}).optional().describe(\"Host supports structured content.\")}),WQ=Q.object({method:Q.literal(\"ui/notifications/request-teardown\"),params:Q.object({}).optional()}),x=Q.object({experimental:Q.object({}).optional().describe(\"Experimental features (structure TBD).\"),openLinks:Q.object({}).optional().describe(\"Host supports opening external URLs.\"),downloadFile:Q.object({}).optional().describe(\"Host supports file downloads via ui/download-file.\"),serverTools:Q.object({listChanged:Q.boolean().optional().describe(\"Host supports tools/list_changed notifications.\")}).optional().describe(\"Host can proxy tool calls to the MCP server.\"),serverResources:Q.object({listChanged:Q.boolean().optional().describe(\"Host supports resources/list_changed notifications.\")}).optional().describe(\"Host can proxy resource reads to the MCP server.\"),logging:Q.object({}).optional().describe(\"Host accepts log messages.\"),sandbox:Q.object({permissions:V.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:G.optional().describe(\"CSP domains approved by the host.\")}).optional().describe(\"Sandbox configuration applied by the host.\"),updateModelContext:L.optional().describe(\"Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.\"),message:L.optional().describe(\"Host supports receiving content messages (ui/message) from the view.\")}),g=Q.object({experimental:Q.object({}).optional().describe(\"Experimental features (structure TBD).\"),tools:Q.object({listChanged:Q.boolean().optional().describe(\"App supports tools/list_changed notifications.\")}).optional().describe(\"App exposes MCP-style tools that the host can call.\"),availableDisplayModes:Q.array(J).optional().describe(\"Display modes the app supports.\")}),zQ=Q.object({method:Q.literal(\"ui/notifications/initialized\"),params:Q.object({}).optional()}),LQ=Q.object({csp:G.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:V.optional().describe(\"Sandbox permissions requested by the UI resource.\"),domain:Q.string().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:Q.boolean().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),BQ=Q.object({method:Q.literal(\"ui/request-display-mode\"),params:Q.object({mode:J.describe(\"The display mode being requested.\")})}),P=Q.object({mode:J.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),S=Q.union([Q.literal(\"model\"),Q.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),_Q=Q.object({resourceUri:Q.string().optional(),visibility:Q.array(S).optional().describe(`Who can access this tool. Default: [\"model\", \"app\"]\n- \"model\": Tool visible to and callable by the agent\n- \"app\": Tool callable by the app from this server only`)}),lQ=Q.object({mimeTypes:Q.array(Q.string()).optional().describe('Array of supported MIME types for UI resources.\\nMust include `\"text/html;profile=mcp-app\"` for MCP Apps support.')}),OQ=Q.object({method:Q.literal(\"ui/download-file\"),params:Q.object({contents:Q.array(Q.union([ZQ,DQ])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),IQ=Q.object({method:Q.literal(\"ui/message\"),params:Q.object({role:Q.literal(\"user\").describe('Message role, currently only \"user\" is supported.'),content:Q.array(M).describe(\"Message content blocks (text, image, etc.).\")})}),wQ=Q.object({method:Q.literal(\"ui/notifications/sandbox-resource-ready\"),params:Q.object({html:Q.string().describe(\"HTML content to load into the inner iframe.\"),sandbox:Q.string().optional().describe(\"Optional override for the inner iframe's sandbox attribute.\"),csp:G.optional().describe(\"CSP configuration from resource metadata.\"),permissions:V.optional().describe(\"Sandbox permissions from resource metadata.\")})}),q=Q.object({method:Q.literal(\"ui/notifications/tool-result\"),params:YQ.describe(\"Standard MCP tool execution result.\")}),T=Q.object({toolInfo:Q.object({id:$Q.optional().describe(\"JSON-RPC id of the tools/call request.\"),tool:JQ.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:J.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:Q.array(J).optional().describe(\"Display modes the host supports.\"),containerDimensions:Q.union([Q.object({height:Q.number().describe(\"Fixed container height in pixels.\")}),Q.object({maxHeight:Q.union([Q.number(),Q.undefined()]).optional().describe(\"Maximum container height in pixels.\")})]).and(Q.union([Q.object({width:Q.number().describe(\"Fixed container width in pixels.\")}),Q.object({maxWidth:Q.union([Q.number(),Q.undefined()]).optional().describe(\"Maximum container width in pixels.\")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:Q.string().optional().describe(\"User's language and region preference in BCP 47 format.\"),timeZone:Q.string().optional().describe(\"User's timezone in IANA format.\"),userAgent:Q.string().optional().describe(\"Host application identifier.\"),platform:Q.union([Q.literal(\"web\"),Q.literal(\"desktop\"),Q.literal(\"mobile\")]).optional().describe(\"Platform type for responsive design decisions.\"),deviceCapabilities:Q.object({touch:Q.boolean().optional().describe(\"Whether the device supports touch input.\"),hover:Q.boolean().optional().describe(\"Whether the device supports hover interactions.\")}).optional().describe(\"Device input capabilities.\"),safeAreaInsets:Q.object({top:Q.number().describe(\"Top safe area inset in pixels.\"),right:Q.number().describe(\"Right safe area inset in pixels.\"),bottom:Q.number().describe(\"Bottom safe area inset in pixels.\"),left:Q.number().describe(\"Left safe area inset in pixels.\")}).optional().describe(\"Mobile safe area boundaries in pixels.\")}).passthrough(),R=Q.object({method:Q.literal(\"ui/notifications/host-context-changed\"),params:T.describe(\"Partial context update containing only changed fields.\")}),AQ=Q.object({method:Q.literal(\"ui/update-model-context\"),params:Q.object({content:Q.array(M).optional().describe(\"Context content blocks (text, image, etc.).\"),structuredContent:Q.record(Q.string(),Q.unknown().describe(\"Structured content for machine-readable context data.\")).optional().describe(\"Structured content for machine-readable context data.\")})}),FQ=Q.object({method:Q.literal(\"ui/initialize\"),params:Q.object({appInfo:v.describe(\"App identification (name and version).\"),appCapabilities:g.describe(\"Features and capabilities this app provides.\"),protocolVersion:Q.string().describe(\"Protocol version this app supports.\")})}),U=Q.object({protocolVersion:Q.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:v.describe(\"Host application identification and version.\"),hostCapabilities:x.describe(\"Features and capabilities provided by the host.\"),hostContext:T.describe(\"Rich context about the host environment.\")}).passthrough();function PQ(){let X=document.documentElement.getAttribute(\"data-theme\");if(X===\"dark\"||X===\"light\")return X;return document.documentElement.classList.contains(\"dark\")?\"dark\":\"light\"}function qQ(X){let Y=document.documentElement;Y.setAttribute(\"data-theme\",X),Y.style.colorScheme=X}function TQ(X,Y=document.documentElement){for(let[Z,$]of Object.entries(X))if($!==void 0)Y.style.setProperty(Z,$)}function RQ(X){if(document.getElementById(\"__mcp-host-fonts\"))return;let Z=document.createElement(\"style\");Z.id=\"__mcp-host-fonts\",Z.textContent=X,document.head.appendChild(Z)}var MX=\"ui/resourceUri\",vX=\"text/html;profile=mcp-app\";class gQ extends UQ{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;constructor(X,Y={},Z={autoResize:!0}){super(Z);this._appInfo=X;this._capabilities=Y;this.options=Z;this.setRequestHandler(CQ,($)=>{return console.log(\"Received ping:\",$.params),{}}),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(X){this.setNotificationHandler(I,(Y)=>X(Y.params))}set ontoolinputpartial(X){this.setNotificationHandler(w,(Y)=>X(Y.params))}set ontoolresult(X){this.setNotificationHandler(q,(Y)=>X(Y.params))}set ontoolcancelled(X){this.setNotificationHandler(A,(Y)=>X(Y.params))}set onhostcontextchanged(X){this.setNotificationHandler(R,(Y)=>{this._hostContext={...this._hostContext,...Y.params},X(Y.params)})}set onteardown(X){this.setRequestHandler(F,(Y,Z)=>X(Y.params,Z))}set oncalltool(X){this.setRequestHandler(HQ,(Y,Z)=>X(Y.params,Z))}set onlisttools(X){this.setRequestHandler(kQ,(Y,Z)=>X(Y.params,Z))}assertCapabilityForMethod(X){}assertRequestHandlerCapability(X){switch(X){case\"tools/call\":case\"tools/list\":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${X})`);return;case\"ping\":case\"ui/resource-teardown\":return;default:throw Error(`No handler for method ${X} registered`)}}assertNotificationCapability(X){}assertTaskCapability(X){throw Error(\"Tasks are not supported in MCP Apps\")}assertTaskHandlerCapability(X){throw Error(\"Task handlers are not supported in MCP Apps\")}async callServerTool(X,Y){if(typeof X===\"string\")throw Error(`callServerTool() expects an object as its first argument, but received a string (\"${X}\"). Did you mean: callServerTool({ name: \"${X}\", arguments: { ... } })?`);return await this.request({method:\"tools/call\",params:X},MQ,Y)}async readServerResource(X,Y){return await this.request({method:\"resources/read\",params:X},xQ,Y)}async listServerResources(X,Y){return await this.request({method:\"resources/list\",params:X},bQ,Y)}sendMessage(X,Y){return this.request({method:\"ui/message\",params:X},O,Y)}sendLog(X){return this.notification({method:\"notifications/message\",params:X})}updateModelContext(X,Y){return this.request({method:\"ui/update-model-context\",params:X},vQ,Y)}openLink(X,Y){return this.request({method:\"ui/open-link\",params:X},B,Y)}sendOpenLink=this.openLink;downloadFile(X,Y){return this.request({method:\"ui/download-file\",params:X},_,Y)}requestTeardown(X={}){return this.notification({method:\"ui/notifications/request-teardown\",params:X})}requestDisplayMode(X,Y){return this.request({method:\"ui/request-display-mode\",params:X},P,Y)}sendSizeChanged(X){return this.notification({method:\"ui/notifications/size-changed\",params:X})}setupSizeChangedNotifications(){let X=!1,Y=0,Z=0,$=()=>{if(X)return;X=!0,requestAnimationFrame(()=>{X=!1;let D=document.documentElement,y=D.style.width,u=D.style.height;D.style.width=\"fit-content\",D.style.height=\"max-content\";let H=D.getBoundingClientRect();D.style.width=y,D.style.height=u;let f=window.innerWidth-D.clientWidth,j=Math.ceil(H.width+f),E=Math.ceil(H.height);if(j!==Y||E!==Z)Y=j,Z=E,this.sendSizeChanged({width:j,height:E})})};$();let N=new ResizeObserver($);return N.observe(document.documentElement),N.observe(document.body),()=>N.disconnect()}async connect(X=new K(window.parent,window.parent),Y){if(this.transport)throw Error(\"App is already connected. Call close() before connecting again.\");await super.connect(X);try{let Z=await this.request({method:\"ui/initialize\",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:W}},U,Y);if(Z===void 0)throw Error(`Server sent invalid initialize result: ${Z}`);if(this._hostCapabilities=Z.hostCapabilities,this._hostInfo=Z.hostInfo,this._hostContext=Z.hostContext,await this.notification({method:\"ui/notifications/initialized\"}),this.options?.autoResize)this.setupSizeChangedNotifications()}catch(Z){throw this.close(),Z}}}export{PQ as getDocumentTheme,TQ as applyHostStyleVariables,RQ as applyHostFonts,qQ as applyDocumentTheme,c as TOOL_RESULT_METHOD,z as TOOL_INPUT_PARTIAL_METHOD,p as TOOL_INPUT_METHOD,n as TOOL_CANCELLED_METHOD,r as SIZE_CHANGED_METHOD,l as SANDBOX_RESOURCE_READY_METHOD,i as SANDBOX_PROXY_READY_METHOD,MX as RESOURCE_URI_META_KEY,s as RESOURCE_TEARDOWN_METHOD,vX as RESOURCE_MIME_TYPE,o as REQUEST_TEARDOWN_METHOD,QQ as REQUEST_DISPLAY_MODE_METHOD,K as PostMessageTransport,d as OPEN_LINK_METHOD,AQ as McpUiUpdateModelContextRequestSchema,S as McpUiToolVisibilitySchema,q as McpUiToolResultNotificationSchema,_Q as McpUiToolMetaSchema,w as McpUiToolInputPartialNotificationSchema,I as McpUiToolInputNotificationSchema,A as McpUiToolCancelledNotificationSchema,b as McpUiThemeSchema,L as McpUiSupportedContentBlockModalitiesSchema,jQ as McpUiSizeChangedNotificationSchema,wQ as McpUiSandboxResourceReadyNotificationSchema,NQ as McpUiSandboxProxyReadyNotificationSchema,EQ as McpUiResourceTeardownResultSchema,F as McpUiResourceTeardownRequestSchema,V as McpUiResourcePermissionsSchema,LQ as McpUiResourceMetaSchema,G as McpUiResourceCspSchema,WQ as McpUiRequestTeardownNotificationSchema,P as McpUiRequestDisplayModeResultSchema,BQ as McpUiRequestDisplayModeRequestSchema,B as McpUiOpenLinkResultSchema,VQ as McpUiOpenLinkRequestSchema,O as McpUiMessageResultSchema,IQ as McpUiMessageRequestSchema,zQ as McpUiInitializedNotificationSchema,U as McpUiInitializeResultSchema,FQ as McpUiInitializeRequestSchema,C as McpUiHostStylesSchema,k as McpUiHostCssSchema,T as McpUiHostContextSchema,R as McpUiHostContextChangedNotificationSchema,x as McpUiHostCapabilitiesSchema,_ as McpUiDownloadFileResultSchema,OQ as McpUiDownloadFileRequestSchema,J as McpUiDisplayModeSchema,g as McpUiAppCapabilitiesSchema,m as MESSAGE_METHOD,W as LATEST_PROTOCOL_VERSION,t as INITIALIZE_METHOD,e as INITIALIZED_METHOD,a as HOST_CONTEXT_CHANGED_METHOD,h as DOWNLOAD_FILE_METHOD,gQ as App};\n"],"x_google_ignoreList":[0],"mappings":";;;AAAuY,IAAI,IAAE,cAAa,IAAE,gBAAe,IAAE,oBAAmB,IAAE,cAAa,IAAE,wCAAuC,IAAE,2CAA0C,IAAE,iCAAgC,IAAE,+BAA8B,IAAE,uCAAsC,IAAE,gCAA+B,IAAE,mCAAkC,IAAE,yCAAwC,IAAE,qCAAoC,IAAE,wBAAuB,IAAE,iBAAgB,IAAE,gCAA+B,KAAG;AAA0B,IAAM,IAAN,MAAO;CAAC;CAAY;CAAY;CAAgB,YAAY,IAAE,OAAO,QAAO,GAAE;AAAC,OAAK,cAAY;AAAE,OAAK,cAAY;AAAE,OAAK,mBAAiB,MAAI;AAAC,OAAG,KAAG,EAAE,WAAS,KAAK,aAAY;AAAC,YAAQ,MAAM,wCAAuC,EAAE;AAAC;;GAAO,IAAI,IAAEA,qBAAG,UAAU,EAAE,KAAK;AAAC,OAAG,EAAE,QAAQ,SAAQ,MAAM,kBAAiB,EAAE,KAAK,EAAC,KAAK,YAAY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