sunpeak 0.18.7 → 0.18.12
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/README.md +12 -0
- package/bin/commands/dev.mjs +3 -3
- package/bin/commands/inspect.mjs +4 -1
- package/bin/lib/sandbox-server.mjs +31 -1
- package/dist/chatgpt/index.cjs +1 -2
- package/dist/chatgpt/index.js +1 -2
- package/dist/claude/index.cjs +1 -2
- package/dist/claude/index.js +1 -2
- package/dist/host/chatgpt/index.cjs +1 -2
- package/dist/host/chatgpt/index.cjs.map +1 -1
- package/dist/host/chatgpt/index.js +1 -2
- package/dist/host/chatgpt/index.js.map +1 -1
- package/dist/index.cjs +93 -93
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +54 -54
- package/dist/index.js.map +1 -1
- package/dist/inspector/hosts.d.ts +12 -0
- package/dist/inspector/index.cjs +1 -2
- package/dist/inspector/index.js +1 -2
- package/dist/{inspector-CKc58UuI.cjs → inspector-8nPV2A-z.cjs} +104 -54
- package/dist/inspector-8nPV2A-z.cjs.map +1 -0
- package/dist/{inspector-DZrN0kej.js → inspector-Cdo5BK2D.js} +103 -53
- package/dist/inspector-Cdo5BK2D.js.map +1 -0
- package/dist/mcp/index.cjs +85 -71
- package/dist/mcp/index.cjs.map +1 -1
- package/dist/mcp/index.js +79 -65
- package/dist/mcp/index.js.map +1 -1
- package/dist/{protocol-DJmRaBzO.js → protocol-BfAACnv0.js} +14 -9
- package/dist/{protocol-DJmRaBzO.js.map → protocol-BfAACnv0.js.map} +1 -1
- package/dist/{protocol-jbxhzcnS.cjs → protocol-C7kTcBr_.cjs} +14 -9
- package/dist/{protocol-jbxhzcnS.cjs.map → protocol-C7kTcBr_.cjs.map} +1 -1
- package/dist/style.css +36 -1
- package/dist/{use-app-BNbz1uzj.js → use-app-CfP9VypY.js} +107 -56
- package/dist/use-app-CfP9VypY.js.map +1 -0
- package/dist/{use-app-Dqh20JPP.cjs → use-app-CzcYw1Kz.cjs} +165 -114
- package/dist/use-app-CzcYw1Kz.cjs.map +1 -0
- package/package.json +7 -7
- package/template/README.md +12 -0
- package/template/dist/albums/albums.html +16 -15
- package/template/dist/albums/albums.json +1 -1
- package/template/dist/carousel/carousel.html +20 -19
- package/template/dist/carousel/carousel.json +1 -1
- package/template/dist/map/map.html +7 -6
- package/template/dist/map/map.json +1 -1
- package/template/dist/review/review.html +6 -5
- 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 +49 -49
- 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 +49 -49
- 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 +89 -89
- 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 +9 -6
- package/template/node_modules/.vite-mcp/deps/@testing-library_react.js.map +1 -1
- package/template/node_modules/.vite-mcp/deps/_metadata.json +26 -26
- package/template/node_modules/.vite-mcp/deps/{protocol-CTflwIfG.js → protocol-B_qKkui_.js} +14 -9
- package/template/node_modules/.vite-mcp/deps/protocol-B_qKkui_.js.map +1 -0
- package/template/node_modules/.vite-mcp/deps/vitest.js +366 -128
- package/template/node_modules/.vite-mcp/deps/vitest.js.map +1 -1
- package/template/package.json +2 -2
- package/template/src/resources/carousel/carousel.test.tsx +16 -2
- package/template/src/resources/carousel/carousel.tsx +42 -14
- package/template/src/resources/carousel/components/carousel.tsx +20 -0
- package/template/src/resources/carousel/components/index.ts +1 -0
- package/template/src/resources/carousel/components/place-detail.tsx +153 -0
- package/template/tests/e2e/carousel.spec.ts +125 -0
- package/template/tests/live/carousel.spec.ts +2 -2
- package/template/tests/simulations/show-carousel.json +54 -5
- package/dist/inspector-CKc58UuI.cjs.map +0 -1
- package/dist/inspector-DZrN0kej.js.map +0 -1
- package/dist/use-app-BNbz1uzj.js.map +0 -1
- package/dist/use-app-Dqh20JPP.cjs.map +0 -1
- package/template/node_modules/.vite-mcp/deps/protocol-CTflwIfG.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Cn as object, In as string, Jn as union, Sn as number, St as _undefined, Tt as array, Yn as unknown, jn as record, kt as boolean, ln as literal } from "./schemas-NsgmY9QV.js";
|
|
2
|
-
import { C as ResourceListChangedNotificationSchema, S as ResourceLinkSchema, T as ToolSchema, _ as PingRequestSchema, a as EmbeddedResourceSchema, b as ReadResourceResultSchema, c as JSONRPCMessageSchema, d as ListResourceTemplatesRequestSchema, f as ListResourceTemplatesResultSchema, g as LoggingMessageNotificationSchema, i as ContentBlockSchema, l as ListPromptsRequestSchema, m as ListResourcesResultSchema, n as CallToolRequestSchema, p as ListResourcesRequestSchema, r as CallToolResultSchema, s as ImplementationSchema, t as Protocol, u as ListPromptsResultSchema, v as PromptListChangedNotificationSchema, w as ToolListChangedNotificationSchema, x as RequestIdSchema, y as ReadResourceRequestSchema } from "./protocol-
|
|
3
|
-
//#region ../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.
|
|
4
|
-
var G = "2026-01-26",
|
|
5
|
-
var
|
|
2
|
+
import { C as ResourceListChangedNotificationSchema, S as ResourceLinkSchema, T as ToolSchema, _ as PingRequestSchema, a as EmbeddedResourceSchema, b as ReadResourceResultSchema, c as JSONRPCMessageSchema, d as ListResourceTemplatesRequestSchema, f as ListResourceTemplatesResultSchema, g as LoggingMessageNotificationSchema, i as ContentBlockSchema, l as ListPromptsRequestSchema, m as ListResourcesResultSchema, n as CallToolRequestSchema, p as ListResourcesRequestSchema, r as CallToolResultSchema, s as ImplementationSchema, t as Protocol, u as ListPromptsResultSchema, v as PromptListChangedNotificationSchema, w as ToolListChangedNotificationSchema, x as RequestIdSchema, y as ReadResourceRequestSchema } from "./protocol-B_qKkui_.js";
|
|
3
|
+
//#region ../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.2_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__react-_38e5f6c50a4ca9cf3f1dffc73a60c951/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js
|
|
4
|
+
var G = "2026-01-26", o = "ui/open-link", a = "ui/download-file", t = "ui/message", s = "ui/notifications/sandbox-proxy-ready", e = "ui/notifications/sandbox-resource-ready", QQ = "ui/notifications/size-changed", XQ = "ui/notifications/tool-input", _ = "ui/notifications/tool-input-partial", YQ = "ui/notifications/tool-result", ZQ = "ui/notifications/tool-cancelled", $Q = "ui/notifications/host-context-changed", JQ = "ui/notifications/request-teardown", KQ = "ui/resource-teardown", GQ = "ui/initialize", WQ = "ui/notifications/initialized", DQ = "ui/request-display-mode";
|
|
5
|
+
var m = union([literal("light"), literal("dark")]).describe("Color theme preference for the host environment."), W = union([
|
|
6
6
|
literal("inline"),
|
|
7
7
|
literal("fullscreen"),
|
|
8
8
|
literal("pip")
|
|
9
|
-
]).describe("Display mode for UI presentation."),
|
|
9
|
+
]).describe("Display mode for UI presentation."), OQ = record(union([
|
|
10
10
|
literal("--color-background-primary"),
|
|
11
11
|
literal("--color-background-secondary"),
|
|
12
12
|
literal("--color-background-tertiary"),
|
|
@@ -107,7 +107,7 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
|
|
|
107
107
|
}), I = object({ isError: boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).") }).passthrough(), A = object({ isError: boolean().optional().describe("True if the download failed (e.g., user cancelled or host denied).") }).passthrough(), F = object({ isError: boolean().optional().describe("True if the host rejected or failed to deliver the message.") }).passthrough(), L = object({
|
|
108
108
|
method: literal("ui/notifications/sandbox-proxy-ready"),
|
|
109
109
|
params: object({})
|
|
110
|
-
}),
|
|
110
|
+
}), N = object({
|
|
111
111
|
connectDomains: array(string()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).
|
|
112
112
|
|
|
113
113
|
- Maps to CSP \`connect-src\` directive
|
|
@@ -115,7 +115,7 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
|
|
|
115
115
|
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)"),
|
|
116
116
|
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'`)"),
|
|
117
117
|
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'`)")
|
|
118
|
-
}),
|
|
118
|
+
}), j = object({
|
|
119
119
|
camera: object({}).optional().describe("Request camera access.\n\nMaps to Permission Policy `camera` feature."),
|
|
120
120
|
microphone: object({}).optional().describe("Request microphone access.\n\nMaps to Permission Policy `microphone` feature."),
|
|
121
121
|
geolocation: object({}).optional().describe("Request geolocation access.\n\nMaps to Permission Policy `geolocation` feature."),
|
|
@@ -135,9 +135,9 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
|
|
|
135
135
|
}), R = object({
|
|
136
136
|
method: literal("ui/notifications/tool-cancelled"),
|
|
137
137
|
params: object({ reason: string().optional().describe("Optional reason for the cancellation (e.g., \"user action\", \"timeout\").") })
|
|
138
|
-
}),
|
|
139
|
-
variables:
|
|
140
|
-
css:
|
|
138
|
+
}), p = object({ fonts: string().optional() }), c = object({
|
|
139
|
+
variables: OQ.optional().describe("CSS variables for theming the app."),
|
|
140
|
+
css: p.optional().describe("CSS blocks that apps can inject.")
|
|
141
141
|
}), U = object({
|
|
142
142
|
method: literal("ui/resource-teardown"),
|
|
143
143
|
params: object({})
|
|
@@ -151,7 +151,7 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
|
|
|
151
151
|
}), M = object({
|
|
152
152
|
method: literal("ui/notifications/request-teardown"),
|
|
153
153
|
params: object({}).optional()
|
|
154
|
-
}),
|
|
154
|
+
}), n = object({
|
|
155
155
|
experimental: object({}).optional().describe("Experimental features (structure TBD)."),
|
|
156
156
|
openLinks: object({}).optional().describe("Host supports opening external URLs."),
|
|
157
157
|
downloadFile: object({}).optional().describe("Host supports file downloads via ui/download-file."),
|
|
@@ -159,21 +159,21 @@ for compatibility with Zod schema generation. Both are functionally equivalent f
|
|
|
159
159
|
serverResources: object({ listChanged: boolean().optional().describe("Host supports resources/list_changed notifications.") }).optional().describe("Host can proxy resource reads to the MCP server."),
|
|
160
160
|
logging: object({}).optional().describe("Host accepts log messages."),
|
|
161
161
|
sandbox: object({
|
|
162
|
-
permissions:
|
|
163
|
-
csp:
|
|
162
|
+
permissions: j.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),
|
|
163
|
+
csp: N.optional().describe("CSP domains approved by the host.")
|
|
164
164
|
}).optional().describe("Sandbox configuration applied by the host."),
|
|
165
165
|
updateModelContext: O.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),
|
|
166
166
|
message: O.optional().describe("Host supports receiving content messages (ui/message) from the view.")
|
|
167
|
-
}),
|
|
167
|
+
}), i = object({
|
|
168
168
|
experimental: object({}).optional().describe("Experimental features (structure TBD)."),
|
|
169
169
|
tools: object({ listChanged: boolean().optional().describe("App supports tools/list_changed notifications.") }).optional().describe("App exposes MCP-style tools that the host can call."),
|
|
170
|
-
availableDisplayModes: array(
|
|
170
|
+
availableDisplayModes: array(W).optional().describe("Display modes the app supports.")
|
|
171
171
|
}), v = object({
|
|
172
172
|
method: literal("ui/notifications/initialized"),
|
|
173
173
|
params: object({}).optional()
|
|
174
|
-
}),
|
|
175
|
-
csp:
|
|
176
|
-
permissions:
|
|
174
|
+
}), VQ = object({
|
|
175
|
+
csp: N.optional().describe("Content Security Policy configuration for UI resources."),
|
|
176
|
+
permissions: j.optional().describe("Sandbox permissions requested by the UI resource."),
|
|
177
177
|
domain: string().optional().describe(`Dedicated origin for view sandbox.
|
|
178
178
|
|
|
179
179
|
Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.
|
|
@@ -190,12 +190,12 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
190
190
|
- \`true\`: request visible border + background
|
|
191
191
|
- \`false\`: request no visible border + background
|
|
192
192
|
- omitted: host decides border`)
|
|
193
|
-
}),
|
|
193
|
+
}), E = object({
|
|
194
194
|
method: literal("ui/request-display-mode"),
|
|
195
|
-
params: object({ mode:
|
|
196
|
-
}), g = object({ mode:
|
|
195
|
+
params: object({ mode: W.describe("The display mode being requested.") })
|
|
196
|
+
}), g = object({ mode: W.describe("The display mode that was actually set. May differ from requested if not supported.") }).passthrough(), l = union([literal("model"), literal("app")]).describe("Tool visibility scope - who can access the tool."), IQ = object({
|
|
197
197
|
resourceUri: string().optional(),
|
|
198
|
-
visibility: array(
|
|
198
|
+
visibility: array(l).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
199
199
|
- "model": Tool visible to and callable by the agent
|
|
200
200
|
- "app": Tool callable by the app from this server only`)
|
|
201
201
|
});
|
|
@@ -209,13 +209,13 @@ var C = object({
|
|
|
209
209
|
role: literal("user").describe("Message role, currently only \"user\" is supported."),
|
|
210
210
|
content: array(ContentBlockSchema).describe("Message content blocks (text, image, etc.).")
|
|
211
211
|
})
|
|
212
|
-
}),
|
|
212
|
+
}), AQ = object({
|
|
213
213
|
method: literal("ui/notifications/sandbox-resource-ready"),
|
|
214
214
|
params: object({
|
|
215
215
|
html: string().describe("HTML content to load into the inner iframe."),
|
|
216
216
|
sandbox: string().optional().describe("Optional override for the inner iframe's sandbox attribute."),
|
|
217
|
-
csp:
|
|
218
|
-
permissions:
|
|
217
|
+
csp: N.optional().describe("CSP configuration from resource metadata."),
|
|
218
|
+
permissions: j.optional().describe("Sandbox permissions from resource metadata.")
|
|
219
219
|
})
|
|
220
220
|
}), q = object({
|
|
221
221
|
method: literal("ui/notifications/tool-result"),
|
|
@@ -225,10 +225,10 @@ var C = object({
|
|
|
225
225
|
id: RequestIdSchema.optional().describe("JSON-RPC id of the tools/call request."),
|
|
226
226
|
tool: ToolSchema.describe("Tool definition including name, inputSchema, etc.")
|
|
227
227
|
}).optional().describe("Metadata of the tool call that instantiated this App."),
|
|
228
|
-
theme:
|
|
229
|
-
styles:
|
|
230
|
-
displayMode:
|
|
231
|
-
availableDisplayModes: array(
|
|
228
|
+
theme: m.optional().describe("Current color theme preference."),
|
|
229
|
+
styles: c.optional().describe("Style configuration for theming the app."),
|
|
230
|
+
displayMode: W.optional().describe("How the UI is currently displayed."),
|
|
231
|
+
availableDisplayModes: array(W).optional().describe("Display modes the host supports."),
|
|
232
232
|
containerDimensions: union([object({ height: number().describe("Fixed container height in pixels.") }), object({ maxHeight: union([number(), _undefined()]).optional().describe("Maximum container height in pixels.") })]).and(union([object({ width: number().describe("Fixed container width in pixels.") }), object({ maxWidth: union([number(), _undefined()]).optional().describe("Maximum container width in pixels.") })])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
233
233
|
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),
|
|
234
234
|
locale: string().optional().describe("User's language and region preference in BCP 47 format."),
|
|
@@ -262,16 +262,16 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
262
262
|
method: literal("ui/initialize"),
|
|
263
263
|
params: object({
|
|
264
264
|
appInfo: ImplementationSchema.describe("App identification (name and version)."),
|
|
265
|
-
appCapabilities:
|
|
265
|
+
appCapabilities: i.describe("Features and capabilities this app provides."),
|
|
266
266
|
protocolVersion: string().describe("Protocol version this app supports.")
|
|
267
267
|
})
|
|
268
268
|
}), b = object({
|
|
269
269
|
protocolVersion: string().describe("Negotiated protocol version string (e.g., \"2025-11-21\")."),
|
|
270
270
|
hostInfo: ImplementationSchema.describe("Host application identification and version."),
|
|
271
|
-
hostCapabilities:
|
|
271
|
+
hostCapabilities: n.describe("Features and capabilities provided by the host."),
|
|
272
272
|
hostContext: y.describe("Rich context about the host environment.")
|
|
273
273
|
}).passthrough();
|
|
274
|
-
var
|
|
274
|
+
var D = class {
|
|
275
275
|
eventTarget;
|
|
276
276
|
eventSource;
|
|
277
277
|
messageListener;
|
|
@@ -305,26 +305,26 @@ var N = class {
|
|
|
305
305
|
sessionId;
|
|
306
306
|
setProtocolVersion;
|
|
307
307
|
};
|
|
308
|
-
var x = "ui/resourceUri",
|
|
309
|
-
function
|
|
308
|
+
var x = "ui/resourceUri", vQ = "text/html;profile=mcp-app";
|
|
309
|
+
function mY(X) {
|
|
310
310
|
let Z = X._meta?.ui?.resourceUri;
|
|
311
311
|
if (Z === void 0) Z = X._meta?.[x];
|
|
312
312
|
if (typeof Z === "string" && Z.startsWith("ui://")) return Z;
|
|
313
313
|
else if (Z !== void 0) throw Error(`Invalid UI resource URI: ${JSON.stringify(Z)}`);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function pY(X) {
|
|
316
316
|
let Z = X._meta?.ui?.visibility;
|
|
317
317
|
if (!Z) return !1;
|
|
318
318
|
if (Z.length === 1 && Z[0] === "model") return !0;
|
|
319
319
|
return !1;
|
|
320
320
|
}
|
|
321
|
-
function
|
|
321
|
+
function cY(X) {
|
|
322
322
|
let Z = X._meta?.ui?.visibility;
|
|
323
323
|
if (!Z) return !1;
|
|
324
324
|
if (Z.length === 1 && Z[0] === "app") return !0;
|
|
325
325
|
return !1;
|
|
326
326
|
}
|
|
327
|
-
function
|
|
327
|
+
function nY(X) {
|
|
328
328
|
if (!X) return "";
|
|
329
329
|
let Y = [];
|
|
330
330
|
if (X.camera) Y.push("camera");
|
|
@@ -333,8 +333,8 @@ function rY(X) {
|
|
|
333
333
|
if (X.clipboardWrite) Y.push("clipboard-write");
|
|
334
334
|
return Y.join("; ");
|
|
335
335
|
}
|
|
336
|
-
var
|
|
337
|
-
var
|
|
336
|
+
var lQ = [G];
|
|
337
|
+
var rQ = class extends Protocol {
|
|
338
338
|
_client;
|
|
339
339
|
_hostInfo;
|
|
340
340
|
_capabilities;
|
|
@@ -346,9 +346,9 @@ var tQ = class extends Protocol {
|
|
|
346
346
|
this._client = X;
|
|
347
347
|
this._hostInfo = Y;
|
|
348
348
|
this._capabilities = Z;
|
|
349
|
-
this._hostContext = $?.hostContext || {}, this.setRequestHandler(d, (
|
|
350
|
-
return this.onping?.(
|
|
351
|
-
}), this.setRequestHandler(
|
|
349
|
+
this._hostContext = $?.hostContext || {}, this.setRequestHandler(d, (J) => this._oninitialize(J)), this.setRequestHandler(PingRequestSchema, (J, K) => {
|
|
350
|
+
return this.onping?.(J.params, K), {};
|
|
351
|
+
}), this.setRequestHandler(E, (J) => {
|
|
352
352
|
return { mode: this._hostContext.displayMode ?? "inline" };
|
|
353
353
|
});
|
|
354
354
|
}
|
|
@@ -387,7 +387,7 @@ var tQ = class extends Protocol {
|
|
|
387
387
|
this.setNotificationHandler(M, (Y) => X(Y.params));
|
|
388
388
|
}
|
|
389
389
|
set onrequestdisplaymode(X) {
|
|
390
|
-
this.setRequestHandler(
|
|
390
|
+
this.setRequestHandler(E, async (Y, Z) => {
|
|
391
391
|
return X(Y.params, Z);
|
|
392
392
|
});
|
|
393
393
|
}
|
|
@@ -459,7 +459,7 @@ var tQ = class extends Protocol {
|
|
|
459
459
|
async _oninitialize(X) {
|
|
460
460
|
let Y = X.params.protocolVersion;
|
|
461
461
|
return this._appCapabilities = X.params.appCapabilities, this._appInfo = X.params.appInfo, {
|
|
462
|
-
protocolVersion:
|
|
462
|
+
protocolVersion: lQ.includes(Y) ? Y : G,
|
|
463
463
|
hostCapabilities: this.getCapabilities(),
|
|
464
464
|
hostInfo: this._hostInfo,
|
|
465
465
|
hostContext: this._hostContext
|
|
@@ -468,9 +468,9 @@ var tQ = class extends Protocol {
|
|
|
468
468
|
setHostContext(X) {
|
|
469
469
|
let Y = {}, Z = !1;
|
|
470
470
|
for (let $ of Object.keys(X)) {
|
|
471
|
-
let
|
|
472
|
-
if (
|
|
473
|
-
Y[$] =
|
|
471
|
+
let J = this._hostContext[$], K = X[$];
|
|
472
|
+
if (oQ(J, K)) continue;
|
|
473
|
+
Y[$] = K, Z = !0;
|
|
474
474
|
}
|
|
475
475
|
if (Z) this._hostContext = X, this.sendHostContextChange(Y);
|
|
476
476
|
}
|
|
@@ -560,10 +560,10 @@ var tQ = class extends Protocol {
|
|
|
560
560
|
return super.connect(X);
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
|
-
function
|
|
563
|
+
function oQ(X, Y) {
|
|
564
564
|
return JSON.stringify(X) === JSON.stringify(Y);
|
|
565
565
|
}
|
|
566
566
|
//#endregion
|
|
567
|
-
export {
|
|
567
|
+
export { rQ as AppBridge, a as DOWNLOAD_FILE_METHOD, $Q as HOST_CONTEXT_CHANGED_METHOD, WQ as INITIALIZED_METHOD, GQ as INITIALIZE_METHOD, G as LATEST_PROTOCOL_VERSION, t as MESSAGE_METHOD, i as McpUiAppCapabilitiesSchema, W as McpUiDisplayModeSchema, C as McpUiDownloadFileRequestSchema, A as McpUiDownloadFileResultSchema, n as McpUiHostCapabilitiesSchema, k as McpUiHostContextChangedNotificationSchema, y as McpUiHostContextSchema, p as McpUiHostCssSchema, c as McpUiHostStylesSchema, d as McpUiInitializeRequestSchema, b as McpUiInitializeResultSchema, v as McpUiInitializedNotificationSchema, S as McpUiMessageRequestSchema, F as McpUiMessageResultSchema, V as McpUiOpenLinkRequestSchema, I as McpUiOpenLinkResultSchema, E as McpUiRequestDisplayModeRequestSchema, g as McpUiRequestDisplayModeResultSchema, M as McpUiRequestTeardownNotificationSchema, N as McpUiResourceCspSchema, VQ as McpUiResourceMetaSchema, j as McpUiResourcePermissionsSchema, U as McpUiResourceTeardownRequestSchema, H as McpUiResourceTeardownResultSchema, L as McpUiSandboxProxyReadyNotificationSchema, AQ as McpUiSandboxResourceReadyNotificationSchema, P as McpUiSizeChangedNotificationSchema, O as McpUiSupportedContentBlockModalitiesSchema, m as McpUiThemeSchema, R as McpUiToolCancelledNotificationSchema, T as McpUiToolInputNotificationSchema, w as McpUiToolInputPartialNotificationSchema, IQ as McpUiToolMetaSchema, q as McpUiToolResultNotificationSchema, l as McpUiToolVisibilitySchema, f as McpUiUpdateModelContextRequestSchema, o as OPEN_LINK_METHOD, D as PostMessageTransport, DQ as REQUEST_DISPLAY_MODE_METHOD, JQ as REQUEST_TEARDOWN_METHOD, vQ as RESOURCE_MIME_TYPE, KQ as RESOURCE_TEARDOWN_METHOD, x as RESOURCE_URI_META_KEY, s as SANDBOX_PROXY_READY_METHOD, e as SANDBOX_RESOURCE_READY_METHOD, QQ as SIZE_CHANGED_METHOD, lQ as SUPPORTED_PROTOCOL_VERSIONS, ZQ as TOOL_CANCELLED_METHOD, XQ as TOOL_INPUT_METHOD, _ as TOOL_INPUT_PARTIAL_METHOD, YQ as TOOL_RESULT_METHOD, nY as buildAllowAttribute, mY as getToolUiResourceUri, cY as isToolVisibilityAppOnly, pY as isToolVisibilityModelOnly };
|
|
568
568
|
|
|
569
569
|
//# sourceMappingURL=@modelcontextprotocol_ext-apps_app-bridge.js.map
|
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.union","Q.literal","Q.record","Q.string","Q.undefined","Q.object","Q.boolean","Q.array","Q.number","Q.unknown","BQ","OQ","h","zQ","_Q","VQ","m","TQ","oQ","pQ","mQ","yQ","bQ","uQ","nQ","fQ","kQ","rQ","xQ","hQ","iQ","lQ","dQ","cQ"],"sources":["../../../../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.1_@modelcontextprotocol+sdk@1.27.1_zod@4.3.6__react-_cd1fb28fd87e0bddd0a29eba0721855d/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js"],"sourcesContent":["import{CallToolRequestSchema as yQ,CallToolResultSchema as kQ,ListPromptsRequestSchema as fQ,ListPromptsResultSchema as dQ,ListResourcesRequestSchema as bQ,ListResourcesResultSchema as xQ,ListResourceTemplatesRequestSchema as uQ,ListResourceTemplatesResultSchema as hQ,LoggingMessageNotificationSchema as mQ,PingRequestSchema as pQ,PromptListChangedNotificationSchema as cQ,ReadResourceRequestSchema as nQ,ReadResourceResultSchema as iQ,ResourceListChangedNotificationSchema as lQ,ToolListChangedNotificationSchema as rQ}from\"@modelcontextprotocol/sdk/types.js\";import{Protocol as oQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";var G=\"2026-01-26\",s=\"ui/open-link\",e=\"ui/download-file\",QQ=\"ui/message\",XQ=\"ui/notifications/sandbox-proxy-ready\",YQ=\"ui/notifications/sandbox-resource-ready\",ZQ=\"ui/notifications/size-changed\",$Q=\"ui/notifications/tool-input\",_=\"ui/notifications/tool-input-partial\",JQ=\"ui/notifications/tool-result\",KQ=\"ui/notifications/tool-cancelled\",GQ=\"ui/notifications/host-context-changed\",DQ=\"ui/notifications/request-teardown\",NQ=\"ui/resource-teardown\",jQ=\"ui/initialize\",EQ=\"ui/notifications/initialized\",WQ=\"ui/request-display-mode\";import{z as Q}from\"zod/v4\";import{ContentBlockSchema as h,CallToolResultSchema as zQ,EmbeddedResourceSchema as BQ,ImplementationSchema as m,RequestIdSchema as _Q,ResourceLinkSchema as OQ,ToolSchema as VQ}from\"@modelcontextprotocol/sdk/types.js\";var p=Q.union([Q.literal(\"light\"),Q.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),D=Q.union([Q.literal(\"inline\"),Q.literal(\"fullscreen\"),Q.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),IQ=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.\"),AQ=Q.record(IQ.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.`),V=Q.object({method:Q.literal(\"ui/open-link\"),params:Q.object({url:Q.string().describe(\"URL to open in the host's browser\")})}),I=Q.object({isError:Q.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),A=Q.object({isError:Q.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),F=Q.object({isError:Q.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),L=Q.object({method:Q.literal(\"ui/notifications/sandbox-proxy-ready\"),params:Q.object({})}),j=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'`)\")}),E=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.\")}),P=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.\")})}),T=Q.object({method:Q.literal(\"ui/notifications/tool-input\"),params:Q.object({arguments:Q.record(Q.string(),Q.unknown().describe(\"Complete tool call arguments as key-value pairs.\")).optional().describe(\"Complete tool call arguments as key-value pairs.\")})}),w=Q.object({method:Q.literal(\"ui/notifications/tool-input-partial\"),params:Q.object({arguments:Q.record(Q.string(),Q.unknown().describe(\"Partial tool call arguments (incomplete, may change).\")).optional().describe(\"Partial tool call arguments (incomplete, may change).\")})}),R=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\").')})}),c=Q.object({fonts:Q.string().optional()}),n=Q.object({variables:AQ.optional().describe(\"CSS variables for theming the app.\"),css:c.optional().describe(\"CSS blocks that apps can inject.\")}),U=Q.object({method:Q.literal(\"ui/resource-teardown\"),params:Q.object({})}),H=Q.record(Q.string(),Q.unknown()),O=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.\")}),M=Q.object({method:Q.literal(\"ui/notifications/request-teardown\"),params:Q.object({}).optional()}),i=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:E.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:j.optional().describe(\"CSP domains approved by the host.\")}).optional().describe(\"Sandbox configuration applied by the host.\"),updateModelContext:O.optional().describe(\"Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.\"),message:O.optional().describe(\"Host supports receiving content messages (ui/message) from the view.\")}),l=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(D).optional().describe(\"Display modes the app supports.\")}),v=Q.object({method:Q.literal(\"ui/notifications/initialized\"),params:Q.object({}).optional()}),FQ=Q.object({csp:j.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:E.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`)}),W=Q.object({method:Q.literal(\"ui/request-display-mode\"),params:Q.object({mode:D.describe(\"The display mode being requested.\")})}),g=Q.object({mode:D.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),r=Q.union([Q.literal(\"model\"),Q.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),LQ=Q.object({resourceUri:Q.string().optional(),visibility:Q.array(r).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`)}),YX=Q.object({mimeTypes:Q.array(Q.string()).optional().describe('Array of supported MIME types for UI resources.\\nMust include `\"text/html;profile=mcp-app\"` for MCP Apps support.')}),C=Q.object({method:Q.literal(\"ui/download-file\"),params:Q.object({contents:Q.array(Q.union([BQ,OQ])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),S=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(h).describe(\"Message content blocks (text, image, etc.).\")})}),PQ=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:j.optional().describe(\"CSP configuration from resource metadata.\"),permissions:E.optional().describe(\"Sandbox permissions from resource metadata.\")})}),q=Q.object({method:Q.literal(\"ui/notifications/tool-result\"),params:zQ.describe(\"Standard MCP tool execution result.\")}),y=Q.object({toolInfo:Q.object({id:_Q.optional().describe(\"JSON-RPC id of the tools/call request.\"),tool:VQ.describe(\"Tool definition including name, inputSchema, etc.\")}).optional().describe(\"Metadata of the tool call that instantiated this App.\"),theme:p.optional().describe(\"Current color theme preference.\"),styles:n.optional().describe(\"Style configuration for theming the app.\"),displayMode:D.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:Q.array(D).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(),k=Q.object({method:Q.literal(\"ui/notifications/host-context-changed\"),params:y.describe(\"Partial context update containing only changed fields.\")}),f=Q.object({method:Q.literal(\"ui/update-model-context\"),params:Q.object({content:Q.array(h).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.\")})}),d=Q.object({method:Q.literal(\"ui/initialize\"),params:Q.object({appInfo:m.describe(\"App identification (name and version).\"),appCapabilities:l.describe(\"Features and capabilities this app provides.\"),protocolVersion:Q.string().describe(\"Protocol version this app supports.\")})}),b=Q.object({protocolVersion:Q.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:m.describe(\"Host application identification and version.\"),hostCapabilities:i.describe(\"Features and capabilities provided by the host.\"),hostContext:y.describe(\"Rich context about the host environment.\")}).passthrough();import{Protocol as wQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";import{CallToolRequestSchema as RQ,CallToolResultSchema as UQ,EmptyResultSchema as HQ,ListResourcesResultSchema as MQ,ListToolsRequestSchema as vQ,PingRequestSchema as gQ,ReadResourceResultSchema as CQ}from\"@modelcontextprotocol/sdk/types.js\";import{JSONRPCMessageSchema as TQ}from\"@modelcontextprotocol/sdk/types.js\";class N{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 $=TQ.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!==_)console.debug(\"Sending message\",X);this.eventTarget.postMessage(X,\"*\")}async close(){window.removeEventListener(\"message\",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var x=\"ui/resourceUri\",SQ=\"text/html;profile=mcp-app\";class qQ extends wQ{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;constructor(X,Y={},Z={autoResize:!0}){super(Z);this._appInfo=X;this._capabilities=Y;this.options=Z;this.setRequestHandler(gQ,($)=>{return console.log(\"Received ping:\",$.params),{}}),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(X){this.setNotificationHandler(T,(Y)=>X(Y.params))}set ontoolinputpartial(X){this.setNotificationHandler(w,(Y)=>X(Y.params))}set ontoolresult(X){this.setNotificationHandler(q,(Y)=>X(Y.params))}set ontoolcancelled(X){this.setNotificationHandler(R,(Y)=>X(Y.params))}set onhostcontextchanged(X){this.setNotificationHandler(k,(Y)=>{this._hostContext={...this._hostContext,...Y.params},X(Y.params)})}set onteardown(X){this.setRequestHandler(U,(Y,Z)=>X(Y.params,Z))}set oncalltool(X){this.setRequestHandler(RQ,(Y,Z)=>X(Y.params,Z))}set onlisttools(X){this.setRequestHandler(vQ,(Y,Z)=>X(Y.params,Z))}assertCapabilityForMethod(X){}assertRequestHandlerCapability(X){switch(X){case\"tools/call\":case\"tools/list\":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${X})`);return;case\"ping\":case\"ui/resource-teardown\":return;default:throw Error(`No handler for method ${X} registered`)}}assertNotificationCapability(X){}assertTaskCapability(X){throw Error(\"Tasks are not supported in MCP Apps\")}assertTaskHandlerCapability(X){throw Error(\"Task handlers are not supported in MCP Apps\")}async callServerTool(X,Y){if(typeof X===\"string\")throw Error(`callServerTool() expects an object as its first argument, but received a string (\"${X}\"). Did you mean: callServerTool({ name: \"${X}\", arguments: { ... } })?`);return await this.request({method:\"tools/call\",params:X},UQ,Y)}async readServerResource(X,Y){return await this.request({method:\"resources/read\",params:X},CQ,Y)}async listServerResources(X,Y){return await this.request({method:\"resources/list\",params:X},MQ,Y)}sendMessage(X,Y){return this.request({method:\"ui/message\",params:X},F,Y)}sendLog(X){return this.notification({method:\"notifications/message\",params:X})}updateModelContext(X,Y){return this.request({method:\"ui/update-model-context\",params:X},HQ,Y)}openLink(X,Y){return this.request({method:\"ui/open-link\",params:X},I,Y)}sendOpenLink=this.openLink;downloadFile(X,Y){return 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.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 J=document.documentElement,o=J.style.width,a=J.style.height;J.style.width=\"fit-content\",J.style.height=\"max-content\";let u=J.getBoundingClientRect();J.style.width=o,J.style.height=a;let t=window.innerWidth-J.clientWidth,z=Math.ceil(u.width+t),B=Math.ceil(u.height);if(z!==Y||B!==Z)Y=z,Z=B,this.sendSizeChanged({width:z,height:B})})};$();let K=new ResizeObserver($);return K.observe(document.documentElement),K.observe(document.body),()=>K.disconnect()}async connect(X=new N(window.parent,window.parent),Y){if(this.transport)throw Error(\"App is already connected. Call close() before connecting again.\");await super.connect(X);try{let Z=await this.request({method:\"ui/initialize\",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:G}},b,Y);if(Z===void 0)throw Error(`Server sent invalid initialize result: ${Z}`);if(this._hostCapabilities=Z.hostCapabilities,this._hostInfo=Z.hostInfo,this._hostContext=Z.hostContext,await this.notification({method:\"ui/notifications/initialized\"}),this.options?.autoResize)this.setupSizeChangedNotifications()}catch(Z){throw this.close(),Z}}}function nY(X){let Z=X._meta?.ui?.resourceUri;if(Z===void 0)Z=X._meta?.[x];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 iY(X){let Z=X._meta?.ui?.visibility;if(!Z)return!1;if(Z.length===1&&Z[0]===\"model\")return!0;return!1}function lY(X){let Z=X._meta?.ui?.visibility;if(!Z)return!1;if(Z.length===1&&Z[0]===\"app\")return!0;return!1}function rY(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 aQ=[G];class tQ extends oQ{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;constructor(X,Y,Z,$){super($);this._client=X;this._hostInfo=Y;this._capabilities=Z;this._hostContext=$?.hostContext||{},this.setRequestHandler(d,(K)=>this._oninitialize(K)),this.setRequestHandler(pQ,(K,J)=>{return this.onping?.(K.params,J),{}}),this.setRequestHandler(W,(K)=>{return{mode:this._hostContext.displayMode??\"inline\"}})}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;set onsizechange(X){this.setNotificationHandler(P,(Y)=>X(Y.params))}set onsandboxready(X){this.setNotificationHandler(L,(Y)=>X(Y.params))}set oninitialized(X){this.setNotificationHandler(v,(Y)=>X(Y.params))}set onmessage(X){this.setRequestHandler(S,async(Y,Z)=>{return X(Y.params,Z)})}set onopenlink(X){this.setRequestHandler(V,async(Y,Z)=>{return X(Y.params,Z)})}set ondownloadfile(X){this.setRequestHandler(C,async(Y,Z)=>{return X(Y.params,Z)})}set onrequestteardown(X){this.setNotificationHandler(M,(Y)=>X(Y.params))}set onrequestdisplaymode(X){this.setRequestHandler(W,async(Y,Z)=>{return X(Y.params,Z)})}set onloggingmessage(X){this.setNotificationHandler(mQ,async(Y)=>{X(Y.params)})}set onupdatemodelcontext(X){this.setRequestHandler(f,async(Y,Z)=>{return X(Y.params,Z)})}set oncalltool(X){this.setRequestHandler(yQ,async(Y,Z)=>{return X(Y.params,Z)})}sendToolListChanged(X={}){return this.notification({method:\"notifications/tools/list_changed\",params:X})}set onlistresources(X){this.setRequestHandler(bQ,async(Y,Z)=>{return X(Y.params,Z)})}set onlistresourcetemplates(X){this.setRequestHandler(uQ,async(Y,Z)=>{return X(Y.params,Z)})}set onreadresource(X){this.setRequestHandler(nQ,async(Y,Z)=>{return X(Y.params,Z)})}sendResourceListChanged(X={}){return this.notification({method:\"notifications/resources/list_changed\",params:X})}set onlistprompts(X){this.setRequestHandler(fQ,async(Y,Z)=>{return X(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;return this._appCapabilities=X.params.appCapabilities,this._appInfo=X.params.appInfo,{protocolVersion:aQ.includes(Y)?Y:G,hostCapabilities:this.getCapabilities(),hostInfo:this._hostInfo,hostContext:this._hostContext}}setHostContext(X){let Y={},Z=!1;for(let $ of Object.keys(X)){let K=this._hostContext[$],J=X[$];if(sQ(K,J))continue;Y[$]=J,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},H,Y)}sendResourceTeardown=this.teardownResource;async connect(X){if(this.transport)throw Error(\"AppBridge is already connected. Call close() before connecting again.\");if(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},kQ,{signal:$.signal})},Y.tools.listChanged)this._client.setNotificationHandler(rQ,(Z)=>this.sendToolListChanged(Z.params))}if(Y.resources){if(this.onlistresources=async(Z,$)=>{return this._client.request({method:\"resources/list\",params:Z},xQ,{signal:$.signal})},this.onlistresourcetemplates=async(Z,$)=>{return this._client.request({method:\"resources/templates/list\",params:Z},hQ,{signal:$.signal})},this.onreadresource=async(Z,$)=>{return this._client.request({method:\"resources/read\",params:Z},iQ,{signal:$.signal})},Y.resources.listChanged)this._client.setNotificationHandler(lQ,(Z)=>this.sendResourceListChanged(Z.params))}if(Y.prompts){if(this.onlistprompts=async(Z,$)=>{return this._client.request({method:\"prompts/list\",params:Z},dQ,{signal:$.signal})},Y.prompts.listChanged)this._client.setNotificationHandler(cQ,(Z)=>this.sendPromptListChanged(Z.params))}}return super.connect(X)}}function sQ(X,Y){return JSON.stringify(X)===JSON.stringify(Y)}export{iY as isToolVisibilityModelOnly,lY as isToolVisibilityAppOnly,nY as getToolUiResourceUri,rY as buildAllowAttribute,JQ as TOOL_RESULT_METHOD,_ as TOOL_INPUT_PARTIAL_METHOD,$Q as TOOL_INPUT_METHOD,KQ as TOOL_CANCELLED_METHOD,aQ as SUPPORTED_PROTOCOL_VERSIONS,ZQ as SIZE_CHANGED_METHOD,YQ as SANDBOX_RESOURCE_READY_METHOD,XQ as SANDBOX_PROXY_READY_METHOD,x as RESOURCE_URI_META_KEY,NQ as RESOURCE_TEARDOWN_METHOD,SQ as RESOURCE_MIME_TYPE,DQ as REQUEST_TEARDOWN_METHOD,WQ as REQUEST_DISPLAY_MODE_METHOD,N as PostMessageTransport,s as OPEN_LINK_METHOD,f as McpUiUpdateModelContextRequestSchema,r as McpUiToolVisibilitySchema,q as McpUiToolResultNotificationSchema,LQ as McpUiToolMetaSchema,w as McpUiToolInputPartialNotificationSchema,T as McpUiToolInputNotificationSchema,R as McpUiToolCancelledNotificationSchema,p as McpUiThemeSchema,O as McpUiSupportedContentBlockModalitiesSchema,P as McpUiSizeChangedNotificationSchema,PQ as McpUiSandboxResourceReadyNotificationSchema,L as McpUiSandboxProxyReadyNotificationSchema,H as McpUiResourceTeardownResultSchema,U as McpUiResourceTeardownRequestSchema,E as McpUiResourcePermissionsSchema,FQ as McpUiResourceMetaSchema,j as McpUiResourceCspSchema,M as McpUiRequestTeardownNotificationSchema,g as McpUiRequestDisplayModeResultSchema,W as McpUiRequestDisplayModeRequestSchema,I as McpUiOpenLinkResultSchema,V as McpUiOpenLinkRequestSchema,F as McpUiMessageResultSchema,S as McpUiMessageRequestSchema,v as McpUiInitializedNotificationSchema,b as McpUiInitializeResultSchema,d as McpUiInitializeRequestSchema,n as McpUiHostStylesSchema,c as McpUiHostCssSchema,y as McpUiHostContextSchema,k as McpUiHostContextChangedNotificationSchema,i as McpUiHostCapabilitiesSchema,A as McpUiDownloadFileResultSchema,C as McpUiDownloadFileRequestSchema,D as McpUiDisplayModeSchema,l as McpUiAppCapabilitiesSchema,QQ as MESSAGE_METHOD,G as LATEST_PROTOCOL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,MAAI;AAAC,YAAO,KAAK,QAAQ,QAAQ;MAAC,QAAO;MAA2B,QAAO;MAAE,EAACC,mCAAG,EAAC,QAAO,EAAE,QAAO,CAAC;OAAE,KAAK,iBAAe,OAAM,GAAE,MAAI;AAAC,YAAO,KAAK,QAAQ,QAAQ;MAAC,QAAO;MAAiB,QAAO;MAAE,EAACC,0BAAG,EAAC,QAAO,EAAE,QAAO,CAAC;OAAE,EAAE,UAAU,YAAY,MAAK,QAAQ,uBAAuBC,wCAAI,MAAI,KAAK,wBAAwB,EAAE,OAAO,CAAC;;AAAC,OAAG,EAAE;QAAY,KAAK,gBAAc,OAAM,GAAE,MAAI;AAAC,YAAO,KAAK,QAAQ,QAAQ;MAAC,QAAO;MAAe,QAAO;MAAE,EAACC,yBAAG,EAAC,QAAO,EAAE,QAAO,CAAC;OAAE,EAAE,QAAQ,YAAY,MAAK,QAAQ,uBAAuBC,sCAAI,MAAI,KAAK,sBAAsB,EAAE,OAAO,CAAC;;;AAAE,SAAO,MAAM,QAAQ,EAAE;;;AAAE,SAAS,GAAG,GAAE,GAAE;AAAC,QAAO,KAAK,UAAU,EAAE,KAAG,KAAK,UAAU,EAAE"}
|
|
1
|
+
{"version":3,"file":"@modelcontextprotocol_ext-apps_app-bridge.js","names":["Q.union","Q.literal","Q.record","Q.string","Q.undefined","Q.object","Q.boolean","Q.array","Q.number","Q.unknown","jQ","zQ","u","NQ","EQ","BQ","h","FQ","iQ","uQ","xQ","CQ","kQ","dQ","mQ","qQ","SQ","nQ","fQ","bQ","pQ","cQ","yQ","hQ"],"sources":["../../../../../../node_modules/.pnpm/@modelcontextprotocol+ext-apps@1.3.2_@modelcontextprotocol+sdk@1.29.0_zod@4.3.6__react-_38e5f6c50a4ca9cf3f1dffc73a60c951/node_modules/@modelcontextprotocol/ext-apps/dist/src/app-bridge.js"],"sourcesContent":["import{CallToolRequestSchema as CQ,CallToolResultSchema as SQ,ListPromptsRequestSchema as qQ,ListPromptsResultSchema as yQ,ListResourcesRequestSchema as kQ,ListResourcesResultSchema as fQ,ListResourceTemplatesRequestSchema as dQ,ListResourceTemplatesResultSchema as bQ,LoggingMessageNotificationSchema as xQ,PingRequestSchema as uQ,PromptListChangedNotificationSchema as hQ,ReadResourceRequestSchema as mQ,ReadResourceResultSchema as pQ,ResourceListChangedNotificationSchema as cQ,ToolListChangedNotificationSchema as nQ}from\"@modelcontextprotocol/sdk/types.js\";import{Protocol as iQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";var G=\"2026-01-26\",o=\"ui/open-link\",a=\"ui/download-file\",t=\"ui/message\",s=\"ui/notifications/sandbox-proxy-ready\",e=\"ui/notifications/sandbox-resource-ready\",QQ=\"ui/notifications/size-changed\",XQ=\"ui/notifications/tool-input\",_=\"ui/notifications/tool-input-partial\",YQ=\"ui/notifications/tool-result\",ZQ=\"ui/notifications/tool-cancelled\",$Q=\"ui/notifications/host-context-changed\",JQ=\"ui/notifications/request-teardown\",KQ=\"ui/resource-teardown\",GQ=\"ui/initialize\",WQ=\"ui/notifications/initialized\",DQ=\"ui/request-display-mode\";import{z as Q}from\"zod/v4\";import{ContentBlockSchema as u,CallToolResultSchema as NQ,EmbeddedResourceSchema as jQ,ImplementationSchema as h,RequestIdSchema as EQ,ResourceLinkSchema as zQ,ToolSchema as BQ}from\"@modelcontextprotocol/sdk/types.js\";var m=Q.union([Q.literal(\"light\"),Q.literal(\"dark\")]).describe(\"Color theme preference for the host environment.\"),W=Q.union([Q.literal(\"inline\"),Q.literal(\"fullscreen\"),Q.literal(\"pip\")]).describe(\"Display mode for UI presentation.\"),_Q=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.\"),OQ=Q.record(_Q.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.`),V=Q.object({method:Q.literal(\"ui/open-link\"),params:Q.object({url:Q.string().describe(\"URL to open in the host's browser\")})}),I=Q.object({isError:Q.boolean().optional().describe(\"True if the host failed to open the URL (e.g., due to security policy).\")}).passthrough(),A=Q.object({isError:Q.boolean().optional().describe(\"True if the download failed (e.g., user cancelled or host denied).\")}).passthrough(),F=Q.object({isError:Q.boolean().optional().describe(\"True if the host rejected or failed to deliver the message.\")}).passthrough(),L=Q.object({method:Q.literal(\"ui/notifications/sandbox-proxy-ready\"),params:Q.object({})}),N=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'`)\")}),j=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.\")}),P=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.\")})}),T=Q.object({method:Q.literal(\"ui/notifications/tool-input\"),params:Q.object({arguments:Q.record(Q.string(),Q.unknown().describe(\"Complete tool call arguments as key-value pairs.\")).optional().describe(\"Complete tool call arguments as key-value pairs.\")})}),w=Q.object({method:Q.literal(\"ui/notifications/tool-input-partial\"),params:Q.object({arguments:Q.record(Q.string(),Q.unknown().describe(\"Partial tool call arguments (incomplete, may change).\")).optional().describe(\"Partial tool call arguments (incomplete, may change).\")})}),R=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\").')})}),p=Q.object({fonts:Q.string().optional()}),c=Q.object({variables:OQ.optional().describe(\"CSS variables for theming the app.\"),css:p.optional().describe(\"CSS blocks that apps can inject.\")}),U=Q.object({method:Q.literal(\"ui/resource-teardown\"),params:Q.object({})}),H=Q.record(Q.string(),Q.unknown()),O=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.\")}),M=Q.object({method:Q.literal(\"ui/notifications/request-teardown\"),params:Q.object({}).optional()}),n=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:j.optional().describe(\"Permissions granted by the host (camera, microphone, geolocation).\"),csp:N.optional().describe(\"CSP domains approved by the host.\")}).optional().describe(\"Sandbox configuration applied by the host.\"),updateModelContext:O.optional().describe(\"Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.\"),message:O.optional().describe(\"Host supports receiving content messages (ui/message) from the view.\")}),i=Q.object({experimental:Q.object({}).optional().describe(\"Experimental features (structure TBD).\"),tools:Q.object({listChanged:Q.boolean().optional().describe(\"App supports tools/list_changed notifications.\")}).optional().describe(\"App exposes MCP-style tools that the host can call.\"),availableDisplayModes:Q.array(W).optional().describe(\"Display modes the app supports.\")}),v=Q.object({method:Q.literal(\"ui/notifications/initialized\"),params:Q.object({}).optional()}),VQ=Q.object({csp:N.optional().describe(\"Content Security Policy configuration for UI resources.\"),permissions:j.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`)}),E=Q.object({method:Q.literal(\"ui/request-display-mode\"),params:Q.object({mode:W.describe(\"The display mode being requested.\")})}),g=Q.object({mode:W.describe(\"The display mode that was actually set. May differ from requested if not supported.\")}).passthrough(),l=Q.union([Q.literal(\"model\"),Q.literal(\"app\")]).describe(\"Tool visibility scope - who can access the tool.\"),IQ=Q.object({resourceUri:Q.string().optional(),visibility:Q.array(l).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`)}),eQ=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.')}),C=Q.object({method:Q.literal(\"ui/download-file\"),params:Q.object({contents:Q.array(Q.union([jQ,zQ])).describe(\"Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.\")})}),S=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(u).describe(\"Message content blocks (text, image, etc.).\")})}),AQ=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:N.optional().describe(\"CSP configuration from resource metadata.\"),permissions:j.optional().describe(\"Sandbox permissions from resource metadata.\")})}),q=Q.object({method:Q.literal(\"ui/notifications/tool-result\"),params:NQ.describe(\"Standard MCP tool execution result.\")}),y=Q.object({toolInfo:Q.object({id:EQ.optional().describe(\"JSON-RPC id of the tools/call request.\"),tool:BQ.describe(\"Tool definition including name, inputSchema, etc.\")}).optional().describe(\"Metadata of the tool call that instantiated this App.\"),theme:m.optional().describe(\"Current color theme preference.\"),styles:c.optional().describe(\"Style configuration for theming the app.\"),displayMode:W.optional().describe(\"How the UI is currently displayed.\"),availableDisplayModes:Q.array(W).optional().describe(\"Display modes the host supports.\"),containerDimensions:Q.union([Q.object({height:Q.number().describe(\"Fixed container height in pixels.\")}),Q.object({maxHeight:Q.union([Q.number(),Q.undefined()]).optional().describe(\"Maximum container height in pixels.\")})]).and(Q.union([Q.object({width:Q.number().describe(\"Fixed container width in pixels.\")}),Q.object({maxWidth:Q.union([Q.number(),Q.undefined()]).optional().describe(\"Maximum container width in pixels.\")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:Q.string().optional().describe(\"User's language and region preference in BCP 47 format.\"),timeZone:Q.string().optional().describe(\"User's timezone in IANA format.\"),userAgent:Q.string().optional().describe(\"Host application identifier.\"),platform:Q.union([Q.literal(\"web\"),Q.literal(\"desktop\"),Q.literal(\"mobile\")]).optional().describe(\"Platform type for responsive design decisions.\"),deviceCapabilities:Q.object({touch:Q.boolean().optional().describe(\"Whether the device supports touch input.\"),hover:Q.boolean().optional().describe(\"Whether the device supports hover interactions.\")}).optional().describe(\"Device input capabilities.\"),safeAreaInsets:Q.object({top:Q.number().describe(\"Top safe area inset in pixels.\"),right:Q.number().describe(\"Right safe area inset in pixels.\"),bottom:Q.number().describe(\"Bottom safe area inset in pixels.\"),left:Q.number().describe(\"Left safe area inset in pixels.\")}).optional().describe(\"Mobile safe area boundaries in pixels.\")}).passthrough(),k=Q.object({method:Q.literal(\"ui/notifications/host-context-changed\"),params:y.describe(\"Partial context update containing only changed fields.\")}),f=Q.object({method:Q.literal(\"ui/update-model-context\"),params:Q.object({content:Q.array(u).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.\")})}),d=Q.object({method:Q.literal(\"ui/initialize\"),params:Q.object({appInfo:h.describe(\"App identification (name and version).\"),appCapabilities:i.describe(\"Features and capabilities this app provides.\"),protocolVersion:Q.string().describe(\"Protocol version this app supports.\")})}),b=Q.object({protocolVersion:Q.string().describe('Negotiated protocol version string (e.g., \"2025-11-21\").'),hostInfo:h.describe(\"Host application identification and version.\"),hostCapabilities:n.describe(\"Features and capabilities provided by the host.\"),hostContext:y.describe(\"Rich context about the host environment.\")}).passthrough();import{Protocol as LQ}from\"@modelcontextprotocol/sdk/shared/protocol.js\";import{CallToolRequestSchema as PQ,CallToolResultSchema as TQ,EmptyResultSchema as wQ,ListResourcesResultSchema as RQ,ListToolsRequestSchema as UQ,PingRequestSchema as HQ,ReadResourceResultSchema as MQ}from\"@modelcontextprotocol/sdk/types.js\";import{JSONRPCMessageSchema as FQ}from\"@modelcontextprotocol/sdk/types.js\";class D{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 $=FQ.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!==_)console.debug(\"Sending message\",X);this.eventTarget.postMessage(X,\"*\")}async close(){window.removeEventListener(\"message\",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var x=\"ui/resourceUri\",vQ=\"text/html;profile=mcp-app\";class gQ extends LQ{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;constructor(X,Y={},Z={autoResize:!0}){super(Z);this._appInfo=X;this._capabilities=Y;this.options=Z;this.setRequestHandler(HQ,($)=>{return console.log(\"Received ping:\",$.params),{}}),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(X){this.setNotificationHandler(T,(Y)=>X(Y.params))}set ontoolinputpartial(X){this.setNotificationHandler(w,(Y)=>X(Y.params))}set ontoolresult(X){this.setNotificationHandler(q,(Y)=>X(Y.params))}set ontoolcancelled(X){this.setNotificationHandler(R,(Y)=>X(Y.params))}set onhostcontextchanged(X){this.setNotificationHandler(k,(Y)=>{this._hostContext={...this._hostContext,...Y.params},X(Y.params)})}set onteardown(X){this.setRequestHandler(U,(Y,Z)=>X(Y.params,Z))}set oncalltool(X){this.setRequestHandler(PQ,(Y,Z)=>X(Y.params,Z))}set onlisttools(X){this.setRequestHandler(UQ,(Y,Z)=>X(Y.params,Z))}assertCapabilityForMethod(X){}assertRequestHandlerCapability(X){switch(X){case\"tools/call\":case\"tools/list\":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${X})`);return;case\"ping\":case\"ui/resource-teardown\":return;default:throw Error(`No handler for method ${X} registered`)}}assertNotificationCapability(X){}assertTaskCapability(X){throw Error(\"Tasks are not supported in MCP Apps\")}assertTaskHandlerCapability(X){throw Error(\"Task handlers are not supported in MCP Apps\")}async callServerTool(X,Y){if(typeof X===\"string\")throw Error(`callServerTool() expects an object as its first argument, but received a string (\"${X}\"). Did you mean: callServerTool({ name: \"${X}\", arguments: { ... } })?`);return await this.request({method:\"tools/call\",params:X},TQ,Y)}async readServerResource(X,Y){return await this.request({method:\"resources/read\",params:X},MQ,Y)}async listServerResources(X,Y){return await this.request({method:\"resources/list\",params:X},RQ,Y)}sendMessage(X,Y){return this.request({method:\"ui/message\",params:X},F,Y)}sendLog(X){return this.notification({method:\"notifications/message\",params:X})}updateModelContext(X,Y){return this.request({method:\"ui/update-model-context\",params:X},wQ,Y)}openLink(X,Y){return this.request({method:\"ui/open-link\",params:X},I,Y)}sendOpenLink=this.openLink;downloadFile(X,Y){return 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.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,r=K.style.height;K.style.height=\"max-content\";let z=Math.ceil(K.getBoundingClientRect().height);K.style.height=r;let B=Math.ceil(window.innerWidth);if(B!==Y||z!==Z)Y=B,Z=z,this.sendSizeChanged({width:B,height:z})})};$();let J=new ResizeObserver($);return J.observe(document.documentElement),J.observe(document.body),()=>J.disconnect()}async connect(X=new D(window.parent,window.parent),Y){if(this.transport)throw Error(\"App is already connected. Call close() before connecting again.\");await super.connect(X);try{let Z=await this.request({method:\"ui/initialize\",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:G}},b,Y);if(Z===void 0)throw Error(`Server sent invalid initialize result: ${Z}`);if(this._hostCapabilities=Z.hostCapabilities,this._hostInfo=Z.hostInfo,this._hostContext=Z.hostContext,await this.notification({method:\"ui/notifications/initialized\"}),this.options?.autoResize)this.setupSizeChangedNotifications()}catch(Z){throw this.close(),Z}}}function mY(X){let Z=X._meta?.ui?.resourceUri;if(Z===void 0)Z=X._meta?.[x];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 pY(X){let Z=X._meta?.ui?.visibility;if(!Z)return!1;if(Z.length===1&&Z[0]===\"model\")return!0;return!1}function cY(X){let Z=X._meta?.ui?.visibility;if(!Z)return!1;if(Z.length===1&&Z[0]===\"app\")return!0;return!1}function nY(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 lQ=[G];class rQ extends iQ{_client;_hostInfo;_capabilities;_appCapabilities;_hostContext={};_appInfo;constructor(X,Y,Z,$){super($);this._client=X;this._hostInfo=Y;this._capabilities=Z;this._hostContext=$?.hostContext||{},this.setRequestHandler(d,(J)=>this._oninitialize(J)),this.setRequestHandler(uQ,(J,K)=>{return this.onping?.(J.params,K),{}}),this.setRequestHandler(E,(J)=>{return{mode:this._hostContext.displayMode??\"inline\"}})}getAppCapabilities(){return this._appCapabilities}getAppVersion(){return this._appInfo}onping;set onsizechange(X){this.setNotificationHandler(P,(Y)=>X(Y.params))}set onsandboxready(X){this.setNotificationHandler(L,(Y)=>X(Y.params))}set oninitialized(X){this.setNotificationHandler(v,(Y)=>X(Y.params))}set onmessage(X){this.setRequestHandler(S,async(Y,Z)=>{return X(Y.params,Z)})}set onopenlink(X){this.setRequestHandler(V,async(Y,Z)=>{return X(Y.params,Z)})}set ondownloadfile(X){this.setRequestHandler(C,async(Y,Z)=>{return X(Y.params,Z)})}set onrequestteardown(X){this.setNotificationHandler(M,(Y)=>X(Y.params))}set onrequestdisplaymode(X){this.setRequestHandler(E,async(Y,Z)=>{return X(Y.params,Z)})}set onloggingmessage(X){this.setNotificationHandler(xQ,async(Y)=>{X(Y.params)})}set onupdatemodelcontext(X){this.setRequestHandler(f,async(Y,Z)=>{return X(Y.params,Z)})}set oncalltool(X){this.setRequestHandler(CQ,async(Y,Z)=>{return X(Y.params,Z)})}sendToolListChanged(X={}){return this.notification({method:\"notifications/tools/list_changed\",params:X})}set onlistresources(X){this.setRequestHandler(kQ,async(Y,Z)=>{return X(Y.params,Z)})}set onlistresourcetemplates(X){this.setRequestHandler(dQ,async(Y,Z)=>{return X(Y.params,Z)})}set onreadresource(X){this.setRequestHandler(mQ,async(Y,Z)=>{return X(Y.params,Z)})}sendResourceListChanged(X={}){return this.notification({method:\"notifications/resources/list_changed\",params:X})}set onlistprompts(X){this.setRequestHandler(qQ,async(Y,Z)=>{return X(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;return this._appCapabilities=X.params.appCapabilities,this._appInfo=X.params.appInfo,{protocolVersion:lQ.includes(Y)?Y:G,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(oQ(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},H,Y)}sendResourceTeardown=this.teardownResource;async connect(X){if(this.transport)throw Error(\"AppBridge is already connected. Call close() before connecting again.\");if(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},SQ,{signal:$.signal})},Y.tools.listChanged)this._client.setNotificationHandler(nQ,(Z)=>this.sendToolListChanged(Z.params))}if(Y.resources){if(this.onlistresources=async(Z,$)=>{return this._client.request({method:\"resources/list\",params:Z},fQ,{signal:$.signal})},this.onlistresourcetemplates=async(Z,$)=>{return this._client.request({method:\"resources/templates/list\",params:Z},bQ,{signal:$.signal})},this.onreadresource=async(Z,$)=>{return this._client.request({method:\"resources/read\",params:Z},pQ,{signal:$.signal})},Y.resources.listChanged)this._client.setNotificationHandler(cQ,(Z)=>this.sendResourceListChanged(Z.params))}if(Y.prompts){if(this.onlistprompts=async(Z,$)=>{return this._client.request({method:\"prompts/list\",params:Z},yQ,{signal:$.signal})},Y.prompts.listChanged)this._client.setNotificationHandler(hQ,(Z)=>this.sendPromptListChanged(Z.params))}}return super.connect(X)}}function oQ(X,Y){return JSON.stringify(X)===JSON.stringify(Y)}export{pY as isToolVisibilityModelOnly,cY as isToolVisibilityAppOnly,mY as getToolUiResourceUri,nY as buildAllowAttribute,YQ as TOOL_RESULT_METHOD,_ as TOOL_INPUT_PARTIAL_METHOD,XQ as TOOL_INPUT_METHOD,ZQ as TOOL_CANCELLED_METHOD,lQ as SUPPORTED_PROTOCOL_VERSIONS,QQ as SIZE_CHANGED_METHOD,e as SANDBOX_RESOURCE_READY_METHOD,s as SANDBOX_PROXY_READY_METHOD,x as RESOURCE_URI_META_KEY,KQ as RESOURCE_TEARDOWN_METHOD,vQ as RESOURCE_MIME_TYPE,JQ as REQUEST_TEARDOWN_METHOD,DQ as REQUEST_DISPLAY_MODE_METHOD,D as PostMessageTransport,o as OPEN_LINK_METHOD,f as McpUiUpdateModelContextRequestSchema,l as McpUiToolVisibilitySchema,q as McpUiToolResultNotificationSchema,IQ as McpUiToolMetaSchema,w as McpUiToolInputPartialNotificationSchema,T as McpUiToolInputNotificationSchema,R as McpUiToolCancelledNotificationSchema,m as McpUiThemeSchema,O as McpUiSupportedContentBlockModalitiesSchema,P as McpUiSizeChangedNotificationSchema,AQ as McpUiSandboxResourceReadyNotificationSchema,L as McpUiSandboxProxyReadyNotificationSchema,H as McpUiResourceTeardownResultSchema,U as McpUiResourceTeardownRequestSchema,j as McpUiResourcePermissionsSchema,VQ as McpUiResourceMetaSchema,N as McpUiResourceCspSchema,M as McpUiRequestTeardownNotificationSchema,g as McpUiRequestDisplayModeResultSchema,E as McpUiRequestDisplayModeRequestSchema,I as McpUiOpenLinkResultSchema,V as McpUiOpenLinkRequestSchema,F as McpUiMessageResultSchema,S as McpUiMessageRequestSchema,v as McpUiInitializedNotificationSchema,b as McpUiInitializeResultSchema,d as McpUiInitializeRequestSchema,c as McpUiHostStylesSchema,p as McpUiHostCssSchema,y as McpUiHostContextSchema,k as McpUiHostContextChangedNotificationSchema,n as McpUiHostCapabilitiesSchema,A as McpUiDownloadFileResultSchema,C as McpUiDownloadFileRequestSchema,W as McpUiDisplayModeSchema,i as McpUiAppCapabilitiesSchema,t as MESSAGE_METHOD,G as LATEST_PROTOCOL_VERSION,GQ as INITIALIZE_METHOD,WQ as INITIALIZED_METHOD,$Q as HOST_CONTEXT_CHANGED_METHOD,a as DOWNLOAD_FILE_METHOD,rQ as AppBridge};\n"],"x_google_ignoreList":[0],"mappings":";;;AAA2nB,IAAI,IAAE,cAAa,IAAE,gBAAe,IAAE,oBAAmB,IAAE,cAAa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