sunpeak 0.18.2 → 0.18.7

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 (76) hide show
  1. package/bin/commands/dev.mjs +6 -2
  2. package/bin/commands/inspect.mjs +405 -5
  3. package/bin/commands/new.mjs +5 -0
  4. package/bin/lib/dev-overlay.mjs +50 -0
  5. package/bin/lib/live/live-config.d.mts +3 -0
  6. package/bin/lib/live/live-config.mjs +3 -1
  7. package/bin/lib/sandbox-server.mjs +11 -1
  8. package/dist/chatgpt/index.cjs +2 -2
  9. package/dist/chatgpt/index.js +2 -2
  10. package/dist/claude/index.cjs +1 -1
  11. package/dist/claude/index.js +1 -1
  12. package/dist/hooks/index.d.ts +1 -0
  13. package/dist/hooks/use-request-teardown.d.ts +21 -0
  14. package/dist/host/chatgpt/index.cjs +1 -1
  15. package/dist/host/chatgpt/index.js +1 -1
  16. package/dist/index.cjs +110 -70
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.ts +3 -3
  19. package/dist/index.js +68 -31
  20. package/dist/index.js.map +1 -1
  21. package/dist/inspector/hosts.d.ts +12 -0
  22. package/dist/inspector/index.cjs +2 -2
  23. package/dist/inspector/index.js +2 -2
  24. package/dist/inspector/inspector-url.d.ts +13 -0
  25. package/dist/inspector/mcp-app-host.d.ts +3 -0
  26. package/dist/inspector/simple-sidebar.d.ts +1 -1
  27. package/dist/inspector/use-inspector-state.d.ts +2 -0
  28. package/dist/inspector/use-mcp-connection.d.ts +9 -1
  29. package/dist/{inspector-CByJjmPD.cjs → inspector-CKc58UuI.cjs} +557 -136
  30. package/dist/inspector-CKc58UuI.cjs.map +1 -0
  31. package/dist/{inspector-ClhpqKLi.js → inspector-DZrN0kej.js} +556 -135
  32. package/dist/inspector-DZrN0kej.js.map +1 -0
  33. package/dist/{inspector-url-7qhtJwY6.cjs → inspector-url-C3LTKgXt.cjs} +3 -1
  34. package/dist/inspector-url-C3LTKgXt.cjs.map +1 -0
  35. package/dist/{inspector-url-DuEFmxLP.js → inspector-url-CyQcuBI9.js} +3 -1
  36. package/dist/inspector-url-CyQcuBI9.js.map +1 -0
  37. package/dist/mcp/index.cjs +119 -40
  38. package/dist/mcp/index.cjs.map +1 -1
  39. package/dist/mcp/index.js +116 -37
  40. package/dist/mcp/index.js.map +1 -1
  41. package/dist/style.css +12 -0
  42. package/dist/{use-app-X7JbGskk.js → use-app-BNbz1uzj.js} +51 -42
  43. package/dist/use-app-BNbz1uzj.js.map +1 -0
  44. package/dist/{use-app-D2h-aiyr.cjs → use-app-Dqh20JPP.cjs} +93 -72
  45. package/dist/use-app-Dqh20JPP.cjs.map +1 -0
  46. package/package.json +2 -2
  47. package/template/dist/albums/albums.html +3 -3
  48. package/template/dist/albums/albums.json +1 -1
  49. package/template/dist/carousel/carousel.html +3 -3
  50. package/template/dist/carousel/carousel.json +1 -1
  51. package/template/dist/map/map.html +3 -3
  52. package/template/dist/map/map.json +1 -1
  53. package/template/dist/review/review.html +3 -3
  54. package/template/dist/review/review.json +1 -1
  55. package/template/node_modules/.vite/deps/_metadata.json +3 -3
  56. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +51 -42
  57. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
  58. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +56 -50
  59. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
  60. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +52 -43
  61. package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
  62. package/template/node_modules/.vite-mcp/deps/_metadata.json +22 -22
  63. package/template/tests/e2e/albums.spec.ts +20 -16
  64. package/template/tests/e2e/carousel.spec.ts +1 -1
  65. package/template/tests/e2e/dev-overlay.spec.ts +118 -0
  66. package/template/tests/e2e/helpers.ts +13 -0
  67. package/template/tests/e2e/map.spec.ts +1 -1
  68. package/template/tests/e2e/review.spec.ts +1 -1
  69. package/template/tests/live/albums.spec.ts +10 -0
  70. package/template/tests/live/playwright.config.ts +1 -1
  71. package/dist/inspector-CByJjmPD.cjs.map +0 -1
  72. package/dist/inspector-ClhpqKLi.js.map +0 -1
  73. package/dist/inspector-url-7qhtJwY6.cjs.map +0 -1
  74. package/dist/inspector-url-DuEFmxLP.js.map +0 -1
  75. package/dist/use-app-D2h-aiyr.cjs.map +0 -1
  76. package/dist/use-app-X7JbGskk.js.map +0 -1
@@ -2,8 +2,8 @@ require("./chunk-9hOWP6kD.cjs");
2
2
  const require_protocol = require("./protocol-jbxhzcnS.cjs");
3
3
  let react = require("react");
4
4
  let react_jsx_runtime = require("react/jsx-runtime");
5
- //#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
6
- var L = "2026-01-26", d = "ui/open-link", h = "ui/download-file", m = "ui/message", 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";
5
+ //#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
6
+ var W = "2026-01-26", d = "ui/open-link", h = "ui/download-file", m = "ui/message", 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";
7
7
  var K = class {
8
8
  eventTarget;
9
9
  eventSource;
@@ -37,11 +37,11 @@ var K = class {
37
37
  onmessage;
38
38
  sessionId;
39
39
  setProtocolVersion;
40
- }, k = require_protocol.union([require_protocol.literal("light"), require_protocol.literal("dark")]).describe("Color theme preference for the host environment."), J = require_protocol.union([
40
+ }, b = require_protocol.union([require_protocol.literal("light"), require_protocol.literal("dark")]).describe("Color theme preference for the host environment."), J = require_protocol.union([
41
41
  require_protocol.literal("inline"),
42
42
  require_protocol.literal("fullscreen"),
43
43
  require_protocol.literal("pip")
44
- ]).describe("Display mode for UI presentation."), JQ = require_protocol.union([
44
+ ]).describe("Display mode for UI presentation."), KQ = require_protocol.union([
45
45
  require_protocol.literal("--color-background-primary"),
46
46
  require_protocol.literal("--color-background-secondary"),
47
47
  require_protocol.literal("--color-background-tertiary"),
@@ -118,7 +118,7 @@ var K = class {
118
118
  require_protocol.literal("--shadow-sm"),
119
119
  require_protocol.literal("--shadow-md"),
120
120
  require_protocol.literal("--shadow-lg")
121
- ]).describe("CSS variable keys available to MCP apps for theming."), KQ = require_protocol.record(JQ.describe(`Style variables for theming MCP apps.
121
+ ]).describe("CSS variable keys available to MCP apps for theming."), GQ = require_protocol.record(KQ.describe(`Style variables for theming MCP apps.
122
122
 
123
123
  Individual style keys are optional - hosts may provide any subset of these values.
124
124
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
@@ -136,7 +136,7 @@ Individual style keys are optional - hosts may provide any subset of these value
136
136
  Values are strings containing CSS values (colors, sizes, font stacks, etc.).
137
137
 
138
138
  Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
139
- for compatibility with Zod schema generation. Both are functionally equivalent for validation.`), GQ = require_protocol.object({
139
+ for compatibility with Zod schema generation. Both are functionally equivalent for validation.`), VQ = require_protocol.object({
140
140
  method: require_protocol.literal("ui/open-link"),
141
141
  params: require_protocol.object({ url: require_protocol.string().describe("URL to open in the host's browser") })
142
142
  }), B = require_protocol.object({ isError: require_protocol.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough(), _ = require_protocol.object({ isError: require_protocol.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough(), O = require_protocol.object({ isError: require_protocol.boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough();
@@ -157,7 +157,7 @@ var G = require_protocol.object({
157
157
  microphone: require_protocol.object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),
158
158
  geolocation: require_protocol.object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),
159
159
  clipboardWrite: require_protocol.object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")
160
- }), NQ = require_protocol.object({
160
+ }), jQ = require_protocol.object({
161
161
  method: require_protocol.literal("ui/notifications/size-changed"),
162
162
  params: require_protocol.object({
163
163
  width: require_protocol.number().optional().describe("New width in pixels."),
@@ -172,19 +172,22 @@ var G = require_protocol.object({
172
172
  }), A = require_protocol.object({
173
173
  method: require_protocol.literal("ui/notifications/tool-cancelled"),
174
174
  params: require_protocol.object({ reason: require_protocol.string().optional().describe("Optional reason for the cancellation (e.g., \"user action\", \"timeout\").") })
175
- }), b = require_protocol.object({ fonts: require_protocol.string().optional() }), C = require_protocol.object({
176
- variables: KQ.optional().describe("CSS variables for theming the app."),
177
- css: b.optional().describe("CSS blocks that apps can inject.")
175
+ }), k = require_protocol.object({ fonts: require_protocol.string().optional() }), C = require_protocol.object({
176
+ variables: GQ.optional().describe("CSS variables for theming the app."),
177
+ css: k.optional().describe("CSS blocks that apps can inject.")
178
178
  }), F = require_protocol.object({
179
179
  method: require_protocol.literal("ui/resource-teardown"),
180
180
  params: require_protocol.object({})
181
- }), jQ = require_protocol.record(require_protocol.string(), require_protocol.unknown()), z = require_protocol.object({
181
+ }), EQ = require_protocol.record(require_protocol.string(), require_protocol.unknown()), L = require_protocol.object({
182
182
  text: require_protocol.object({}).optional().describe("Host supports text content blocks."),
183
183
  image: require_protocol.object({}).optional().describe("Host supports image content blocks."),
184
184
  audio: require_protocol.object({}).optional().describe("Host supports audio content blocks."),
185
185
  resource: require_protocol.object({}).optional().describe("Host supports resource content blocks."),
186
186
  resourceLink: require_protocol.object({}).optional().describe("Host supports resource link content blocks."),
187
187
  structuredContent: require_protocol.object({}).optional().describe("Host supports structured content.")
188
+ }), WQ = require_protocol.object({
189
+ method: require_protocol.literal("ui/notifications/request-teardown"),
190
+ params: require_protocol.object({}).optional()
188
191
  }), x = require_protocol.object({
189
192
  experimental: require_protocol.object({}).optional().describe("Experimental features (structure TBD)."),
190
193
  openLinks: require_protocol.object({}).optional().describe("Host supports opening external URLs."),
@@ -196,13 +199,13 @@ var G = require_protocol.object({
196
199
  permissions: V.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),
197
200
  csp: G.optional().describe("CSP domains approved by the host.")
198
201
  }).optional().describe("Sandbox configuration applied by the host."),
199
- updateModelContext: z.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
200
- message: z.optional().describe("Host supports receiving content messages (ui/message) from the view.")
201
- }), S = require_protocol.object({
202
+ updateModelContext: L.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
203
+ message: L.optional().describe("Host supports receiving content messages (ui/message) from the view.")
204
+ }), g = require_protocol.object({
202
205
  experimental: require_protocol.object({}).optional().describe("Experimental features (structure TBD)."),
203
206
  tools: require_protocol.object({ listChanged: require_protocol.boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."),
204
207
  availableDisplayModes: require_protocol.array(J).optional().describe("Display modes the app supports.")
205
- }), EQ = require_protocol.object({
208
+ }), zQ = require_protocol.object({
206
209
  method: require_protocol.literal("ui/notifications/initialized"),
207
210
  params: require_protocol.object({}).optional()
208
211
  }), LQ = require_protocol.object({
@@ -224,20 +227,20 @@ Boolean requesting whether a visible border and background is provided by the ho
224
227
  - \`true\`: request visible border + background
225
228
  - \`false\`: request no visible border + background
226
229
  - omitted: host decides border`)
227
- }), WQ = require_protocol.object({
230
+ }), BQ = require_protocol.object({
228
231
  method: require_protocol.literal("ui/request-display-mode"),
229
232
  params: require_protocol.object({ mode: J.describe("The display mode being requested.") })
230
- }), P = require_protocol.object({ mode: J.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough(), g = require_protocol.union([require_protocol.literal("model"), require_protocol.literal("app")]).describe("Tool visibility scope - who can access the tool."), zQ = require_protocol.object({
233
+ }), P = require_protocol.object({ mode: J.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough(), S = require_protocol.union([require_protocol.literal("model"), require_protocol.literal("app")]).describe("Tool visibility scope - who can access the tool."), _Q = require_protocol.object({
231
234
  resourceUri: require_protocol.string().optional(),
232
- visibility: require_protocol.array(g).optional().describe(`Who can access this tool. Default: ["model", "app"]
235
+ visibility: require_protocol.array(S).optional().describe(`Who can access this tool. Default: ["model", "app"]
233
236
  - "model": Tool visible to and callable by the agent
234
237
  - "app": Tool callable by the app from this server only`)
235
238
  });
236
239
  require_protocol.object({ mimeTypes: require_protocol.array(require_protocol.string()).optional().describe("Array of supported MIME types for UI resources.\nMust include `\"text/html;profile=mcp-app\"` for MCP Apps support.") });
237
- var BQ = require_protocol.object({
240
+ var OQ = require_protocol.object({
238
241
  method: require_protocol.literal("ui/download-file"),
239
242
  params: require_protocol.object({ contents: require_protocol.array(require_protocol.union([require_protocol.EmbeddedResourceSchema, require_protocol.ResourceLinkSchema])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.") })
240
- }), _Q = require_protocol.object({
243
+ }), IQ = require_protocol.object({
241
244
  method: require_protocol.literal("ui/message"),
242
245
  params: require_protocol.object({
243
246
  role: require_protocol.literal("user").describe("Message role, currently only \"user\" is supported."),
@@ -253,15 +256,15 @@ require_protocol.object({
253
256
  permissions: V.optional().describe("Sandbox permissions from resource metadata.")
254
257
  })
255
258
  });
256
- var T = require_protocol.object({
259
+ var q = require_protocol.object({
257
260
  method: require_protocol.literal("ui/notifications/tool-result"),
258
261
  params: require_protocol.CallToolResultSchema.describe("Standard MCP tool execution result.")
259
- }), q = require_protocol.object({
262
+ }), T = require_protocol.object({
260
263
  toolInfo: require_protocol.object({
261
264
  id: require_protocol.RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."),
262
265
  tool: require_protocol.ToolSchema.describe("Tool definition including name, inputSchema, etc.")
263
266
  }).optional().describe("Metadata of the tool call that instantiated this App."),
264
- theme: k.optional().describe("Current color theme preference."),
267
+ theme: b.optional().describe("Current color theme preference."),
265
268
  styles: C.optional().describe("Style configuration for theming the app."),
266
269
  displayMode: J.optional().describe("How the UI is currently displayed."),
267
270
  availableDisplayModes: require_protocol.array(J).optional().describe("Display modes the host supports."),
@@ -285,47 +288,47 @@ container holding the app. Specify either width or maxWidth, and either height o
285
288
  bottom: require_protocol.number().describe("Bottom safe area inset in pixels."),
286
289
  left: require_protocol.number().describe("Left safe area inset in pixels.")
287
290
  }).optional().describe("Mobile safe area boundaries in pixels.")
288
- }).passthrough(), U = require_protocol.object({
291
+ }).passthrough(), R = require_protocol.object({
289
292
  method: require_protocol.literal("ui/notifications/host-context-changed"),
290
- params: q.describe("Partial context update containing only changed fields.")
291
- }), IQ = require_protocol.object({
293
+ params: T.describe("Partial context update containing only changed fields.")
294
+ }), AQ = require_protocol.object({
292
295
  method: require_protocol.literal("ui/update-model-context"),
293
296
  params: require_protocol.object({
294
297
  content: require_protocol.array(require_protocol.ContentBlockSchema).optional().describe("Context content blocks (text, image, etc.)."),
295
298
  structuredContent: require_protocol.record(require_protocol.string(), require_protocol.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")
296
299
  })
297
- }), wQ = require_protocol.object({
300
+ }), FQ = require_protocol.object({
298
301
  method: require_protocol.literal("ui/initialize"),
299
302
  params: require_protocol.object({
300
303
  appInfo: require_protocol.ImplementationSchema.describe("App identification (name and version)."),
301
- appCapabilities: S.describe("Features and capabilities this app provides."),
304
+ appCapabilities: g.describe("Features and capabilities this app provides."),
302
305
  protocolVersion: require_protocol.string().describe("Protocol version this app supports.")
303
306
  })
304
- }), R = require_protocol.object({
307
+ }), U = require_protocol.object({
305
308
  protocolVersion: require_protocol.string().describe("Negotiated protocol version string (e.g., \"2025-11-21\")."),
306
309
  hostInfo: require_protocol.ImplementationSchema.describe("Host application identification and version."),
307
310
  hostCapabilities: x.describe("Features and capabilities provided by the host."),
308
- hostContext: q.describe("Rich context about the host environment.")
311
+ hostContext: T.describe("Rich context about the host environment.")
309
312
  }).passthrough();
310
- function AQ() {
313
+ function PQ() {
311
314
  let X = document.documentElement.getAttribute("data-theme");
312
315
  if (X === "dark" || X === "light") return X;
313
316
  return document.documentElement.classList.contains("dark") ? "dark" : "light";
314
317
  }
315
- function FQ(X) {
318
+ function qQ(X) {
316
319
  let Y = document.documentElement;
317
320
  Y.setAttribute("data-theme", X), Y.style.colorScheme = X;
318
321
  }
319
- function PQ(X, Y = document.documentElement) {
322
+ function TQ(X, Y = document.documentElement) {
320
323
  for (let [Z, $] of Object.entries(X)) if ($ !== void 0) Y.style.setProperty(Z, $);
321
324
  }
322
- function TQ(X) {
325
+ function RQ(X) {
323
326
  if (document.getElementById("__mcp-host-fonts")) return;
324
327
  let Z = document.createElement("style");
325
328
  Z.id = "__mcp-host-fonts", Z.textContent = X, document.head.appendChild(Z);
326
329
  }
327
- var UX = "ui/resourceUri", RX = "text/html;profile=mcp-app";
328
- var CQ = class extends require_protocol.Protocol {
330
+ var MX = "ui/resourceUri", vX = "text/html;profile=mcp-app";
331
+ var gQ = class extends require_protocol.Protocol {
329
332
  _appInfo;
330
333
  _capabilities;
331
334
  options;
@@ -357,13 +360,13 @@ var CQ = class extends require_protocol.Protocol {
357
360
  this.setNotificationHandler(w, (Y) => X(Y.params));
358
361
  }
359
362
  set ontoolresult(X) {
360
- this.setNotificationHandler(T, (Y) => X(Y.params));
363
+ this.setNotificationHandler(q, (Y) => X(Y.params));
361
364
  }
362
365
  set ontoolcancelled(X) {
363
366
  this.setNotificationHandler(A, (Y) => X(Y.params));
364
367
  }
365
368
  set onhostcontextchanged(X) {
366
- this.setNotificationHandler(U, (Y) => {
369
+ this.setNotificationHandler(R, (Y) => {
367
370
  this._hostContext = {
368
371
  ...this._hostContext,
369
372
  ...Y.params
@@ -448,6 +451,12 @@ var CQ = class extends require_protocol.Protocol {
448
451
  params: X
449
452
  }, _, Y);
450
453
  }
454
+ requestTeardown(X = {}) {
455
+ return this.notification({
456
+ method: "ui/notifications/request-teardown",
457
+ params: X
458
+ });
459
+ }
451
460
  requestDisplayMode(X, Y) {
452
461
  return this.request({
453
462
  method: "ui/request-display-mode",
@@ -489,9 +498,9 @@ var CQ = class extends require_protocol.Protocol {
489
498
  params: {
490
499
  appCapabilities: this._capabilities,
491
500
  appInfo: this._appInfo,
492
- protocolVersion: L
501
+ protocolVersion: W
493
502
  }
494
- }, R, Y);
503
+ }, U, Y);
495
504
  if (Z === void 0) throw Error(`Server sent invalid initialize result: ${Z}`);
496
505
  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();
497
506
  } catch (Z) {
@@ -539,7 +548,7 @@ function AppProvider({ appInfo, capabilities, onAppCreated, children }) {
539
548
  }
540
549
  if (!_connecting) _connecting = (async () => {
541
550
  const transport = new K(window.parent, window.parent);
542
- const newApp = new CQ(appInfo, capabilities ?? {});
551
+ const newApp = new gQ(appInfo, capabilities ?? {});
543
552
  onAppCreated?.(newApp);
544
553
  await newApp.connect(transport);
545
554
  _app = newApp;
@@ -630,12 +639,6 @@ Object.defineProperty(exports, "C", {
630
639
  return C;
631
640
  }
632
641
  });
633
- Object.defineProperty(exports, "CQ", {
634
- enumerable: true,
635
- get: function() {
636
- return CQ;
637
- }
638
- });
639
642
  Object.defineProperty(exports, "EQ", {
640
643
  enumerable: true,
641
644
  get: function() {
@@ -660,12 +663,6 @@ Object.defineProperty(exports, "G", {
660
663
  return G;
661
664
  }
662
665
  });
663
- Object.defineProperty(exports, "GQ", {
664
- enumerable: true,
665
- get: function() {
666
- return GQ;
667
- }
668
- });
669
666
  Object.defineProperty(exports, "I", {
670
667
  enumerable: true,
671
668
  get: function() {
@@ -702,10 +699,10 @@ Object.defineProperty(exports, "LQ", {
702
699
  return LQ;
703
700
  }
704
701
  });
705
- Object.defineProperty(exports, "NQ", {
702
+ Object.defineProperty(exports, "MX", {
706
703
  enumerable: true,
707
704
  get: function() {
708
- return NQ;
705
+ return MX;
709
706
  }
710
707
  });
711
708
  Object.defineProperty(exports, "O", {
@@ -714,6 +711,12 @@ Object.defineProperty(exports, "O", {
714
711
  return O;
715
712
  }
716
713
  });
714
+ Object.defineProperty(exports, "OQ", {
715
+ enumerable: true,
716
+ get: function() {
717
+ return OQ;
718
+ }
719
+ });
717
720
  Object.defineProperty(exports, "P", {
718
721
  enumerable: true,
719
722
  get: function() {
@@ -726,16 +729,22 @@ Object.defineProperty(exports, "PQ", {
726
729
  return PQ;
727
730
  }
728
731
  });
732
+ Object.defineProperty(exports, "QQ", {
733
+ enumerable: true,
734
+ get: function() {
735
+ return QQ;
736
+ }
737
+ });
729
738
  Object.defineProperty(exports, "R", {
730
739
  enumerable: true,
731
740
  get: function() {
732
741
  return R;
733
742
  }
734
743
  });
735
- Object.defineProperty(exports, "RX", {
744
+ Object.defineProperty(exports, "RQ", {
736
745
  enumerable: true,
737
746
  get: function() {
738
- return RX;
747
+ return RQ;
739
748
  }
740
749
  });
741
750
  Object.defineProperty(exports, "S", {
@@ -762,16 +771,16 @@ Object.defineProperty(exports, "U", {
762
771
  return U;
763
772
  }
764
773
  });
765
- Object.defineProperty(exports, "UX", {
774
+ Object.defineProperty(exports, "V", {
766
775
  enumerable: true,
767
776
  get: function() {
768
- return UX;
777
+ return V;
769
778
  }
770
779
  });
771
- Object.defineProperty(exports, "V", {
780
+ Object.defineProperty(exports, "VQ", {
772
781
  enumerable: true,
773
782
  get: function() {
774
- return V;
783
+ return VQ;
775
784
  }
776
785
  });
777
786
  Object.defineProperty(exports, "W", {
@@ -810,6 +819,12 @@ Object.defineProperty(exports, "b", {
810
819
  return b;
811
820
  }
812
821
  });
822
+ Object.defineProperty(exports, "c", {
823
+ enumerable: true,
824
+ get: function() {
825
+ return c;
826
+ }
827
+ });
813
828
  Object.defineProperty(exports, "d", {
814
829
  enumerable: true,
815
830
  get: function() {
@@ -828,6 +843,12 @@ Object.defineProperty(exports, "g", {
828
843
  return g;
829
844
  }
830
845
  });
846
+ Object.defineProperty(exports, "gQ", {
847
+ enumerable: true,
848
+ get: function() {
849
+ return gQ;
850
+ }
851
+ });
831
852
  Object.defineProperty(exports, "h", {
832
853
  enumerable: true,
833
854
  get: function() {
@@ -846,12 +867,6 @@ Object.defineProperty(exports, "k", {
846
867
  return k;
847
868
  }
848
869
  });
849
- Object.defineProperty(exports, "l", {
850
- enumerable: true,
851
- get: function() {
852
- return l;
853
- }
854
- });
855
870
  Object.defineProperty(exports, "m", {
856
871
  enumerable: true,
857
872
  get: function() {
@@ -882,6 +897,12 @@ Object.defineProperty(exports, "q", {
882
897
  return q;
883
898
  }
884
899
  });
900
+ Object.defineProperty(exports, "qQ", {
901
+ enumerable: true,
902
+ get: function() {
903
+ return qQ;
904
+ }
905
+ });
885
906
  Object.defineProperty(exports, "r", {
886
907
  enumerable: true,
887
908
  get: function() {
@@ -906,16 +927,16 @@ Object.defineProperty(exports, "useApp", {
906
927
  return useApp;
907
928
  }
908
929
  });
909
- Object.defineProperty(exports, "w", {
930
+ Object.defineProperty(exports, "vX", {
910
931
  enumerable: true,
911
932
  get: function() {
912
- return w;
933
+ return vX;
913
934
  }
914
935
  });
915
- Object.defineProperty(exports, "wQ", {
936
+ Object.defineProperty(exports, "w", {
916
937
  enumerable: true,
917
938
  get: function() {
918
- return wQ;
939
+ return w;
919
940
  }
920
941
  });
921
942
  Object.defineProperty(exports, "x", {
@@ -937,4 +958,4 @@ Object.defineProperty(exports, "zQ", {
937
958
  }
938
959
  });
939
960
 
940
- //# sourceMappingURL=use-app-D2h-aiyr.cjs.map
961
+ //# sourceMappingURL=use-app-Dqh20JPP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-app-Dqh20JPP.cjs","names":["XQ","ZQ","DQ","M","YQ","$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","../src/hooks/app-context.tsx","../src/hooks/use-app.ts"],"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","/**\n * React Context for sharing the MCP App instance across the component tree.\n *\n * AppProvider handles connecting to the MCP Apps host and provides the App\n * instance via context. All sunpeak hooks read from this context internally,\n * so consumers never need to pass `app` as a parameter.\n *\n * The provider preserves the App instance across React Fast Refresh (HMR)\n * by storing it at module scope, matching the previous useApp() behavior.\n */\nimport { createContext, useState, useEffect, type ReactNode } from 'react';\nimport { App, PostMessageTransport } from '@modelcontextprotocol/ext-apps';\n\nexport interface AppProviderProps {\n appInfo: { name: string; version: string };\n capabilities?: Record<string, unknown>;\n onAppCreated?: (app: App) => void;\n children: ReactNode;\n}\n\nexport interface AppState {\n app: App | null;\n isConnected: boolean;\n error: Error | null;\n}\n\nconst defaultState: AppState = { app: null, isConnected: false, error: null };\n\nexport const AppContext = createContext<AppState>(defaultState);\n\n// Module-level App persistence.\n// During React Fast Refresh the component file is hot-swapped but this module\n// is NOT re-evaluated, so these variables survive across HMR cycles.\n// On a full page reload they reset to null, triggering a fresh connection.\nlet _app: App | null = null;\nlet _connecting: Promise<App> | null = null;\n\nexport function AppProvider({ appInfo, capabilities, onAppCreated, children }: AppProviderProps) {\n const [state, setState] = useState<AppState>(() =>\n _app ? { app: _app, isConnected: true, error: null } : defaultState\n );\n\n useEffect(() => {\n let cancelled = false;\n\n // Already connected (HMR re-run or StrictMode double-mount) — reuse.\n if (_app) {\n setState({ app: _app, isConnected: true, error: null });\n return () => {\n cancelled = true;\n };\n }\n\n // Connection already in flight (StrictMode double-mount) — wait for it.\n if (!_connecting) {\n _connecting = (async () => {\n const transport = new PostMessageTransport(window.parent, window.parent);\n const newApp = new App(appInfo, capabilities ?? {});\n onAppCreated?.(newApp);\n await newApp.connect(transport);\n _app = newApp;\n return newApp;\n })();\n }\n\n _connecting.then(\n (connectedApp) => {\n if (!cancelled) {\n setState({ app: connectedApp, isConnected: true, error: null });\n }\n },\n (err) => {\n _connecting = null;\n if (!cancelled) {\n setState({\n app: null,\n isConnected: false,\n error: err instanceof Error ? err : new Error('Failed to connect'),\n });\n }\n }\n );\n\n return () => {\n cancelled = true;\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps -- connect once, persist across HMR\n }, []);\n\n return <AppContext.Provider value={state}>{children}</AppContext.Provider>;\n}\n","import { useContext } from 'react';\nimport { AppContext } from './app-context';\nimport type { App } from '@modelcontextprotocol/ext-apps';\n\n/**\n * Access the MCP App instance from context.\n *\n * Returns the connected App instance, or `null` while the connection\n * is being established. Must be used inside an `<AppProvider>`.\n *\n * Most hooks read from context internally, so you only need `useApp()`\n * for direct SDK method calls like `app.requestDisplayMode()`.\n *\n * @example\n * ```tsx\n * import { useApp } from 'sunpeak';\n *\n * function MyComponent() {\n * const app = useApp();\n * const handleFullscreen = () => app?.requestDisplayMode({ mode: 'fullscreen' });\n * return <button onClick={handleFullscreen}>Fullscreen</button>;\n * }\n * ```\n */\nexport function useApp(): App | null {\n return useContext(AppContext).app;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAAuY,IAAI,IAAE,cAAa,IAAE,gBAAe,IAAE,oBAAmB,IAAE,cAAkG,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,iBAAAA,qBAAG,UAAU,EAAE,KAAK;AAAC,OAAG,EAAE,QAAQ,SAAQ,MAAM,kBAAiB,EAAE,KAAK,EAAC,KAAK,YAAY,EAAE,KAAK;YAAS,EAAE,MAAM,YAAU,MAAM,SAAQ,MAAM,iCAAgC,EAAE,MAAM,SAAQ,EAAE;OAAM,SAAQ,MAAM,2BAA0B,EAAE,MAAM,SAAQ,EAAE,EAAC,KAAK,UAAU,MAAM,wCAAsC,EAAE,MAAM,QAAQ,CAAC;;;CAAE,MAAM,QAAO;AAAC,SAAO,iBAAiB,WAAU,KAAK,gBAAgB;;CAAC,MAAM,KAAK,GAAE,GAAE;AAAC,MAAG,EAAE,WAAA,sCAAW,SAAQ,MAAM,mBAAkB,EAAE;AAAC,OAAK,YAAY,YAAY,GAAE,I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AK;IACL,aAAa;IACb,OAAO,eAAe,QAAQ,sBAAM,IAAI,MAAM,oBAAoB;IACnE,CAAC;IAGP;AAED,eAAa;AACX,eAAY;;IAGb,EAAE,CAAC;AAEN,QAAO,iBAAA,GAAA,kBAAA,KAAC,WAAW,UAAZ;EAAqB,OAAO;EAAQ;EAA+B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;ACjE5E,SAAgB,SAAqB;AACnC,SAAA,GAAA,MAAA,YAAkB,WAAW,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sunpeak",
3
- "version": "0.18.2",
3
+ "version": "0.18.7",
4
4
  "description": "Inspector, testing framework, and app framework for MCP Apps.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -123,7 +123,7 @@
123
123
  },
124
124
  "dependencies": {
125
125
  "@clack/prompts": "^1.1.0",
126
- "@modelcontextprotocol/ext-apps": "^1.2.2",
126
+ "@modelcontextprotocol/ext-apps": "^1.3.1",
127
127
  "@modelcontextprotocol/sdk": "^1.27.1",
128
128
  "@vitejs/plugin-react": "^6.0.1",
129
129
  "clsx": "^2.1.1",