11import { RESOURCE_MIME_TYPE , getToolUiResourceUri , type McpUiSandboxProxyReadyNotification , AppBridge , PostMessageTransport , type McpUiResourceCsp , type McpUiResourcePermissions , buildAllowAttribute , type McpUiUpdateModelContextRequest , type McpUiMessageRequest } from "@modelcontextprotocol/ext-apps/app-bridge" ;
22import { Client } from "@modelcontextprotocol/client" ;
3- import { SSEClientTransport } from "@modelcontextprotocol/sdk/ client/sse.js " ;
3+ import { SSEClientTransport } from "@modelcontextprotocol/client" ;
44import { StreamableHTTPClientTransport } from "@modelcontextprotocol/client" ;
55import type { CallToolResult , Resource , Tool } from "@modelcontextprotocol/server" ;
66import { getTheme , onThemeChange } from "./theme" ;
@@ -303,7 +303,7 @@ export function newAppBridge(
303303 // Listen for theme changes (from toggle or system) and notify the app
304304 onThemeChange ( ( newTheme ) => {
305305 log . info ( "Theme changed:" , newTheme ) ;
306- appBridge . sendHostContextChange ( { theme : newTheme } ) ;
306+ appBridge . sendHostContextChanged ( { theme : newTheme } ) ;
307307 } ) ;
308308
309309 // Per spec, the host SHOULD notify the view when container dimensions
@@ -315,7 +315,7 @@ export function newAppBridge(
315315 const iframeResizeObserver = new ResizeObserver ( ( [ entry ] ) => {
316316 const width = Math . round ( entry . contentRect . width ) ;
317317 if ( width > 0 ) {
318- appBridge . sendHostContextChange ( {
318+ appBridge . sendHostContextChanged ( {
319319 containerDimensions : { width, maxHeight : 6000 } ,
320320 } ) ;
321321 }
@@ -397,7 +397,7 @@ export function newAppBridge(
397397 log . info ( "Display mode request from MCP App:" , params ) ;
398398 const newMode = params . mode === "fullscreen" ? "fullscreen" : "inline" ;
399399 // Update host context and notify the app
400- appBridge . sendHostContextChange ( {
400+ appBridge . sendHostContextChanged ( {
401401 displayMode : newMode ,
402402 } ) ;
403403 // Notify the host UI (via callback)
0 commit comments