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
24 changed files with 2954 additions and 1665 deletions

View file

@ -6,7 +6,7 @@ export default [
...baseConfig,
{
settings: {
'import/internal-regex': '^@modelcontextprotocol/core'
'import/internal-regex': '^@modelcontextprotocol/core-internal'
}
}
];

View file

@ -80,7 +80,7 @@
}
},
"devDependencies": {
"@modelcontextprotocol/core": "workspace:^",
"@modelcontextprotocol/core-internal": "workspace:^",
"@modelcontextprotocol/tsconfig": "workspace:^",
"@modelcontextprotocol/eslint-config": "workspace:^",
"@modelcontextprotocol/vitest-config": "workspace:^",

View file

@ -1,4 +1,4 @@
import type { OAuthClientInformationFull } from '@modelcontextprotocol/core';
import type { OAuthClientInformationFull } from '@modelcontextprotocol/core-internal';
/**
* Stores information about registered OAuth clients for this server.

View file

@ -1,4 +1,4 @@
import type { OAuthErrorResponse } from '@modelcontextprotocol/core';
import type { OAuthErrorResponse } from '@modelcontextprotocol/core-internal';
/**
* Base class for all OAuth errors

View file

@ -1,4 +1,4 @@
import type { OAuthMetadata, OAuthProtectedResourceMetadata } from '@modelcontextprotocol/core';
import type { OAuthMetadata, OAuthProtectedResourceMetadata } from '@modelcontextprotocol/core-internal';
import cors from 'cors';
import type { RequestHandler } from 'express';
import express from 'express';

View file

@ -1,7 +1,7 @@
import crypto from 'node:crypto';
import type { OAuthClientInformationFull } from '@modelcontextprotocol/core';
import { OAuthClientMetadataSchema } from '@modelcontextprotocol/core';
import type { OAuthClientInformationFull } from '@modelcontextprotocol/core-internal';
import { OAuthClientMetadataSchema } from '@modelcontextprotocol/core-internal';
import cors from 'cors';
import type { RequestHandler } from 'express';
import express from 'express';

View file

@ -1,4 +1,4 @@
import { OAuthTokenRevocationRequestSchema } from '@modelcontextprotocol/core';
import { OAuthTokenRevocationRequestSchema } from '@modelcontextprotocol/core-internal';
import cors from 'cors';
import type { RequestHandler } from 'express';
import express from 'express';

View file

@ -1,4 +1,4 @@
import type { OAuthClientInformationFull } from '@modelcontextprotocol/core';
import type { OAuthClientInformationFull } from '@modelcontextprotocol/core-internal';
import type { RequestHandler } from 'express';
import * as z from 'zod/v4';

View file

@ -1,4 +1,4 @@
import type { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '@modelcontextprotocol/core';
import type { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '@modelcontextprotocol/core-internal';
import type { Response } from 'express';
import type { OAuthRegisteredClientsStore } from './clients';

View file

@ -1,5 +1,5 @@
import type { FetchLike, OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '@modelcontextprotocol/core';
import { OAuthClientInformationFullSchema, OAuthTokensSchema } from '@modelcontextprotocol/core';
import type { FetchLike, OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '@modelcontextprotocol/core-internal';
import { OAuthClientInformationFullSchema, OAuthTokensSchema } from '@modelcontextprotocol/core-internal';
import type { Response } from 'express';
import type { OAuthRegisteredClientsStore } from '../clients';

View file

@ -1,4 +1,4 @@
import type { OAuthMetadata, OAuthProtectedResourceMetadata } from '@modelcontextprotocol/core';
import type { OAuthMetadata, OAuthProtectedResourceMetadata } from '@modelcontextprotocol/core-internal';
import type { RequestHandler } from 'express';
import express from 'express';

View file

@ -1 +1 @@
export type { AuthInfo } from '@modelcontextprotocol/core';
export type { AuthInfo } from '@modelcontextprotocol/core-internal';

View file

@ -2,8 +2,8 @@ import { randomUUID } from 'node:crypto';
import type { IncomingMessage, ServerResponse } from 'node:http';
import { TLSSocket } from 'node:tls';
import type { AuthInfo, JSONRPCMessage, MessageExtraInfo, Transport, TransportSendOptions } from '@modelcontextprotocol/core';
import { JSONRPCMessageSchema } from '@modelcontextprotocol/core';
import type { AuthInfo, JSONRPCMessage, MessageExtraInfo, Transport, TransportSendOptions } from '@modelcontextprotocol/core-internal';
import { JSONRPCMessageSchema } from '@modelcontextprotocol/core-internal';
import contentType from 'content-type';
import getRawBody from 'raw-body';

View file

@ -1,7 +1,7 @@
import { authorizationHandler, AuthorizationHandlerOptions, redirectUriMatches } from '../../../src/auth/handlers/authorize';
import { OAuthServerProvider, AuthorizationParams } from '../../../src/auth/provider';
import { OAuthRegisteredClientsStore } from '../../../src/auth/clients';
import { OAuthClientInformationFull, OAuthTokens } from '@modelcontextprotocol/core';
import { OAuthClientInformationFull, OAuthTokens } from '@modelcontextprotocol/core-internal';
import express, { Response } from 'express';
import supertest from 'supertest';
import { AuthInfo } from '../../../src/auth/types';

View file

@ -1,5 +1,5 @@
import { metadataHandler } from '../../../src/auth/handlers/metadata';
import { OAuthMetadata } from '@modelcontextprotocol/core';
import { OAuthMetadata } from '@modelcontextprotocol/core-internal';
import express from 'express';
import supertest from 'supertest';

View file

@ -1,6 +1,6 @@
import { clientRegistrationHandler, ClientRegistrationHandlerOptions } from '../../../src/auth/handlers/register';
import { OAuthRegisteredClientsStore } from '../../../src/auth/clients';
import { OAuthClientInformationFull, OAuthClientMetadata } from '@modelcontextprotocol/core';
import { OAuthClientInformationFull, OAuthClientMetadata } from '@modelcontextprotocol/core-internal';
import express from 'express';
import supertest from 'supertest';
import { MockInstance } from 'vitest';

View file

@ -1,7 +1,7 @@
import { revocationHandler, RevocationHandlerOptions } from '../../../src/auth/handlers/revoke';
import { OAuthServerProvider, AuthorizationParams } from '../../../src/auth/provider';
import { OAuthRegisteredClientsStore } from '../../../src/auth/clients';
import { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '@modelcontextprotocol/core';
import { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '@modelcontextprotocol/core-internal';
import express, { Response } from 'express';
import supertest from 'supertest';
import { AuthInfo } from '../../../src/auth/types';

View file

@ -1,7 +1,7 @@
import { tokenHandler, TokenHandlerOptions } from '../../../src/auth/handlers/token';
import { OAuthServerProvider, AuthorizationParams } from '../../../src/auth/provider';
import { OAuthRegisteredClientsStore } from '../../../src/auth/clients';
import { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '@modelcontextprotocol/core';
import { OAuthClientInformationFull, OAuthTokenRevocationRequest, OAuthTokens } from '@modelcontextprotocol/core-internal';
import express, { Response } from 'express';
import supertest from 'supertest';
import * as pkceChallenge from 'pkce-challenge';

View file

@ -1,6 +1,6 @@
import { authenticateClient, ClientAuthenticationMiddlewareOptions } from '../../../src/auth/middleware/clientAuth';
import { OAuthRegisteredClientsStore } from '../../../src/auth/clients';
import { OAuthClientInformationFull } from '@modelcontextprotocol/core';
import { OAuthClientInformationFull } from '@modelcontextprotocol/core-internal';
import express from 'express';
import supertest from 'supertest';

View file

@ -1,7 +1,7 @@
import { Response } from 'express';
import { ProxyOAuthServerProvider, ProxyOptions } from '../../../src/auth/providers/proxyProvider';
import { AuthInfo } from '../../../src/auth/types';
import { OAuthClientInformationFull, OAuthTokens } from '@modelcontextprotocol/core';
import { OAuthClientInformationFull, OAuthTokens } from '@modelcontextprotocol/core-internal';
import { ServerError } from '../../../src/auth/errors';
import { InvalidTokenError } from '../../../src/auth/errors';
import { InsufficientScopeError } from '../../../src/auth/errors';

Some files were not shown because too many files have changed in this diff Show more