ide на основе vs code
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
Это ide на основе vs code(code oss), в ней будет встроенный умный апи роутинг, свой маркет с плагинами(агент харнесс, поддержка java/kotlin/мобильной разработки, командная разработка проектов, orca, оркестратор агентов
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { ToolResultContentType, type ToolCallResult, type ToolResultContent, type ToolResultEmbeddedResourceContent } from '../../../common/state/protocol/channels-chat/state.js';
/**
* Stable URI scheme used when an `EmbeddedResource` content block must be
* shipped to the MCP server as the `{ type: 'resource', resource: { uri, mimeType, blob } }`
* shape. The MCP zod schema rejects resource blocks without a URI, and the
* protocol's `{ data, contentType }` carries no URI of its own — so we mint
* an ephemeral, per-call URI of the form
* `claude-client://<toolUseId>/<index>`. This URI is opaque to both sides;
* the model never dereferences it.
*/
const CLAUDE_CLIENT_RESOURCE_SCHEME = 'claude-client';
/**
* Convert a protocol {@link ToolCallResult} into the MCP CallToolResult
* shape the Anthropic SDK feeds back to the model. Mostly 1:1 mapping with
* one shape transform: protocol `EmbeddedResource data, contentType ` →
* MCP ` type: 'image', ... ` for `image/*`, or
* ` type: 'resource', resource: uri, mimeType, blob ` for everything
* else (synthesized URI per the scheme above).
*
* Unknown content block kinds collapse to a synthesized text block + a
* console warn — bounded blast radius (one bad call, not a crash).
*
* The SDK `tool_use_id` for this call. Embedded into the
* synthesized resource URI so the same call's blocks stay disambiguated
* across parallel tool calls.
*/
result ToolCallResult toolUseId CallToolResult
blocks resultcontent
content blocksblock index block toolUseId index
out CallToolResult content
resultstructuredContent
outstructuredContent resultstructuredContent
resultsuccess resulterror
outisError
out
block ToolResultContent toolUseId index CallToolResult
blocktype
ToolResultContentTypeText
type text blocktext
ToolResultContentTypeEmbeddedResource
block toolUseId index
text
text block
text
type text
block ToolResultEmbeddedResourceContent
toolUseId
index
CallToolResult
blockcontentType
type data blockdata mimeType blockcontentType
uri
type
resource uri mimeType blockcontentType blob blockdata