@dudko.dev/agent-web-ui 0.0.1 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/README.md +94 -3
  2. package/dist/canvas.cjs +0 -1
  3. package/dist/canvas.js +1 -2
  4. package/dist/{chunk-EL2YCROY.js → chunk-D64VLIRY.js} +0 -1
  5. package/dist/chunk-G7LQTOA2.js +1439 -0
  6. package/dist/{chunk-4EHUITGU.js → chunk-S5AHUAFG.js} +6 -1
  7. package/dist/{chunk-7O64ZI6Z.js → chunk-TJBGZM6D.js} +0 -1
  8. package/dist/{chunk-P2F2P3JC.js → chunk-UNIXGP4N.js} +6 -1
  9. package/dist/{chunk-A55Q377T.js → chunk-V33T6VX3.js} +6 -1
  10. package/dist/{chunk-TPK25QGK.js → chunk-VZCQXE3P.js} +6 -1
  11. package/dist/{chunk-GB7RZJMG.js → chunk-WEYQMUKY.js} +0 -1
  12. package/dist/{chunk-KZQB35LS.js → chunk-Y6QYUFSC.js} +0 -1
  13. package/dist/controller.cjs +1890 -0
  14. package/dist/controller.d.cts +253 -0
  15. package/dist/controller.d.ts +253 -0
  16. package/dist/controller.js +481 -0
  17. package/dist/{en-CcNUz2tN.d.ts → en-Dg2MtzcJ.d.cts} +6 -0
  18. package/dist/{en-CcNUz2tN.d.cts → en-Dg2MtzcJ.d.ts} +6 -0
  19. package/dist/index.cjs +133 -1
  20. package/dist/index.d.cts +82 -4
  21. package/dist/index.d.ts +82 -4
  22. package/dist/index.js +144 -1422
  23. package/dist/{labels-UuWI7wPo.d.ts → labels-CmiTBLWD.d.cts} +68 -100
  24. package/dist/{labels-D5BrHct4.d.cts → labels-DH1ESUtm.d.ts} +68 -100
  25. package/dist/locales/be.cjs +12 -1
  26. package/dist/locales/be.d.cts +4 -2
  27. package/dist/locales/be.d.ts +4 -2
  28. package/dist/locales/be.js +7 -2
  29. package/dist/locales/bg.cjs +12 -1
  30. package/dist/locales/bg.d.cts +4 -2
  31. package/dist/locales/bg.d.ts +4 -2
  32. package/dist/locales/bg.js +7 -2
  33. package/dist/locales/ca.cjs +12 -1
  34. package/dist/locales/ca.d.cts +4 -2
  35. package/dist/locales/ca.d.ts +4 -2
  36. package/dist/locales/ca.js +7 -2
  37. package/dist/locales/cs.cjs +12 -1
  38. package/dist/locales/cs.d.cts +4 -2
  39. package/dist/locales/cs.d.ts +4 -2
  40. package/dist/locales/cs.js +7 -2
  41. package/dist/locales/da.cjs +12 -1
  42. package/dist/locales/da.d.cts +4 -2
  43. package/dist/locales/da.d.ts +4 -2
  44. package/dist/locales/da.js +7 -2
  45. package/dist/locales/de.cjs +12 -1
  46. package/dist/locales/de.d.cts +4 -2
  47. package/dist/locales/de.d.ts +4 -2
  48. package/dist/locales/de.js +7 -2
  49. package/dist/locales/el.cjs +12 -1
  50. package/dist/locales/el.d.cts +4 -2
  51. package/dist/locales/el.d.ts +4 -2
  52. package/dist/locales/el.js +7 -2
  53. package/dist/locales/en.cjs +12 -1
  54. package/dist/locales/en.d.cts +4 -2
  55. package/dist/locales/en.d.ts +4 -2
  56. package/dist/locales/en.js +7 -2
  57. package/dist/locales/es-419.cjs +16 -2
  58. package/dist/locales/es-419.d.cts +4 -2
  59. package/dist/locales/es-419.d.ts +4 -2
  60. package/dist/locales/es-419.js +6 -4
  61. package/dist/locales/es.cjs +12 -1
  62. package/dist/locales/es.d.cts +4 -2
  63. package/dist/locales/es.d.ts +4 -2
  64. package/dist/locales/es.js +2 -3
  65. package/dist/locales/fi.cjs +12 -1
  66. package/dist/locales/fi.d.cts +4 -2
  67. package/dist/locales/fi.d.ts +4 -2
  68. package/dist/locales/fi.js +7 -2
  69. package/dist/locales/fr-CA.cjs +12 -1
  70. package/dist/locales/fr-CA.d.cts +4 -2
  71. package/dist/locales/fr-CA.d.ts +4 -2
  72. package/dist/locales/fr-CA.js +2 -3
  73. package/dist/locales/fr.cjs +12 -1
  74. package/dist/locales/fr.d.cts +4 -2
  75. package/dist/locales/fr.d.ts +4 -2
  76. package/dist/locales/fr.js +2 -3
  77. package/dist/locales/gn.cjs +12 -1
  78. package/dist/locales/gn.d.cts +4 -2
  79. package/dist/locales/gn.d.ts +4 -2
  80. package/dist/locales/gn.js +7 -2
  81. package/dist/locales/hr.cjs +12 -1
  82. package/dist/locales/hr.d.cts +4 -2
  83. package/dist/locales/hr.d.ts +4 -2
  84. package/dist/locales/hr.js +7 -2
  85. package/dist/locales/ht.cjs +12 -1
  86. package/dist/locales/ht.d.cts +4 -2
  87. package/dist/locales/ht.d.ts +4 -2
  88. package/dist/locales/ht.js +7 -2
  89. package/dist/locales/hu.cjs +12 -1
  90. package/dist/locales/hu.d.cts +4 -2
  91. package/dist/locales/hu.d.ts +4 -2
  92. package/dist/locales/hu.js +7 -2
  93. package/dist/locales/index.cjs +6 -1
  94. package/dist/locales/index.d.cts +6 -4
  95. package/dist/locales/index.d.ts +6 -4
  96. package/dist/locales/index.js +1 -2
  97. package/dist/locales/it.cjs +12 -1
  98. package/dist/locales/it.d.cts +4 -2
  99. package/dist/locales/it.d.ts +4 -2
  100. package/dist/locales/it.js +7 -2
  101. package/dist/locales/nb.cjs +12 -1
  102. package/dist/locales/nb.d.cts +4 -2
  103. package/dist/locales/nb.d.ts +4 -2
  104. package/dist/locales/nb.js +7 -2
  105. package/dist/locales/nl.cjs +12 -1
  106. package/dist/locales/nl.d.cts +4 -2
  107. package/dist/locales/nl.d.ts +4 -2
  108. package/dist/locales/nl.js +7 -2
  109. package/dist/locales/pl.cjs +12 -1
  110. package/dist/locales/pl.d.cts +4 -2
  111. package/dist/locales/pl.d.ts +4 -2
  112. package/dist/locales/pl.js +7 -2
  113. package/dist/locales/pt-BR.cjs +12 -1
  114. package/dist/locales/pt-BR.d.cts +4 -2
  115. package/dist/locales/pt-BR.d.ts +4 -2
  116. package/dist/locales/pt-BR.js +7 -2
  117. package/dist/locales/pt.cjs +12 -1
  118. package/dist/locales/pt.d.cts +4 -2
  119. package/dist/locales/pt.d.ts +4 -2
  120. package/dist/locales/pt.js +7 -2
  121. package/dist/locales/qu.cjs +12 -1
  122. package/dist/locales/qu.d.cts +4 -2
  123. package/dist/locales/qu.d.ts +4 -2
  124. package/dist/locales/qu.js +7 -2
  125. package/dist/locales/ro.cjs +12 -1
  126. package/dist/locales/ro.d.cts +4 -2
  127. package/dist/locales/ro.d.ts +4 -2
  128. package/dist/locales/ro.js +7 -2
  129. package/dist/locales/ru.cjs +12 -1
  130. package/dist/locales/ru.d.cts +4 -2
  131. package/dist/locales/ru.d.ts +4 -2
  132. package/dist/locales/ru.js +7 -2
  133. package/dist/locales/sk.cjs +12 -1
  134. package/dist/locales/sk.d.cts +4 -2
  135. package/dist/locales/sk.d.ts +4 -2
  136. package/dist/locales/sk.js +7 -2
  137. package/dist/locales/sq.cjs +12 -1
  138. package/dist/locales/sq.d.cts +4 -2
  139. package/dist/locales/sq.d.ts +4 -2
  140. package/dist/locales/sq.js +7 -2
  141. package/dist/locales/sr-Latn.cjs +12 -1
  142. package/dist/locales/sr-Latn.d.cts +4 -2
  143. package/dist/locales/sr-Latn.d.ts +4 -2
  144. package/dist/locales/sr-Latn.js +2 -3
  145. package/dist/locales/sr.cjs +12 -1
  146. package/dist/locales/sr.d.cts +4 -2
  147. package/dist/locales/sr.d.ts +4 -2
  148. package/dist/locales/sr.js +2 -3
  149. package/dist/locales/sv.cjs +12 -1
  150. package/dist/locales/sv.d.cts +4 -2
  151. package/dist/locales/sv.d.ts +4 -2
  152. package/dist/locales/sv.js +7 -2
  153. package/dist/locales/tr.cjs +12 -1
  154. package/dist/locales/tr.d.cts +4 -2
  155. package/dist/locales/tr.d.ts +4 -2
  156. package/dist/locales/tr.js +7 -2
  157. package/dist/locales/uk.cjs +12 -1
  158. package/dist/locales/uk.d.cts +4 -2
  159. package/dist/locales/uk.d.ts +4 -2
  160. package/dist/locales/uk.js +7 -2
  161. package/dist/markdown.cjs +0 -1
  162. package/dist/markdown.js +1 -2
  163. package/dist/mcp-app-sandbox.cjs +0 -1
  164. package/dist/mcp-app-sandbox.js +1 -2
  165. package/dist/mcp-app.cjs +0 -1
  166. package/dist/mcp-app.d.cts +491 -3
  167. package/dist/mcp-app.d.ts +491 -3
  168. package/dist/mcp-app.js +2 -3
  169. package/dist/pipeline.cjs +0 -1
  170. package/dist/pipeline.js +1 -2
  171. package/dist/questions-Dw--IEjT.d.cts +100 -0
  172. package/dist/questions-Dw--IEjT.d.ts +100 -0
  173. package/dist/{types-BmvgYUzF.d.cts → types-CQquuZpl.d.cts} +1 -1
  174. package/dist/{types-Cr5gmUts.d.ts → types-CXZfZVP5.d.ts} +1 -1
  175. package/dist/{mcp-app-entry-BA-Ca39z.d.ts → types-DnBCok3z.d.cts} +2 -488
  176. package/dist/{mcp-app-entry-tybABaHg.d.cts → types-DnBCok3z.d.ts} +2 -488
  177. package/package.json +13 -3
  178. package/dist/canvas.cjs.map +0 -1
  179. package/dist/canvas.js.map +0 -1
  180. package/dist/chunk-4EHUITGU.js.map +0 -1
  181. package/dist/chunk-7O64ZI6Z.js.map +0 -1
  182. package/dist/chunk-A55Q377T.js.map +0 -1
  183. package/dist/chunk-EL2YCROY.js.map +0 -1
  184. package/dist/chunk-GB7RZJMG.js.map +0 -1
  185. package/dist/chunk-KZQB35LS.js.map +0 -1
  186. package/dist/chunk-P2F2P3JC.js.map +0 -1
  187. package/dist/chunk-TPK25QGK.js.map +0 -1
  188. package/dist/index.cjs.map +0 -1
  189. package/dist/index.js.map +0 -1
  190. package/dist/locales/be.cjs.map +0 -1
  191. package/dist/locales/be.js.map +0 -1
  192. package/dist/locales/bg.cjs.map +0 -1
  193. package/dist/locales/bg.js.map +0 -1
  194. package/dist/locales/ca.cjs.map +0 -1
  195. package/dist/locales/ca.js.map +0 -1
  196. package/dist/locales/cs.cjs.map +0 -1
  197. package/dist/locales/cs.js.map +0 -1
  198. package/dist/locales/da.cjs.map +0 -1
  199. package/dist/locales/da.js.map +0 -1
  200. package/dist/locales/de.cjs.map +0 -1
  201. package/dist/locales/de.js.map +0 -1
  202. package/dist/locales/el.cjs.map +0 -1
  203. package/dist/locales/el.js.map +0 -1
  204. package/dist/locales/en.cjs.map +0 -1
  205. package/dist/locales/en.js.map +0 -1
  206. package/dist/locales/es-419.cjs.map +0 -1
  207. package/dist/locales/es-419.js.map +0 -1
  208. package/dist/locales/es.cjs.map +0 -1
  209. package/dist/locales/es.js.map +0 -1
  210. package/dist/locales/fi.cjs.map +0 -1
  211. package/dist/locales/fi.js.map +0 -1
  212. package/dist/locales/fr-CA.cjs.map +0 -1
  213. package/dist/locales/fr-CA.js.map +0 -1
  214. package/dist/locales/fr.cjs.map +0 -1
  215. package/dist/locales/fr.js.map +0 -1
  216. package/dist/locales/gn.cjs.map +0 -1
  217. package/dist/locales/gn.js.map +0 -1
  218. package/dist/locales/hr.cjs.map +0 -1
  219. package/dist/locales/hr.js.map +0 -1
  220. package/dist/locales/ht.cjs.map +0 -1
  221. package/dist/locales/ht.js.map +0 -1
  222. package/dist/locales/hu.cjs.map +0 -1
  223. package/dist/locales/hu.js.map +0 -1
  224. package/dist/locales/index.cjs.map +0 -1
  225. package/dist/locales/index.js.map +0 -1
  226. package/dist/locales/it.cjs.map +0 -1
  227. package/dist/locales/it.js.map +0 -1
  228. package/dist/locales/nb.cjs.map +0 -1
  229. package/dist/locales/nb.js.map +0 -1
  230. package/dist/locales/nl.cjs.map +0 -1
  231. package/dist/locales/nl.js.map +0 -1
  232. package/dist/locales/pl.cjs.map +0 -1
  233. package/dist/locales/pl.js.map +0 -1
  234. package/dist/locales/pt-BR.cjs.map +0 -1
  235. package/dist/locales/pt-BR.js.map +0 -1
  236. package/dist/locales/pt.cjs.map +0 -1
  237. package/dist/locales/pt.js.map +0 -1
  238. package/dist/locales/qu.cjs.map +0 -1
  239. package/dist/locales/qu.js.map +0 -1
  240. package/dist/locales/ro.cjs.map +0 -1
  241. package/dist/locales/ro.js.map +0 -1
  242. package/dist/locales/ru.cjs.map +0 -1
  243. package/dist/locales/ru.js.map +0 -1
  244. package/dist/locales/sk.cjs.map +0 -1
  245. package/dist/locales/sk.js.map +0 -1
  246. package/dist/locales/sq.cjs.map +0 -1
  247. package/dist/locales/sq.js.map +0 -1
  248. package/dist/locales/sr-Latn.cjs.map +0 -1
  249. package/dist/locales/sr-Latn.js.map +0 -1
  250. package/dist/locales/sr.cjs.map +0 -1
  251. package/dist/locales/sr.js.map +0 -1
  252. package/dist/locales/sv.cjs.map +0 -1
  253. package/dist/locales/sv.js.map +0 -1
  254. package/dist/locales/tr.cjs.map +0 -1
  255. package/dist/locales/tr.js.map +0 -1
  256. package/dist/locales/uk.cjs.map +0 -1
  257. package/dist/locales/uk.js.map +0 -1
  258. package/dist/markdown.cjs.map +0 -1
  259. package/dist/markdown.js.map +0 -1
  260. package/dist/mcp-app-sandbox.cjs.map +0 -1
  261. package/dist/mcp-app-sandbox.js.map +0 -1
  262. package/dist/mcp-app.cjs.map +0 -1
  263. package/dist/mcp-app.js.map +0 -1
  264. package/dist/pipeline.cjs.map +0 -1
  265. package/dist/pipeline.js.map +0 -1
@@ -1,3 +1,491 @@
1
- export { V as APP_DEFAULT_HEIGHT, X as APP_HEIGHT_CEILING, Y as APP_HEIGHT_SCREENS, Z as APP_MAX_HEIGHT, _ as APP_MIN_HEIGHT, $ as AppDownload, a0 as AppFileSaverEnv, a1 as AppLink, a2 as AppReadyDownload, a3 as AppResourceReader, a4 as MCP_APP_DISPLAY_MODES, a5 as MCP_APP_MAX_ARGS_CHARS, a6 as MCP_APP_MAX_DOWNLOAD_BYTES, a7 as MCP_APP_MAX_FILE_NAME_CHARS, a8 as MCP_APP_MAX_IN_FLIGHT, a9 as MCP_APP_MAX_MESSAGE_CHARS, aa as MCP_APP_MAX_URL_CHARS, ab as MCP_APP_NOTIFICATIONS, ac as MCP_APP_OPTIONAL_REQUESTS, ad as MCP_APP_PROTOCOL_VERSION, ae as MCP_APP_REFUSED, af as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, ag as MCP_APP_REFUSED_DOWNLOAD_TYPES, ah as MCP_APP_RELAY, ai as MCP_APP_REQUESTS, aj as MCP_APP_SANDBOX_FRAME_TOKENS, ak as MCP_APP_SANDBOX_GRACE_MS, al as MCP_APP_SANDBOX_SERVER, am as MCP_APP_SANDBOX_TIMEOUT_MS, an as McpAppBridge, ao as McpAppBridgeHandlers, ap as McpAppBridgeOptions, aq as McpAppDisplayMode, ar as McpAppRpcError, as as McpAppRpcMessage, at as McpAppSandboxInput, au as McpAppSandboxLink, av as McpAppSandboxLinkOptions, aw as McpAppSandboxOptions, g as McpAppSandboxReason, ax as McpAppSandboxTarget, ay as appDisplayModeAllowed, az as appDownloadOf, aA as appDownloadRefusal, aB as appFileExtensionOf, aC as appFileNameOf, aD as appGestureOf, aE as appHeightCap, aF as appLinkOf, aG as appMessageTextOf, aH as appMimeTypeOf, aI as appSamplingErrorOf, aJ as buildMcpAppDocument, aK as buildMcpAppSandboxShell, aL as clampAppHeight, aM as grantedAppCsp, aN as isApprovalOfApp, aO as mcpAppCsp, aP as mcpAppHostCapabilities, aQ as mcpAppSandboxProxyUrl, aR as mcpAppSandboxShellCsp, aS as mcpAppSandboxTarget, aT as nextAppHeightCap, aU as resolveAppDownload, aV as saveAppFile } from './mcp-app-entry-tybABaHg.cjs';
2
- export { b as MCP_APP_POLICY_MAX_ORIGINS, c as MCP_APP_POLICY_TOKEN_MAX_CHARS, d as MCP_APP_SANDBOX_PROXY_READY, e as MCP_APP_SANDBOX_RESOURCE_READY, f as MCP_APP_SCHEME_PARAM, a as McpAppColorScheme, M as McpAppPolicyOrigins, i as isMcpAppSandboxMessage, m as mcpAppColorScheme, g as mcpAppPolicy, h as mcpAppPolicyOfToken, j as mcpAppPolicyOrigin, k as mcpAppPolicyToken } from './mcp-app-policy-DXKQ2jjM.cjs';
3
- import '@dudko.dev/agent-web';
1
+ import { McpAppCsp } from '@dudko.dev/agent-web';
2
+ import { a as McpAppColorScheme } from './mcp-app-policy-DXKQ2jjM.cjs';
3
+ export { b as MCP_APP_POLICY_MAX_ORIGINS, c as MCP_APP_POLICY_TOKEN_MAX_CHARS, d as MCP_APP_SANDBOX_PROXY_READY, e as MCP_APP_SANDBOX_RESOURCE_READY, f as MCP_APP_SCHEME_PARAM, M as McpAppPolicyOrigins, i as isMcpAppSandboxMessage, m as mcpAppColorScheme, g as mcpAppPolicy, h as mcpAppPolicyOfToken, j as mcpAppPolicyOrigin, k as mcpAppPolicyToken } from './mcp-app-policy-DXKQ2jjM.cjs';
4
+ import { ApprovalView, AppView } from './index.cjs';
5
+
6
+ /**
7
+ * MCP Apps, the host's side: the security core of `<McpAppFrame>`, as pure code - no React, no
8
+ * DOM - so every guard is unit-tested (`tests/apps.test.ts`) and proved in a real browser
9
+ * (`e2e/apps.spec.ts`).
10
+ *
11
+ * The frame: an app is third-party HTML WITH scripts that must talk to the page, so it gets the
12
+ * HTML preview's boundary (`html-preview.ts`) and one addition, a relay:
13
+ *
14
+ * 1. The outer `<iframe sandbox="allow-scripts">` (never `allow-same-origin`): an opaque origin,
15
+ * no access to the page's DOM, storage, IndexedDB (the key vault) or cookies; no top
16
+ * navigation, popups, forms, modals, downloads. No `allow` attribute: no camera, microphone,
17
+ * geolocation or clipboard, whatever the app asked for.
18
+ * 2. It holds a SHELL of ours (`buildMcpAppDocument`): the policy built from the resource's
19
+ * declared origins and nothing else (`mcpAppCsp`), one inner frame - the app, also
20
+ * `sandbox="allow-scripts"`, with the same policy first in its own document - and a relay
21
+ * script. The shell's `frame-src 'none'` is what stops the app navigating itself (a frame
22
+ * may always navigate itself; only the EMBEDDING document's policy decides where to).
23
+ * 3. The relay forwards messages between the page and the app, and nothing else: from the
24
+ * app's window to the page, from the page to the app's window, never the
25
+ * `ui/notifications/sandbox-*` messages the specification reserves. The app talks to
26
+ * `window.parent` as the extension's SDK does; the page accepts messages only from the outer
27
+ * frame (`event.source`), so the app writing to `window.top` directly is ignored.
28
+ * 4. The bridge (`McpAppBridge`) answers the app: a method allow-list, checked parameters, a
29
+ * cap on requests in flight, and every request that DOES something (a tool call, a link, a
30
+ * message) handed to the host, which asks the user.
31
+ *
32
+ * That is the default. Opt-in, the app runs on an origin of its own instead, behind a sandbox
33
+ * page the host serves on another origin (the specification's "sandbox proxy"): 1 - 3 change
34
+ * (see "An app on an origin of its own" below and `mcp-app-policy.ts`), 4 does not.
35
+ */
36
+ /** The revision of the extension this host speaks. */
37
+ declare const MCP_APP_PROTOCOL_VERSION = "2026-01-26";
38
+ /** An app's frame height, before it says how tall it is. */
39
+ declare const APP_DEFAULT_HEIGHT = 360;
40
+ /**
41
+ * The frame's height is the host's: the app's wish, clamped to `APP_MIN_HEIGHT` .. the cap. The
42
+ * cap is `appHeightCap` of the chat's visible height - a few screens, never less than
43
+ * `APP_MAX_HEIGHT` - so an app as tall as its content has no scroller of its own inside the
44
+ * transcript (one scroller: the chat's), and an app that grows forever stops there.
45
+ */
46
+ declare const APP_MIN_HEIGHT = 120;
47
+ /** The least the cap is (and the cap where nothing says how tall the chat is). */
48
+ declare const APP_MAX_HEIGHT = 800;
49
+ /** The cap is this many of the chat's visible heights. */
50
+ declare const APP_HEIGHT_SCREENS = 3;
51
+ /** ... and never more than this, whatever the screen. */
52
+ declare const APP_HEIGHT_CEILING = 6000;
53
+ /**
54
+ * The tallest an inline app's frame is drawn, for a chat body (or viewport) `viewHeight` px tall:
55
+ * `APP_HEIGHT_SCREENS` of it, rounded down to 100 px (the app is told it in
56
+ * `containerDimensions.maxHeight`, and a resize of a few pixels must not tell it again), at least
57
+ * `APP_MAX_HEIGHT`, at most `APP_HEIGHT_CEILING`.
58
+ */
59
+ declare const appHeightCap: (viewHeight: number | undefined) => number;
60
+ /**
61
+ * The cap of a frame that is already drawn, when the chat's height changes: `appHeightCap` of the
62
+ * new height, but never less than the cap the frame had (`current`) - a rotation, a keyboard
63
+ * resizing the page or a relayout for a touch screen must not give an app that was drawn whole a
64
+ * scroller of its own. The cap only grows while the frame is shown (at most
65
+ * `APP_HEIGHT_CEILING`); a new frame starts from the cap of its moment.
66
+ */
67
+ declare const nextAppHeightCap: (current: number, viewHeight: number | undefined) => number;
68
+ /** At most this many requests of one app wait at once (tool calls, links, messages). */
69
+ declare const MCP_APP_MAX_IN_FLIGHT = 3;
70
+ /** A message an app puts in the chat: at most this many characters. */
71
+ declare const MCP_APP_MAX_MESSAGE_CHARS = 4000;
72
+ /** A link an app asks to open: at most this many characters. */
73
+ declare const MCP_APP_MAX_URL_CHARS = 2048;
74
+ /** The arguments of a tool call an app makes: at most this many characters as JSON. */
75
+ declare const MCP_APP_MAX_ARGS_CHARS = 64000;
76
+ /** An app's wish for a height, as the frame draws it: within `APP_MIN_HEIGHT` .. `max` (the cap). */
77
+ declare const clampAppHeight: (height: number, max?: number) => number;
78
+ /**
79
+ * The policy of an app's document: scripts and styles inline, `data:` / `blob:` media, and the
80
+ * network ONLY where the resource declared it - `connectDomains` for `fetch` / XHR / WebSocket,
81
+ * `resourceDomains` for scripts, styles, images, fonts and media. Nothing declared, nothing
82
+ * reached. Nested frames, workers, plugins, forms and `<base>` are refused whatever was declared
83
+ * (`frameDomains` / `baseUriDomains` are not granted: a frame the app may embed would also be a
84
+ * place it may navigate itself to). Each entry is checked again with the core's `mcpAppOrigin`.
85
+ */
86
+ declare const mcpAppCsp: (csp?: Partial<McpAppCsp>) => string;
87
+ /** The origins the policy actually grants: what the app is told in `hostCapabilities.sandbox`. */
88
+ declare const grantedAppCsp: (csp?: Partial<McpAppCsp>) => {
89
+ connectDomains: string[];
90
+ resourceDomains: string[];
91
+ };
92
+ /**
93
+ * The relay of the shell: the app's messages to the page, the page's to the app - matched by
94
+ * `event.source`, never by anything the message says - and not the reserved
95
+ * `ui/notifications/sandbox-*` ones. It reads nothing else and runs nothing it is sent.
96
+ */
97
+ declare const MCP_APP_RELAY: string;
98
+ /**
99
+ * What goes into the OUTER frame's `srcdoc`: the shell (the app's policy first, one inner frame
100
+ * that fills it, the relay) carrying the app, escaped, as the inner frame's `srcdoc` - with the
101
+ * same policy first in it. Give the outer `<iframe>` `sandbox="allow-scripts"` and nothing else.
102
+ * `scheme` (the theme the app is told) is declared by the shell and its inner frame; give the
103
+ * outer `<iframe>` the same `color-scheme`. Only `light` / `dark` are declared.
104
+ */
105
+ declare const buildMcpAppDocument: (html: string, csp?: Partial<McpAppCsp>, scheme?: McpAppColorScheme) => string;
106
+ /** A link an app asks to open, taken apart for the prompt: the host is what the user checks. */
107
+ interface AppLink {
108
+ /** The normalised URL (what is opened). */
109
+ href: string;
110
+ /** `https://` */
111
+ scheme: string;
112
+ /** The host (and port), as the browser will go there - an internationalised name in punycode. */
113
+ host: string;
114
+ /** Everything after the host. */
115
+ rest: string;
116
+ }
117
+ /** An `http(s)` URL with a host and no credentials, at most `MCP_APP_MAX_URL_CHARS`; else none. */
118
+ declare const appLinkOf: (value: unknown) => AppLink | undefined;
119
+ /**
120
+ * The text of a `ui/message` an app sends: text blocks only (one, or a list of at most 20),
121
+ * joined, without invisible characters, at most `MCP_APP_MAX_MESSAGE_CHARS`. Anything else -
122
+ * an image, a resource, an empty or a longer text - is refused (`undefined`).
123
+ */
124
+ declare const appMessageTextOf: (content: unknown) => string | undefined;
125
+ /** A JSON-RPC message as the bridge sends it. */
126
+ type McpAppRpcMessage = {
127
+ jsonrpc: '2.0';
128
+ id: string | number;
129
+ method: string;
130
+ params?: unknown;
131
+ } | {
132
+ jsonrpc: '2.0';
133
+ method: string;
134
+ params?: unknown;
135
+ } | {
136
+ jsonrpc: '2.0';
137
+ id: string | number;
138
+ result: unknown;
139
+ } | {
140
+ jsonrpc: '2.0';
141
+ id: string | number;
142
+ error: {
143
+ code: number;
144
+ message: string;
145
+ };
146
+ };
147
+ /** The requests an app may make of this host. Any other is answered "method not found". */
148
+ declare const MCP_APP_REQUESTS: readonly ["ui/initialize", "ping", "tools/call", "ui/open-link", "ui/message", "ui/request-display-mode"];
149
+ /**
150
+ * Requests answered only when the host turned the feature on (`downloadFile` / `sampling` in
151
+ * `hostCapabilities`, a handler given to the bridge); otherwise "method not found", as before.
152
+ */
153
+ declare const MCP_APP_OPTIONAL_REQUESTS: readonly ["ui/download-file", "sampling/createMessage"];
154
+ /** The notifications this host reads. Any other is dropped. */
155
+ declare const MCP_APP_NOTIFICATIONS: readonly ["ui/notifications/initialized", "ui/notifications/size-changed"];
156
+ /** An error the bridge answers with: a JSON-RPC code and a message for the app. */
157
+ declare class McpAppRpcError extends Error {
158
+ readonly code: number;
159
+ constructor(code: number, message: string);
160
+ }
161
+ /** The host refused: the user said no, too many requests, not initialized. */
162
+ declare const MCP_APP_REFUSED = -32000;
163
+ /** How an app is shown (`hostContext.displayMode`). This host offers `inline` and `fullscreen`. */
164
+ type McpAppDisplayMode = 'inline' | 'fullscreen' | 'pip';
165
+ /** The modes the extension names (a request for any other is invalid). */
166
+ declare const MCP_APP_DISPLAY_MODES: readonly McpAppDisplayMode[];
167
+ /** A file an app asks the host to save (`ui/download-file`), as checked by `appDownloadOf`. */
168
+ type AppDownload = {
169
+ kind: 'embedded';
170
+ /** The file name, sanitized (`appFileNameOf`): what it is saved as. */
171
+ name: string;
172
+ /** The type the app declared, if it is a MIME type at all. */
173
+ mimeType?: string;
174
+ bytes: Uint8Array;
175
+ } | {
176
+ /** A `resource_link`: read with `resources/read` on the app's own server, never fetched. */
177
+ kind: 'link';
178
+ uri: string;
179
+ name: string;
180
+ mimeType?: string;
181
+ };
182
+ /** What the host does for an app (the user is asked inside these, never by the bridge). */
183
+ interface McpAppBridgeHandlers {
184
+ /** A `tools/call`: resolves with the result the app is given; throws when refused. */
185
+ callTool: (name: string, args: Record<string, unknown>) => Promise<unknown>;
186
+ /** A link (already checked): resolves true when it was opened, false when the user said no. */
187
+ openLink: (link: AppLink) => Promise<boolean>;
188
+ /** A message (already cleaned): resolves true when it was accepted, false when not. */
189
+ message: (text: string) => Promise<boolean>;
190
+ /** The app's wish for a height (the caller clamps it). */
191
+ resize: (height: number) => void;
192
+ /**
193
+ * `ui/request-display-mode` for a mode the host offers and the app declared (or `inline`):
194
+ * the mode the app is in afterwards - the host may say no and answer the current one.
195
+ * Without it, an app stays where it is.
196
+ */
197
+ displayMode?: (mode: McpAppDisplayMode) => McpAppDisplayMode | Promise<McpAppDisplayMode>;
198
+ /**
199
+ * `ui/download-file` (already checked): true once the file was saved, false when the user said
200
+ * no. Without it the method is not offered (`hostCapabilities.downloadFile` absent).
201
+ */
202
+ downloadFile?: (file: AppDownload) => Promise<boolean>;
203
+ /**
204
+ * `sampling/createMessage`: the result for the app; throws (an `McpAppRpcError`) when refused.
205
+ * Without it the method is not offered (`hostCapabilities.sampling` absent).
206
+ */
207
+ sample?: (params: Record<string, unknown>) => Promise<unknown>;
208
+ }
209
+ interface McpAppBridgeOptions {
210
+ /** Send a message to the app (the page posts it to the outer frame). */
211
+ post: (message: McpAppRpcMessage) => void;
212
+ handlers: McpAppBridgeHandlers;
213
+ hostInfo: {
214
+ name: string;
215
+ version: string;
216
+ };
217
+ hostCapabilities: Record<string, unknown>;
218
+ hostContext: Record<string, unknown>;
219
+ /** The tool call's arguments: sent once the app says it is initialized. */
220
+ toolInput: Record<string, unknown>;
221
+ /** Its result; `undefined` = the app is told the call was cancelled (`reason`). */
222
+ toolResult?: unknown;
223
+ cancelledReason?: string;
224
+ maxInFlight?: number;
225
+ }
226
+ /**
227
+ * One app's conversation with the host (the extension's JSON-RPC over `postMessage`). It never
228
+ * touches the DOM: `receive` is given what arrived - from the right frame, the caller checked
229
+ * `event.source` - and `post` sends. Requests outside the allow-list get "method not found";
230
+ * before `ui/initialize`, only `ping` is answered; parameters are checked before a handler sees
231
+ * them; at most `maxInFlight` requests run at once. The tool's input and result are sent once,
232
+ * after the app's `ui/notifications/initialized`, as the specification requires.
233
+ */
234
+ declare class McpAppBridge {
235
+ private readonly o;
236
+ private initializeSeen;
237
+ private delivered;
238
+ private inFlight;
239
+ private closed;
240
+ private seq;
241
+ private appModes;
242
+ constructor(options: McpAppBridgeOptions);
243
+ /** The app said it is ready, and was given the tool's input and result. */
244
+ get initialized(): boolean;
245
+ /** Stop answering: the frame is gone or was reloaded. */
246
+ close(): void;
247
+ /** Tell the app it is being torn down (not waited for: the frame goes anyway). */
248
+ teardown(reason: string): void;
249
+ /** The display modes the app declared at `ui/initialize` (undefined: none, or not yet). */
250
+ get appDisplayModes(): readonly McpAppDisplayMode[] | undefined;
251
+ /** How the app is shown now (`hostContext.displayMode`). */
252
+ get displayMode(): McpAppDisplayMode;
253
+ /** Tell an initialized app that part of the host context changed (the theme). */
254
+ updateContext(patch: Record<string, unknown>): void;
255
+ /** One message from the app's frame. */
256
+ receive(data: unknown): void;
257
+ private send;
258
+ private error;
259
+ private notification;
260
+ private request;
261
+ }
262
+ /**
263
+ * What this host tells an app it can do (`hostCapabilities` of `ui/initialize`): only what it
264
+ * does. `downloadFile` and `sampling` (never `sampling.tools`) only when the host turned them on.
265
+ */
266
+ declare const mcpAppHostCapabilities: (csp?: Partial<McpAppCsp>, features?: {
267
+ downloadFile?: boolean;
268
+ sampling?: boolean;
269
+ }) => Record<string, unknown>;
270
+ /**
271
+ * Whether a display mode an app asks for may be given: `inline` always (the way back needs no
272
+ * permission); any other only when the host offers it AND the app declared it in
273
+ * `appCapabilities.availableDisplayModes` - an app that declared nothing stays inline (the
274
+ * specification lets a host decline it).
275
+ */
276
+ declare const appDisplayModeAllowed: (o: {
277
+ requested: McpAppDisplayMode;
278
+ current: McpAppDisplayMode;
279
+ host: readonly McpAppDisplayMode[];
280
+ app: readonly McpAppDisplayMode[] | undefined;
281
+ }) => boolean;
282
+ /**
283
+ * Whether the user just acted INSIDE the app's frame: the page's frame element has the focus
284
+ * (a click or a key in a frame focuses it) and the page has transient user activation (an
285
+ * activation in a frame reaches every page above it, for a few seconds). Where the browser has
286
+ * no `navigator.userActivation`, the focus alone.
287
+ */
288
+ declare const appGestureOf: (o: {
289
+ focused: boolean;
290
+ activation: boolean | undefined;
291
+ }) => boolean;
292
+ /** A file an app asks to save: at most this many bytes. */
293
+ declare const MCP_APP_MAX_DOWNLOAD_BYTES: number;
294
+ /** A saved file's name: at most this many characters (the extension kept). */
295
+ declare const MCP_APP_MAX_FILE_NAME_CHARS = 100;
296
+ /**
297
+ * Extensions this host never saves: programs, scripts, installers, shortcuts, disk images - and
298
+ * documents a browser runs scripts in when they are opened (HTML, SVG, XML).
299
+ */
300
+ declare const MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS: readonly string[];
301
+ /** Types this host never saves (the same kinds), and any `…+xml`. */
302
+ declare const MCP_APP_REFUSED_DOWNLOAD_TYPES: readonly string[];
303
+ /** A declared type as a bare MIME type (`text/plain`), or undefined when it is not one. */
304
+ declare const appMimeTypeOf: (value: unknown) => string | undefined;
305
+ /**
306
+ * The name a file is saved under: the last segment of a path or URI (`file:///x/report.json` →
307
+ * `report.json`; percent-encoding decoded, and split again), without what cannot be seen or
308
+ * reserved characters (`<>:"/\|?*`, controls), no leading dots (a hidden file) or trailing dots
309
+ * and spaces, not a Windows device name, at most `MCP_APP_MAX_FILE_NAME_CHARS` with the extension
310
+ * kept; `download` when nothing is left.
311
+ */
312
+ declare const appFileNameOf: (value: unknown) => string;
313
+ /** The extension of a (sanitized) file name, lowercased, without the dot; '' when none. */
314
+ declare const appFileExtensionOf: (name: string) => string;
315
+ /**
316
+ * Why a file may not be saved, or undefined when it may: an extension or a type of the refused
317
+ * lists (a program, a script, a page a browser would run), checked on the sanitized name and
318
+ * the declared type both.
319
+ */
320
+ declare const appDownloadRefusal: (name: string, mimeType?: string) => string | undefined;
321
+ /**
322
+ * What `ui/download-file` asks for, checked - or why not (a message for the app): ONE item of
323
+ * `contents` (one file per request, one prompt); an `EmbeddedResource` (`resource.uri` names
324
+ * it, `text` as UTF-8 or base64 `blob`, at most `maxBytes`) or a `ResourceLink` (a one-line URI,
325
+ * read later from the app's own server: the name is its last segment, else its `name`); the
326
+ * name sanitized and the name and type not refused (`appDownloadRefusal`).
327
+ */
328
+ declare const appDownloadOf: (params: unknown, maxBytes?: number) => AppDownload | string;
329
+ /** A file ready to be put to the user: its name, type, bytes, and where the bytes came from. */
330
+ interface AppReadyDownload {
331
+ name: string;
332
+ mimeType?: string;
333
+ bytes: Uint8Array;
334
+ source: 'embedded' | 'link';
335
+ }
336
+ /** How a linked file is read: `resources/read` on the app's OWN server (the connection's). */
337
+ type AppResourceReader = (server: string, uri: string, options: {
338
+ signal?: AbortSignal;
339
+ maxBytes: number;
340
+ }) => Promise<{
341
+ mimeType?: string;
342
+ bytes: Uint8Array;
343
+ }>;
344
+ /**
345
+ * The bytes of a checked file: an embedded one as it came; a linked one read from `server` -
346
+ * the app's own - through `read` (never a fetch of its URI), at most `maxBytes`, and the type the
347
+ * SERVER gives it judged again (an app cannot pass a page off as a text file through a link).
348
+ * Throws an `McpAppRpcError` for the app: no reader, a failed read, a refused type, too large.
349
+ */
350
+ declare const resolveAppDownload: (file: AppDownload, server: string, read: AppResourceReader | undefined, signal?: AbortSignal, maxBytes?: number) => Promise<AppReadyDownload>;
351
+ /**
352
+ * The error an app is told when the agent did not answer its sampling request: the core's
353
+ * `AppSamplingError` carries its JSON-RPC code (`-1`: the user said no, `-32602`: not a request
354
+ * this host takes, `-32000`: too many); anything else is a refusal.
355
+ */
356
+ declare const appSamplingErrorOf: (err: unknown) => McpAppRpcError;
357
+ /** What `saveAppFile` uses of the page (passed in: this module touches no DOM by itself). */
358
+ interface AppFileSaverEnv {
359
+ document: {
360
+ createElement: (tag: 'a') => HTMLAnchorElement;
361
+ body: {
362
+ append: (n: Node) => void;
363
+ };
364
+ };
365
+ URL: {
366
+ createObjectURL: (blob: Blob) => string;
367
+ revokeObjectURL: (url: string) => void;
368
+ };
369
+ setTimeout: (fn: () => void, ms: number) => unknown;
370
+ }
371
+ /**
372
+ * Save a checked file the user agreed to: a `Blob` of type `application/octet-stream` (the
373
+ * browser never renders or sniffs it as a page), a `blob:` URL of THIS page, an `<a download>`
374
+ * made here and clicked once. No navigation, no `data:` or `javascript:` URL, nothing of the app
375
+ * in the page; the URL is revoked a minute later.
376
+ */
377
+ declare const saveAppFile: (file: {
378
+ name: string;
379
+ bytes: Uint8Array;
380
+ }, env: AppFileSaverEnv) => void;
381
+ /** `<AgentChat appSandbox>` / `useMcpAppHost({ sandbox })`. */
382
+ interface McpAppSandboxOptions {
383
+ /**
384
+ * The sandbox page's base URL on another origin you serve (`mcpAppSandboxResponse` of the
385
+ * `./mcp-app-sandbox` entry), e.g. `https://apps.example.com/sandbox/v1`; an app's frame loads
386
+ * `<url>/<policy>`. `{server}` in the host name gives each server an origin of its own
387
+ * (`https://{server}.apps.example.com/sandbox/v1`; the server's name must be a DNS label - it
388
+ * needs a wildcard certificate). `https://` only; `http://` on `localhost` / `127.0.0.1`.
389
+ */
390
+ url: string;
391
+ /** How long a frame waits for the page's handshake before it falls back (default 5000 ms). */
392
+ timeoutMs?: number;
393
+ }
394
+ /** Why an app runs in the opaque frame although a sandbox URL is set. */
395
+ type McpAppSandboxReason = 'invalid' | 'insecure' | 'same-origin' | 'no-page-origin' | 'server-name' | 'too-many-origins' | 'no-answer';
396
+ type McpAppSandboxTarget = {
397
+ ok: true;
398
+ origin: string;
399
+ base: string;
400
+ } | {
401
+ ok: false;
402
+ reason: McpAppSandboxReason;
403
+ };
404
+ /** The placeholder for the server's name in `McpAppSandboxOptions.url`. */
405
+ declare const MCP_APP_SANDBOX_SERVER = "{server}";
406
+ declare const MCP_APP_SANDBOX_TIMEOUT_MS = 5000;
407
+ /** After the shell has loaded (the proxy loaded or failed), the handshake gets this much longer. */
408
+ declare const MCP_APP_SANDBOX_GRACE_MS = 1000;
409
+ /**
410
+ * The sandbox flags of the shell's frame and of the proxy's: scripts and an origin - the shell
411
+ * must keep YOUR origin (else the proxy below it would get an opaque one) and runs no script; the
412
+ * proxy is on the sandbox origin. Nothing else: no navigation, popup, form, modal, download.
413
+ */
414
+ declare const MCP_APP_SANDBOX_FRAME_TOKENS = "allow-scripts allow-same-origin";
415
+ /**
416
+ * Where an app of `server` runs, for a page on `pageOrigin`: the sandbox's origin and base URL,
417
+ * or why not. Refused: not a URL; credentials, a query or a fragment; not `https://` (`http://`
418
+ * only on `localhost` / `127.0.0.1`); a path a policy cannot name; `{server}` anywhere but the
419
+ * host name, more than once, or a server name that is not a lowercase DNS label; a page without
420
+ * an origin; and the sandbox on the PAGE'S OWN origin - `allow-same-origin` there would hand the
421
+ * app your storage and the key vault.
422
+ */
423
+ declare const mcpAppSandboxTarget: (options: McpAppSandboxOptions | undefined, server: string, pageOrigin: string | undefined) => McpAppSandboxTarget;
424
+ /** The proxy page's URL for an app's declared origins (`<base>/<policy>`), or none if too long. */
425
+ declare const mcpAppSandboxProxyUrl: (base: string, csp?: Partial<McpAppCsp>) => string | undefined;
426
+ /**
427
+ * The policy of the shell: no script at all, and frames from the proxy's exact URL only - a
428
+ * `frame-src` with a path matches that path and nothing else (the query is not part of the
429
+ * match), so the proxy's frame can never be navigated anywhere else.
430
+ */
431
+ declare const mcpAppSandboxShellCsp: (proxyUrl: string) => string;
432
+ /**
433
+ * What goes into the OUTER frame's `srcdoc` in sandbox mode: the shell - its policy first, one
434
+ * frame of the proxy page, no script, nothing of the app. Give the outer `<iframe>`
435
+ * `sandbox={MCP_APP_SANDBOX_FRAME_TOKENS}` and nothing else. Throws on a URL that is not a proxy
436
+ * URL this package builds (`mcpAppSandboxProxyUrl`). `scheme` is declared by the shell and its
437
+ * frame, and handed to the proxy page as `?scheme=` on its frame's `src` ONLY: the shell's
438
+ * `frame-src` stays the path (a source expression carries no query, and a path source ignores
439
+ * one), so the pin is the same with or without it.
440
+ */
441
+ declare const buildMcpAppSandboxShell: (proxyUrl: string, scheme?: McpAppColorScheme) => string;
442
+ /** What one message from the proxy's frame is, for the page (`McpAppSandboxLink.receive`). */
443
+ type McpAppSandboxInput = 'drop' | 'ready' | 'broken' | 'app';
444
+ interface McpAppSandboxLinkOptions {
445
+ /** The sandbox origin (`mcpAppSandboxTarget(…).origin`). */
446
+ origin: string;
447
+ /** The app, as read from its server: sent once, on the proxy's first ready. */
448
+ html: string;
449
+ csp?: Partial<McpAppCsp>;
450
+ /** Post to the proxy's window. Always called with the sandbox origin as the target - never `*`. */
451
+ post: (message: unknown, targetOrigin: string) => void;
452
+ }
453
+ /**
454
+ * The page's side of the sandbox proxy, without the DOM: which messages are the proxy's, the
455
+ * handshake, and every post to the sandbox origin. A message is the proxy's only when it comes
456
+ * from the proxy's window (`event.source`) AND from the sandbox origin (`event.origin`). The
457
+ * first `sandbox-proxy-ready` is answered with the app (`sandbox-resource-ready`); another one
458
+ * means the proxy page was loaded again - by the app - and the link breaks (`'broken'`: stop the
459
+ * app). Every other `ui/notifications/sandbox-*` message is dropped; nothing reaches the bridge
460
+ * (`'app'`) before the app was handed over.
461
+ */
462
+ declare class McpAppSandboxLink {
463
+ private readonly o;
464
+ private state;
465
+ constructor(options: McpAppSandboxLinkOptions);
466
+ /** The proxy answered and was given the app. */
467
+ get ready(): boolean;
468
+ /** The proxy page was loaded a second time: the app must be stopped. */
469
+ get broken(): boolean;
470
+ /** Whether a message event is the proxy's: its window, and the sandbox origin. */
471
+ accepts(event: {
472
+ source: unknown;
473
+ origin: string;
474
+ }, proxy: unknown): boolean;
475
+ receive(event: {
476
+ source: unknown;
477
+ origin: string;
478
+ data: unknown;
479
+ }, proxy: unknown): McpAppSandboxInput;
480
+ /** Send a message to the app, through the proxy, to the sandbox origin. Nothing once broken. */
481
+ post(message: unknown): void;
482
+ close(): void;
483
+ }
484
+ /**
485
+ * A pending consent request of THIS frame (`ApprovalView.app.frame`, set by `useAgent`); for a
486
+ * request that names no frame (a host's own gate), one of this app's server and resource.
487
+ */
488
+ declare const isApprovalOfApp: (approval: ApprovalView, app: AppView) => boolean;
489
+
490
+ export { APP_DEFAULT_HEIGHT, APP_HEIGHT_CEILING, APP_HEIGHT_SCREENS, APP_MAX_HEIGHT, APP_MIN_HEIGHT, MCP_APP_DISPLAY_MODES, MCP_APP_MAX_ARGS_CHARS, MCP_APP_MAX_DOWNLOAD_BYTES, MCP_APP_MAX_FILE_NAME_CHARS, MCP_APP_MAX_IN_FLIGHT, MCP_APP_MAX_MESSAGE_CHARS, MCP_APP_MAX_URL_CHARS, MCP_APP_NOTIFICATIONS, MCP_APP_OPTIONAL_REQUESTS, MCP_APP_PROTOCOL_VERSION, MCP_APP_REFUSED, MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, MCP_APP_REFUSED_DOWNLOAD_TYPES, MCP_APP_RELAY, MCP_APP_REQUESTS, MCP_APP_SANDBOX_FRAME_TOKENS, MCP_APP_SANDBOX_GRACE_MS, MCP_APP_SANDBOX_SERVER, MCP_APP_SANDBOX_TIMEOUT_MS, McpAppBridge, McpAppColorScheme, McpAppRpcError, McpAppSandboxLink, appDisplayModeAllowed, appDownloadOf, appDownloadRefusal, appFileExtensionOf, appFileNameOf, appGestureOf, appHeightCap, appLinkOf, appMessageTextOf, appMimeTypeOf, appSamplingErrorOf, buildMcpAppDocument, buildMcpAppSandboxShell, clampAppHeight, grantedAppCsp, isApprovalOfApp, mcpAppCsp, mcpAppHostCapabilities, mcpAppSandboxProxyUrl, mcpAppSandboxShellCsp, mcpAppSandboxTarget, nextAppHeightCap, resolveAppDownload, saveAppFile };
491
+ export type { AppDownload, AppFileSaverEnv, AppLink, AppReadyDownload, AppResourceReader, McpAppBridgeHandlers, McpAppBridgeOptions, McpAppDisplayMode, McpAppRpcMessage, McpAppSandboxInput, McpAppSandboxLinkOptions, McpAppSandboxOptions, McpAppSandboxReason, McpAppSandboxTarget };