Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* Schema updated from the Model Context Protocol Apps repository at
* https://github.com/modelcontextprotocol/ext-apps/blob/main/src/spec.types.ts
*
* ⚠️ Do not edit within `namespace` manually except to update schema versions ⚠️
*/
export
namespace
{
/**
* Current protocol version supported by this SDK.
*
* The SDK automatically handles version negotiation during initialization.
* Apps and hosts don't need to manage protocol versions manually.
*/
export
const
LATEST_PROTOCOL_VERSION
=
"2026-01-26"
;
/**
* @description Color theme preference for the host environment.
*/
export
type
McpUiTheme
=
"light"
|
"dark"
;
/**
* @description Display mode for UI presentation.
*/
export
type
McpUiDisplayMode
=
"inline"
|
"fullscreen"
|
"pip"
;
/**
* @description CSS variable keys available to MCP apps for theming.
*/
export
type
McpUiStyleVariableKey
=
// Background colors
|
"--color-background-primary"
|
"--color-background-secondary"
|
"--color-background-tertiary"
|
"--color-background-inverse"
|
"--color-background-ghost"
|
"--color-background-info"
|
"--color-background-danger"
|
"--color-background-success"
|
"--color-background-warning"
|
"--color-background-disabled"
// Text colors
|
"--color-text-primary"
|
"--color-text-secondary"
|
"--color-text-tertiary"
|
"--color-text-inverse"
|
"--color-text-ghost"
|
"--color-text-info"
|
"--color-text-danger"
|
"--color-text-success"
|
"--color-text-warning"
|
"--color-text-disabled"
|
"--color-text-ghost"
// Border colors
|
"--color-border-primary"
|
"--color-border-secondary"
|
"--color-border-tertiary"
|
"--color-border-inverse"
|
"--color-border-ghost"
|
"--color-border-info"
|
"--color-border-danger"
|
"--color-border-success"
|
"--color-border-warning"
|
"--color-border-disabled"
// Ring colors
|
"--color-ring-primary"
|
"--color-ring-secondary"
|
"--color-ring-inverse"
|
"--color-ring-info"
|
"--color-ring-danger"
|
"--color-ring-success"
|
"--color-ring-warning"
// Typography - Family
|
"--font-sans"
|
"--font-mono"
// Typography - Weight
|
"--font-weight-normal"
|
"--font-weight-medium"
|
"--font-weight-semibold"
|
"--font-weight-bold"
// Typography - Text Size
|
"--font-text-xs-size"
|
"--font-text-sm-size"
|
"--font-text-md-size"
|
"--font-text-lg-size"
// Typography - Heading Size
|
"--font-heading-xs-size"
|
"--font-heading-sm-size"
|
"--font-heading-md-size"
|
"--font-heading-lg-size"
|
"--font-heading-xl-size"
|
"--font-heading-2xl-size"
|
"--font-heading-3xl-size"
// Typography - Text Line Height
|
"--font-text-xs-line-height"
|
"--font-text-sm-line-height"
|
"--font-text-md-line-height"
|
"--font-text-lg-line-height"
// Typography - Heading Line Height
|
"--font-heading-xs-line-height"
|
"--font-heading-sm-line-height"
|
"--font-heading-md-line-height"
|
"--font-heading-lg-line-height"
|
"--font-heading-xl-line-height"
|
"--font-heading-2xl-line-height"
|
"--font-heading-3xl-line-height"
// Border radius
|
"--border-radius-xs"
|
"--border-radius-sm"
|
"--border-radius-md"
|
"--border-radius-lg"
|
"--border-radius-xl"
|
"--border-radius-full"
// Border width
|
"--border-width-regular"
// Shadows
|
"--shadow-hairline"
|
"--shadow-sm"
|
"--shadow-md"
|
"--shadow-lg"
;
/**
* @description Style variables for theming MCP apps.
*
* Individual style keys are optional - hosts may provide any subset of these values.
* Values are strings containing CSS values (colors, sizes, font stacks, etc.).
*
* Note: This type uses `Record<K, string | undefined>` rather than `Partial<Record<K, string>>`
* for compatibility with Zod schema generation. Both are functionally equivalent for validation.
*/
export
type
McpUiStyles
=
<
,
string
|
undefined
>
;
/**
* @description Request to open an external URL in the host's default browser.
* @see{@link app.App.sendOpenLink} for the method that sends this request
*/
export
interface
McpUiOpenLinkRequest
{
:
"ui/open-link"
;
:
{
/** @description URL to open in the host's browser */
:
string
;
}
;
}
/**
* @description Result from opening a URL.
* @see{@link McpUiOpenLinkRequest}
*/
export
interface
McpUiOpenLinkResult
{
/** @description True if the host failed to open the URL (e.g., due to security policy). */
?
:
boolean
;
/**
* Index signature required for MCP SDK `Protocol` class compatibility.
* Note: The schema intentionally omits this to enforce strict validation.
*/
[
:
string
]
:
unknown
;
}
/**
* @description Request to download one or more files through the host.
* Uses standard MCP resource types: EmbeddedResource for inline content
* and ResourceLink for references the host resolves via resources/read.
*/
export
interface
McpUiDownloadFileRequest
{
:
"ui/download-file"
;
:
{
/** @description Resources to download, either inline or as links for the host to resolve. */
:
(
MCP
.
|
MCP
.
)
[
]
;
}
;
}
/**
* @description Result from a download file request.
* @see{@link McpUiDownloadFileRequest}
*/
export
interface
McpUiDownloadFileResult
{
/** @description True if the host rejected or failed to process the download. */
?
:
boolean
;
/**
* Index signature required for MCP SDK `Protocol` class compatibility.
* Note: The schema intentionally omits this to enforce strict validation.
*/
[
:
string
]
:
unknown
;
}
/**
* @description Request to send a message to the host's chat interface.
* @see{@link app.App.sendMessage} for the method that sends this request
*/
export
interface
McpUiMessageRequest
{
:
"ui/message"
;
:
{
/** @description Message role, currently only "user" is supported. */
/**
* @description Result from sending a message.
* @see{@link McpUiMessageRequest}
*/
export
interface
McpUiMessageResult
{
/** @description True if the host rejected or failed to deliver the message. */
?
:
boolean
;
/**
* Index signature required for MCP SDK `Protocol` class compatibility.
* Note: The schema intentionally omits this to enforce strict validation.
*/
[
:
string
]
:
unknown
;
}
/**
* @description Notification that the sandbox proxy iframe is ready to receive content.
* @internal
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx#sandbox-proxy
*/
export
interface
McpUiSandboxProxyReadyNotification
{
:
"ui/notifications/sandbox-proxy-ready"
;
:
{
}
;
}
/**
* @description Notification containing HTML resource for the sandbox proxy to load.
* @internal
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx#sandbox-proxy
*/
export
interface
McpUiSandboxResourceReadyNotification
{
:
"ui/notifications/sandbox-resource-ready"
;
:
{
/** @description HTML content to load into the inner iframe. */
:
string
;
/** @description Optional override for the inner iframe's sandbox attribute. */
?
:
string
;
/** @description CSP configuration from resource metadata. */
?
:
;
/** @description Sandbox permissions from resource metadata. */
?
:
;
}
;
}
/**
* @description Notification of UI size changes (bidirectional: Guest <-> Host).
* @see{@link app.App.sendSizeChanged} for the method to send this from Guest UI
*/
/** @description Standard MCP tool execution result. */
:
;
}
/**
* @description Notification that tool execution was cancelled (Host -> Guest UI).
* Host MUST send this if tool execution was cancelled for any reason (user action,
* sampling error, classifier intervention, etc.).
*/
export
interface
McpUiToolCancelledNotification
{
:
"ui/notifications/tool-cancelled"
;
:
{
/** @description Optional reason for the cancellation (e.g., "user action", "timeout"). */
?
:
string
;
}
;
}
/**
* @description CSS blocks that can be injected by apps.
*/
export
interface
McpUiHostCss
{
/** @description CSS for font loading (@font-face rules or @import statements). Apps must apply using applyHostFonts(). */
?
:
string
;
}
/**
* @description Style configuration for theming MCP apps.
*/
export
interface
McpUiHostStyles
{
/** @description CSS variables for theming the app. */
?
:
;
/** @description CSS blocks that apps can inject. */
?
:
;
}
/**
* @description Rich context about the host environment provided to Guest UIs.
*/
export
interface
McpUiHostContext
{
/** @description Allow additional properties for forward compatibility. */
[
:
string
]
:
unknown
;
/** @description Metadata of the tool call that instantiated this App. */
?
:
{
/** @description JSON-RPC id of the tools/call request. */
?
:
;
/** @description Tool definition including name, inputSchema, etc. */
:
;
}
;
/** @description Current color theme preference. */
?
:
;
/** @description Style configuration for theming the app. */
?
:
;
/** @description How the UI is currently displayed. */
?
:
;
/** @description Display modes the host supports. */
?
:
string
[
]
;
/**
* @description Container dimensions. Represents the dimensions of the iframe or other
* container holding the app. Specify either width or maxWidth, and either height or maxHeight.
*/
?
:
(
|
{
/** @description Fixed container height in pixels. */
:
number
;
}
|
{
/** @description Maximum container height in pixels. */
?
:
number
|
undefined
;
}
)
&
(
|
{
/** @description Fixed container width in pixels. */
:
number
;
}
|
{
/** @description Maximum container width in pixels. */
?
:
number
|
undefined
;
}
)
;
/** @description User's language and region preference in BCP 47 format. */
?
:
string
;
/** @description User's timezone in IANA format. */
?
:
string
;
/** @description Host application identifier. */
?
:
string
;
/** @description Platform type for responsive design decisions. */
?
:
"web"
|
"desktop"
|
"mobile"
;
/** @description Device input capabilities. */
?
:
{
/** @description Whether the device supports touch input. */
?
:
boolean
;
/** @description Whether the device supports hover interactions. */
?
:
boolean
;
}
;
/** @description Mobile safe area boundaries in pixels. */
?
:
{
/** @description Top safe area inset in pixels. */
:
number
;
/** @description Right safe area inset in pixels. */
:
number
;
/** @description Bottom safe area inset in pixels. */
:
number
;
/** @description Left safe area inset in pixels. */
:
number
;
}
;
}
/**
* @description Notification that host context has changed (Host -> Guest UI).
* @see{@link McpUiHostContext} for the full context structure
*/
export
interface
McpUiHostContextChangedNotification
{
:
"ui/notifications/host-context-changed"
;
/** @description Partial context update containing only changed fields. */
:
;
}
/**
* @description Request to update the agent's context without requiring a follow-up action (Guest UI -> Host).
*
* Unlike `notifications/message` which is for debugging/logging, this request is intended
* to update the Host's model context. Each request overwrites the previous context sent by the Guest UI.
* Unlike messages, context updates do not trigger follow-ups.
*
* The host will typically defer sending the context to the model until the next user message
* (including `ui/message`), and will only send the last update received.
*
* @see{@link app.App.updateModelContext} for the method that sends this request
*/
/** @description Structured content for machine-readable context data. */
?
:
<
string
,
unknown
>
;
}
;
}
/**
* @description Request for graceful shutdown of the Guest UI (Host -> Guest UI).
* @see{@link app-bridge.AppBridge.teardownResource} for the host method that sends this
*/
export
interface
McpUiResourceTeardownRequest
{
:
"ui/resource-teardown"
;
:
{
}
;
}
/**
* @description Result from graceful shutdown request.
* @see{@link McpUiResourceTeardownRequest}
*/
export
interface
McpUiResourceTeardownResult
{
/**
* Index signature required for MCP SDK `Protocol` class compatibility.
*/
[
:
string
]
:
unknown
;
}
export
interface
McpUiSupportedContentBlockModalities
{
/** @description Host supports text content blocks. */
/**
* @description Capabilities supported by the host application.
* @see{@link McpUiInitializeResult} for the initialization result that includes these capabilities
*/
export
interface
McpUiHostCapabilities
{
/** @description Experimental features (structure TBD). */
/** @description Sandbox configuration applied by the host. */
?
:
{
/** @description Permissions granted by the host (camera, microphone, geolocation). */
?
:
;
/** @description CSP domains approved by the host. */
?
:
;
}
;
/** @description Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns. */
?
:
;
/** @description Host supports receiving content messages (ui/message) from the View. */
?
:
;
/** @description Host supports file downloads (ui/download-file) from the View. */
?
:
{
}
;
}
/**
* @description Capabilities provided by the View (App).
* @see{@link McpUiInitializeRequest} for the initialization request that includes these capabilities
*/
export
interface
McpUiAppCapabilities
{
/** @description Experimental features (structure TBD). */
?
:
{
}
;
/** @description App exposes MCP-style tools that the host can call. */
/**
* @description Display modes the app supports. See Display Modes section of the spec for details.
* @example ["inline", "fullscreen"]
*/
?
:
[
]
;
}
/**
* @description Initialization request sent from Guest UI to Host.
* @see{@link app.App.connect} for the method that sends this request
*/
export
interface
McpUiInitializeRequest
{
:
"ui/initialize"
;
:
{
/** @description App identification (name and version). */
:
;
/** @description Features and capabilities this app provides. */
:
;
/** @description Protocol version this app supports. */
:
string
;
}
;
}
/**
* @description Initialization result returned from Host to Guest UI.
* @see{@link McpUiInitializeRequest}
*/
export
interface
McpUiInitializeResult
{
/** @description Negotiated protocol version string (e.g., "2025-11-21"). */
:
string
;
/** @description Host application identification and version. */
:
;
/** @description Features and capabilities provided by the host. */
:
;
/** @description Rich context about the host environment. */
:
;
/**
* Index signature required for MCP SDK `Protocol` class compatibility.
* Note: The schema intentionally omits this to enforce strict validation.
*/
[
:
string
]
:
unknown
;
}
/**
* @description Notification that Guest UI has completed initialization (Guest UI -> Host).
* @see{@link app.App.connect} for the method that sends this notification
*/
/** @description Origins for nested iframes (frame-src directive). */
?
:
string
[
]
;
/** @description Allowed base URIs for the document (base-uri directive). */
?
:
string
[
]
;
}
/**
* @description Sandbox permissions requested by the UI resource.
* Hosts MAY honor these by setting appropriate iframe `allow` attributes.
* Apps SHOULD NOT assume permissions are granted; use JS feature detection as fallback.
*/
export
interface
McpUiResourcePermissions
{
/** @description Request camera access (Permission Policy `camera` feature). */
/** @description Sandbox permissions requested by the UI. */
?
:
;
/** @description Dedicated origin for widget sandbox. */
?
:
string
;
/** @description Visual boundary preference - true if UI prefers a visible border. */
?
:
boolean
;
}
/**
* @description Request to change the display mode of the UI.
* The host will respond with the actual display mode that was set,
* which may differ from the requested mode if not supported.
* @see{@link app.App.requestDisplayMode} for the method that sends this request
*/
export
interface
McpUiRequestDisplayModeRequest
{
:
"ui/request-display-mode"
;
:
{
/** @description The display mode being requested. */
:
;
}
;
}
/**
* @description Result from requesting a display mode change.
* @see{@link McpUiRequestDisplayModeRequest}
*/
export
interface
McpUiRequestDisplayModeResult
{
/** @description The display mode that was actually set. May differ from requested if not supported. */
:
;
/**
* Index signature required for MCP SDK `Protocol` class compatibility.
* Note: The schema intentionally omits this to enforce strict validation.
*/
[
:
string
]
:
unknown
;
}
/**
* @description Tool visibility scope - who can access the tool.
*/
export
type
McpUiToolVisibility
=
"model"
|
"app"
;
/**
* @description UI-related metadata for tools.
*/
export
interface
McpUiToolMeta
{
/**
* URI of the UI resource to display for this tool, if any.
* This is converted to `_meta["ui/resourceUri"]`.
*
* @example "ui://weather/widget.html"
*/
?
:
string
;
/**
* @description Who can access this tool. Default: ["model", "app"]
* - "model": Tool visible to and callable by the agent
* - "app": Tool callable by the app from this server only
*/
?
:
[
]
;
}
/**
* Method string constants for MCP Apps protocol messages.
*
* These constants provide a type-safe way to check message methods without
* accessing internal Zod schema properties. External libraries should use
* these constants instead of accessing `schema.shape.method._def.values[0]`.
*
* @example
* ```typescript
* import { SANDBOX_PROXY_READY_METHOD } from '@modelcontextprotocol/ext-apps';
*
* if (event.data.method === SANDBOX_PROXY_READY_METHOD) {
* // Handle sandbox proxy ready notification
* }
* ```
*/