@modelcontextprotocol/ext-apps 1.1.0 → 1.1.2

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.
@@ -38,6 +38,13 @@ export declare const McpUiOpenLinkRequestSchema: z.ZodObject<{
38
38
  export declare const McpUiOpenLinkResultSchema: z.ZodObject<{
39
39
  isError: z.ZodOptional<z.ZodBoolean>;
40
40
  }, z.core.$loose>;
41
+ /**
42
+ * @description Result from a file download request.
43
+ * @see {@link McpUiDownloadFileRequest `McpUiDownloadFileRequest`}
44
+ */
45
+ export declare const McpUiDownloadFileResultSchema: z.ZodObject<{
46
+ isError: z.ZodOptional<z.ZodBoolean>;
47
+ }, z.core.$loose>;
41
48
  /**
42
49
  * @description Result from sending a message.
43
50
  * @see {@link McpUiMessageRequest `McpUiMessageRequest`}
@@ -166,6 +173,7 @@ export declare const McpUiSupportedContentBlockModalitiesSchema: z.ZodObject<{
166
173
  export declare const McpUiHostCapabilitiesSchema: z.ZodObject<{
167
174
  experimental: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
168
175
  openLinks: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
176
+ downloadFile: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
169
177
  serverTools: z.ZodOptional<z.ZodObject<{
170
178
  listChanged: z.ZodOptional<z.ZodBoolean>;
171
179
  }, z.core.$strip>>;
@@ -282,6 +290,69 @@ export declare const McpUiToolMetaSchema: z.ZodObject<{
282
290
  export declare const McpUiClientCapabilitiesSchema: z.ZodObject<{
283
291
  mimeTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
284
292
  }, z.core.$strip>;
293
+ /**
294
+ * @description Request to download a file through the host.
295
+ *
296
+ * Sent from the View to the Host when the app wants to trigger a file download.
297
+ * Since MCP Apps run in sandboxed iframes where direct downloads are blocked,
298
+ * this provides a host-mediated mechanism for file exports.
299
+ * The host SHOULD show a confirmation dialog before initiating the download.
300
+ *
301
+ * @see {@link app!App.downloadFile `App.downloadFile`} for the method that sends this request
302
+ */
303
+ export declare const McpUiDownloadFileRequestSchema: z.ZodObject<{
304
+ method: z.ZodLiteral<"ui/download-file">;
305
+ params: z.ZodObject<{
306
+ contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
307
+ type: z.ZodLiteral<"resource">;
308
+ resource: z.ZodUnion<readonly [z.ZodObject<{
309
+ uri: z.ZodString;
310
+ mimeType: z.ZodOptional<z.ZodString>;
311
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
312
+ text: z.ZodString;
313
+ }, z.core.$strip>, z.ZodObject<{
314
+ uri: z.ZodString;
315
+ mimeType: z.ZodOptional<z.ZodString>;
316
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
317
+ blob: z.ZodString;
318
+ }, z.core.$strip>]>;
319
+ annotations: z.ZodOptional<z.ZodObject<{
320
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
321
+ user: "user";
322
+ assistant: "assistant";
323
+ }>>>;
324
+ priority: z.ZodOptional<z.ZodNumber>;
325
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
326
+ }, z.core.$strip>>;
327
+ _meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
328
+ }, z.core.$strip>, z.ZodObject<{
329
+ uri: z.ZodString;
330
+ description: z.ZodOptional<z.ZodString>;
331
+ mimeType: z.ZodOptional<z.ZodString>;
332
+ annotations: z.ZodOptional<z.ZodObject<{
333
+ audience: z.ZodOptional<z.ZodArray<z.ZodEnum<{
334
+ user: "user";
335
+ assistant: "assistant";
336
+ }>>>;
337
+ priority: z.ZodOptional<z.ZodNumber>;
338
+ lastModified: z.ZodOptional<z.ZodISODateTime>;
339
+ }, z.core.$strip>>;
340
+ _meta: z.ZodOptional<z.ZodObject<{}, z.core.$loose>>;
341
+ icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
342
+ src: z.ZodString;
343
+ mimeType: z.ZodOptional<z.ZodString>;
344
+ sizes: z.ZodOptional<z.ZodArray<z.ZodString>>;
345
+ theme: z.ZodOptional<z.ZodEnum<{
346
+ light: "light";
347
+ dark: "dark";
348
+ }>>;
349
+ }, z.core.$strip>>>;
350
+ name: z.ZodString;
351
+ title: z.ZodOptional<z.ZodString>;
352
+ type: z.ZodLiteral<"resource_link">;
353
+ }, z.core.$strip>]>>;
354
+ }, z.core.$strip>;
355
+ }, z.core.$strip>;
285
356
  /**
286
357
  * @description Request to send a message to the host's chat interface.
287
358
  * @see {@link app!App.sendMessage `App.sendMessage`} for the method that sends this request
@@ -828,6 +899,7 @@ export declare const McpUiInitializeResultSchema: z.ZodObject<{
828
899
  hostCapabilities: z.ZodObject<{
829
900
  experimental: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
830
901
  openLinks: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
902
+ downloadFile: z.ZodOptional<z.ZodObject<{}, z.core.$strip>>;
831
903
  serverTools: z.ZodOptional<z.ZodObject<{
832
904
  listChanged: z.ZodOptional<z.ZodBoolean>;
833
905
  }, z.core.$strip>>;
@@ -6,6 +6,7 @@ export type McpUiStyleVariableKeySchemaInferredType = z.infer<typeof generated.M
6
6
  export type McpUiStylesSchemaInferredType = z.infer<typeof generated.McpUiStylesSchema>;
7
7
  export type McpUiOpenLinkRequestSchemaInferredType = z.infer<typeof generated.McpUiOpenLinkRequestSchema>;
8
8
  export type McpUiOpenLinkResultSchemaInferredType = z.infer<typeof generated.McpUiOpenLinkResultSchema>;
9
+ export type McpUiDownloadFileResultSchemaInferredType = z.infer<typeof generated.McpUiDownloadFileResultSchema>;
9
10
  export type McpUiMessageResultSchemaInferredType = z.infer<typeof generated.McpUiMessageResultSchema>;
10
11
  export type McpUiSandboxProxyReadyNotificationSchemaInferredType = z.infer<typeof generated.McpUiSandboxProxyReadyNotificationSchema>;
11
12
  export type McpUiResourceCspSchemaInferredType = z.infer<typeof generated.McpUiResourceCspSchema>;
@@ -28,6 +29,7 @@ export type McpUiRequestDisplayModeResultSchemaInferredType = z.infer<typeof gen
28
29
  export type McpUiToolVisibilitySchemaInferredType = z.infer<typeof generated.McpUiToolVisibilitySchema>;
29
30
  export type McpUiToolMetaSchemaInferredType = z.infer<typeof generated.McpUiToolMetaSchema>;
30
31
  export type McpUiClientCapabilitiesSchemaInferredType = z.infer<typeof generated.McpUiClientCapabilitiesSchema>;
32
+ export type McpUiDownloadFileRequestSchemaInferredType = z.infer<typeof generated.McpUiDownloadFileRequestSchema>;
31
33
  export type McpUiMessageRequestSchemaInferredType = z.infer<typeof generated.McpUiMessageRequestSchema>;
32
34
  export type McpUiSandboxResourceReadyNotificationSchemaInferredType = z.infer<typeof generated.McpUiSandboxResourceReadyNotificationSchema>;
33
35
  export type McpUiToolResultNotificationSchemaInferredType = z.infer<typeof generated.McpUiToolResultNotificationSchema>;