v2: codemod iterations, canonical zod schema exports from sdk-shared (#2354)

Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
Konstantin Konstantinov 2026-06-25 21:42:44 +03:00 • committed by GitHub
commit 0fb8406d83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 2954 additions and 1665 deletions

View file

@ -1,5 +1,5 @@
import type { JsonSchemaType, JsonSchemaValidatorResult, jsonSchemaValidator } from '@modelcontextprotocol/core';
import { InMemoryTransport, LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/core';
import type { JsonSchemaType, JsonSchemaValidatorResult, jsonSchemaValidator } from '@modelcontextprotocol/core-internal';
import { InMemoryTransport, LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/core-internal';
import { fromJsonSchema } from '../../src/fromJsonSchema';
import { Server } from '../../src/server/server';

View file

@ -1,5 +1,5 @@
import type { JSONRPCMessage } from '@modelcontextprotocol/core';
import { InMemoryTransport, isStandardSchema, LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/core';
import type { JSONRPCMessage } from '@modelcontextprotocol/core-internal';
import { InMemoryTransport, isStandardSchema, LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/core-internal';
import { describe, expect, expectTypeOf, it, vi } from 'vitest';
import * as z from 'zod/v4';
import { McpServer } from '../../src/index';

View file

@ -1,5 +1,5 @@
import type { Icon, JSONRPCMessage } from '@modelcontextprotocol/core';
import { InMemoryTransport, LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/core';
import type { Icon, JSONRPCMessage } from '@modelcontextprotocol/core-internal';
import { InMemoryTransport, LATEST_PROTOCOL_VERSION } from '@modelcontextprotocol/core-internal';
import { describe, expect, it, vi } from 'vitest';
import { McpServer, ResourceTemplate } from '../../src/index';

View file

@ -1,11 +1,11 @@
import type { JSONRPCMessage, JSONRPCRequest } from '@modelcontextprotocol/core';
import type { JSONRPCMessage, JSONRPCRequest } from '@modelcontextprotocol/core-internal';
import {
InitializeResultSchema,
InMemoryTransport,
isJSONRPCResultResponse,
LATEST_PROTOCOL_VERSION,
SUPPORTED_PROTOCOL_VERSIONS
} from '@modelcontextprotocol/core';
} from '@modelcontextprotocol/core-internal';
import { Server } from '../../src/server/server';
/** An older protocol version the server supports out of the box. */

View file

@ -1,7 +1,7 @@
import { Readable, Writable } from 'node:stream';
import type { JSONRPCMessage } from '@modelcontextprotocol/core';
import { ReadBuffer, serializeMessage } from '@modelcontextprotocol/core';
import type { JSONRPCMessage } from '@modelcontextprotocol/core-internal';
import { ReadBuffer, serializeMessage } from '@modelcontextprotocol/core-internal';
import { StdioServerTransport } from '../../src/server/stdio';

View file

@ -1,6 +1,6 @@
import { randomUUID } from 'node:crypto';
import type { CallToolResult, JSONRPCErrorResponse, JSONRPCMessage } from '@modelcontextprotocol/core';
import type { CallToolResult, JSONRPCErrorResponse, JSONRPCMessage } from '@modelcontextprotocol/core-internal';
import * as z from 'zod/v4';
import { McpServer } from '../../src/server/mcp';

View file

@ -1,6 +1,6 @@
import { randomUUID } from 'node:crypto';
import type { JSONRPCMessage, MessageExtraInfo } from '@modelcontextprotocol/core';
import type { JSONRPCMessage, MessageExtraInfo } from '@modelcontextprotocol/core-internal';
import { McpServer } from '../../src/server/mcp';
import type { EventId, EventStore, StreamId } from '../../src/server/streamableHttp';

View file

@ -1,7 +1,7 @@
import { randomUUID } from 'node:crypto';
import type { JSONRPCMessage } from '@modelcontextprotocol/core';
import { SUPPORTED_PROTOCOL_VERSIONS } from '@modelcontextprotocol/core';
import type { JSONRPCMessage } from '@modelcontextprotocol/core-internal';
import { SUPPORTED_PROTOCOL_VERSIONS } from '@modelcontextprotocol/core-internal';
import { McpServer } from '../../src/server/mcp';
import { WebStandardStreamableHTTPServerTransport } from '../../src/server/streamableHttp';