sunpeak 0.20.64 → 0.20.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/commands/dev.mjs +88 -46
- package/bin/lib/inspect/inspect-config.mjs +6 -6
- package/bin/lib/live/live-config.mjs +8 -6
- package/bin/lib/test/test-config.mjs +7 -10
- package/dist/chatgpt/index.cjs +1 -1
- package/dist/chatgpt/index.js +1 -1
- package/dist/claude/index.cjs +1 -1
- package/dist/claude/index.js +1 -1
- package/dist/embed.css +2 -2
- package/dist/host/chatgpt/index.cjs +1 -1
- package/dist/host/chatgpt/index.js +1 -1
- package/dist/index.cjs +14 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -7
- package/dist/index.js.map +1 -1
- package/dist/inspector/index.cjs +1 -1
- package/dist/inspector/index.js +1 -1
- package/dist/{inspector-DPJeSQAd.js → inspector-BQx_pKAK.js} +31 -15
- package/dist/{inspector-DPJeSQAd.js.map → inspector-BQx_pKAK.js.map} +1 -1
- package/dist/{inspector-Cl5w_7yQ.cjs → inspector-wz-9eEPo.cjs} +33 -16
- package/dist/{inspector-Cl5w_7yQ.cjs.map → inspector-wz-9eEPo.cjs.map} +1 -1
- package/dist/mcp/index.cjs +14 -7
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +12 -6
- package/dist/mcp/index.js.map +1 -1
- package/dist/style.css +7 -6
- package/dist/{use-app-D7-OtXBl.js → use-app-BUrAWLg8.js} +76 -28
- package/dist/{use-app-D7-OtXBl.js.map → use-app-BUrAWLg8.js.map} +1 -1
- package/dist/{use-app-BcSuulay.cjs → use-app-QDHDymli.cjs} +78 -29
- package/dist/{use-app-BcSuulay.cjs.map → use-app-QDHDymli.cjs.map} +1 -1
- package/package.json +16 -16
- package/template/dist/albums/albums.html +2 -2
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.html +2 -2
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.html +755 -750
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.html +1 -1
- package/template/dist/review/review.json +1 -1
- package/template/node_modules/.bin/vite +2 -2
- package/template/node_modules/.bin/vitest +2 -2
- package/template/node_modules/.vite/deps/_metadata.json +4 -4
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js +82 -30
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js +82 -30
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js +82 -30
- package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_react.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/@testing-library_react.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/_metadata.json +24 -24
- package/template/node_modules/.vite-mcp/deps/{dist-CO4R4Zw4.js → dist-Bd8a6mlN.js} +17 -5
- package/template/node_modules/.vite-mcp/deps/{dist-CO4R4Zw4.js.map → dist-Bd8a6mlN.js.map} +1 -1
- package/template/node_modules/.vite-mcp/deps/embla-carousel-react.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/mapbox-gl.js +14765 -13820
- package/template/node_modules/.vite-mcp/deps/mapbox-gl.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/vitest.js +57 -36
- package/template/node_modules/.vite-mcp/deps/vitest.js.map +1 -1
- package/template/package.json +6 -6
- package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-chatgpt-linux.png +0 -0
- package/template/tests/e2e/visual.spec.ts-snapshots/albums-fullscreen-claude-darwin.png +0 -0
|
@@ -62,7 +62,22 @@ var _ = class extends require_protocol.Protocol {
|
|
|
62
62
|
if (this._registeredMethods.has(Z)) throw Error(`Handler for "${Z}" already registered (via ${Y}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);
|
|
63
63
|
this._registeredMethods.add(Z);
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
};
|
|
66
|
+
var E = "2026-01-26";
|
|
67
|
+
var l = "ui/open-link";
|
|
68
|
+
var r = "ui/download-file";
|
|
69
|
+
var n = "ui/message";
|
|
70
|
+
var s = "ui/notifications/size-changed";
|
|
71
|
+
var t = "ui/notifications/tool-input";
|
|
72
|
+
var O = "ui/notifications/tool-input-partial";
|
|
73
|
+
var e = "ui/notifications/tool-result";
|
|
74
|
+
var QQ = "ui/notifications/tool-cancelled";
|
|
75
|
+
var XQ = "ui/notifications/host-context-changed";
|
|
76
|
+
var YQ = "ui/notifications/request-teardown";
|
|
77
|
+
var ZQ = "ui/resource-teardown";
|
|
78
|
+
var $Q = "ui/initialize";
|
|
79
|
+
var DQ = "ui/notifications/initialized";
|
|
80
|
+
var JQ = "ui/request-display-mode";
|
|
66
81
|
var j = class {
|
|
67
82
|
eventTarget;
|
|
68
83
|
eventSource;
|
|
@@ -96,11 +111,14 @@ var j = class {
|
|
|
96
111
|
onmessage;
|
|
97
112
|
sessionId;
|
|
98
113
|
setProtocolVersion;
|
|
99
|
-
}
|
|
114
|
+
};
|
|
115
|
+
var g = require_protocol.union([require_protocol.literal("light"), require_protocol.literal("dark")]).describe("Color theme preference for the host environment.");
|
|
116
|
+
var W = require_protocol.union([
|
|
100
117
|
require_protocol.literal("inline"),
|
|
101
118
|
require_protocol.literal("fullscreen"),
|
|
102
119
|
require_protocol.literal("pip")
|
|
103
|
-
]).describe("Display mode for UI presentation.")
|
|
120
|
+
]).describe("Display mode for UI presentation.");
|
|
121
|
+
var LQ = require_protocol.union([
|
|
104
122
|
require_protocol.literal("--color-background-primary"),
|
|
105
123
|
require_protocol.literal("--color-background-secondary"),
|
|
106
124
|
require_protocol.literal("--color-background-tertiary"),
|
|
@@ -177,7 +195,8 @@ var j = class {
|
|
|
177
195
|
require_protocol.literal("--shadow-sm"),
|
|
178
196
|
require_protocol.literal("--shadow-md"),
|
|
179
197
|
require_protocol.literal("--shadow-lg")
|
|
180
|
-
]).describe("CSS variable keys available to MCP apps for theming.")
|
|
198
|
+
]).describe("CSS variable keys available to MCP apps for theming.");
|
|
199
|
+
var BQ = require_protocol.record(LQ.describe(`Style variables for theming MCP apps.
|
|
181
200
|
|
|
182
201
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
183
202
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -195,10 +214,14 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
195
214
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
196
215
|
|
|
197
216
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
198
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)
|
|
217
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);
|
|
218
|
+
var _Q = require_protocol.object({
|
|
199
219
|
method: require_protocol.literal("ui/open-link"),
|
|
200
220
|
params: require_protocol.object({ url: require_protocol.string().describe("URL to open in the host's browser") })
|
|
201
|
-
})
|
|
221
|
+
});
|
|
222
|
+
var I = 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();
|
|
223
|
+
var F = require_protocol.object({ isError: require_protocol.boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough();
|
|
224
|
+
var q = require_protocol.object({ isError: require_protocol.boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough();
|
|
202
225
|
require_protocol.object({
|
|
203
226
|
method: require_protocol.literal("ui/notifications/sandbox-proxy-ready"),
|
|
204
227
|
params: require_protocol.object({})
|
|
@@ -211,43 +234,55 @@ var L = require_protocol.object({
|
|
|
211
234
|
resourceDomains: require_protocol.array(require_protocol.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)"),
|
|
212
235
|
frameDomains: require_protocol.array(require_protocol.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'`)"),
|
|
213
236
|
baseUriDomains: require_protocol.array(require_protocol.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'`)")
|
|
214
|
-
})
|
|
237
|
+
});
|
|
238
|
+
var B = require_protocol.object({
|
|
215
239
|
camera: require_protocol.object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),
|
|
216
240
|
microphone: require_protocol.object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),
|
|
217
241
|
geolocation: require_protocol.object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),
|
|
218
242
|
clipboardWrite: require_protocol.object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")
|
|
219
|
-
})
|
|
243
|
+
});
|
|
244
|
+
var OQ = require_protocol.object({
|
|
220
245
|
method: require_protocol.literal("ui/notifications/size-changed"),
|
|
221
246
|
params: require_protocol.object({
|
|
222
247
|
width: require_protocol.number().optional().describe("New width in pixels."),
|
|
223
248
|
height: require_protocol.number().optional().describe("New height in pixels.")
|
|
224
249
|
})
|
|
225
|
-
})
|
|
250
|
+
});
|
|
251
|
+
var P = require_protocol.object({
|
|
226
252
|
method: require_protocol.literal("ui/notifications/tool-input"),
|
|
227
253
|
params: require_protocol.object({ arguments: require_protocol.record(require_protocol.string(), require_protocol.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.") })
|
|
228
|
-
})
|
|
254
|
+
});
|
|
255
|
+
var w = require_protocol.object({
|
|
229
256
|
method: require_protocol.literal("ui/notifications/tool-input-partial"),
|
|
230
257
|
params: require_protocol.object({ arguments: require_protocol.record(require_protocol.string(), require_protocol.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).") })
|
|
231
|
-
})
|
|
258
|
+
});
|
|
259
|
+
var A = require_protocol.object({
|
|
232
260
|
method: require_protocol.literal("ui/notifications/tool-cancelled"),
|
|
233
261
|
params: require_protocol.object({ reason: require_protocol.string().optional().describe("Optional reason for the cancellation (e.g., \"user action\", \"timeout\").") })
|
|
234
|
-
})
|
|
262
|
+
});
|
|
263
|
+
var v = require_protocol.object({ fonts: require_protocol.string().optional() });
|
|
264
|
+
var f = require_protocol.object({
|
|
235
265
|
variables: BQ.optional().describe("CSS variables for theming the app."),
|
|
236
266
|
css: v.optional().describe("CSS blocks that apps can inject.")
|
|
237
|
-
})
|
|
267
|
+
});
|
|
268
|
+
var R = require_protocol.object({
|
|
238
269
|
method: require_protocol.literal("ui/resource-teardown"),
|
|
239
270
|
params: require_protocol.object({})
|
|
240
|
-
})
|
|
271
|
+
});
|
|
272
|
+
var zQ = require_protocol.record(require_protocol.string(), require_protocol.unknown());
|
|
273
|
+
var z = require_protocol.object({
|
|
241
274
|
text: require_protocol.object({}).optional().describe("Host supports text content blocks."),
|
|
242
275
|
image: require_protocol.object({}).optional().describe("Host supports image content blocks."),
|
|
243
276
|
audio: require_protocol.object({}).optional().describe("Host supports audio content blocks."),
|
|
244
277
|
resource: require_protocol.object({}).optional().describe("Host supports resource content blocks."),
|
|
245
278
|
resourceLink: require_protocol.object({}).optional().describe("Host supports resource link content blocks."),
|
|
246
279
|
structuredContent: require_protocol.object({}).optional().describe("Host supports structured content.")
|
|
247
|
-
})
|
|
280
|
+
});
|
|
281
|
+
var IQ = require_protocol.object({
|
|
248
282
|
method: require_protocol.literal("ui/notifications/request-teardown"),
|
|
249
283
|
params: require_protocol.object({}).optional()
|
|
250
|
-
})
|
|
284
|
+
});
|
|
285
|
+
var u = require_protocol.object({
|
|
251
286
|
experimental: require_protocol.object({}).optional().describe("Experimental features (structure TBD)."),
|
|
252
287
|
openLinks: require_protocol.object({}).optional().describe("Host supports opening external URLs."),
|
|
253
288
|
downloadFile: require_protocol.object({}).optional().describe("Host supports file downloads via ui/download-file."),
|
|
@@ -261,14 +296,17 @@ var L = require_protocol.object({
|
|
|
261
296
|
updateModelContext: z.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
|
|
262
297
|
message: z.optional().describe("Host supports receiving content messages (ui/message) from the view."),
|
|
263
298
|
sampling: require_protocol.object({ tools: require_protocol.object({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.") }).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")
|
|
264
|
-
})
|
|
299
|
+
});
|
|
300
|
+
var d = require_protocol.object({
|
|
265
301
|
experimental: require_protocol.object({}).optional().describe("Experimental features (structure TBD)."),
|
|
266
302
|
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."),
|
|
267
303
|
availableDisplayModes: require_protocol.array(W).optional().describe("Display modes the app supports.")
|
|
268
|
-
})
|
|
304
|
+
});
|
|
305
|
+
var FQ = require_protocol.object({
|
|
269
306
|
method: require_protocol.literal("ui/notifications/initialized"),
|
|
270
307
|
params: require_protocol.object({}).optional()
|
|
271
|
-
})
|
|
308
|
+
});
|
|
309
|
+
var qQ = require_protocol.object({
|
|
272
310
|
csp: L.optional().describe("Content Security Policy configuration for UI resources."),
|
|
273
311
|
permissions: B.optional().describe("Sandbox permissions requested by the UI resource."),
|
|
274
312
|
domain: require_protocol.string().optional().describe(`Dedicated origin for view sandbox.
|
|
@@ -287,10 +325,14 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
287
325
|
- \`true\`: request visible border + background
|
|
288
326
|
- \`false\`: request no visible border + background
|
|
289
327
|
- omitted: host decides border`)
|
|
290
|
-
})
|
|
328
|
+
});
|
|
329
|
+
var PQ = require_protocol.object({
|
|
291
330
|
method: require_protocol.literal("ui/request-display-mode"),
|
|
292
331
|
params: require_protocol.object({ mode: W.describe("The display mode being requested.") })
|
|
293
|
-
})
|
|
332
|
+
});
|
|
333
|
+
var U = require_protocol.object({ mode: W.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
|
|
334
|
+
var h = require_protocol.union([require_protocol.literal("model"), require_protocol.literal("app")]).describe("Tool visibility scope - who can access the tool.");
|
|
335
|
+
var wQ = require_protocol.object({
|
|
294
336
|
resourceUri: require_protocol.string().optional(),
|
|
295
337
|
visibility: require_protocol.array(h).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
296
338
|
- "model": Tool visible to and callable by the agent
|
|
@@ -302,7 +344,8 @@ require_protocol.object({ mimeTypes: require_protocol.array(require_protocol.str
|
|
|
302
344
|
var AQ = require_protocol.object({
|
|
303
345
|
method: require_protocol.literal("ui/download-file"),
|
|
304
346
|
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.") })
|
|
305
|
-
})
|
|
347
|
+
});
|
|
348
|
+
var RQ = require_protocol.object({
|
|
306
349
|
method: require_protocol.literal("ui/message"),
|
|
307
350
|
params: require_protocol.object({
|
|
308
351
|
role: require_protocol.literal("user").describe("Message role, currently only \"user\" is supported."),
|
|
@@ -321,7 +364,8 @@ require_protocol.object({
|
|
|
321
364
|
var H = require_protocol.object({
|
|
322
365
|
method: require_protocol.literal("ui/notifications/tool-result"),
|
|
323
366
|
params: require_protocol.CallToolResultSchema.describe("Standard MCP tool execution result.")
|
|
324
|
-
})
|
|
367
|
+
});
|
|
368
|
+
var T = require_protocol.object({
|
|
325
369
|
toolInfo: require_protocol.object({
|
|
326
370
|
id: require_protocol.RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."),
|
|
327
371
|
tool: require_protocol.ToolSchema.describe("Tool definition including name, inputSchema, etc.")
|
|
@@ -350,23 +394,27 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
350
394
|
bottom: require_protocol.number().describe("Bottom safe area inset in pixels."),
|
|
351
395
|
left: require_protocol.number().describe("Left safe area inset in pixels.")
|
|
352
396
|
}).optional().describe("Mobile safe area boundaries in pixels.")
|
|
353
|
-
}).passthrough()
|
|
397
|
+
}).passthrough();
|
|
398
|
+
var M = require_protocol.object({
|
|
354
399
|
method: require_protocol.literal("ui/notifications/host-context-changed"),
|
|
355
400
|
params: T.describe("Partial context update containing only changed fields.")
|
|
356
|
-
})
|
|
401
|
+
});
|
|
402
|
+
var HQ = require_protocol.object({
|
|
357
403
|
method: require_protocol.literal("ui/update-model-context"),
|
|
358
404
|
params: require_protocol.object({
|
|
359
405
|
content: require_protocol.array(require_protocol.ContentBlockSchema).optional().describe("Context content blocks (text, image, etc.)."),
|
|
360
406
|
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.")
|
|
361
407
|
})
|
|
362
|
-
})
|
|
408
|
+
});
|
|
409
|
+
var TQ = require_protocol.object({
|
|
363
410
|
method: require_protocol.literal("ui/initialize"),
|
|
364
411
|
params: require_protocol.object({
|
|
365
412
|
appInfo: require_protocol.ImplementationSchema.describe("App identification (name and version)."),
|
|
366
413
|
appCapabilities: d.describe("Features and capabilities this app provides."),
|
|
367
414
|
protocolVersion: require_protocol.string().describe("Protocol version this app supports.")
|
|
368
415
|
})
|
|
369
|
-
})
|
|
416
|
+
});
|
|
417
|
+
var C = require_protocol.object({
|
|
370
418
|
protocolVersion: require_protocol.string().describe("Negotiated protocol version string (e.g., \"2025-11-21\")."),
|
|
371
419
|
hostInfo: require_protocol.ImplementationSchema.describe("Host application identification and version."),
|
|
372
420
|
hostCapabilities: u.describe("Features and capabilities provided by the host."),
|
|
@@ -410,7 +458,8 @@ function SQ(X) {
|
|
|
410
458
|
let Z = document.createElement("style");
|
|
411
459
|
Z.id = "__mcp-host-fonts", Z.textContent = X, document.head.appendChild(Z);
|
|
412
460
|
}
|
|
413
|
-
var eX = "ui/resourceUri"
|
|
461
|
+
var eX = "ui/resourceUri";
|
|
462
|
+
var QY = "text/html;profile=mcp-app";
|
|
414
463
|
var i = class i extends _ {
|
|
415
464
|
_appInfo;
|
|
416
465
|
_capabilities;
|
|
@@ -1325,4 +1374,4 @@ Object.defineProperty(exports, "zQ", {
|
|
|
1325
1374
|
}
|
|
1326
1375
|
});
|
|
1327
1376
|
|
|
1328
|
-
//# sourceMappingURL=use-app-
|
|
1377
|
+
//# sourceMappingURL=use-app-QDHDymli.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-app-BcSuulay.cjs","names":["c","KQ","NQ","WQ","x","GQ","VQ","jQ","y","iQ","xQ","yQ","hQ","gQ","mQ","dQ","fQ","vQ","uQ"],"sources":["../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.7.4_@modelcontextprotocol+sdk@1.29.0_zod@4.4.3__react-_bc4d5adeaec14d46b9a46bfff8177b13/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js","../src/hooks/tool-data-store.ts","../src/hooks/app-context.tsx","../src/hooks/use-app.ts"],"sourcesContent":["var p=((X)=>typeof require<\"u\"?require:typeof Proxy<\"u\"?new Proxy(X,{get:(Y,Z)=>(typeof require<\"u\"?require:Y)[Z]}):X)(function(X){if(typeof require<\"u\")return require.apply(this,arguments);throw Error('Dynamic require of \"'+X+'\" is not supported')});import{mergeCapabilities as xQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";import{CallToolRequestSchema as yQ,CallToolResultSchema as gQ,CreateMessageResultSchema as vQ,CreateMessageResultWithToolsSchema as fQ,EmptyResultSchema as uQ,ListResourcesResultSchema as dQ,ListToolsRequestSchema as hQ,PingRequestSchema as iQ,ReadResourceResultSchema as mQ}from\"@modelcontextprotocol/sdk/types.js\";import{Protocol as c}from\"@modelcontextprotocol/sdk/shared/protocol.js\";class _ extends c{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(X,Y){}_ensureEventSlot(X){let Y=this._eventSlots.get(X);if(!Y){let Z=this.eventSchemas[X];if(!Z)throw Error(`Unknown event: ${String(X)}`);Y={listeners:[]},this._eventSlots.set(X,Y);let $=Z.shape.method.value;this._registeredMethods.add($);let D=Y;super.setNotificationHandler(Z,(J)=>{let K=J.params;this.onEventDispatch(X,K),D.onHandler?.(K);for(let G of[...D.listeners])G(K)})}return Y}setEventHandler(X,Y){let Z=this._ensureEventSlot(X);if(Z.onHandler&&Y)console.warn(`[MCP Apps] on${String(X)} handler replaced. Use addEventListener(\"${String(X)}\", …) to add multiple listeners without replacing.`);Z.onHandler=Y}getEventHandler(X){return this._eventSlots.get(X)?.onHandler}addEventListener(X,Y){this._ensureEventSlot(X).listeners.push(Y)}removeEventListener(X,Y){let Z=this._eventSlots.get(X);if(!Z)return;let $=Z.listeners.indexOf(Y);if($!==-1)Z.listeners.splice($,1)}setRequestHandler=(X,Y)=>{this._assertMethodNotRegistered(X,\"setRequestHandler\"),super.setRequestHandler(X,Y)};setNotificationHandler=(X,Y)=>{this._assertMethodNotRegistered(X,\"setNotificationHandler\"),super.setNotificationHandler(X,Y)};warnIfRequestHandlerReplaced(X,Y,Z){if(Y&&Z)console.warn(`[MCP Apps] ${X} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(X,Y)=>{let Z=X.shape.method.value;this._registeredMethods.add(Z),super.setRequestHandler(X,Y)};_assertMethodNotRegistered(X,Y){let Z=X.shape.method.value;if(this._registeredMethods.has(Z))throw Error(`Handler for \"${Z}\" already registered (via ${Y}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(Z)}}import{JSONRPCMessageSchema as KQ}from\"@modelcontextprotocol/sdk/types.js\";var E=\"2026-01-26\",l=\"ui/open-link\",r=\"ui/download-file\",n=\"ui/message\",a=\"ui/notifications/sandbox-proxy-ready\",o=\"ui/notifications/sandbox-resource-ready\",s=\"ui/notifications/size-changed\",t=\"ui/notifications/tool-input\",O=\"ui/notifications/tool-input-partial\",e=\"ui/notifications/tool-result\",QQ=\"ui/notifications/tool-cancelled\",XQ=\"ui/notifications/host-context-changed\",YQ=\"ui/notifications/request-teardown\",ZQ=\"ui/resource-teardown\",$Q=\"ui/initialize\",DQ=\"ui/notifications/initialized\",JQ=\"ui/request-display-mode\";class j{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 $=KQ.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!==O)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 x,CallToolResultSchema as GQ,EmbeddedResourceSchema as NQ,ImplementationSchema as y,RequestIdSchema as VQ,ResourceLinkSchema as WQ,ToolSchema as jQ}from\"@modelcontextprotocol/sdk/types.js\";var g=Q.union([Q.literal(\"light\"),Q.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),W=Q.union([Q.literal(\"inline\"),Q.literal(\"fullscreen\"),Q.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),LQ=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.\"),BQ=Q.record(LQ.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.`),_Q=Q.object({method:Q.literal(\"ui/open-link\"),params:Q.object({url:Q.string().describe(\"URL to open in the host's browser\")})}),I=Q.object({isError:Q.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),F=Q.object({isError:Q.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),q=Q.object({isError:Q.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),EQ=Q.object({method:Q.literal(\"ui/notifications/sandbox-proxy-ready\"),params:Q.object({})}),L=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'`)\")}),B=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.\")}),OQ=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.\")})}),P=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\").')})}),v=Q.object({fonts:Q.string().optional()}),f=Q.object({variables:BQ.optional().describe(\"CSS variables for theming the app.\"),css:v.optional().describe(\"CSS blocks that apps can inject.\")}),R=Q.object({method:Q.literal(\"ui/resource-teardown\"),params:Q.object({})}),zQ=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.\")}),IQ=Q.object({method:Q.literal(\"ui/notifications/request-teardown\"),params:Q.object({}).optional()}),u=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:B.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:L.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.\"),sampling:Q.object({tools:Q.object({}).optional().describe(\"Host supports tool use via `tools` and `toolChoice` parameters.\")}).optional().describe(\"Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.\")}),d=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(W).optional().describe(\"Display modes the app supports.\")}),FQ=Q.object({method:Q.literal(\"ui/notifications/initialized\"),params:Q.object({}).optional()}),qQ=Q.object({csp:L.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:B.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`)}),PQ=Q.object({method:Q.literal(\"ui/request-display-mode\"),params:Q.object({mode:W.describe(\"The display mode being requested.\")})}),U=Q.object({mode:W.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),h=Q.union([Q.literal(\"model\"),Q.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),wQ=Q.object({resourceUri:Q.string().optional(),visibility:Q.array(h).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`),csp:Q.never().optional(),permissions:Q.never().optional()}),YX=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.')}),AQ=Q.object({method:Q.literal(\"ui/download-file\"),params:Q.object({contents:Q.array(Q.union([NQ,WQ])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),RQ=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(x).describe(\"Message content blocks (text, image, etc.).\")})}),UQ=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:L.optional().describe(\"CSP configuration from resource metadata.\"),permissions:B.optional().describe(\"Sandbox permissions from resource metadata.\")})}),H=Q.object({method:Q.literal(\"ui/notifications/tool-result\"),params:GQ.describe(\"Standard MCP tool execution result.\")}),T=Q.object({toolInfo:Q.object({id:VQ.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:g.optional().describe(\"Current color theme preference.\"),styles:f.optional().describe(\"Style configuration for theming the app.\"),displayMode:W.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:Q.array(W).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(),M=Q.object({method:Q.literal(\"ui/notifications/host-context-changed\"),params:T.describe(\"Partial context update containing only changed fields.\")}),HQ=Q.object({method:Q.literal(\"ui/update-model-context\"),params:Q.object({content:Q.array(x).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.\")})}),TQ=Q.object({method:Q.literal(\"ui/initialize\"),params:Q.object({appInfo:y.describe(\"App identification (name and version).\"),appCapabilities:d.describe(\"Features and capabilities this app provides.\"),protocolVersion:Q.string().describe(\"Protocol version this app supports.\")})}),C=Q.object({protocolVersion:Q.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:y.describe(\"Host application identification and version.\"),hostCapabilities:u.describe(\"Features and capabilities provided by the host.\"),hostContext:T.describe(\"Rich context about the host environment.\")}).passthrough();var MQ={target:\"draft-2020-12\"};async function k(X,Y){let Z=X[\"~standard\"];if(Z.jsonSchema)return Z.jsonSchema[Y](MQ);if(Z.vendor===\"zod\"){let{z:$}=await import(\"zod/v4\");return $.toJSONSchema(X,{io:Y})}throw Error(`Schema (vendor: ${Z.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function b(X,Y,Z=\"\"){let $=await X[\"~standard\"].validate(Y);if($.issues){let D=$.issues.map((J)=>{let K=J.path?.map((G)=>typeof G===\"object\"?G.key:G).join(\".\");return K?`${K}: ${J.message}`:J.message}).join(\"; \");throw Error(Z+D)}return $.value}import{z as pQ}from\"zod/v4\";function CQ(){let X=document.documentElement.getAttribute(\"data-theme\");if(X===\"dark\"||X===\"light\")return X;return document.documentElement.classList.contains(\"dark\")?\"dark\":\"light\"}function kQ(X){let Y=document.documentElement;Y.setAttribute(\"data-theme\",X),Y.style.colorScheme=X}function bQ(X,Y=document.documentElement){for(let[Z,$]of Object.entries(X))if($!==void 0)Y.style.setProperty(Z,$)}function SQ(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 eX=\"ui/resourceUri\",QY=\"text/html;profile=mcp-app\";class i extends _{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(X){if(this._initializedSent)return;let Y=`[ext-apps] App.${X}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(Y);console.warn(`${Y}. This will throw in a future release.`)}eventSchemas={toolinput:P,toolinputpartial:w,toolresult:H,toolcancelled:A,hostcontextchanged:M};static ONE_SHOT_EVENTS=new Set([\"toolinput\",\"toolinputpartial\",\"toolresult\",\"toolcancelled\"]);_everHadListener=new Set;_assertHandlerTiming(X){if(!i.ONE_SHOT_EVENTS.has(X)||this._everHadListener.has(X))return;if(this._everHadListener.add(X),!this._initializedSent)return;let Y=`[ext-apps] \"${String(X)}\" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(Y);console.warn(Y)}setEventHandler(X,Y){if(Y)this._assertHandlerTiming(X);super.setEventHandler(X,Y)}addEventListener(X,Y){this._assertHandlerTiming(X),super.addEventListener(X,Y)}onEventDispatch(X,Y){if(X===\"hostcontextchanged\")this._hostContext={...this._hostContext,...Y}}constructor(X,Y={},Z={autoResize:!0}){super(Z);this._appInfo=X;this._capabilities=Y;this.options=Z;if(!Z.allowUnsafeEval)pQ.config({jitless:!0});this.setRequestHandler(iQ,($)=>{return console.log(\"Received ping:\",$.params),{}}),this.setEventHandler(\"hostcontextchanged\",void 0)}registerCapabilities(X){if(this.transport)throw Error(\"Cannot register capabilities after transport is established\");this._capabilities=xQ(this._capabilities,X)}registerTool(X,Y,Z){if(this._registeredTools[X])throw Error(`Tool ${X} is already registered`);let $=this,D=()=>{if($._initializedSent&&$._capabilities.tools?.listChanged)$.sendToolListChanged()},J=Y.inputSchema!==void 0,K={title:Y.title,description:Y.description,inputSchema:Y.inputSchema,outputSchema:Y.outputSchema,annotations:Y.annotations,_meta:Y._meta,enabled:!0,enable(){this.enabled=!0,D()},disable(){this.enabled=!1,D()},update(G){Object.assign(this,G),D()},remove(){if($._registeredTools[X]!==K)return;delete $._registeredTools[X],D()},handler:async(G,N)=>{if(!K.enabled)throw Error(`Tool ${X} is disabled`);let V;if(J){let S=K.inputSchema,m=S?await b(S,G??{},`Invalid input for tool ${X}: `):G??{};V=await Z(m,N)}else V=await Z(N);if(K.outputSchema&&!V.isError)V.structuredContent=await b(K.outputSchema,V.structuredContent,`Invalid output for tool ${X}: `);return V}};if(this._registeredTools[X]=K,!this._capabilities.tools&&!this.transport)this.registerCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),D(),K}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){if(this._toolHandlersInitialized)return;this._toolHandlersInitialized=!0,this.oncalltool=async(X,Y)=>{let Z=this._registeredTools[X.name];if(!Z)throw Error(`Tool ${X.name} not found`);return Z.handler(X.arguments,Y)},this.onlisttools=async(X,Y)=>{return{tools:await Promise.all(Object.entries(this._registeredTools).filter(([$,D])=>D.enabled).map(async([$,D])=>{let J={name:$,title:D.title,description:D.description,inputSchema:D.inputSchema?await k(D.inputSchema,\"input\"):{type:\"object\",properties:{}}};if(D.outputSchema)J.outputSchema=await k(D.outputSchema,\"output\");if(D.annotations)J.annotations=D.annotations;if(D._meta)J._meta=D._meta;return J}))}}}async sendToolListChanged(X={}){this._assertInitialized(\"sendToolListChanged\"),await this.notification({method:\"notifications/tools/list_changed\",params:X})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(\"toolinput\")}set ontoolinput(X){this.setEventHandler(\"toolinput\",X)}get ontoolinputpartial(){return this.getEventHandler(\"toolinputpartial\")}set ontoolinputpartial(X){this.setEventHandler(\"toolinputpartial\",X)}get ontoolresult(){return this.getEventHandler(\"toolresult\")}set ontoolresult(X){this.setEventHandler(\"toolresult\",X)}get ontoolcancelled(){return this.getEventHandler(\"toolcancelled\")}set ontoolcancelled(X){this.setEventHandler(\"toolcancelled\",X)}get onhostcontextchanged(){return this.getEventHandler(\"hostcontextchanged\")}set onhostcontextchanged(X){this.setEventHandler(\"hostcontextchanged\",X)}_onteardown;get onteardown(){return this._onteardown}set onteardown(X){this.warnIfRequestHandlerReplaced(\"onteardown\",this._onteardown,X),this._onteardown=X,this.replaceRequestHandler(R,(Y,Z)=>{if(!this._onteardown)throw Error(\"No onteardown handler set\");return this._onteardown(Y.params,Z)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(X){this.warnIfRequestHandlerReplaced(\"oncalltool\",this._oncalltool,X),this._oncalltool=X,this.replaceRequestHandler(yQ,(Y,Z)=>{if(!this._oncalltool)throw Error(\"No oncalltool handler set\");return this._oncalltool(Y.params,Z)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(X){this.warnIfRequestHandlerReplaced(\"onlisttools\",this._onlisttools,X),this._onlisttools=X,this.replaceRequestHandler(hQ,(Y,Z)=>{if(!this._onlisttools)throw Error(\"No onlisttools handler set\");return this._onlisttools(Y.params,Z)})}assertCapabilityForMethod(X){switch(X){case\"sampling/createMessage\":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${X})`);break}}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(this._assertInitialized(\"callServerTool\"),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},gQ,{onprogress:()=>{},resetTimeoutOnProgress:!0,...Y})}async readServerResource(X,Y){return this._assertInitialized(\"readServerResource\"),await this.request({method:\"resources/read\",params:X},mQ,Y)}async listServerResources(X,Y){return this._assertInitialized(\"listServerResources\"),await this.request({method:\"resources/list\",params:X},dQ,Y)}async createSamplingMessage(X,Y){this._assertInitialized(\"createSamplingMessage\");let Z=X.tools?fQ:vQ;return await this.request({method:\"sampling/createMessage\",params:X},Z,Y)}sendMessage(X,Y){return this._assertInitialized(\"sendMessage\"),this.request({method:\"ui/message\",params:X},q,Y)}sendLog(X){return this.notification({method:\"notifications/message\",params:X})}updateModelContext(X,Y){return this._assertInitialized(\"updateModelContext\"),this.request({method:\"ui/update-model-context\",params:X},uQ,Y)}openLink(X,Y){return this._assertInitialized(\"openLink\"),this.request({method:\"ui/open-link\",params:X},I,Y)}sendOpenLink=this.openLink;downloadFile(X,Y){return this._assertInitialized(\"downloadFile\"),this.request({method:\"ui/download-file\",params:X},F,Y)}requestTeardown(X={}){return this.notification({method:\"ui/notifications/request-teardown\",params:X})}requestDisplayMode(X,Y){return this._assertInitialized(\"requestDisplayMode\"),this.request({method:\"ui/request-display-mode\",params:X},U,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 J=document.documentElement,K=J.style.height;J.style.height=\"max-content\";let G=Math.ceil(J.getBoundingClientRect().height);J.style.height=K;let N=Math.ceil(window.innerWidth);if(N!==Y||G!==Z)Y=N,Z=G,this.sendSizeChanged({width:N,height:G})})};$();let D=new ResizeObserver($);return D.observe(document.documentElement),D.observe(document.body),()=>D.disconnect()}async connect(X=new j(window.parent,window.parent),Y){if(this.transport)throw Error(\"App is already connected. Call close() before connecting again.\");this._initializedSent=!1,await super.connect(X);try{let Z=await this.request({method:\"ui/initialize\",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:E}},C,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._initializedSent=!0,this.options?.autoResize)this.setupSizeChangedNotifications()}catch(Z){throw this.close(),Z}}}export{CQ as getDocumentTheme,bQ as applyHostStyleVariables,SQ as applyHostFonts,kQ as applyDocumentTheme,e as TOOL_RESULT_METHOD,O as TOOL_INPUT_PARTIAL_METHOD,t as TOOL_INPUT_METHOD,QQ as TOOL_CANCELLED_METHOD,s as SIZE_CHANGED_METHOD,o as SANDBOX_RESOURCE_READY_METHOD,a as SANDBOX_PROXY_READY_METHOD,eX as RESOURCE_URI_META_KEY,ZQ as RESOURCE_TEARDOWN_METHOD,QY as RESOURCE_MIME_TYPE,YQ as REQUEST_TEARDOWN_METHOD,JQ as REQUEST_DISPLAY_MODE_METHOD,_ as ProtocolWithEvents,j as PostMessageTransport,l as OPEN_LINK_METHOD,HQ as McpUiUpdateModelContextRequestSchema,h as McpUiToolVisibilitySchema,H as McpUiToolResultNotificationSchema,wQ as McpUiToolMetaSchema,w as McpUiToolInputPartialNotificationSchema,P as McpUiToolInputNotificationSchema,A as McpUiToolCancelledNotificationSchema,g as McpUiThemeSchema,z as McpUiSupportedContentBlockModalitiesSchema,OQ as McpUiSizeChangedNotificationSchema,UQ as McpUiSandboxResourceReadyNotificationSchema,EQ as McpUiSandboxProxyReadyNotificationSchema,zQ as McpUiResourceTeardownResultSchema,R as McpUiResourceTeardownRequestSchema,B as McpUiResourcePermissionsSchema,qQ as McpUiResourceMetaSchema,L as McpUiResourceCspSchema,IQ as McpUiRequestTeardownNotificationSchema,U as McpUiRequestDisplayModeResultSchema,PQ as McpUiRequestDisplayModeRequestSchema,I as McpUiOpenLinkResultSchema,_Q as McpUiOpenLinkRequestSchema,q as McpUiMessageResultSchema,RQ as McpUiMessageRequestSchema,FQ as McpUiInitializedNotificationSchema,C as McpUiInitializeResultSchema,TQ as McpUiInitializeRequestSchema,f as McpUiHostStylesSchema,v as McpUiHostCssSchema,T as McpUiHostContextSchema,M as McpUiHostContextChangedNotificationSchema,u as McpUiHostCapabilitiesSchema,F as McpUiDownloadFileResultSchema,AQ as McpUiDownloadFileRequestSchema,W as McpUiDisplayModeSchema,d as McpUiAppCapabilitiesSchema,n as MESSAGE_METHOD,E as LATEST_PROTOCOL_VERSION,$Q as INITIALIZE_METHOD,DQ as INITIALIZED_METHOD,XQ as HOST_CONTEXT_CHANGED_METHOD,r as DOWNLOAD_FILE_METHOD,i as App};\n","/**\n * Tool-data store shared between AppProvider and the useToolData hook.\n *\n * AppProvider eagerly creates the store and wires the App's tool-event\n * listeners BEFORE running the ui/initialize handshake. Without that, hosts\n * that fire `ui/notifications/tool-result` immediately after the initialize\n * response (ChatGPT in production Safari is the known offender) race the\n * React commit that lets <AppProvider> children render and call\n * `useToolData()` — the lazy registration runs after the host has already\n * dispatched the notification, the result is dropped, and the widget is\n * stranded on its loading skeleton forever. sunpeak's own console warning\n * flagged exactly this:\n * \"toolresult handler registered after connect() completed the\n * ui/initialize handshake\".\n *\n * `useToolData` still falls back to a lazy WeakMap registration for App\n * instances created outside `AppProvider` (tests, direct SDK usage).\n */\nimport type { App } from '@modelcontextprotocol/ext-apps';\n\nexport interface ToolData<TInput = unknown, TOutput = unknown> {\n input: TInput | null;\n inputPartial: TInput | null;\n output: TOutput | null;\n isError: boolean;\n isLoading: boolean;\n isCancelled: boolean;\n cancelReason: string | null;\n}\n\nexport interface ToolDataStore<TInput = unknown, TOutput = unknown> {\n data: ToolData<TInput, TOutput>;\n listeners: Set<() => void>;\n}\n\ndeclare module '@modelcontextprotocol/ext-apps' {\n interface App {\n /** @internal Eager store attached by AppProvider before connect(). */\n __toolDataStore?: ToolDataStore;\n }\n}\n\n/**\n * Initialize the tool-data store on an App instance and wire its event\n * listeners. Idempotent - returns the existing store if one is already\n * attached.\n */\nexport function initToolDataStore(app: App): ToolDataStore {\n if (app.__toolDataStore) return app.__toolDataStore;\n\n const store: ToolDataStore = {\n data: {\n input: null,\n inputPartial: null,\n output: null,\n isError: false,\n isLoading: true,\n isCancelled: false,\n cancelReason: null,\n },\n listeners: new Set(),\n };\n app.__toolDataStore = store;\n\n const notify = () => {\n for (const fn of store.listeners) fn();\n };\n\n app.addEventListener('toolinput', (_params) => {\n store.data = {\n ...store.data,\n input: _params.arguments,\n inputPartial: null,\n };\n notify();\n });\n\n app.addEventListener('toolinputpartial', (_params) => {\n store.data = {\n ...store.data,\n inputPartial: _params.arguments,\n };\n notify();\n });\n\n app.addEventListener('toolresult', (_params) => {\n store.data = {\n ...store.data,\n output: _params.structuredContent ?? _params.content,\n isError: _params.isError ?? false,\n isLoading: false,\n };\n notify();\n });\n\n app.addEventListener('toolcancelled', (_params) => {\n store.data = {\n ...store.data,\n isCancelled: true,\n cancelReason: _params.reason ?? null,\n isLoading: false,\n };\n notify();\n });\n\n return store;\n}\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 *\n * Connection resilience: if the initial PostMessage handshake doesn't complete\n * within a timeout, the provider automatically retries with exponential backoff.\n * This handles race conditions where the host iframe bridge isn't ready when the\n * app first mounts (common on first load in ChatGPT and Claude).\n */\nimport { createContext, useState, useEffect, type ReactNode } from 'react';\nimport { App, PostMessageTransport } from '@modelcontextprotocol/ext-apps';\nimport { initToolDataStore } from './tool-data-store';\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\n/** Timeout for a single connection attempt (ms). */\nconst CONNECT_TIMEOUT_MS = 5_000;\n/** Maximum number of retry attempts before giving up. */\nconst MAX_RETRIES = 3;\n/** Base delay for exponential backoff between retries (ms). */\nconst RETRY_BASE_DELAY_MS = 500;\n\n/**\n * Race a promise against a timeout. Rejects with a TimeoutError if the\n * promise doesn't settle within `ms` milliseconds.\n */\nfunction withTimeout<T>(promise: Promise<T>, ms: number): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timer = setTimeout(() => reject(new Error('Connection timed out')), ms);\n promise.then(\n (v) => {\n clearTimeout(timer);\n resolve(v);\n },\n (e) => {\n clearTimeout(timer);\n reject(e);\n }\n );\n });\n}\n\n/**\n * Attempt to connect to the host with timeout and retries.\n * Each attempt creates a fresh transport + App instance so stale PostMessage\n * listeners from a previous failed attempt don't interfere.\n */\nasync function connectWithRetry(\n appInfo: { name: string; version: string },\n capabilities: Record<string, unknown>,\n onAppCreated?: (app: App) => void\n): Promise<App> {\n let lastError: Error | null = null;\n\n for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {\n if (attempt > 0) {\n const delay = RETRY_BASE_DELAY_MS * 2 ** (attempt - 1);\n await new Promise((r) => setTimeout(r, delay));\n }\n\n let transport: PostMessageTransport | null = null;\n try {\n transport = new PostMessageTransport(window.parent, window.parent);\n const newApp = new App(appInfo, capabilities);\n // Pre-register useToolData's notification handlers BEFORE connect()\n // runs the ui/initialize handshake. Hosts that fire\n // `ui/notifications/tool-result` immediately after the initialize\n // response (ChatGPT on production Safari) would otherwise race the\n // first React commit and drop the result. See tool-data-store.ts.\n initToolDataStore(newApp);\n onAppCreated?.(newApp);\n await withTimeout(newApp.connect(transport), CONNECT_TIMEOUT_MS);\n return newApp;\n } catch (err) {\n // Clean up the transport's PostMessage listener so it doesn't linger.\n if (transport) {\n try {\n await transport.close();\n } catch {\n /* ignore close errors */\n }\n }\n lastError = err instanceof Error ? err : new Error('Connection failed');\n if (attempt < MAX_RETRIES) {\n console.warn(\n `[sunpeak] Connection attempt ${attempt + 1}/${MAX_RETRIES + 1} failed, retrying...`,\n lastError.message\n );\n }\n }\n }\n\n console.error(\n '[sunpeak] All connection attempts failed. Try refreshing the page or opening a new chat.\\n' +\n 'Troubleshooting: https://sunpeak.ai/docs/app-framework/guides/troubleshooting'\n );\n throw lastError ?? new Error('Failed to connect');\n}\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 = connectWithRetry(appInfo, capabilities ?? {}, onAppCreated);\n }\n\n _connecting.then(\n (connectedApp) => {\n _app = 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":";;;;EAAQ,MAAI,OAAO,UAAQ,MAAI,UAAQ,OAAO,QAAM,MAAI,IAAI,MAAM,GAAE,EAAC,MAAK,GAAE,OAAK,OAAO,UAAQ,MAAI,UAAQ,EAAA,CAAG,GAAE,CAAC,IAAE,EAAA,CAAG,SAAS,GAAE;CAAC,IAAG,OAAO,UAAQ,KAAI,OAAO,QAAQ,MAAM,MAAK,SAAS;CAAE,MAAM,MAAM,0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,cAAc,cAAc,YAA8B;CAC/F,MAAM,CAAC,OAAO,aAAA,GAAA,MAAA,SAAA,OACZ,OAAO;EAAE,KAAK;EAAM,aAAa;EAAM,OAAO;CAAK,IAAI,YACzD;CAEA,CAAA,GAAA,MAAA,UAAA,OAAgB;EACd,IAAI,YAAY;EAGhB,IAAI,MAAM;GACR,SAAS;IAAE,KAAK;IAAM,aAAa;IAAM,OAAO;GAAK,CAAC;GACtD,aAAa;IACX,YAAY;GACd;EACF;EAGA,IAAI,CAAC,aACH,cAAc,iBAAiB,SAAS,gBAAgB,CAAC,GAAG,YAAY;EAG1E,YAAY,MACT,iBAAiB;GAChB,OAAO;GACP,IAAI,CAAC,WACH,SAAS;IAAE,KAAK;IAAc,aAAa;IAAM,OAAO;GAAK,CAAC;EAElE,IACC,QAAQ;GACP,cAAc;GACd,IAAI,CAAC,WACH,SAAS;IACP,KAAK;IACL,aAAa;IACb,OAAO,eAAe,QAAQ,sBAAM,IAAI,MAAM,mBAAmB;GACnE,CAAC;EAEL,CACF;EAEA,aAAa;GACX,YAAY;EACd;CAEF,GAAG,CAAC,CAAC;CAEL,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,WAAW,UAAZ;EAAqB,OAAO;EAAQ;CAA8B,CAAA;AAC3E;;;;;;;;;;;;;;;;;;;;;;;ACtJA,SAAgB,SAAqB;CACnC,QAAA,GAAA,MAAA,WAAA,CAAkB,UAAU,CAAC,CAAC;AAChC"}
|
|
1
|
+
{"version":3,"file":"use-app-QDHDymli.cjs","names":["c","KQ","NQ","WQ","x","GQ","VQ","jQ","y","iQ","xQ","yQ","hQ","gQ","mQ","dQ","fQ","vQ","uQ"],"sources":["../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.7.4_@modelcontextprotocol+sdk@1.29.0_zod@4.4.3__react-_bc4d5adeaec14d46b9a46bfff8177b13/node_modules/@modelcontextprotocol/ext-apps/dist/src/app.js","../src/hooks/tool-data-store.ts","../src/hooks/app-context.tsx","../src/hooks/use-app.ts"],"sourcesContent":["var p=((X)=>typeof require<\"u\"?require:typeof Proxy<\"u\"?new Proxy(X,{get:(Y,Z)=>(typeof require<\"u\"?require:Y)[Z]}):X)(function(X){if(typeof require<\"u\")return require.apply(this,arguments);throw Error('Dynamic require of \"'+X+'\" is not supported')});import{mergeCapabilities as xQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";import{CallToolRequestSchema as yQ,CallToolResultSchema as gQ,CreateMessageResultSchema as vQ,CreateMessageResultWithToolsSchema as fQ,EmptyResultSchema as uQ,ListResourcesResultSchema as dQ,ListToolsRequestSchema as hQ,PingRequestSchema as iQ,ReadResourceResultSchema as mQ}from\"@modelcontextprotocol/sdk/types.js\";import{Protocol as c}from\"@modelcontextprotocol/sdk/shared/protocol.js\";class _ extends c{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(X,Y){}_ensureEventSlot(X){let Y=this._eventSlots.get(X);if(!Y){let Z=this.eventSchemas[X];if(!Z)throw Error(`Unknown event: ${String(X)}`);Y={listeners:[]},this._eventSlots.set(X,Y);let $=Z.shape.method.value;this._registeredMethods.add($);let D=Y;super.setNotificationHandler(Z,(J)=>{let K=J.params;this.onEventDispatch(X,K),D.onHandler?.(K);for(let G of[...D.listeners])G(K)})}return Y}setEventHandler(X,Y){let Z=this._ensureEventSlot(X);if(Z.onHandler&&Y)console.warn(`[MCP Apps] on${String(X)} handler replaced. Use addEventListener(\"${String(X)}\", …) to add multiple listeners without replacing.`);Z.onHandler=Y}getEventHandler(X){return this._eventSlots.get(X)?.onHandler}addEventListener(X,Y){this._ensureEventSlot(X).listeners.push(Y)}removeEventListener(X,Y){let Z=this._eventSlots.get(X);if(!Z)return;let $=Z.listeners.indexOf(Y);if($!==-1)Z.listeners.splice($,1)}setRequestHandler=(X,Y)=>{this._assertMethodNotRegistered(X,\"setRequestHandler\"),super.setRequestHandler(X,Y)};setNotificationHandler=(X,Y)=>{this._assertMethodNotRegistered(X,\"setNotificationHandler\"),super.setNotificationHandler(X,Y)};warnIfRequestHandlerReplaced(X,Y,Z){if(Y&&Z)console.warn(`[MCP Apps] ${X} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(X,Y)=>{let Z=X.shape.method.value;this._registeredMethods.add(Z),super.setRequestHandler(X,Y)};_assertMethodNotRegistered(X,Y){let Z=X.shape.method.value;if(this._registeredMethods.has(Z))throw Error(`Handler for \"${Z}\" already registered (via ${Y}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(Z)}}import{JSONRPCMessageSchema as KQ}from\"@modelcontextprotocol/sdk/types.js\";var E=\"2026-01-26\",l=\"ui/open-link\",r=\"ui/download-file\",n=\"ui/message\",a=\"ui/notifications/sandbox-proxy-ready\",o=\"ui/notifications/sandbox-resource-ready\",s=\"ui/notifications/size-changed\",t=\"ui/notifications/tool-input\",O=\"ui/notifications/tool-input-partial\",e=\"ui/notifications/tool-result\",QQ=\"ui/notifications/tool-cancelled\",XQ=\"ui/notifications/host-context-changed\",YQ=\"ui/notifications/request-teardown\",ZQ=\"ui/resource-teardown\",$Q=\"ui/initialize\",DQ=\"ui/notifications/initialized\",JQ=\"ui/request-display-mode\";class j{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 $=KQ.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!==O)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 x,CallToolResultSchema as GQ,EmbeddedResourceSchema as NQ,ImplementationSchema as y,RequestIdSchema as VQ,ResourceLinkSchema as WQ,ToolSchema as jQ}from\"@modelcontextprotocol/sdk/types.js\";var g=Q.union([Q.literal(\"light\"),Q.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),W=Q.union([Q.literal(\"inline\"),Q.literal(\"fullscreen\"),Q.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),LQ=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.\"),BQ=Q.record(LQ.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.`),_Q=Q.object({method:Q.literal(\"ui/open-link\"),params:Q.object({url:Q.string().describe(\"URL to open in the host's browser\")})}),I=Q.object({isError:Q.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),F=Q.object({isError:Q.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),q=Q.object({isError:Q.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),EQ=Q.object({method:Q.literal(\"ui/notifications/sandbox-proxy-ready\"),params:Q.object({})}),L=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'`)\")}),B=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.\")}),OQ=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.\")})}),P=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\").')})}),v=Q.object({fonts:Q.string().optional()}),f=Q.object({variables:BQ.optional().describe(\"CSS variables for theming the app.\"),css:v.optional().describe(\"CSS blocks that apps can inject.\")}),R=Q.object({method:Q.literal(\"ui/resource-teardown\"),params:Q.object({})}),zQ=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.\")}),IQ=Q.object({method:Q.literal(\"ui/notifications/request-teardown\"),params:Q.object({}).optional()}),u=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:B.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:L.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.\"),sampling:Q.object({tools:Q.object({}).optional().describe(\"Host supports tool use via `tools` and `toolChoice` parameters.\")}).optional().describe(\"Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.\")}),d=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(W).optional().describe(\"Display modes the app supports.\")}),FQ=Q.object({method:Q.literal(\"ui/notifications/initialized\"),params:Q.object({}).optional()}),qQ=Q.object({csp:L.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:B.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`)}),PQ=Q.object({method:Q.literal(\"ui/request-display-mode\"),params:Q.object({mode:W.describe(\"The display mode being requested.\")})}),U=Q.object({mode:W.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),h=Q.union([Q.literal(\"model\"),Q.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),wQ=Q.object({resourceUri:Q.string().optional(),visibility:Q.array(h).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`),csp:Q.never().optional(),permissions:Q.never().optional()}),YX=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.')}),AQ=Q.object({method:Q.literal(\"ui/download-file\"),params:Q.object({contents:Q.array(Q.union([NQ,WQ])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),RQ=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(x).describe(\"Message content blocks (text, image, etc.).\")})}),UQ=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:L.optional().describe(\"CSP configuration from resource metadata.\"),permissions:B.optional().describe(\"Sandbox permissions from resource metadata.\")})}),H=Q.object({method:Q.literal(\"ui/notifications/tool-result\"),params:GQ.describe(\"Standard MCP tool execution result.\")}),T=Q.object({toolInfo:Q.object({id:VQ.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:g.optional().describe(\"Current color theme preference.\"),styles:f.optional().describe(\"Style configuration for theming the app.\"),displayMode:W.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:Q.array(W).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(),M=Q.object({method:Q.literal(\"ui/notifications/host-context-changed\"),params:T.describe(\"Partial context update containing only changed fields.\")}),HQ=Q.object({method:Q.literal(\"ui/update-model-context\"),params:Q.object({content:Q.array(x).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.\")})}),TQ=Q.object({method:Q.literal(\"ui/initialize\"),params:Q.object({appInfo:y.describe(\"App identification (name and version).\"),appCapabilities:d.describe(\"Features and capabilities this app provides.\"),protocolVersion:Q.string().describe(\"Protocol version this app supports.\")})}),C=Q.object({protocolVersion:Q.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:y.describe(\"Host application identification and version.\"),hostCapabilities:u.describe(\"Features and capabilities provided by the host.\"),hostContext:T.describe(\"Rich context about the host environment.\")}).passthrough();var MQ={target:\"draft-2020-12\"};async function k(X,Y){let Z=X[\"~standard\"];if(Z.jsonSchema)return Z.jsonSchema[Y](MQ);if(Z.vendor===\"zod\"){let{z:$}=await import(\"zod/v4\");return $.toJSONSchema(X,{io:Y})}throw Error(`Schema (vendor: ${Z.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function b(X,Y,Z=\"\"){let $=await X[\"~standard\"].validate(Y);if($.issues){let D=$.issues.map((J)=>{let K=J.path?.map((G)=>typeof G===\"object\"?G.key:G).join(\".\");return K?`${K}: ${J.message}`:J.message}).join(\"; \");throw Error(Z+D)}return $.value}import{z as pQ}from\"zod/v4\";function CQ(){let X=document.documentElement.getAttribute(\"data-theme\");if(X===\"dark\"||X===\"light\")return X;return document.documentElement.classList.contains(\"dark\")?\"dark\":\"light\"}function kQ(X){let Y=document.documentElement;Y.setAttribute(\"data-theme\",X),Y.style.colorScheme=X}function bQ(X,Y=document.documentElement){for(let[Z,$]of Object.entries(X))if($!==void 0)Y.style.setProperty(Z,$)}function SQ(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 eX=\"ui/resourceUri\",QY=\"text/html;profile=mcp-app\";class i extends _{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(X){if(this._initializedSent)return;let Y=`[ext-apps] App.${X}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(Y);console.warn(`${Y}. This will throw in a future release.`)}eventSchemas={toolinput:P,toolinputpartial:w,toolresult:H,toolcancelled:A,hostcontextchanged:M};static ONE_SHOT_EVENTS=new Set([\"toolinput\",\"toolinputpartial\",\"toolresult\",\"toolcancelled\"]);_everHadListener=new Set;_assertHandlerTiming(X){if(!i.ONE_SHOT_EVENTS.has(X)||this._everHadListener.has(X))return;if(this._everHadListener.add(X),!this._initializedSent)return;let Y=`[ext-apps] \"${String(X)}\" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(Y);console.warn(Y)}setEventHandler(X,Y){if(Y)this._assertHandlerTiming(X);super.setEventHandler(X,Y)}addEventListener(X,Y){this._assertHandlerTiming(X),super.addEventListener(X,Y)}onEventDispatch(X,Y){if(X===\"hostcontextchanged\")this._hostContext={...this._hostContext,...Y}}constructor(X,Y={},Z={autoResize:!0}){super(Z);this._appInfo=X;this._capabilities=Y;this.options=Z;if(!Z.allowUnsafeEval)pQ.config({jitless:!0});this.setRequestHandler(iQ,($)=>{return console.log(\"Received ping:\",$.params),{}}),this.setEventHandler(\"hostcontextchanged\",void 0)}registerCapabilities(X){if(this.transport)throw Error(\"Cannot register capabilities after transport is established\");this._capabilities=xQ(this._capabilities,X)}registerTool(X,Y,Z){if(this._registeredTools[X])throw Error(`Tool ${X} is already registered`);let $=this,D=()=>{if($._initializedSent&&$._capabilities.tools?.listChanged)$.sendToolListChanged()},J=Y.inputSchema!==void 0,K={title:Y.title,description:Y.description,inputSchema:Y.inputSchema,outputSchema:Y.outputSchema,annotations:Y.annotations,_meta:Y._meta,enabled:!0,enable(){this.enabled=!0,D()},disable(){this.enabled=!1,D()},update(G){Object.assign(this,G),D()},remove(){if($._registeredTools[X]!==K)return;delete $._registeredTools[X],D()},handler:async(G,N)=>{if(!K.enabled)throw Error(`Tool ${X} is disabled`);let V;if(J){let S=K.inputSchema,m=S?await b(S,G??{},`Invalid input for tool ${X}: `):G??{};V=await Z(m,N)}else V=await Z(N);if(K.outputSchema&&!V.isError)V.structuredContent=await b(K.outputSchema,V.structuredContent,`Invalid output for tool ${X}: `);return V}};if(this._registeredTools[X]=K,!this._capabilities.tools&&!this.transport)this.registerCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),D(),K}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){if(this._toolHandlersInitialized)return;this._toolHandlersInitialized=!0,this.oncalltool=async(X,Y)=>{let Z=this._registeredTools[X.name];if(!Z)throw Error(`Tool ${X.name} not found`);return Z.handler(X.arguments,Y)},this.onlisttools=async(X,Y)=>{return{tools:await Promise.all(Object.entries(this._registeredTools).filter(([$,D])=>D.enabled).map(async([$,D])=>{let J={name:$,title:D.title,description:D.description,inputSchema:D.inputSchema?await k(D.inputSchema,\"input\"):{type:\"object\",properties:{}}};if(D.outputSchema)J.outputSchema=await k(D.outputSchema,\"output\");if(D.annotations)J.annotations=D.annotations;if(D._meta)J._meta=D._meta;return J}))}}}async sendToolListChanged(X={}){this._assertInitialized(\"sendToolListChanged\"),await this.notification({method:\"notifications/tools/list_changed\",params:X})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(\"toolinput\")}set ontoolinput(X){this.setEventHandler(\"toolinput\",X)}get ontoolinputpartial(){return this.getEventHandler(\"toolinputpartial\")}set ontoolinputpartial(X){this.setEventHandler(\"toolinputpartial\",X)}get ontoolresult(){return this.getEventHandler(\"toolresult\")}set ontoolresult(X){this.setEventHandler(\"toolresult\",X)}get ontoolcancelled(){return this.getEventHandler(\"toolcancelled\")}set ontoolcancelled(X){this.setEventHandler(\"toolcancelled\",X)}get onhostcontextchanged(){return this.getEventHandler(\"hostcontextchanged\")}set onhostcontextchanged(X){this.setEventHandler(\"hostcontextchanged\",X)}_onteardown;get onteardown(){return this._onteardown}set onteardown(X){this.warnIfRequestHandlerReplaced(\"onteardown\",this._onteardown,X),this._onteardown=X,this.replaceRequestHandler(R,(Y,Z)=>{if(!this._onteardown)throw Error(\"No onteardown handler set\");return this._onteardown(Y.params,Z)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(X){this.warnIfRequestHandlerReplaced(\"oncalltool\",this._oncalltool,X),this._oncalltool=X,this.replaceRequestHandler(yQ,(Y,Z)=>{if(!this._oncalltool)throw Error(\"No oncalltool handler set\");return this._oncalltool(Y.params,Z)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(X){this.warnIfRequestHandlerReplaced(\"onlisttools\",this._onlisttools,X),this._onlisttools=X,this.replaceRequestHandler(hQ,(Y,Z)=>{if(!this._onlisttools)throw Error(\"No onlisttools handler set\");return this._onlisttools(Y.params,Z)})}assertCapabilityForMethod(X){switch(X){case\"sampling/createMessage\":if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${X})`);break}}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(this._assertInitialized(\"callServerTool\"),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},gQ,{onprogress:()=>{},resetTimeoutOnProgress:!0,...Y})}async readServerResource(X,Y){return this._assertInitialized(\"readServerResource\"),await this.request({method:\"resources/read\",params:X},mQ,Y)}async listServerResources(X,Y){return this._assertInitialized(\"listServerResources\"),await this.request({method:\"resources/list\",params:X},dQ,Y)}async createSamplingMessage(X,Y){this._assertInitialized(\"createSamplingMessage\");let Z=X.tools?fQ:vQ;return await this.request({method:\"sampling/createMessage\",params:X},Z,Y)}sendMessage(X,Y){return this._assertInitialized(\"sendMessage\"),this.request({method:\"ui/message\",params:X},q,Y)}sendLog(X){return this.notification({method:\"notifications/message\",params:X})}updateModelContext(X,Y){return this._assertInitialized(\"updateModelContext\"),this.request({method:\"ui/update-model-context\",params:X},uQ,Y)}openLink(X,Y){return this._assertInitialized(\"openLink\"),this.request({method:\"ui/open-link\",params:X},I,Y)}sendOpenLink=this.openLink;downloadFile(X,Y){return this._assertInitialized(\"downloadFile\"),this.request({method:\"ui/download-file\",params:X},F,Y)}requestTeardown(X={}){return this.notification({method:\"ui/notifications/request-teardown\",params:X})}requestDisplayMode(X,Y){return this._assertInitialized(\"requestDisplayMode\"),this.request({method:\"ui/request-display-mode\",params:X},U,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 J=document.documentElement,K=J.style.height;J.style.height=\"max-content\";let G=Math.ceil(J.getBoundingClientRect().height);J.style.height=K;let N=Math.ceil(window.innerWidth);if(N!==Y||G!==Z)Y=N,Z=G,this.sendSizeChanged({width:N,height:G})})};$();let D=new ResizeObserver($);return D.observe(document.documentElement),D.observe(document.body),()=>D.disconnect()}async connect(X=new j(window.parent,window.parent),Y){if(this.transport)throw Error(\"App is already connected. Call close() before connecting again.\");this._initializedSent=!1,await super.connect(X);try{let Z=await this.request({method:\"ui/initialize\",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:E}},C,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._initializedSent=!0,this.options?.autoResize)this.setupSizeChangedNotifications()}catch(Z){throw this.close(),Z}}}export{CQ as getDocumentTheme,bQ as applyHostStyleVariables,SQ as applyHostFonts,kQ as applyDocumentTheme,e as TOOL_RESULT_METHOD,O as TOOL_INPUT_PARTIAL_METHOD,t as TOOL_INPUT_METHOD,QQ as TOOL_CANCELLED_METHOD,s as SIZE_CHANGED_METHOD,o as SANDBOX_RESOURCE_READY_METHOD,a as SANDBOX_PROXY_READY_METHOD,eX as RESOURCE_URI_META_KEY,ZQ as RESOURCE_TEARDOWN_METHOD,QY as RESOURCE_MIME_TYPE,YQ as REQUEST_TEARDOWN_METHOD,JQ as REQUEST_DISPLAY_MODE_METHOD,_ as ProtocolWithEvents,j as PostMessageTransport,l as OPEN_LINK_METHOD,HQ as McpUiUpdateModelContextRequestSchema,h as McpUiToolVisibilitySchema,H as McpUiToolResultNotificationSchema,wQ as McpUiToolMetaSchema,w as McpUiToolInputPartialNotificationSchema,P as McpUiToolInputNotificationSchema,A as McpUiToolCancelledNotificationSchema,g as McpUiThemeSchema,z as McpUiSupportedContentBlockModalitiesSchema,OQ as McpUiSizeChangedNotificationSchema,UQ as McpUiSandboxResourceReadyNotificationSchema,EQ as McpUiSandboxProxyReadyNotificationSchema,zQ as McpUiResourceTeardownResultSchema,R as McpUiResourceTeardownRequestSchema,B as McpUiResourcePermissionsSchema,qQ as McpUiResourceMetaSchema,L as McpUiResourceCspSchema,IQ as McpUiRequestTeardownNotificationSchema,U as McpUiRequestDisplayModeResultSchema,PQ as McpUiRequestDisplayModeRequestSchema,I as McpUiOpenLinkResultSchema,_Q as McpUiOpenLinkRequestSchema,q as McpUiMessageResultSchema,RQ as McpUiMessageRequestSchema,FQ as McpUiInitializedNotificationSchema,C as McpUiInitializeResultSchema,TQ as McpUiInitializeRequestSchema,f as McpUiHostStylesSchema,v as McpUiHostCssSchema,T as McpUiHostContextSchema,M as McpUiHostContextChangedNotificationSchema,u as McpUiHostCapabilitiesSchema,F as McpUiDownloadFileResultSchema,AQ as McpUiDownloadFileRequestSchema,W as McpUiDisplayModeSchema,d as McpUiAppCapabilitiesSchema,n as MESSAGE_METHOD,E as LATEST_PROTOCOL_VERSION,$Q as INITIALIZE_METHOD,DQ as INITIALIZED_METHOD,XQ as HOST_CONTEXT_CHANGED_METHOD,r as DOWNLOAD_FILE_METHOD,i as App};\n","/**\n * Tool-data store shared between AppProvider and the useToolData hook.\n *\n * AppProvider eagerly creates the store and wires the App's tool-event\n * listeners BEFORE running the ui/initialize handshake. Without that, hosts\n * that fire `ui/notifications/tool-result` immediately after the initialize\n * response (ChatGPT in production Safari is the known offender) race the\n * React commit that lets <AppProvider> children render and call\n * `useToolData()` — the lazy registration runs after the host has already\n * dispatched the notification, the result is dropped, and the widget is\n * stranded on its loading skeleton forever. sunpeak's own console warning\n * flagged exactly this:\n * \"toolresult handler registered after connect() completed the\n * ui/initialize handshake\".\n *\n * `useToolData` still falls back to a lazy WeakMap registration for App\n * instances created outside `AppProvider` (tests, direct SDK usage).\n */\nimport type { App } from '@modelcontextprotocol/ext-apps';\n\nexport interface ToolData<TInput = unknown, TOutput = unknown> {\n input: TInput | null;\n inputPartial: TInput | null;\n output: TOutput | null;\n isError: boolean;\n isLoading: boolean;\n isCancelled: boolean;\n cancelReason: string | null;\n}\n\nexport interface ToolDataStore<TInput = unknown, TOutput = unknown> {\n data: ToolData<TInput, TOutput>;\n listeners: Set<() => void>;\n}\n\ndeclare module '@modelcontextprotocol/ext-apps' {\n interface App {\n /** @internal Eager store attached by AppProvider before connect(). */\n __toolDataStore?: ToolDataStore;\n }\n}\n\n/**\n * Initialize the tool-data store on an App instance and wire its event\n * listeners. Idempotent - returns the existing store if one is already\n * attached.\n */\nexport function initToolDataStore(app: App): ToolDataStore {\n if (app.__toolDataStore) return app.__toolDataStore;\n\n const store: ToolDataStore = {\n data: {\n input: null,\n inputPartial: null,\n output: null,\n isError: false,\n isLoading: true,\n isCancelled: false,\n cancelReason: null,\n },\n listeners: new Set(),\n };\n app.__toolDataStore = store;\n\n const notify = () => {\n for (const fn of store.listeners) fn();\n };\n\n app.addEventListener('toolinput', (_params) => {\n store.data = {\n ...store.data,\n input: _params.arguments,\n inputPartial: null,\n };\n notify();\n });\n\n app.addEventListener('toolinputpartial', (_params) => {\n store.data = {\n ...store.data,\n inputPartial: _params.arguments,\n };\n notify();\n });\n\n app.addEventListener('toolresult', (_params) => {\n store.data = {\n ...store.data,\n output: _params.structuredContent ?? _params.content,\n isError: _params.isError ?? false,\n isLoading: false,\n };\n notify();\n });\n\n app.addEventListener('toolcancelled', (_params) => {\n store.data = {\n ...store.data,\n isCancelled: true,\n cancelReason: _params.reason ?? null,\n isLoading: false,\n };\n notify();\n });\n\n return store;\n}\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 *\n * Connection resilience: if the initial PostMessage handshake doesn't complete\n * within a timeout, the provider automatically retries with exponential backoff.\n * This handles race conditions where the host iframe bridge isn't ready when the\n * app first mounts (common on first load in ChatGPT and Claude).\n */\nimport { createContext, useState, useEffect, type ReactNode } from 'react';\nimport { App, PostMessageTransport } from '@modelcontextprotocol/ext-apps';\nimport { initToolDataStore } from './tool-data-store';\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\n/** Timeout for a single connection attempt (ms). */\nconst CONNECT_TIMEOUT_MS = 5_000;\n/** Maximum number of retry attempts before giving up. */\nconst MAX_RETRIES = 3;\n/** Base delay for exponential backoff between retries (ms). */\nconst RETRY_BASE_DELAY_MS = 500;\n\n/**\n * Race a promise against a timeout. Rejects with a TimeoutError if the\n * promise doesn't settle within `ms` milliseconds.\n */\nfunction withTimeout<T>(promise: Promise<T>, ms: number): Promise<T> {\n return new Promise<T>((resolve, reject) => {\n const timer = setTimeout(() => reject(new Error('Connection timed out')), ms);\n promise.then(\n (v) => {\n clearTimeout(timer);\n resolve(v);\n },\n (e) => {\n clearTimeout(timer);\n reject(e);\n }\n );\n });\n}\n\n/**\n * Attempt to connect to the host with timeout and retries.\n * Each attempt creates a fresh transport + App instance so stale PostMessage\n * listeners from a previous failed attempt don't interfere.\n */\nasync function connectWithRetry(\n appInfo: { name: string; version: string },\n capabilities: Record<string, unknown>,\n onAppCreated?: (app: App) => void\n): Promise<App> {\n let lastError: Error | null = null;\n\n for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {\n if (attempt > 0) {\n const delay = RETRY_BASE_DELAY_MS * 2 ** (attempt - 1);\n await new Promise((r) => setTimeout(r, delay));\n }\n\n let transport: PostMessageTransport | null = null;\n try {\n transport = new PostMessageTransport(window.parent, window.parent);\n const newApp = new App(appInfo, capabilities);\n // Pre-register useToolData's notification handlers BEFORE connect()\n // runs the ui/initialize handshake. Hosts that fire\n // `ui/notifications/tool-result` immediately after the initialize\n // response (ChatGPT on production Safari) would otherwise race the\n // first React commit and drop the result. See tool-data-store.ts.\n initToolDataStore(newApp);\n onAppCreated?.(newApp);\n await withTimeout(newApp.connect(transport), CONNECT_TIMEOUT_MS);\n return newApp;\n } catch (err) {\n // Clean up the transport's PostMessage listener so it doesn't linger.\n if (transport) {\n try {\n await transport.close();\n } catch {\n /* ignore close errors */\n }\n }\n lastError = err instanceof Error ? err : new Error('Connection failed');\n if (attempt < MAX_RETRIES) {\n console.warn(\n `[sunpeak] Connection attempt ${attempt + 1}/${MAX_RETRIES + 1} failed, retrying...`,\n lastError.message\n );\n }\n }\n }\n\n console.error(\n '[sunpeak] All connection attempts failed. Try refreshing the page or opening a new chat.\\n' +\n 'Troubleshooting: https://sunpeak.ai/docs/app-framework/guides/troubleshooting'\n );\n throw lastError ?? new Error('Failed to connect');\n}\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 = connectWithRetry(appInfo, capabilities ?? {}, onAppCreated);\n }\n\n _connecting.then(\n (connectedApp) => {\n _app = 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":";;;;EAAQ,MAAI,OAAO,UAAQ,MAAI,UAAQ,OAAO,QAAM,MAAI,IAAI,MAAM,GAAE,EAAC,MAAK,GAAE,OAAK,OAAO,UAAQ,MAAI,UAAQ,EAAA,CAAG,GAAE,CAAC,IAAE,EAAA,CAAG,SAAS,GAAE;CAAC,IAAG,OAAO,UAAQ,KAAI,OAAO,QAAQ,MAAM,MAAK,SAAS;CAAE,MAAM,MAAM,0BAAuB,IAAE,qBAAoB;AAAC,CAAC;AAAwd,IAAM,IAAN,cAAgBA,iBAAAA,SAAC;CAAC,qCAAmB,IAAI,IAAE;CAAE,8BAAY,IAAI,IAAE;CAAE,gBAAgB,GAAE,GAAE,CAAC;CAAC,iBAAiB,GAAE;EAAC,IAAI,IAAE,KAAK,YAAY,IAAI,CAAC;EAAE,IAAG,CAAC,GAAE;GAAC,IAAI,IAAE,KAAK,aAAa;GAAG,IAAG,CAAC,GAAE,MAAM,MAAM,kBAAkB,OAAO,CAAC,GAAG;GAAE,IAAE,EAAC,WAAU,CAAC,EAAC,GAAE,KAAK,YAAY,IAAI,GAAE,CAAC;GAAE,IAAI,IAAE,EAAE,MAAM,OAAO;GAAM,KAAK,mBAAmB,IAAI,CAAC;GAAE,IAAI,IAAE;GAAE,MAAM,uBAAuB,IAAG,MAAI;IAAC,IAAI,IAAE,EAAE;IAAO,KAAK,gBAAgB,GAAE,CAAC,GAAE,EAAE,YAAY,CAAC;IAAE,KAAI,IAAI,KAAI,CAAC,GAAG,EAAE,SAAS,GAAE,EAAE,CAAC;GAAC,CAAC;EAAC;EAAC,OAAO;CAAC;CAAC,gBAAgB,GAAE,GAAE;EAAC,IAAI,IAAE,KAAK,iBAAiB,CAAC;EAAE,IAAG,E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