feat(mcp-apps): add Permission Policy support for sandbox iframes (#6947)

This commit is contained in:
Andrew Harvard
2026-02-04 11:52:11 -05:00
committed by GitHub
parent d8d9bb741b
commit 2b90c2c310
10 changed files with 110 additions and 8 deletions
File diff suppressed because one or more lines are too long
+25
View File
@@ -667,6 +667,30 @@ export type ParseRecipeResponse = {
*/
export type PermissionLevel = 'always_allow' | 'ask_before' | 'never_allow';
/**
* Sandbox permissions for MCP Apps
* Specifies which browser capabilities the UI needs access to.
* Maps to the iframe Permission Policy `allow` attribute.
*/
export type PermissionsMetadata = {
/**
* Request camera access (maps to Permission Policy `camera` feature)
*/
camera?: boolean;
/**
* Request clipboard write access (maps to Permission Policy `clipboard-write` feature)
*/
clipboardWrite?: boolean;
/**
* Request geolocation access (maps to Permission Policy `geolocation` feature)
*/
geolocation?: boolean;
/**
* Request microphone access (maps to Permission Policy `microphone` feature)
*/
microphone?: boolean;
};
export type PricingData = {
context_length?: number | null;
currency: string;
@@ -1273,6 +1297,7 @@ export type UiMetadata = {
* Preferred domain for the app (used for CORS)
*/
domain?: string | null;
permissions?: PermissionsMetadata;
/**
* Whether the app prefers to have a border around it
*/