mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-07-02 04:12:36 +00:00
Bridges inline MCP App HTML. Server-bound resources now always render through the sandbox bridge rather than a bare srcDoc iframe, and useAppBridge sends the resource's inline text directly when present instead of a resources/read round trip, so inline text/html;profile=mcp-app apps complete their App.connect handshake and receive tool input and results. Bare srcDoc is kept only for inline HTML with no server binding. Forwards the complete tool result to apps. A shared buildAppToolResult always produces a result for app-backed resources so ontoolresult fires even for empty output, and it carries the tool result _meta the App Bridge forwards via sendToolResult (the result is a full CallToolResult), which apps use to hydrate component-only state. Advertises the message capability. The bridge handles ui/message via onmessage but omitted the matching host capability, so spec-compliant apps disabled message actions; it now advertises the text message modality it supports. Permits app reads of server resources. The resources/read proxy required the ui:// scheme, which contradicts the serverResources capability the bridge advertises, so it now accepts any resource URI and leaves authorization to the MCP server. Allows WebSocket origins in app CSP. The sandbox host allowlist dropped wss:// endpoints declared in csp.connectDomains; the pattern now permits ws and wss so apps relying on live updates can connect. Invalidates app-level tool metadata on reconnect. App-level connections can be transparently recreated when a server config changes, so cached resourceUri and visibility are now keyed to the connection that produced them and rebuilt when it changes. |
||
|---|---|---|
| .. | ||
| controllers | ||
| middleware | ||
| routes | ||
| services | ||
| utils | ||
| cleanup.js | ||
| experimental.js | ||
| index.js | ||
| index.metrics.spec.js | ||
| index.spec.js | ||
| socialLogins.js | ||
| socialLogins.spec.js | ||
| telemetry.js | ||
| telemetry.spec.js | ||