Skip to content

Commit e4a5c5c

Browse files
chore: dedup InMemoryTransport export and normalize docs after rebase onto #1834
1 parent d08eaca commit e4a5c5c

File tree

3 files changed

+12
-14
lines changed

3 files changed

+12
-14
lines changed

docs/migration-SKILL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -440,15 +440,15 @@ const elicit = await ctx.mcpReq.send({ method: 'elicitation/create', params: { .
440440
const tool = await client.callTool({ name: 'my-tool', arguments: {} });
441441
```
442442

443-
| v1 call | v2 call |
444-
| ------------------------------------------------------------ | ---------------------------------- |
445-
| `client.request(req, ResultSchema)` | `client.request(req)` |
446-
| `client.request(req, ResultSchema, options)` | `client.request(req, options)` |
443+
| v1 call | v2 call |
444+
| -------------------------------------------------------------------------- | ------------------------------------------------------------ |
445+
| `client.request(req, ResultSchema)` | `client.request(req)` |
446+
| `client.request(req, ResultSchema, options)` | `client.request(req, options)` |
447447
| `client.experimental.tasks.callToolStream(params, ResultSchema, options?)` | `client.experimental.tasks.callToolStream(params, options?)` |
448-
| `ctx.mcpReq.send(req, ResultSchema)` | `ctx.mcpReq.send(req)` |
449-
| `ctx.mcpReq.send(req, ResultSchema, options)` | `ctx.mcpReq.send(req, options)` |
450-
| `client.callTool(params, CompatibilityCallToolResultSchema)` | `client.callTool(params)` |
451-
| `client.callTool(params, schema, options)` | `client.callTool(params, options)` |
448+
| `ctx.mcpReq.send(req, ResultSchema)` | `ctx.mcpReq.send(req)` |
449+
| `ctx.mcpReq.send(req, ResultSchema, options)` | `ctx.mcpReq.send(req, options)` |
450+
| `client.callTool(params, CompatibilityCallToolResultSchema)` | `client.callTool(params)` |
451+
| `client.callTool(params, schema, options)` | `client.callTool(params, options)` |
452452

453453
Remove unused schema imports: `CallToolResultSchema`, `CompatibilityCallToolResultSchema`, `ElicitResultSchema`, `CreateMessageResultSchema`, etc., when they were only used in `request()`/`send()`/`callTool()` calls.
454454

docs/migration.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ app.all('/mcp', async (req, res) => {
139139
});
140140
```
141141

142-
With `sessionIdGenerator: undefined` the transport runs in stateless mode, so creating a fresh instance per request is correct. For stateful sessions, the transport must be created once per session and stored in a `Map<string, NodeStreamableHTTPServerTransport>` keyed by session ID — see `examples/server/src/simpleStreamableHttp.ts` for the full pattern.
142+
With `sessionIdGenerator: undefined` the transport runs in stateless mode, so creating a fresh instance per request is correct. For stateful sessions, the transport must be created once per session and stored in a `Map<string, NodeStreamableHTTPServerTransport>` keyed by session
143+
ID — see `examples/server/src/simpleStreamableHttp.ts` for the full pattern.
143144

144145
### `WebSocketClientTransport` removed
145146

@@ -472,8 +473,8 @@ example.
472473

473474
### `Protocol.request()`, `ctx.mcpReq.send()`, and `Client.callTool()` no longer take a schema parameter
474475

475-
The public `Protocol.request()`, `BaseContext.mcpReq.send()`, `Client.callTool()`, and `client.experimental.tasks.callToolStream()` methods no longer accept a Zod result schema argument. The SDK now resolves the correct result schema internally based on the method name. This means you no longer need to import result schemas
476-
like `CallToolResultSchema` or `ElicitResultSchema` when making requests.
476+
The public `Protocol.request()`, `BaseContext.mcpReq.send()`, `Client.callTool()`, and `client.experimental.tasks.callToolStream()` methods no longer accept a Zod result schema argument. The SDK now resolves the correct result schema internally based on the method name. This
477+
means you no longer need to import result schemas like `CallToolResultSchema` or `ElicitResultSchema` when making requests.
477478

478479
**`client.request()` — Before (v1):**
479480

packages/core/src/exports/public/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ export type {
136136
export { isTerminal } from '../../experimental/tasks/interfaces.js';
137137
export { InMemoryTaskMessageQueue, InMemoryTaskStore } from '../../experimental/tasks/stores/inMemory.js';
138138

139-
// Transport utilities
140-
export { InMemoryTransport } from '../../util/inMemory.js';
141-
142139
// Validator types and classes
143140
export type { StandardSchemaWithJSON } from '../../util/standardSchema.js';
144141
export { AjvJsonSchemaValidator } from '../../validators/ajvProvider.js';

0 commit comments

Comments
 (0)