refactor(client,server): move stdio transports to ./stdio subpath export (#1871)
Co-authored-by: Konstantin Konstantinov <KKonstantinov@users.noreply.github.com>
This commit is contained in:
parent
55b1f06cd4
commit
9fc9070b7b
2 changed files with 194 additions and 31 deletions
|
|
@ -28,7 +28,9 @@ export type { HostHeaderValidationResult } from './server/middleware/hostHeaderV
|
|||
export { hostHeaderValidationResponse, localhostAllowedHostnames, validateHostHeader } from './server/middleware/hostHeaderValidation.js';
|
||||
export type { ServerOptions } from './server/server.js';
|
||||
export { Server } from './server/server.js';
|
||||
export { StdioServerTransport } from './server/stdio.js';
|
||||
// StdioServerTransport is exported from the './stdio' subpath — server stdio has only type-level Node
|
||||
// imports (erased at compile time), but matching the client's `./stdio` subpath gives consumers a
|
||||
// consistent shape across packages.
|
||||
export type {
|
||||
EventId,
|
||||
EventStore,
|
||||
|
|
|
|||
8
packages/server/src/stdio.ts
Normal file
8
packages/server/src/stdio.ts
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
// Subpath entry for the stdio server transport.
|
||||
//
|
||||
// Exported separately from the root entry to keep `StdioServerTransport` out of the default bundle
|
||||
// surface — server stdio has only type-level Node imports, but matching the client's `./stdio`
|
||||
// subpath gives consumers a consistent shape across packages. Import from
|
||||
// `@modelcontextprotocol/server/stdio` only in process-stdio runtimes (Node.js, Bun, Deno).
|
||||
|
||||
export { StdioServerTransport } from './server/stdio.js';
|
||||
Loading…
Reference in a new issue