Class McpAppResourceMetadata
java.lang.Object
com.soklet.McpAppResourceMetadata
Immutable security policy and presentation hints for an MCP Apps resource.
Permissions request capabilities rather than grant them. Hosts enforce content security policy and may further restrict it; this value does not construct a browser sandbox or establish host acceptance of a domain hint.
- Author:
- Mark Allen
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMutable builder for immutable Apps resource metadata.static final classImmutable allowlists of canonical ASCII origins, not raw CSP header sources.static enumBrowser capabilities that an Apps resource may request from its host. -
Method Summary
-
Method Details
-
builder
- Returns:
- mutable builder with empty permissions and omitted hints
-
getContentSecurityPolicy
public @NonNull Optional<@NonNull McpAppResourceMetadata.ContentSecurityPolicy> getContentSecurityPolicy()Returns the explicitly supplied content security policy.An empty optional means CSP metadata is omitted, not that sandbox protection is disabled. MCP Apps hosts must still apply restrictive defaults.
- Returns:
- content security policy, or empty when omitted
-
getPermissions
- Returns:
- immutable requested permissions in enum declaration order
-
getDomain
-
getPrefersBorder
Returns the host presentation preference for a visible border and background. Omission leaves the presentation to the host; explicit false requests an unframed presentation. This hint does not configure CSS inside the App.- Returns:
- border preference, preserving omission separately from false
-
equals
-
hashCode
-
toString
-