feat: enhance sandbox capability negotiation (#158)
* feat: enhance sandbox capability negotiation * Update specification/draft/apps.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add all csp and permissions to host capabilities + update SEP * feat: add clipboard-write permission support Adds clipboardWrite to McpUiResourcePermissions for clipboard access. Maps to Permission Policy 'clipboard-write' feature. * rm files added by mistake * refactor: change McpUiResourcePermissions properties to empty objects * chore: remove scratch files and redundant cross-env dependency --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Olivier Chafik <ochafik@anthropic.com>
This commit is contained in:
parent
9f09932baf
commit
9acc52cb96
1 changed files with 496 additions and 16 deletions
239
src/generated/schema.json
generated
239
src/generated/schema.json
generated
|
|
@ -89,6 +89,79 @@
|
|||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"sandbox": {
|
||||
"description": "Sandbox configuration applied by the host.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"permissions": {
|
||||
"description": "Permissions granted by the host (camera, microphone, geolocation).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"camera": {
|
||||
"description": "Request camera access (Permission Policy `camera` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"microphone": {
|
||||
"description": "Request microphone access (Permission Policy `microphone` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"geolocation": {
|
||||
"description": "Request geolocation access (Permission Policy `geolocation` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"clipboardWrite": {
|
||||
"description": "Request clipboard write access (Permission Policy `clipboard-write` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"csp": {
|
||||
"description": "CSP domains approved by the host.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connectDomains": {
|
||||
"description": "Origins for network requests (fetch/XHR/WebSocket).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"resourceDomains": {
|
||||
"description": "Origins for static resources (scripts, images, styles, fonts).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"frameDomains": {
|
||||
"description": "Origins for nested iframes (frame-src directive).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"baseUriDomains": {
|
||||
"description": "Allowed base URIs for the document (base-uri directive).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
|
@ -2231,6 +2304,79 @@
|
|||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"sandbox": {
|
||||
"description": "Sandbox configuration applied by the host.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"permissions": {
|
||||
"description": "Permissions granted by the host (camera, microphone, geolocation).",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"camera": {
|
||||
"description": "Request camera access (Permission Policy `camera` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"microphone": {
|
||||
"description": "Request microphone access (Permission Policy `microphone` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"geolocation": {
|
||||
"description": "Request geolocation access (Permission Policy `geolocation` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"clipboardWrite": {
|
||||
"description": "Request clipboard write access (Permission Policy `clipboard-write` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"csp": {
|
||||
"description": "CSP domains approved by the host.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"connectDomains": {
|
||||
"description": "Origins for network requests (fetch/XHR/WebSocket).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"resourceDomains": {
|
||||
"description": "Origins for static resources (scripts, images, styles, fonts).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"frameDomains": {
|
||||
"description": "Origins for nested iframes (frame-src directive).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"baseUriDomains": {
|
||||
"description": "Allowed base URIs for the document (base-uri directive).",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false,
|
||||
|
|
@ -3532,6 +3678,37 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"permissions": {
|
||||
"description": "Sandbox permissions requested by the UI.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"camera": {
|
||||
"description": "Request camera access (Permission Policy `camera` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"microphone": {
|
||||
"description": "Request microphone access (Permission Policy `microphone` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"geolocation": {
|
||||
"description": "Request geolocation access (Permission Policy `geolocation` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"clipboardWrite": {
|
||||
"description": "Request clipboard write access (Permission Policy `clipboard-write` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"domain": {
|
||||
"description": "Dedicated origin for widget sandbox.",
|
||||
"type": "string"
|
||||
|
|
@ -3543,6 +3720,37 @@
|
|||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"McpUiResourcePermissions": {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"camera": {
|
||||
"description": "Request camera access (Permission Policy `camera` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"microphone": {
|
||||
"description": "Request microphone access (Permission Policy `microphone` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"geolocation": {
|
||||
"description": "Request geolocation access (Permission Policy `geolocation` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"clipboardWrite": {
|
||||
"description": "Request clipboard write access (Permission Policy `clipboard-write` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"McpUiResourceTeardownRequest": {
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"type": "object",
|
||||
|
|
@ -3638,6 +3846,37 @@
|
|||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"permissions": {
|
||||
"description": "Sandbox permissions from resource metadata.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"camera": {
|
||||
"description": "Request camera access (Permission Policy `camera` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"microphone": {
|
||||
"description": "Request microphone access (Permission Policy `microphone` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"geolocation": {
|
||||
"description": "Request geolocation access (Permission Policy `geolocation` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"clipboardWrite": {
|
||||
"description": "Request clipboard write access (Permission Policy `clipboard-write` feature).",
|
||||
"type": "object",
|
||||
"properties": {},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
"required": ["html"],
|
||||
|
|
|
|||
Loading…
Reference in a new issue