Skip to content

Commit 6c439da

Browse files
simplify: strip forward-looking spec references from comments
Removed speculative '2026-06+', 'subscriptions/listen', and version-labeled 'native' references from JSDoc. Reworded to describe current behavior or cite the SEP. Kept the '2026-06-30' version literal in shttpHandler's negotiated-version gate (functional, not commentary) and 'pre-2026-06' phrasing in sessionCompat/ shttpHandler option docs (describes the back-compat path, not future behavior).
1 parent 7068291 commit 6c439da

4 files changed

Lines changed: 20 additions & 22 deletions

File tree

packages/client/src/client/client.ts

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,8 @@ function isCreateTaskResult(r: unknown): r is CreateTaskResult {
159159
}
160160

161161
/**
162-
* Loose envelope for the (draft) 2026-06 MRTR `input_required` result. Typed
163-
* minimally so this compiles before the spec types land; runtime detection is
164-
* by shape.
162+
* Loose envelope for the SEP-2322 MRTR `input_required` result. Typed minimally
163+
* (field names not yet finalized in the spec); runtime detection is by shape.
165164
*/
166165
type InputRequiredEnvelope = {
167166
ResultType: 'input_required';
@@ -204,10 +203,10 @@ export type ClientOptions = ProtocolOptions & {
204203
/**
205204
* MCP client built on a request-shaped {@linkcode ClientTransport}.
206205
*
207-
* - 2026-06-native: every request is independent; `request()` runs the MRTR
208-
* loop, servicing `input_required` rounds via locally registered handlers.
209-
* - 2025-11-compat: {@linkcode connect} accepts the legacy pipe-shaped
210-
* {@linkcode Transport} and runs the initialize handshake.
206+
* Every request is independent; `request()` runs the SEP-2322 MRTR loop,
207+
* servicing `input_required` rounds via locally registered handlers.
208+
* {@linkcode connect} also accepts a legacy pipe-shaped {@linkcode Transport}
209+
* and runs the 2025-11 initialize handshake for back-compat.
211210
*/
212211
export class Client extends Dispatcher<ClientContext> {
213212
private _ct?: ClientTransport;
@@ -274,11 +273,10 @@ export class Client extends Dispatcher<ClientContext> {
274273
}
275274

276275
/**
277-
* Connects to a server. Accepts either a {@linkcode ClientTransport}
278-
* (2026-06-native, request-shaped) or a legacy pipe {@linkcode Transport}
279-
* (stdio, SSE, the v1 SHTTP class). Pipe transports are adapted via
280-
* {@linkcode channelAsClientTransport} and the 2025-11 initialize handshake
281-
* is performed.
276+
* Connects to a server. Accepts either a request-shaped {@linkcode ClientTransport}
277+
* or a legacy pipe {@linkcode Transport} (stdio, SSE, the v1 SHTTP class).
278+
* Pipe transports are adapted via {@linkcode channelAsClientTransport} and
279+
* the 2025-11 initialize handshake is performed.
282280
*/
283281
async connect(transport: Transport | ClientTransport, options?: RequestOptions): Promise<void> {
284282
if (isChannelTransport(transport)) {
@@ -755,7 +753,7 @@ export class Client extends Dispatcher<ClientContext> {
755753
}
756754

757755
private async _discoverOrInitialize(options: RequestOptions | undefined, setProtocolVersion: (v: string) => void): Promise<void> {
758-
// 2026-06: try server/discover, fall back to initialize. Discover schema
756+
// Try server/discover (SEP-2575 stateless), fall back to initialize. Discover schema
759757
// is not yet in spec types, so probe and accept the result loosely.
760758
try {
761759
const resp = await this._ct!.fetch(
@@ -770,7 +768,7 @@ export class Client extends Dispatcher<ClientContext> {
770768
protocolVersion?: string;
771769
};
772770
// Only accept discover if the result is shaped like a real discover response;
773-
// pre-2026-06 servers may return an empty/echo result for unknown methods.
771+
// 2025-11 servers may return an empty/echo result for unknown methods.
774772
if (r?.serverInfo) {
775773
this._serverCapabilities = r.capabilities;
776774
this._serverVersion = r.serverInfo;

packages/client/src/client/clientTransport.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export type ClientFetchOptions = {
6161
* response out. The transport may be stateful internally (session id, protocol
6262
* version) but the contract is per-call.
6363
*
64-
* This is the 2026-06-native shape. The legacy pipe {@linkcode Transport}
65-
* interface is adapted via {@linkcode channelAsClientTransport}.
64+
* The legacy pipe {@linkcode Transport} interface is adapted via
65+
* {@linkcode channelAsClientTransport}.
6666
*/
6767
export interface ClientTransport {
6868
/** Explicit shape brand. Required so {@linkcode isChannelTransport} can discriminate without duck-typing. */

packages/core/src/shared/transport.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,14 +203,13 @@ export interface RequestTransport {
203203

204204
/**
205205
* 2025-11 back-compat: write an unsolicited notification to the session's standalone
206-
* GET subscription stream. In 2026-06+ clients open `subscriptions/listen` instead.
206+
* GET subscription stream.
207207
*/
208208
notify?(n: JSONRPCNotification): Promise<void>;
209209

210210
/**
211211
* 2025-11 back-compat: send an unsolicited server→client request via the standalone
212-
* GET stream and await the client's POSTed-back response. In 2026-06+ server→client
213-
* requests are per-inbound-request via `env.send` (MRTR).
212+
* GET stream and await the client's POSTed-back response.
214213
*/
215214
request?(r: JSONRPCRequest): Promise<JSONRPCResultResponse | JSONRPCErrorResponse>;
216215

packages/server/src/server/backchannel2511.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ import { DEFAULT_REQUEST_TIMEOUT_MSEC, isJSONRPCErrorResponse, ProtocolError, Sd
1212
/**
1313
* Isolated 2025-11 server-to-client request backchannel for {@linkcode shttpHandler}.
1414
*
15-
* The pre-2026-06 protocol allows a server to send `elicitation/create` and
15+
* The 2025-11 protocol allows a server to send `elicitation/create` and
1616
* `sampling/createMessage` requests to the client mid-tool-call by writing them as
1717
* SSE events on the open POST response stream and waiting for the client to POST
1818
* the response back. This class owns the per-session `{requestId -> resolver}`
1919
* map that correlation requires, plus the standalone-GET writer registry used for
2020
* unsolicited server notifications.
2121
*
22-
* It exists so this stateful behaviour is in one removable file once 2026-06 (MRTR)
23-
* is the floor and `env.send` becomes a hard error in stateless paths.
22+
* It exists so this stateful behaviour is in one removable file once MRTR
23+
* (SEP-2322) is the protocol floor and `env.send` becomes a hard error in
24+
* stateless paths.
2425
*/
2526
export class Backchannel2511 {
2627
private _pending = new Map<string, Map<number, { resolve: (r: Result) => void; reject: (e: Error) => void }>>();

0 commit comments

Comments
 (0)