Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/**
* Result from loading an MCP App UI resource.
*/
export
interface
IMcpAppResourceContent
extends
McpApps
.
{
/** The HTML content of the UI resource */
readonly
:
string
;
/** MIME type of the content */
readonly
:
string
;
}
/**
* Transport abstraction for the constrained subset of MCP requests an MCP
* App's webview makes back to the host. Two implementations exist: one
* routes through {@link IMcpService} (local servers), the other through
* the owning {@link IAgentConnection.handleMcpRequest} on an `mcp://` AHP
* side channel (agent-host-resident servers).
*/
export
interface
IMcpAppCallTransport
extends
IDisposable
{
/** Forwarded MCP server notifications (`notifications/*`) for this server. */
readonly
:
<
{
readonly
:
string
;
readonly
?
:
unknown
}
>
;
loadResource
(
:
)
:
Promise
<
>
;
callTool
(
:
string
,
:
<
string
,
unknown
>
,
:
)
:
Promise
<
MCP
.
>
;
readResource
(
:
string
,
:
)
:
Promise
<
MCP
.
>
;
sampling
(
:
MCP
.
[
'params'
]
,
:
)
:
Promise
<
MCP
.
>
;
log
(
:
MCP
.
)
:
Promise
<
void
>
;
}
function
readResourceContentToHtml
(
:
readonly
(
MCP
.
|
MCP
.
)
[
]
)
:
{
if
(
!
||
.
===
0
)
{
throw
new
Error
(
'UI resource not found on server'
)
;
}
const
=
[
0
]
;
let
:
string
;
const
=
.
||
'text/html'
;
if
(
hasKey
(
,
{
:
true
}
)
)
{
=
.
;
}
else
if
(
hasKey
(
,
{
:
true
}
)
)
{
=
decodeBase64
(
.
)
.
toString
(
)
;
}
else
{
throw
new
Error
(
'UI resource has no content'
)
;
}
const
=
.
?.
as
.
|
undefined
;
return
{
...
,
,
,
}
;
}
/**
* Local transport: resolves the MCP server via {@link IMcpService} and
* proxies requests through {@link IMcpServer}. Used for locally-configured
* MCP servers whose state lives in the workbench.
*/
/**
* AHP transport: routes requests over the `mcp://` side channel through the
* Agent Host connection identified by the render data's authority, and filters
* {@link IAgentConnection.onMcpNotification} down to this channel.
*
* Used for MCP servers owned by an agent host (e.g. Copilot CLI).
*/
"The Agent Host connection is no longer available."
)
)
;
}
return
this
.
;
}
async
log
(
:
MCP
.
)
:
Promise
<
void
>
{
// Notifications are one-way; the AHP `mcp://` channel accepts
// `notifications/message` from the client. We use the request
// path here for symmetry (the host treats `notifications/message`
// the same regardless of how it arrived). Failures are swallowed
// to avoid surfacing log-pipe errors to the App.
try
{
await
this
.
_getConnection
(
)
.
handleMcpRequest
(
this
.
,
'notifications/message'
,
as
unknown
as
<
string
,
unknown
>
)
;
}
catch
{
// no-op
}
}
async
loadResource
(
:
)
:
Promise
<
>
{
const
=
await
this
.
_getConnection
(
)
.
handleMcpRequest
(
this
.
,
'resources/read'
,
{
:
this
.
.
}
)
as
MCP
.
;
return
readResourceContentToHtml
(
.
)
;
}
async
callTool
(
:
string
,
:
<
string
,
unknown
>
,
:
)
:
Promise
<
MCP
.
>
{
const
=
await
this
.
_getConnection
(
)
.
handleMcpRequest
(
this
.
,
'tools/call'
,
{
,
:
}
)
as
MCP
.
;
return
;
}
async
readResource
(
:
string
,
:
)
:
Promise
<
MCP
.
>
{
const
=
await
this
.
_getConnection
(
)
.
handleMcpRequest
(
this
.
,
'resources/read'
,
{
}
)
as
MCP
.
;
return
;
}
async
sampling
(
:
MCP
.
[
'params'
]
,
:
)
:
Promise
<
MCP
.
>
{
const
=
await
this
.
_getConnection
(
)
.
handleMcpRequest
(
this
.
,
'sampling/createMessage'
,
as
unknown
as
<
string
,
unknown
>
)
as
MCP
.
;
return
;
}
}
/**
* Wrapper class that "upgrades" serializable IMcpToolCallUIData into a functional
* object that can load UI resources and proxy tool/resource calls back to the MCP server.
*
* Selects the underlying transport based on whether the renderer was given
* an AHP `mcp://` channel — agent-host-resident servers route through the
* owning Agent Host connection, everything else uses the local
* {@link IMcpService}.
*/
export
class
McpToolCallUI
extends
Disposable
{
/**
* Basic host context reflecting the current UI and theme. Notably lacks
* the `toolInfo` or `viewport` sizes.
*/
public
readonly
:
<
.
>
;
private
readonly
:
;
/** Forwarded MCP server notifications scoped to this App's server. */
/**
* Logs a message to the MCP server's logger.
*/
public
log
(
:
MCP
.
)
:
Promise
<
void
>
{
return
this
.
.
log
(
)
;
}
/**
* Loads the UI resource from the MCP server.
* @paramtoken Cancellation token
* @returns The HTML content and CSP configuration
*/
public
loadResource
(
:
)
:
Promise
<
>
{
return
this
.
.
loadResource
(
)
;
}
/**
* Calls a tool on the MCP server.
* @paramname Tool name
* @paramparams Tool parameters
* @paramtoken Cancellation token
* @returns The tool call result
*/
public
callTool
(
:
string
,
:
<
string
,
unknown
>
,
:
)
:
Promise
<
MCP
.
>
{
return
this
.
.
callTool
(
,
,
)
;
}
/**
* Reads a resource from the MCP server.
* @paramuri Resource URI
* @paramtoken Cancellation token
* @returns The resource content
*/
public
readResource
(
:
string
,
:
)
:
Promise
<
MCP
.
>
{
return
this
.
.
readResource
(
,
)
;
}
/**
* Issues a `sampling/createMessage` request against the MCP server's
* host-side sampling implementation. Only supported when the App
* server runs inside an agent host that has opted into sampling.
*/