@@ -123,7 +123,7 @@ export class StreamableHTTPClientTransport implements Transport {
123
123
throw new UnauthorizedError ( ) ;
124
124
}
125
125
126
- return await this . _startOrAuthStandaloneSSE ( ) ;
126
+ return await this . _startOrAuthSse ( ) ;
127
127
}
128
128
129
129
private async _commonHeaders ( ) : Promise < Headers > {
@@ -144,7 +144,7 @@ export class StreamableHTTPClientTransport implements Transport {
144
144
) ;
145
145
}
146
146
147
- private async _startOrAuthStandaloneSSE ( lastEventId ?: string ) : Promise < void > {
147
+ private async _startOrAuthSse ( lastEventId ?: string ) : Promise < void > {
148
148
try {
149
149
// Try to open an initial SSE stream with GET to listen for server messages
150
150
// This is optional according to the spec - server may not support it
@@ -238,7 +238,7 @@ export class StreamableHTTPClientTransport implements Transport {
238
238
// Schedule the reconnection
239
239
setTimeout ( ( ) => {
240
240
// Use the last event ID to resume where we left off
241
- this . _startOrAuthStandaloneSSE ( lastEventId ) . catch ( error => {
241
+ this . _startOrAuthSse ( lastEventId ) . catch ( error => {
242
242
this . onerror ?.( new Error ( `Failed to reconnect SSE stream: ${ error instanceof Error ? error . message : String ( error ) } ` ) ) ;
243
243
// Schedule another attempt if this one failed, incrementing the attempt counter
244
244
this . _scheduleReconnection ( lastEventId , attemptCount + 1 ) ;
@@ -343,7 +343,7 @@ export class StreamableHTTPClientTransport implements Transport {
343
343
const { lastEventId, onLastEventIdUpdate } = options ?? { } ;
344
344
if ( lastEventId ) {
345
345
// If we have at last event ID, we need to reconnect the SSE stream
346
- this . _startOrAuthStandaloneSSE ( lastEventId ) . catch ( err => this . onerror ?.( err ) ) ;
346
+ this . _startOrAuthSse ( lastEventId ) . catch ( err => this . onerror ?.( err ) ) ;
347
347
return ;
348
348
}
349
349
@@ -390,7 +390,7 @@ export class StreamableHTTPClientTransport implements Transport {
390
390
// if it's supported by the server
391
391
if ( isJSONRPCNotification ( message ) && message . method === "notifications/initialized" ) {
392
392
// Start without a lastEventId since this is a fresh connection
393
- this . _startOrAuthStandaloneSSE ( ) . catch ( err => this . onerror ?.( err ) ) ;
393
+ this . _startOrAuthSse ( ) . catch ( err => this . onerror ?.( err ) ) ;
394
394
}
395
395
return ;
396
396
}
0 commit comments