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
|
@@ -63,12 +63,30 @@ var _ = class extends Protocol {
|
|
|
63
63
|
this._registeredMethods.add(Z);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
var j = "2026-01-26"
|
|
67
|
-
var
|
|
66
|
+
var j = "2026-01-26";
|
|
67
|
+
var JQ = "ui/open-link";
|
|
68
|
+
var KQ = "ui/download-file";
|
|
69
|
+
var DQ = "ui/message";
|
|
70
|
+
var GQ = "ui/notifications/sandbox-proxy-ready";
|
|
71
|
+
var NQ = "ui/notifications/sandbox-resource-ready";
|
|
72
|
+
var WQ = "ui/notifications/size-changed";
|
|
73
|
+
var jQ = "ui/notifications/tool-input";
|
|
74
|
+
var V = "ui/notifications/tool-input-partial";
|
|
75
|
+
var BQ = "ui/notifications/tool-result";
|
|
76
|
+
var _Q = "ui/notifications/tool-cancelled";
|
|
77
|
+
var EQ = "ui/notifications/host-context-changed";
|
|
78
|
+
var OQ = "ui/notifications/request-teardown";
|
|
79
|
+
var zQ = "ui/resource-teardown";
|
|
80
|
+
var IQ = "ui/initialize";
|
|
81
|
+
var VQ = "ui/notifications/initialized";
|
|
82
|
+
var FQ = "ui/request-display-mode";
|
|
83
|
+
var r = union([literal("light"), literal("dark")]).describe("Color theme preference for the host environment.");
|
|
84
|
+
var B = union([
|
|
68
85
|
literal("inline"),
|
|
69
86
|
literal("fullscreen"),
|
|
70
87
|
literal("pip")
|
|
71
|
-
]).describe("Display mode for UI presentation.")
|
|
88
|
+
]).describe("Display mode for UI presentation.");
|
|
89
|
+
var RQ = record(union([
|
|
72
90
|
literal("--color-background-primary"),
|
|
73
91
|
literal("--color-background-secondary"),
|
|
74
92
|
literal("--color-background-tertiary"),
|
|
@@ -163,13 +181,19 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
163
181
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
164
182
|
|
|
165
183
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
166
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`)
|
|
184
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);
|
|
185
|
+
var L = object({
|
|
167
186
|
method: literal("ui/open-link"),
|
|
168
187
|
params: object({ url: string().describe("URL to open in the host's browser") })
|
|
169
|
-
})
|
|
188
|
+
});
|
|
189
|
+
var P = object({ isError: boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough();
|
|
190
|
+
var A = object({ isError: boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough();
|
|
191
|
+
var U = object({ isError: boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough();
|
|
192
|
+
var w = object({
|
|
170
193
|
method: literal("ui/notifications/sandbox-proxy-ready"),
|
|
171
194
|
params: object({})
|
|
172
|
-
})
|
|
195
|
+
});
|
|
196
|
+
var O = object({
|
|
173
197
|
connectDomains: array(string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
174
198
|
|
|
175
199
|
- Maps to CSP \`connect-src\` directive
|
|
@@ -177,43 +201,55 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
|
|
|
177
201
|
resourceDomains: array(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)"),
|
|
178
202
|
frameDomains: array(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'`)"),
|
|
179
203
|
baseUriDomains: array(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'`)")
|
|
180
|
-
})
|
|
204
|
+
});
|
|
205
|
+
var z = object({
|
|
181
206
|
camera: object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),
|
|
182
207
|
microphone: object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),
|
|
183
208
|
geolocation: object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),
|
|
184
209
|
clipboardWrite: object({}).optional().describe("Request clipboard write access.\n\nMaps to Permission Policy `clipboard-write` feature.")
|
|
185
|
-
})
|
|
210
|
+
});
|
|
211
|
+
var H = object({
|
|
186
212
|
method: literal("ui/notifications/size-changed"),
|
|
187
213
|
params: object({
|
|
188
214
|
width: number().optional().describe("New width in pixels."),
|
|
189
215
|
height: number().optional().describe("New height in pixels.")
|
|
190
216
|
})
|
|
191
|
-
})
|
|
217
|
+
});
|
|
218
|
+
var R = object({
|
|
192
219
|
method: literal("ui/notifications/tool-input"),
|
|
193
220
|
params: object({ arguments: record(string(), unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.") })
|
|
194
|
-
})
|
|
221
|
+
});
|
|
222
|
+
var T = object({
|
|
195
223
|
method: literal("ui/notifications/tool-input-partial"),
|
|
196
224
|
params: object({ arguments: record(string(), unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).") })
|
|
197
|
-
})
|
|
225
|
+
});
|
|
226
|
+
var M = object({
|
|
198
227
|
method: literal("ui/notifications/tool-cancelled"),
|
|
199
228
|
params: object({ reason: string().optional().describe("Optional reason for the cancellation (e.g., \"user action\", \"timeout\").") })
|
|
200
|
-
})
|
|
229
|
+
});
|
|
230
|
+
var o = object({ fonts: string().optional() });
|
|
231
|
+
var s = object({
|
|
201
232
|
variables: RQ.optional().describe("CSS variables for theming the app."),
|
|
202
233
|
css: o.optional().describe("CSS blocks that apps can inject.")
|
|
203
|
-
})
|
|
234
|
+
});
|
|
235
|
+
var C = object({
|
|
204
236
|
method: literal("ui/resource-teardown"),
|
|
205
237
|
params: object({})
|
|
206
|
-
})
|
|
238
|
+
});
|
|
239
|
+
var S = record(string(), unknown());
|
|
240
|
+
var F = object({
|
|
207
241
|
text: object({}).optional().describe("Host supports text content blocks."),
|
|
208
242
|
image: object({}).optional().describe("Host supports image content blocks."),
|
|
209
243
|
audio: object({}).optional().describe("Host supports audio content blocks."),
|
|
210
244
|
resource: object({}).optional().describe("Host supports resource content blocks."),
|
|
211
245
|
resourceLink: object({}).optional().describe("Host supports resource link content blocks."),
|
|
212
246
|
structuredContent: object({}).optional().describe("Host supports structured content.")
|
|
213
|
-
})
|
|
247
|
+
});
|
|
248
|
+
var q = object({
|
|
214
249
|
method: literal("ui/notifications/request-teardown"),
|
|
215
250
|
params: object({}).optional()
|
|
216
|
-
})
|
|
251
|
+
});
|
|
252
|
+
var t = object({
|
|
217
253
|
experimental: object({}).optional().describe("Experimental features (structure TBD)."),
|
|
218
254
|
openLinks: object({}).optional().describe("Host supports opening external URLs."),
|
|
219
255
|
downloadFile: object({}).optional().describe("Host supports file downloads via ui/download-file."),
|
|
@@ -227,14 +263,17 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
|
|
|
227
263
|
updateModelContext: F.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
|
|
228
264
|
message: F.optional().describe("Host supports receiving content messages (ui/message) from the view."),
|
|
229
265
|
sampling: object({ tools: 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.")
|
|
230
|
-
})
|
|
266
|
+
});
|
|
267
|
+
var a = object({
|
|
231
268
|
experimental: object({}).optional().describe("Experimental features (structure TBD)."),
|
|
232
269
|
tools: object({ listChanged: boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."),
|
|
233
270
|
availableDisplayModes: array(B).optional().describe("Display modes the app supports.")
|
|
234
|
-
})
|
|
271
|
+
});
|
|
272
|
+
var y = object({
|
|
235
273
|
method: literal("ui/notifications/initialized"),
|
|
236
274
|
params: object({}).optional()
|
|
237
|
-
})
|
|
275
|
+
});
|
|
276
|
+
var TQ = object({
|
|
238
277
|
csp: O.optional().describe("Content Security Policy configuration for UI resources."),
|
|
239
278
|
permissions: z.optional().describe("Sandbox permissions requested by the UI resource."),
|
|
240
279
|
domain: string().optional().describe(`Dedicated origin for view sandbox.
|
|
@@ -253,10 +292,14 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
253
292
|
- \`true\`: request visible border + background
|
|
254
293
|
- \`false\`: request no visible border + background
|
|
255
294
|
- omitted: host decides border`)
|
|
256
|
-
})
|
|
295
|
+
});
|
|
296
|
+
var I = object({
|
|
257
297
|
method: literal("ui/request-display-mode"),
|
|
258
298
|
params: object({ mode: B.describe("The display mode being requested.") })
|
|
259
|
-
})
|
|
299
|
+
});
|
|
300
|
+
var g = object({ mode: B.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough();
|
|
301
|
+
var e = union([literal("model"), literal("app")]).describe("Tool visibility scope - who can access the tool.");
|
|
302
|
+
var MQ = object({
|
|
260
303
|
resourceUri: string().optional(),
|
|
261
304
|
visibility: array(e).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
262
305
|
- "model": Tool visible to and callable by the agent
|
|
@@ -268,13 +311,15 @@ object({ mimeTypes: array(string()).optional().describe("Array of supported MIME
|
|
|
268
311
|
var f = object({
|
|
269
312
|
method: literal("ui/download-file"),
|
|
270
313
|
params: object({ contents: array(union([EmbeddedResourceSchema, ResourceLinkSchema])).describe("Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.") })
|
|
271
|
-
})
|
|
314
|
+
});
|
|
315
|
+
var k = object({
|
|
272
316
|
method: literal("ui/message"),
|
|
273
317
|
params: object({
|
|
274
318
|
role: literal("user").describe("Message role, currently only \"user\" is supported."),
|
|
275
319
|
content: array(ContentBlockSchema).describe("Message content blocks (text, image, etc.).")
|
|
276
320
|
})
|
|
277
|
-
})
|
|
321
|
+
});
|
|
322
|
+
var CQ = object({
|
|
278
323
|
method: literal("ui/notifications/sandbox-resource-ready"),
|
|
279
324
|
params: object({
|
|
280
325
|
html: string().describe("HTML content to load into the inner iframe."),
|
|
@@ -282,10 +327,12 @@ var f = object({
|
|
|
282
327
|
csp: O.optional().describe("CSP configuration from resource metadata."),
|
|
283
328
|
permissions: z.optional().describe("Sandbox permissions from resource metadata.")
|
|
284
329
|
})
|
|
285
|
-
})
|
|
330
|
+
});
|
|
331
|
+
var v = object({
|
|
286
332
|
method: literal("ui/notifications/tool-result"),
|
|
287
333
|
params: CallToolResultSchema.describe("Standard MCP tool execution result.")
|
|
288
|
-
})
|
|
334
|
+
});
|
|
335
|
+
var x = object({
|
|
289
336
|
toolInfo: object({
|
|
290
337
|
id: RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."),
|
|
291
338
|
tool: ToolSchema.describe("Tool definition including name, inputSchema, etc.")
|
|
@@ -314,23 +361,27 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
314
361
|
bottom: number().describe("Bottom safe area inset in pixels."),
|
|
315
362
|
left: number().describe("Left safe area inset in pixels.")
|
|
316
363
|
}).optional().describe("Mobile safe area boundaries in pixels.")
|
|
317
|
-
}).passthrough()
|
|
364
|
+
}).passthrough();
|
|
365
|
+
var b = object({
|
|
318
366
|
method: literal("ui/notifications/host-context-changed"),
|
|
319
367
|
params: x.describe("Partial context update containing only changed fields.")
|
|
320
|
-
})
|
|
368
|
+
});
|
|
369
|
+
var d = object({
|
|
321
370
|
method: literal("ui/update-model-context"),
|
|
322
371
|
params: object({
|
|
323
372
|
content: array(ContentBlockSchema).optional().describe("Context content blocks (text, image, etc.)."),
|
|
324
373
|
structuredContent: record(string(), unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")
|
|
325
374
|
})
|
|
326
|
-
})
|
|
375
|
+
});
|
|
376
|
+
var u = object({
|
|
327
377
|
method: literal("ui/initialize"),
|
|
328
378
|
params: object({
|
|
329
379
|
appInfo: ImplementationSchema.describe("App identification (name and version)."),
|
|
330
380
|
appCapabilities: a.describe("Features and capabilities this app provides."),
|
|
331
381
|
protocolVersion: string().describe("Protocol version this app supports.")
|
|
332
382
|
})
|
|
333
|
-
})
|
|
383
|
+
});
|
|
384
|
+
var h = object({
|
|
334
385
|
protocolVersion: string().describe("Negotiated protocol version string (e.g., \"2025-11-21\")."),
|
|
335
386
|
hostInfo: ImplementationSchema.describe("Host application identification and version."),
|
|
336
387
|
hostCapabilities: t.describe("Features and capabilities provided by the host."),
|
|
@@ -370,7 +421,8 @@ var E = class {
|
|
|
370
421
|
sessionId;
|
|
371
422
|
setProtocolVersion;
|
|
372
423
|
};
|
|
373
|
-
var i = "ui/resourceUri"
|
|
424
|
+
var i = "ui/resourceUri";
|
|
425
|
+
var pQ = "text/html;profile=mcp-app";
|
|
374
426
|
function FZ(X) {
|
|
375
427
|
let Z = X._meta?.ui?.resourceUri;
|
|
376
428
|
if (Z === void 0) Z = X._meta?.[i];
|
package/template/node_modules/.vite-mcp/deps/@modelcontextprotocol_ext-apps_app-bridge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"@modelcontextprotocol_ext-apps_app-bridge.js","names":["$Q","Q.union","Q.literal","Q.record","Q.string","Q.undefined","Q.object","Q.boolean","Q.array","Q.number","Q.unknown","Q.never","PQ","UQ","c","LQ","AQ","wQ","l","SQ","eQ","QX","iQ","nQ","rQ","sQ","YX","cQ","XQ","aQ","JX","oQ","tQ","ZX","$X","lQ","XX"],"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-bridge.js"],"sourcesContent":["var ZQ=((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{CallToolRequestSchema as iQ,CallToolResultSchema as XQ,CreateMessageRequestSchema as nQ,ListPromptsRequestSchema as cQ,ListPromptsResultSchema as lQ,ListResourcesRequestSchema as rQ,ListResourcesResultSchema as oQ,ListResourceTemplatesRequestSchema as sQ,ListResourceTemplatesResultSchema as tQ,ListToolsResultSchema as aQ,LoggingMessageNotificationSchema as eQ,PingRequestSchema as QX,PromptListChangedNotificationSchema as XX,ReadResourceRequestSchema as YX,ReadResourceResultSchema as ZX,ResourceListChangedNotificationSchema as $X,ToolListChangedNotificationSchema as JX}from\"@modelcontextprotocol/sdk/types.js\";import{Protocol as $Q}from\"@modelcontextprotocol/sdk/shared/protocol.js\";class _ extends $Q{_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 J=Y;super.setNotificationHandler(Z,(K)=>{let D=K.params;this.onEventDispatch(X,D),J.onHandler?.(D);for(let G of[...J.listeners])G(D)})}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)}}var j=\"2026-01-26\",JQ=\"ui/open-link\",KQ=\"ui/download-file\",DQ=\"ui/message\",GQ=\"ui/notifications/sandbox-proxy-ready\",NQ=\"ui/notifications/sandbox-resource-ready\",WQ=\"ui/notifications/size-changed\",jQ=\"ui/notifications/tool-input\",V=\"ui/notifications/tool-input-partial\",BQ=\"ui/notifications/tool-result\",_Q=\"ui/notifications/tool-cancelled\",EQ=\"ui/notifications/host-context-changed\",OQ=\"ui/notifications/request-teardown\",zQ=\"ui/resource-teardown\",IQ=\"ui/initialize\",VQ=\"ui/notifications/initialized\",FQ=\"ui/request-display-mode\";import{z as Q}from\"zod/v4\";import{ContentBlockSchema as c,CallToolResultSchema as LQ,EmbeddedResourceSchema as PQ,ImplementationSchema as l,RequestIdSchema as AQ,ResourceLinkSchema as UQ,ToolSchema as wQ}from\"@modelcontextprotocol/sdk/types.js\";var r=Q.union([Q.literal(\"light\"),Q.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),B=Q.union([Q.literal(\"inline\"),Q.literal(\"fullscreen\"),Q.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),HQ=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.\"),RQ=Q.record(HQ.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.`),L=Q.object({method:Q.literal(\"ui/open-link\"),params:Q.object({url:Q.string().describe(\"URL to open in the host's browser\")})}),P=Q.object({isError:Q.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),A=Q.object({isError:Q.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),U=Q.object({isError:Q.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),w=Q.object({method:Q.literal(\"ui/notifications/sandbox-proxy-ready\"),params:Q.object({})}),O=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'`)\")}),z=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.\")}),H=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.\")})}),R=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.\")})}),T=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).\")})}),M=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\").')})}),o=Q.object({fonts:Q.string().optional()}),s=Q.object({variables:RQ.optional().describe(\"CSS variables for theming the app.\"),css:o.optional().describe(\"CSS blocks that apps can inject.\")}),C=Q.object({method:Q.literal(\"ui/resource-teardown\"),params:Q.object({})}),S=Q.record(Q.string(),Q.unknown()),F=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.\")}),q=Q.object({method:Q.literal(\"ui/notifications/request-teardown\"),params:Q.object({}).optional()}),t=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:z.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:O.optional().describe(\"CSP domains approved by the host.\")}).optional().describe(\"Sandbox configuration applied by the host.\"),updateModelContext:F.optional().describe(\"Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.\"),message:F.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.\")}),a=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(B).optional().describe(\"Display modes the app supports.\")}),y=Q.object({method:Q.literal(\"ui/notifications/initialized\"),params:Q.object({}).optional()}),TQ=Q.object({csp:O.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:z.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`)}),I=Q.object({method:Q.literal(\"ui/request-display-mode\"),params:Q.object({mode:B.describe(\"The display mode being requested.\")})}),g=Q.object({mode:B.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),e=Q.union([Q.literal(\"model\"),Q.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),MQ=Q.object({resourceUri:Q.string().optional(),visibility:Q.array(e).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()}),OX=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.')}),f=Q.object({method:Q.literal(\"ui/download-file\"),params:Q.object({contents:Q.array(Q.union([PQ,UQ])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),k=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(c).describe(\"Message content blocks (text, image, etc.).\")})}),CQ=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:O.optional().describe(\"CSP configuration from resource metadata.\"),permissions:z.optional().describe(\"Sandbox permissions from resource metadata.\")})}),v=Q.object({method:Q.literal(\"ui/notifications/tool-result\"),params:LQ.describe(\"Standard MCP tool execution result.\")}),x=Q.object({toolInfo:Q.object({id:AQ.optional().describe(\"JSON-RPC id of the tools/call request.\"),tool:wQ.describe(\"Tool definition including name, inputSchema, etc.\")}).optional().describe(\"Metadata of the tool call that instantiated this App.\"),theme:r.optional().describe(\"Current color theme preference.\"),styles:s.optional().describe(\"Style configuration for theming the app.\"),displayMode:B.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:Q.array(B).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(),b=Q.object({method:Q.literal(\"ui/notifications/host-context-changed\"),params:x.describe(\"Partial context update containing only changed fields.\")}),d=Q.object({method:Q.literal(\"ui/update-model-context\"),params:Q.object({content:Q.array(c).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.\")})}),u=Q.object({method:Q.literal(\"ui/initialize\"),params:Q.object({appInfo:l.describe(\"App identification (name and version).\"),appCapabilities:a.describe(\"Features and capabilities this app provides.\"),protocolVersion:Q.string().describe(\"Protocol version this app supports.\")})}),h=Q.object({protocolVersion:Q.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:l.describe(\"Host application identification and version.\"),hostCapabilities:t.describe(\"Features and capabilities provided by the host.\"),hostContext:x.describe(\"Rich context about the host environment.\")}).passthrough();import{mergeCapabilities as yQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";import{CallToolRequestSchema as gQ,CallToolResultSchema as fQ,CreateMessageResultSchema as kQ,CreateMessageResultWithToolsSchema as vQ,EmptyResultSchema as xQ,ListResourcesResultSchema as bQ,ListToolsRequestSchema as dQ,PingRequestSchema as uQ,ReadResourceResultSchema as hQ}from\"@modelcontextprotocol/sdk/types.js\";import{JSONRPCMessageSchema as SQ}from\"@modelcontextprotocol/sdk/types.js\";class E{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 $=SQ.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!==V)console.debug(\"Sending message\",X);this.eventTarget.postMessage(X,\"*\")}async close(){window.removeEventListener(\"message\",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var qQ={target:\"draft-2020-12\"};async function m(X,Y){let Z=X[\"~standard\"];if(Z.jsonSchema)return Z.jsonSchema[Y](qQ);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 p(X,Y,Z=\"\"){let $=await X[\"~standard\"].validate(Y);if($.issues){let J=$.issues.map((K)=>{let D=K.path?.map((G)=>typeof G===\"object\"?G.key:G).join(\".\");return D?`${D}: ${K.message}`:K.message}).join(\"; \");throw Error(Z+J)}return $.value}import{z as mQ}from\"zod/v4\";var i=\"ui/resourceUri\",pQ=\"text/html;profile=mcp-app\";class QQ 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:R,toolinputpartial:T,toolresult:v,toolcancelled:M,hostcontextchanged:b};static ONE_SHOT_EVENTS=new Set([\"toolinput\",\"toolinputpartial\",\"toolresult\",\"toolcancelled\"]);_everHadListener=new Set;_assertHandlerTiming(X){if(!QQ.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)mQ.config({jitless:!0});this.setRequestHandler(uQ,($)=>{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=yQ(this._capabilities,X)}registerTool(X,Y,Z){if(this._registeredTools[X])throw Error(`Tool ${X} is already registered`);let $=this,J=()=>{if($._initializedSent&&$._capabilities.tools?.listChanged)$.sendToolListChanged()},K=Y.inputSchema!==void 0,D={title:Y.title,description:Y.description,inputSchema:Y.inputSchema,outputSchema:Y.outputSchema,annotations:Y.annotations,_meta:Y._meta,enabled:!0,enable(){this.enabled=!0,J()},disable(){this.enabled=!1,J()},update(G){Object.assign(this,G),J()},remove(){if($._registeredTools[X]!==D)return;delete $._registeredTools[X],J()},handler:async(G,N)=>{if(!D.enabled)throw Error(`Tool ${X} is disabled`);let W;if(K){let n=D.inputSchema,YQ=n?await p(n,G??{},`Invalid input for tool ${X}: `):G??{};W=await Z(YQ,N)}else W=await Z(N);if(D.outputSchema&&!W.isError)W.structuredContent=await p(D.outputSchema,W.structuredContent,`Invalid output for tool ${X}: `);return W}};if(this._registeredTools[X]=D,!this._capabilities.tools&&!this.transport)this.registerCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),J(),D}_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(([$,J])=>J.enabled).map(async([$,J])=>{let K={name:$,title:J.title,description:J.description,inputSchema:J.inputSchema?await m(J.inputSchema,\"input\"):{type:\"object\",properties:{}}};if(J.outputSchema)K.outputSchema=await m(J.outputSchema,\"output\");if(J.annotations)K.annotations=J.annotations;if(J._meta)K._meta=J._meta;return K}))}}}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(C,(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(gQ,(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(dQ,(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},fQ,{onprogress:()=>{},resetTimeoutOnProgress:!0,...Y})}async readServerResource(X,Y){return this._assertInitialized(\"readServerResource\"),await this.request({method:\"resources/read\",params:X},hQ,Y)}async listServerResources(X,Y){return this._assertInitialized(\"listServerResources\"),await this.request({method:\"resources/list\",params:X},bQ,Y)}async createSamplingMessage(X,Y){this._assertInitialized(\"createSamplingMessage\");let Z=X.tools?vQ:kQ;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},U,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},xQ,Y)}openLink(X,Y){return this._assertInitialized(\"openLink\"),this.request({method:\"ui/open-link\",params:X},P,Y)}sendOpenLink=this.openLink;downloadFile(X,Y){return this._assertInitialized(\"downloadFile\"),this.request({method:\"ui/download-file\",params:X},A,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},g,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 K=document.documentElement,D=K.style.height;K.style.height=\"max-content\";let G=Math.ceil(K.getBoundingClientRect().height);K.style.height=D;let N=Math.ceil(window.innerWidth);if(N!==Y||G!==Z)Y=N,Z=G,this.sendSizeChanged({width:N,height:G})})};$();let J=new ResizeObserver($);return J.observe(document.documentElement),J.observe(document.body),()=>J.disconnect()}async connect(X=new E(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:j}},h,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}}}function FZ(X){let Z=X._meta?.ui?.resourceUri;if(Z===void 0)Z=X._meta?.[i];if(typeof Z===\"string\"&&Z.startsWith(\"ui://\"))return Z;else if(Z!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(Z)}`);return}function LZ(X){let Z=X._meta?.ui?.visibility;if(!Z)return!1;if(Z.length===1&&Z[0]===\"model\")return!0;return!1}function PZ(X){let Z=X._meta?.ui?.visibility;if(!Z)return!1;if(Z.length===1&&Z[0]===\"app\")return!0;return!1}function AZ(X){if(!X)return\"\";let Y=[];if(X.camera)Y.push(\"camera\");if(X.microphone)Y.push(\"microphone\");if(X.geolocation)Y.push(\"geolocation\");if(X.clipboardWrite)Y.push(\"clipboard-write\");return Y.join(\"; \")}var KX=[j];class DX extends _{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(X,Y)=>{this._baseReplaceRequestHandler(X,(Z,$)=>{if(!this._initializedReceived)console.warn(`[ext-apps] AppBridge received '${Z.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`);return Y(Z,$)})};eventSchemas={sizechange:H,sandboxready:w,initialized:y,requestteardown:q,loggingmessage:eQ};constructor(X,Y,Z,$){super($);this._client=X;this._hostInfo=Y;this._capabilities=Z;this.addEventListener(\"initialized\",()=>{this._initializedReceived=!0}),this._hostContext=$?.hostContext||{},this.setRequestHandler(u,(J)=>this._oninitialize(J)),this.setRequestHandler(QX,(J,K)=>{return this.onping?.(J.params,K),{}}),this.replaceRequestHandler(I,(J)=>{return{mode:this._hostContext.displayMode??\"inline\"}})}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(\"sizechange\")}set onsizechange(X){this.setEventHandler(\"sizechange\",X)}get onsandboxready(){return this.getEventHandler(\"sandboxready\")}set onsandboxready(X){this.setEventHandler(\"sandboxready\",X)}get oninitialized(){return this.getEventHandler(\"initialized\")}set oninitialized(X){this.setEventHandler(\"initialized\",X)}_onmessage;get onmessage(){return this._onmessage}set onmessage(X){this.warnIfRequestHandlerReplaced(\"onmessage\",this._onmessage,X),this._onmessage=X,this.replaceRequestHandler(k,async(Y,Z)=>{if(!this._onmessage)throw Error(\"No onmessage handler set\");return this._onmessage(Y.params,Z)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(X){this.warnIfRequestHandlerReplaced(\"onopenlink\",this._onopenlink,X),this._onopenlink=X,this.replaceRequestHandler(L,async(Y,Z)=>{if(!this._onopenlink)throw Error(\"No onopenlink handler set\");return this._onopenlink(Y.params,Z)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(X){this.warnIfRequestHandlerReplaced(\"ondownloadfile\",this._ondownloadfile,X),this._ondownloadfile=X,this.replaceRequestHandler(f,async(Y,Z)=>{if(!this._ondownloadfile)throw Error(\"No ondownloadfile handler set\");return this._ondownloadfile(Y.params,Z)})}get onrequestteardown(){return this.getEventHandler(\"requestteardown\")}set onrequestteardown(X){this.setEventHandler(\"requestteardown\",X)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(X){this.warnIfRequestHandlerReplaced(\"onrequestdisplaymode\",this._onrequestdisplaymode,X),this._onrequestdisplaymode=X,this.replaceRequestHandler(I,async(Y,Z)=>{if(!this._onrequestdisplaymode)throw Error(\"No onrequestdisplaymode handler set\");return this._onrequestdisplaymode(Y.params,Z)})}get onloggingmessage(){return this.getEventHandler(\"loggingmessage\")}set onloggingmessage(X){this.setEventHandler(\"loggingmessage\",X)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(X){this.warnIfRequestHandlerReplaced(\"onupdatemodelcontext\",this._onupdatemodelcontext,X),this._onupdatemodelcontext=X,this.replaceRequestHandler(d,async(Y,Z)=>{if(!this._onupdatemodelcontext)throw Error(\"No onupdatemodelcontext handler set\");return this._onupdatemodelcontext(Y.params,Z)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(X){this.warnIfRequestHandlerReplaced(\"oncalltool\",this._oncalltool,X),this._oncalltool=X,this.replaceRequestHandler(iQ,async(Y,Z)=>{if(!this._oncalltool)throw Error(\"No oncalltool handler set\");return this._oncalltool(Y.params,Z)})}set oncreatesamplingmessage(X){this.setRequestHandler(nQ,async(Y,Z)=>{return X(Y.params,Z)})}sendToolListChanged(X={}){return this.notification({method:\"notifications/tools/list_changed\",params:X})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(X){this.warnIfRequestHandlerReplaced(\"onlistresources\",this._onlistresources,X),this._onlistresources=X,this.replaceRequestHandler(rQ,async(Y,Z)=>{if(!this._onlistresources)throw Error(\"No onlistresources handler set\");return this._onlistresources(Y.params,Z)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(X){this.warnIfRequestHandlerReplaced(\"onlistresourcetemplates\",this._onlistresourcetemplates,X),this._onlistresourcetemplates=X,this.replaceRequestHandler(sQ,async(Y,Z)=>{if(!this._onlistresourcetemplates)throw Error(\"No onlistresourcetemplates handler set\");return this._onlistresourcetemplates(Y.params,Z)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(X){this.warnIfRequestHandlerReplaced(\"onreadresource\",this._onreadresource,X),this._onreadresource=X,this.replaceRequestHandler(YX,async(Y,Z)=>{if(!this._onreadresource)throw Error(\"No onreadresource handler set\");return this._onreadresource(Y.params,Z)})}sendResourceListChanged(X={}){return this.notification({method:\"notifications/resources/list_changed\",params:X})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(X){this.warnIfRequestHandlerReplaced(\"onlistprompts\",this._onlistprompts,X),this._onlistprompts=X,this.replaceRequestHandler(cQ,async(Y,Z)=>{if(!this._onlistprompts)throw Error(\"No onlistprompts handler set\");return this._onlistprompts(Y.params,Z)})}sendPromptListChanged(X={}){return this.notification({method:\"notifications/prompts/list_changed\",params:X})}assertCapabilityForMethod(X){}assertRequestHandlerCapability(X){}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\")}getCapabilities(){return this._capabilities}async _oninitialize(X){let Y=X.params.protocolVersion;if(this._appInfo!==void 0)console.warn(\"[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.\");return this._appCapabilities=X.params.appCapabilities,this._appInfo=X.params.appInfo,{protocolVersion:KX.includes(Y)?Y:j,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(X){let Y={},Z=!1;for(let $ of Object.keys(X)){let J=this._hostContext[$],K=X[$];if(GX(J,K))continue;Y[$]=K,Z=!0}if(Z)this._hostContext=X,this.sendHostContextChange(Y)}sendHostContextChange(X){return this.notification({method:\"ui/notifications/host-context-changed\",params:X})}sendToolInput(X){return this.notification({method:\"ui/notifications/tool-input\",params:X})}sendToolInputPartial(X){return this.notification({method:\"ui/notifications/tool-input-partial\",params:X})}sendToolResult(X){return this.notification({method:\"ui/notifications/tool-result\",params:X})}sendToolCancelled(X){return this.notification({method:\"ui/notifications/tool-cancelled\",params:X})}sendSandboxResourceReady(X){return this.notification({method:\"ui/notifications/sandbox-resource-ready\",params:X})}teardownResource(X,Y){return this.request({method:\"ui/resource-teardown\",params:X},S,Y)}sendResourceTeardown=this.teardownResource;callTool(X,Y){return this.request({method:\"tools/call\",params:X},XQ,Y)}listTools(X,Y){return this.request({method:\"tools/list\",params:X},aQ,Y)}async connect(X){if(this.transport)throw Error(\"AppBridge is already connected. Call close() before connecting again.\");if(this._initializedReceived=!1,this._client){let Y=this._client.getServerCapabilities();if(!Y)throw Error(\"Client server capabilities not available\");if(Y.tools){if(this.oncalltool=async(Z,$)=>{return this._client.request({method:\"tools/call\",params:Z},XQ,{signal:$.signal})},Y.tools.listChanged)this._client.setNotificationHandler(JX,(Z)=>this.sendToolListChanged(Z.params))}if(Y.resources){if(this.onlistresources=async(Z,$)=>{return this._client.request({method:\"resources/list\",params:Z},oQ,{signal:$.signal})},this.onlistresourcetemplates=async(Z,$)=>{return this._client.request({method:\"resources/templates/list\",params:Z},tQ,{signal:$.signal})},this.onreadresource=async(Z,$)=>{return this._client.request({method:\"resources/read\",params:Z},ZX,{signal:$.signal})},Y.resources.listChanged)this._client.setNotificationHandler($X,(Z)=>this.sendResourceListChanged(Z.params))}if(Y.prompts){if(this.onlistprompts=async(Z,$)=>{return this._client.request({method:\"prompts/list\",params:Z},lQ,{signal:$.signal})},Y.prompts.listChanged)this._client.setNotificationHandler(XX,(Z)=>this.sendPromptListChanged(Z.params))}}return super.connect(X)}}function GX(X,Y){return JSON.stringify(X)===JSON.stringify(Y)}export{LZ as isToolVisibilityModelOnly,PZ as isToolVisibilityAppOnly,FZ as getToolUiResourceUri,AZ as buildAllowAttribute,BQ as TOOL_RESULT_METHOD,V as TOOL_INPUT_PARTIAL_METHOD,jQ as TOOL_INPUT_METHOD,_Q as TOOL_CANCELLED_METHOD,KX as SUPPORTED_PROTOCOL_VERSIONS,WQ as SIZE_CHANGED_METHOD,NQ as SANDBOX_RESOURCE_READY_METHOD,GQ as SANDBOX_PROXY_READY_METHOD,i as RESOURCE_URI_META_KEY,zQ as RESOURCE_TEARDOWN_METHOD,pQ as RESOURCE_MIME_TYPE,OQ as REQUEST_TEARDOWN_METHOD,FQ as REQUEST_DISPLAY_MODE_METHOD,E as PostMessageTransport,JQ as OPEN_LINK_METHOD,d as McpUiUpdateModelContextRequestSchema,e as McpUiToolVisibilitySchema,v as McpUiToolResultNotificationSchema,MQ as McpUiToolMetaSchema,T as McpUiToolInputPartialNotificationSchema,R as McpUiToolInputNotificationSchema,M as McpUiToolCancelledNotificationSchema,r as McpUiThemeSchema,F as McpUiSupportedContentBlockModalitiesSchema,H as McpUiSizeChangedNotificationSchema,CQ as McpUiSandboxResourceReadyNotificationSchema,w as McpUiSandboxProxyReadyNotificationSchema,S as McpUiResourceTeardownResultSchema,C as McpUiResourceTeardownRequestSchema,z as McpUiResourcePermissionsSchema,TQ as McpUiResourceMetaSchema,O as McpUiResourceCspSchema,q as McpUiRequestTeardownNotificationSchema,g as McpUiRequestDisplayModeResultSchema,I as McpUiRequestDisplayModeRequestSchema,P as McpUiOpenLinkResultSchema,L as McpUiOpenLinkRequestSchema,U as McpUiMessageResultSchema,k as McpUiMessageRequestSchema,y as McpUiInitializedNotificationSchema,h as McpUiInitializeResultSchema,u as McpUiInitializeRequestSchema,s as McpUiHostStylesSchema,o as McpUiHostCssSchema,x as McpUiHostContextSchema,b as McpUiHostContextChangedNotificationSchema,t as McpUiHostCapabilitiesSchema,A as McpUiDownloadFileResultSchema,f as McpUiDownloadFileRequestSchema,B as McpUiDisplayModeSchema,a as McpUiAppCapabilitiesSchema,DQ as MESSAGE_METHOD,j as LATEST_PROTOCOL_VERSION,IQ as INITIALIZE_METHOD,VQ as INITIALIZED_METHOD,EQ as HOST_CONTEXT_CHANGED_METHOD,KQ as DOWNLOAD_FILE_METHOD,DX as AppBridge};\n"],"x_google_ignoreList":[0],"mappings":";;;;EAAS,MAAI,OAAA,YAAe,MAAA,YAAY,OAAO,QAAM,MAAI,IAAI,MAAM,GAAE,EAAC,MAAK,GAAE,OAAK,OAAA,YAAe,MAAA,YAAY,EAAA,CAAG,GAAE,CAAC,IAAE,EAAA,CAAG,SAAS,GAAE;CAAC,IAAG,OAAA,YAAe,KAAI,OAAA,UAAe,MAAM,MAAK,SAAS;CAAE,MAAM,MAAM,0BAAuB,IAAE,qBAAoB;AAAC,CAAC;AAA0rB,IAAM,IAAN,cAAgBA,SAAE;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,E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AK,gBAAc,OAAM,GAAE,MAAI;KAAC,OAAO,KAAK,QAAQ,QAAQ;MAAC,QAAO;MAAe,QAAO;KAAC,GAAEC,yBAAG,EAAC,QAAO,EAAE,OAAM,CAAC;IAAC,GAAE,EAAE,QAAQ,aAAY,KAAK,QAAQ,uBAAuBC,sCAAI,MAAI,KAAK,sBAAsB,EAAE,MAAM,CAAC;GAAA;EAAE;EAAC,OAAO,MAAM,QAAQ,CAAC;CAAC;AAAC;AAAC,SAAS,GAAG,GAAE,GAAE;CAAC,OAAO,KAAK,UAAU,CAAC,MAAI,KAAK,UAAU,CAAC;AAAC"}
|
|
1
|
+
{"version":3,"file":"@modelcontextprotocol_ext-apps_app-bridge.js","names":["$Q","Q.union","Q.literal","Q.record","Q.string","Q.undefined","Q.object","Q.boolean","Q.array","Q.number","Q.unknown","Q.never","PQ","UQ","c","LQ","AQ","wQ","l","SQ","eQ","QX","iQ","nQ","rQ","sQ","YX","cQ","XQ","aQ","JX","oQ","tQ","ZX","$X","lQ","XX"],"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-bridge.js"],"sourcesContent":["var ZQ=((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{CallToolRequestSchema as iQ,CallToolResultSchema as XQ,CreateMessageRequestSchema as nQ,ListPromptsRequestSchema as cQ,ListPromptsResultSchema as lQ,ListResourcesRequestSchema as rQ,ListResourcesResultSchema as oQ,ListResourceTemplatesRequestSchema as sQ,ListResourceTemplatesResultSchema as tQ,ListToolsResultSchema as aQ,LoggingMessageNotificationSchema as eQ,PingRequestSchema as QX,PromptListChangedNotificationSchema as XX,ReadResourceRequestSchema as YX,ReadResourceResultSchema as ZX,ResourceListChangedNotificationSchema as $X,ToolListChangedNotificationSchema as JX}from\"@modelcontextprotocol/sdk/types.js\";import{Protocol as $Q}from\"@modelcontextprotocol/sdk/shared/protocol.js\";class _ extends $Q{_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 J=Y;super.setNotificationHandler(Z,(K)=>{let D=K.params;this.onEventDispatch(X,D),J.onHandler?.(D);for(let G of[...J.listeners])G(D)})}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)}}var j=\"2026-01-26\",JQ=\"ui/open-link\",KQ=\"ui/download-file\",DQ=\"ui/message\",GQ=\"ui/notifications/sandbox-proxy-ready\",NQ=\"ui/notifications/sandbox-resource-ready\",WQ=\"ui/notifications/size-changed\",jQ=\"ui/notifications/tool-input\",V=\"ui/notifications/tool-input-partial\",BQ=\"ui/notifications/tool-result\",_Q=\"ui/notifications/tool-cancelled\",EQ=\"ui/notifications/host-context-changed\",OQ=\"ui/notifications/request-teardown\",zQ=\"ui/resource-teardown\",IQ=\"ui/initialize\",VQ=\"ui/notifications/initialized\",FQ=\"ui/request-display-mode\";import{z as Q}from\"zod/v4\";import{ContentBlockSchema as c,CallToolResultSchema as LQ,EmbeddedResourceSchema as PQ,ImplementationSchema as l,RequestIdSchema as AQ,ResourceLinkSchema as UQ,ToolSchema as wQ}from\"@modelcontextprotocol/sdk/types.js\";var r=Q.union([Q.literal(\"light\"),Q.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),B=Q.union([Q.literal(\"inline\"),Q.literal(\"fullscreen\"),Q.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),HQ=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.\"),RQ=Q.record(HQ.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.`),L=Q.object({method:Q.literal(\"ui/open-link\"),params:Q.object({url:Q.string().describe(\"URL to open in the host's browser\")})}),P=Q.object({isError:Q.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),A=Q.object({isError:Q.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),U=Q.object({isError:Q.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),w=Q.object({method:Q.literal(\"ui/notifications/sandbox-proxy-ready\"),params:Q.object({})}),O=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'`)\")}),z=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.\")}),H=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.\")})}),R=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.\")})}),T=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).\")})}),M=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\").')})}),o=Q.object({fonts:Q.string().optional()}),s=Q.object({variables:RQ.optional().describe(\"CSS variables for theming the app.\"),css:o.optional().describe(\"CSS blocks that apps can inject.\")}),C=Q.object({method:Q.literal(\"ui/resource-teardown\"),params:Q.object({})}),S=Q.record(Q.string(),Q.unknown()),F=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.\")}),q=Q.object({method:Q.literal(\"ui/notifications/request-teardown\"),params:Q.object({}).optional()}),t=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:z.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:O.optional().describe(\"CSP domains approved by the host.\")}).optional().describe(\"Sandbox configuration applied by the host.\"),updateModelContext:F.optional().describe(\"Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.\"),message:F.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.\")}),a=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(B).optional().describe(\"Display modes the app supports.\")}),y=Q.object({method:Q.literal(\"ui/notifications/initialized\"),params:Q.object({}).optional()}),TQ=Q.object({csp:O.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:z.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`)}),I=Q.object({method:Q.literal(\"ui/request-display-mode\"),params:Q.object({mode:B.describe(\"The display mode being requested.\")})}),g=Q.object({mode:B.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),e=Q.union([Q.literal(\"model\"),Q.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),MQ=Q.object({resourceUri:Q.string().optional(),visibility:Q.array(e).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()}),OX=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.')}),f=Q.object({method:Q.literal(\"ui/download-file\"),params:Q.object({contents:Q.array(Q.union([PQ,UQ])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),k=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(c).describe(\"Message content blocks (text, image, etc.).\")})}),CQ=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:O.optional().describe(\"CSP configuration from resource metadata.\"),permissions:z.optional().describe(\"Sandbox permissions from resource metadata.\")})}),v=Q.object({method:Q.literal(\"ui/notifications/tool-result\"),params:LQ.describe(\"Standard MCP tool execution result.\")}),x=Q.object({toolInfo:Q.object({id:AQ.optional().describe(\"JSON-RPC id of the tools/call request.\"),tool:wQ.describe(\"Tool definition including name, inputSchema, etc.\")}).optional().describe(\"Metadata of the tool call that instantiated this App.\"),theme:r.optional().describe(\"Current color theme preference.\"),styles:s.optional().describe(\"Style configuration for theming the app.\"),displayMode:B.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:Q.array(B).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(),b=Q.object({method:Q.literal(\"ui/notifications/host-context-changed\"),params:x.describe(\"Partial context update containing only changed fields.\")}),d=Q.object({method:Q.literal(\"ui/update-model-context\"),params:Q.object({content:Q.array(c).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.\")})}),u=Q.object({method:Q.literal(\"ui/initialize\"),params:Q.object({appInfo:l.describe(\"App identification (name and version).\"),appCapabilities:a.describe(\"Features and capabilities this app provides.\"),protocolVersion:Q.string().describe(\"Protocol version this app supports.\")})}),h=Q.object({protocolVersion:Q.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:l.describe(\"Host application identification and version.\"),hostCapabilities:t.describe(\"Features and capabilities provided by the host.\"),hostContext:x.describe(\"Rich context about the host environment.\")}).passthrough();import{mergeCapabilities as yQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";import{CallToolRequestSchema as gQ,CallToolResultSchema as fQ,CreateMessageResultSchema as kQ,CreateMessageResultWithToolsSchema as vQ,EmptyResultSchema as xQ,ListResourcesResultSchema as bQ,ListToolsRequestSchema as dQ,PingRequestSchema as uQ,ReadResourceResultSchema as hQ}from\"@modelcontextprotocol/sdk/types.js\";import{JSONRPCMessageSchema as SQ}from\"@modelcontextprotocol/sdk/types.js\";class E{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 $=SQ.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!==V)console.debug(\"Sending message\",X);this.eventTarget.postMessage(X,\"*\")}async close(){window.removeEventListener(\"message\",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var qQ={target:\"draft-2020-12\"};async function m(X,Y){let Z=X[\"~standard\"];if(Z.jsonSchema)return Z.jsonSchema[Y](qQ);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 p(X,Y,Z=\"\"){let $=await X[\"~standard\"].validate(Y);if($.issues){let J=$.issues.map((K)=>{let D=K.path?.map((G)=>typeof G===\"object\"?G.key:G).join(\".\");return D?`${D}: ${K.message}`:K.message}).join(\"; \");throw Error(Z+J)}return $.value}import{z as mQ}from\"zod/v4\";var i=\"ui/resourceUri\",pQ=\"text/html;profile=mcp-app\";class QQ 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:R,toolinputpartial:T,toolresult:v,toolcancelled:M,hostcontextchanged:b};static ONE_SHOT_EVENTS=new Set([\"toolinput\",\"toolinputpartial\",\"toolresult\",\"toolcancelled\"]);_everHadListener=new Set;_assertHandlerTiming(X){if(!QQ.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)mQ.config({jitless:!0});this.setRequestHandler(uQ,($)=>{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=yQ(this._capabilities,X)}registerTool(X,Y,Z){if(this._registeredTools[X])throw Error(`Tool ${X} is already registered`);let $=this,J=()=>{if($._initializedSent&&$._capabilities.tools?.listChanged)$.sendToolListChanged()},K=Y.inputSchema!==void 0,D={title:Y.title,description:Y.description,inputSchema:Y.inputSchema,outputSchema:Y.outputSchema,annotations:Y.annotations,_meta:Y._meta,enabled:!0,enable(){this.enabled=!0,J()},disable(){this.enabled=!1,J()},update(G){Object.assign(this,G),J()},remove(){if($._registeredTools[X]!==D)return;delete $._registeredTools[X],J()},handler:async(G,N)=>{if(!D.enabled)throw Error(`Tool ${X} is disabled`);let W;if(K){let n=D.inputSchema,YQ=n?await p(n,G??{},`Invalid input for tool ${X}: `):G??{};W=await Z(YQ,N)}else W=await Z(N);if(D.outputSchema&&!W.isError)W.structuredContent=await p(D.outputSchema,W.structuredContent,`Invalid output for tool ${X}: `);return W}};if(this._registeredTools[X]=D,!this._capabilities.tools&&!this.transport)this.registerCapabilities({tools:{listChanged:!0}});return this.ensureToolHandlersInitialized(),J(),D}_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(([$,J])=>J.enabled).map(async([$,J])=>{let K={name:$,title:J.title,description:J.description,inputSchema:J.inputSchema?await m(J.inputSchema,\"input\"):{type:\"object\",properties:{}}};if(J.outputSchema)K.outputSchema=await m(J.outputSchema,\"output\");if(J.annotations)K.annotations=J.annotations;if(J._meta)K._meta=J._meta;return K}))}}}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(C,(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(gQ,(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(dQ,(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},fQ,{onprogress:()=>{},resetTimeoutOnProgress:!0,...Y})}async readServerResource(X,Y){return this._assertInitialized(\"readServerResource\"),await this.request({method:\"resources/read\",params:X},hQ,Y)}async listServerResources(X,Y){return this._assertInitialized(\"listServerResources\"),await this.request({method:\"resources/list\",params:X},bQ,Y)}async createSamplingMessage(X,Y){this._assertInitialized(\"createSamplingMessage\");let Z=X.tools?vQ:kQ;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},U,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},xQ,Y)}openLink(X,Y){return this._assertInitialized(\"openLink\"),this.request({method:\"ui/open-link\",params:X},P,Y)}sendOpenLink=this.openLink;downloadFile(X,Y){return this._assertInitialized(\"downloadFile\"),this.request({method:\"ui/download-file\",params:X},A,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},g,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 K=document.documentElement,D=K.style.height;K.style.height=\"max-content\";let G=Math.ceil(K.getBoundingClientRect().height);K.style.height=D;let N=Math.ceil(window.innerWidth);if(N!==Y||G!==Z)Y=N,Z=G,this.sendSizeChanged({width:N,height:G})})};$();let J=new ResizeObserver($);return J.observe(document.documentElement),J.observe(document.body),()=>J.disconnect()}async connect(X=new E(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:j}},h,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}}}function FZ(X){let Z=X._meta?.ui?.resourceUri;if(Z===void 0)Z=X._meta?.[i];if(typeof Z===\"string\"&&Z.startsWith(\"ui://\"))return Z;else if(Z!==void 0)throw Error(`Invalid UI resource URI: ${JSON.stringify(Z)}`);return}function LZ(X){let Z=X._meta?.ui?.visibility;if(!Z)return!1;if(Z.length===1&&Z[0]===\"model\")return!0;return!1}function PZ(X){let Z=X._meta?.ui?.visibility;if(!Z)return!1;if(Z.length===1&&Z[0]===\"app\")return!0;return!1}function AZ(X){if(!X)return\"\";let Y=[];if(X.camera)Y.push(\"camera\");if(X.microphone)Y.push(\"microphone\");if(X.geolocation)Y.push(\"geolocation\");if(X.clipboardWrite)Y.push(\"clipboard-write\");return Y.join(\"; \")}var KX=[j];class DX extends _{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;_initializedReceived=!1;_baseReplaceRequestHandler=this.replaceRequestHandler;replaceRequestHandler=(X,Y)=>{this._baseReplaceRequestHandler(X,(Z,$)=>{if(!this._initializedReceived)console.warn(`[ext-apps] AppBridge received '${Z.method}' before ui/notifications/initialized. The View is calling host methods before completing the handshake; it should await app.connect() first.`);return Y(Z,$)})};eventSchemas={sizechange:H,sandboxready:w,initialized:y,requestteardown:q,loggingmessage:eQ};constructor(X,Y,Z,$){super($);this._client=X;this._hostInfo=Y;this._capabilities=Z;this.addEventListener(\"initialized\",()=>{this._initializedReceived=!0}),this._hostContext=$?.hostContext||{},this.setRequestHandler(u,(J)=>this._oninitialize(J)),this.setRequestHandler(QX,(J,K)=>{return this.onping?.(J.params,K),{}}),this.replaceRequestHandler(I,(J)=>{return{mode:this._hostContext.displayMode??\"inline\"}})}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;get onsizechange(){return this.getEventHandler(\"sizechange\")}set onsizechange(X){this.setEventHandler(\"sizechange\",X)}get onsandboxready(){return this.getEventHandler(\"sandboxready\")}set onsandboxready(X){this.setEventHandler(\"sandboxready\",X)}get oninitialized(){return this.getEventHandler(\"initialized\")}set oninitialized(X){this.setEventHandler(\"initialized\",X)}_onmessage;get onmessage(){return this._onmessage}set onmessage(X){this.warnIfRequestHandlerReplaced(\"onmessage\",this._onmessage,X),this._onmessage=X,this.replaceRequestHandler(k,async(Y,Z)=>{if(!this._onmessage)throw Error(\"No onmessage handler set\");return this._onmessage(Y.params,Z)})}_onopenlink;get onopenlink(){return this._onopenlink}set onopenlink(X){this.warnIfRequestHandlerReplaced(\"onopenlink\",this._onopenlink,X),this._onopenlink=X,this.replaceRequestHandler(L,async(Y,Z)=>{if(!this._onopenlink)throw Error(\"No onopenlink handler set\");return this._onopenlink(Y.params,Z)})}_ondownloadfile;get ondownloadfile(){return this._ondownloadfile}set ondownloadfile(X){this.warnIfRequestHandlerReplaced(\"ondownloadfile\",this._ondownloadfile,X),this._ondownloadfile=X,this.replaceRequestHandler(f,async(Y,Z)=>{if(!this._ondownloadfile)throw Error(\"No ondownloadfile handler set\");return this._ondownloadfile(Y.params,Z)})}get onrequestteardown(){return this.getEventHandler(\"requestteardown\")}set onrequestteardown(X){this.setEventHandler(\"requestteardown\",X)}_onrequestdisplaymode;get onrequestdisplaymode(){return this._onrequestdisplaymode}set onrequestdisplaymode(X){this.warnIfRequestHandlerReplaced(\"onrequestdisplaymode\",this._onrequestdisplaymode,X),this._onrequestdisplaymode=X,this.replaceRequestHandler(I,async(Y,Z)=>{if(!this._onrequestdisplaymode)throw Error(\"No onrequestdisplaymode handler set\");return this._onrequestdisplaymode(Y.params,Z)})}get onloggingmessage(){return this.getEventHandler(\"loggingmessage\")}set onloggingmessage(X){this.setEventHandler(\"loggingmessage\",X)}_onupdatemodelcontext;get onupdatemodelcontext(){return this._onupdatemodelcontext}set onupdatemodelcontext(X){this.warnIfRequestHandlerReplaced(\"onupdatemodelcontext\",this._onupdatemodelcontext,X),this._onupdatemodelcontext=X,this.replaceRequestHandler(d,async(Y,Z)=>{if(!this._onupdatemodelcontext)throw Error(\"No onupdatemodelcontext handler set\");return this._onupdatemodelcontext(Y.params,Z)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(X){this.warnIfRequestHandlerReplaced(\"oncalltool\",this._oncalltool,X),this._oncalltool=X,this.replaceRequestHandler(iQ,async(Y,Z)=>{if(!this._oncalltool)throw Error(\"No oncalltool handler set\");return this._oncalltool(Y.params,Z)})}set oncreatesamplingmessage(X){this.setRequestHandler(nQ,async(Y,Z)=>{return X(Y.params,Z)})}sendToolListChanged(X={}){return this.notification({method:\"notifications/tools/list_changed\",params:X})}_onlistresources;get onlistresources(){return this._onlistresources}set onlistresources(X){this.warnIfRequestHandlerReplaced(\"onlistresources\",this._onlistresources,X),this._onlistresources=X,this.replaceRequestHandler(rQ,async(Y,Z)=>{if(!this._onlistresources)throw Error(\"No onlistresources handler set\");return this._onlistresources(Y.params,Z)})}_onlistresourcetemplates;get onlistresourcetemplates(){return this._onlistresourcetemplates}set onlistresourcetemplates(X){this.warnIfRequestHandlerReplaced(\"onlistresourcetemplates\",this._onlistresourcetemplates,X),this._onlistresourcetemplates=X,this.replaceRequestHandler(sQ,async(Y,Z)=>{if(!this._onlistresourcetemplates)throw Error(\"No onlistresourcetemplates handler set\");return this._onlistresourcetemplates(Y.params,Z)})}_onreadresource;get onreadresource(){return this._onreadresource}set onreadresource(X){this.warnIfRequestHandlerReplaced(\"onreadresource\",this._onreadresource,X),this._onreadresource=X,this.replaceRequestHandler(YX,async(Y,Z)=>{if(!this._onreadresource)throw Error(\"No onreadresource handler set\");return this._onreadresource(Y.params,Z)})}sendResourceListChanged(X={}){return this.notification({method:\"notifications/resources/list_changed\",params:X})}_onlistprompts;get onlistprompts(){return this._onlistprompts}set onlistprompts(X){this.warnIfRequestHandlerReplaced(\"onlistprompts\",this._onlistprompts,X),this._onlistprompts=X,this.replaceRequestHandler(cQ,async(Y,Z)=>{if(!this._onlistprompts)throw Error(\"No onlistprompts handler set\");return this._onlistprompts(Y.params,Z)})}sendPromptListChanged(X={}){return this.notification({method:\"notifications/prompts/list_changed\",params:X})}assertCapabilityForMethod(X){}assertRequestHandlerCapability(X){}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\")}getCapabilities(){return this._capabilities}async _oninitialize(X){let Y=X.params.protocolVersion;if(this._appInfo!==void 0)console.warn(\"[ext-apps] AppBridge received a second ui/initialize. The View may be double-mounting (e.g. React StrictMode in dev) without closing the previous App instance. Responding normally; the latest appInfo/appCapabilities replace the previous values.\");return this._appCapabilities=X.params.appCapabilities,this._appInfo=X.params.appInfo,{protocolVersion:KX.includes(Y)?Y:j,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(X){let Y={},Z=!1;for(let $ of Object.keys(X)){let J=this._hostContext[$],K=X[$];if(GX(J,K))continue;Y[$]=K,Z=!0}if(Z)this._hostContext=X,this.sendHostContextChange(Y)}sendHostContextChange(X){return this.notification({method:\"ui/notifications/host-context-changed\",params:X})}sendToolInput(X){return this.notification({method:\"ui/notifications/tool-input\",params:X})}sendToolInputPartial(X){return this.notification({method:\"ui/notifications/tool-input-partial\",params:X})}sendToolResult(X){return this.notification({method:\"ui/notifications/tool-result\",params:X})}sendToolCancelled(X){return this.notification({method:\"ui/notifications/tool-cancelled\",params:X})}sendSandboxResourceReady(X){return this.notification({method:\"ui/notifications/sandbox-resource-ready\",params:X})}teardownResource(X,Y){return this.request({method:\"ui/resource-teardown\",params:X},S,Y)}sendResourceTeardown=this.teardownResource;callTool(X,Y){return this.request({method:\"tools/call\",params:X},XQ,Y)}listTools(X,Y){return this.request({method:\"tools/list\",params:X},aQ,Y)}async connect(X){if(this.transport)throw Error(\"AppBridge is already connected. Call close() before connecting again.\");if(this._initializedReceived=!1,this._client){let Y=this._client.getServerCapabilities();if(!Y)throw Error(\"Client server capabilities not available\");if(Y.tools){if(this.oncalltool=async(Z,$)=>{return this._client.request({method:\"tools/call\",params:Z},XQ,{signal:$.signal})},Y.tools.listChanged)this._client.setNotificationHandler(JX,(Z)=>this.sendToolListChanged(Z.params))}if(Y.resources){if(this.onlistresources=async(Z,$)=>{return this._client.request({method:\"resources/list\",params:Z},oQ,{signal:$.signal})},this.onlistresourcetemplates=async(Z,$)=>{return this._client.request({method:\"resources/templates/list\",params:Z},tQ,{signal:$.signal})},this.onreadresource=async(Z,$)=>{return this._client.request({method:\"resources/read\",params:Z},ZX,{signal:$.signal})},Y.resources.listChanged)this._client.setNotificationHandler($X,(Z)=>this.sendResourceListChanged(Z.params))}if(Y.prompts){if(this.onlistprompts=async(Z,$)=>{return this._client.request({method:\"prompts/list\",params:Z},lQ,{signal:$.signal})},Y.prompts.listChanged)this._client.setNotificationHandler(XX,(Z)=>this.sendPromptListChanged(Z.params))}}return super.connect(X)}}function GX(X,Y){return JSON.stringify(X)===JSON.stringify(Y)}export{LZ as isToolVisibilityModelOnly,PZ as isToolVisibilityAppOnly,FZ as getToolUiResourceUri,AZ as buildAllowAttribute,BQ as TOOL_RESULT_METHOD,V as TOOL_INPUT_PARTIAL_METHOD,jQ as TOOL_INPUT_METHOD,_Q as TOOL_CANCELLED_METHOD,KX as SUPPORTED_PROTOCOL_VERSIONS,WQ as SIZE_CHANGED_METHOD,NQ as SANDBOX_RESOURCE_READY_METHOD,GQ as SANDBOX_PROXY_READY_METHOD,i as RESOURCE_URI_META_KEY,zQ as RESOURCE_TEARDOWN_METHOD,pQ as RESOURCE_MIME_TYPE,OQ as REQUEST_TEARDOWN_METHOD,FQ as REQUEST_DISPLAY_MODE_METHOD,E as PostMessageTransport,JQ as OPEN_LINK_METHOD,d as McpUiUpdateModelContextRequestSchema,e as McpUiToolVisibilitySchema,v as McpUiToolResultNotificationSchema,MQ as McpUiToolMetaSchema,T as McpUiToolInputPartialNotificationSchema,R as McpUiToolInputNotificationSchema,M as McpUiToolCancelledNotificationSchema,r as McpUiThemeSchema,F as McpUiSupportedContentBlockModalitiesSchema,H as McpUiSizeChangedNotificationSchema,CQ as McpUiSandboxResourceReadyNotificationSchema,w as McpUiSandboxProxyReadyNotificationSchema,S as McpUiResourceTeardownResultSchema,C as McpUiResourceTeardownRequestSchema,z as McpUiResourcePermissionsSchema,TQ as McpUiResourceMetaSchema,O as McpUiResourceCspSchema,q as McpUiRequestTeardownNotificationSchema,g as McpUiRequestDisplayModeResultSchema,I as McpUiRequestDisplayModeRequestSchema,P as McpUiOpenLinkResultSchema,L as McpUiOpenLinkRequestSchema,U as McpUiMessageResultSchema,k as McpUiMessageRequestSchema,y as McpUiInitializedNotificationSchema,h as McpUiInitializeResultSchema,u as McpUiInitializeRequestSchema,s as McpUiHostStylesSchema,o as McpUiHostCssSchema,x as McpUiHostContextSchema,b as McpUiHostContextChangedNotificationSchema,t as McpUiHostCapabilitiesSchema,A as McpUiDownloadFileResultSchema,f as McpUiDownloadFileRequestSchema,B as McpUiDisplayModeSchema,a as McpUiAppCapabilitiesSchema,DQ as MESSAGE_METHOD,j as LATEST_PROTOCOL_VERSION,IQ as INITIALIZE_METHOD,VQ as INITIALIZED_METHOD,EQ as HOST_CONTEXT_CHANGED_METHOD,KQ as DOWNLOAD_FILE_METHOD,DX as AppBridge};\n"],"x_google_ignoreList":[0],"mappings":";;;;EAAS,MAAI,OAAA,YAAe,MAAA,YAAY,OAAO,QAAM,MAAI,IAAI,MAAM,GAAE,EAAC,MAAK,GAAE,OAAK,OAAA,YAAe,MAAA,YAAY,EAAA,CAAG,GAAE,CAAC,IAAE,EAAA,CAAG,SAAS,GAAE;CAAC,IAAG,OAAA,YAAe,KAAI,OAAA,UAAe,MAAM,MAAK,SAAS;CAAE,MAAM,MAAM,0BAAuB,IAAE,qBAAoB;AAAC,CAAC;AAA0rB,IAAM,IAAN,cAAgBA,SAAE;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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