Summary
Honor ui/download-file requests from MCP App views: with user confirmation, either write an embedded resource (text/blob) to disk or open an http(s)-only resource_link in a new tab. Labels shown in the confirmation are sanitized.
Why
ui/download-file is part of the ext-apps host surface and is currently silently dropped, so widgets using it appear broken in the inspector.
Reference implementation (PR #1510)
Re-implement informed by these changes at 33fac3f:
Depends on
downloadFile.ts enhancements (library)
- CSP enforcement + resource-error surfacing in the bridge factory (same file; land first)
Wave 2 lane — sequential with the other AppRenderer/AppsScreen issues.
Notes
- Security posture: confirmation required;
resource_link restricted to http(s) (no javascript:/data:/file:); sanitize any widget-supplied text shown in host UI.
- Coverage gate ≥90 on all four dimensions.
Part of the PR #1510 decomposition (see tracking issue).
Summary
Honor
ui/download-filerequests from MCP App views: with user confirmation, either write an embedded resource (text/blob) to disk or open anhttp(s)-onlyresource_linkin a new tab. Labels shown in the confirmation are sanitized.Why
ui/download-fileis part of the ext-apps host surface and is currently silently dropped, so widgets using it appear broken in the inspector.Reference implementation (PR #1510)
Re-implement informed by these changes at
33fac3f:ondownloadfilehandler,base64ToBytes(),sanitizeDownloadLabel(),describeDownloadItem(),downloadResourceItem()Depends on
downloadFile.tsenhancements (library)Wave 2 lane — sequential with the other AppRenderer/AppsScreen issues.
Notes
resource_linkrestricted to http(s) (nojavascript:/data:/file:); sanitize any widget-supplied text shown in host UI.Part of the PR #1510 decomposition (see tracking issue).