v2: codemod iterations, canonical zod schema exports from sdk-shared (#2354)
Co-authored-by: Felix Weinberger <fweinberger@anthropic.com>
This commit is contained in:
parent
7ea6fde1b6
commit
0fb8406d83
8 changed files with 2954 additions and 1665 deletions
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Reference in a new issue