avancement planning
This commit is contained in:
+23
-8
@@ -1,6 +1,6 @@
|
||||
import { Transport, FetchLike } from "../shared/transport.js";
|
||||
import { JSONRPCMessage } from "../types.js";
|
||||
import { OAuthClientProvider } from "./auth.js";
|
||||
import { Transport, FetchLike } from '../shared/transport.js';
|
||||
import { JSONRPCMessage } from '../types.js';
|
||||
import { OAuthClientProvider } from './auth.js';
|
||||
export declare class StreamableHTTPError extends Error {
|
||||
readonly code: number | undefined;
|
||||
constructor(code: number | undefined, message: string | undefined);
|
||||
@@ -22,9 +22,9 @@ export interface StartSSEOptions {
|
||||
*/
|
||||
onresumptiontoken?: (token: string) => void;
|
||||
/**
|
||||
* Override Message ID to associate with the replay message
|
||||
* so that response can be associate with the new resumed request.
|
||||
*/
|
||||
* Override Message ID to associate with the replay message
|
||||
* so that response can be associate with the new resumed request.
|
||||
*/
|
||||
replayMessageId?: string | number;
|
||||
}
|
||||
/**
|
||||
@@ -98,12 +98,18 @@ export declare class StreamableHTTPClientTransport implements Transport {
|
||||
private _abortController?;
|
||||
private _url;
|
||||
private _resourceMetadataUrl?;
|
||||
private _scope?;
|
||||
private _requestInit?;
|
||||
private _authProvider?;
|
||||
private _fetch?;
|
||||
private _fetchWithInit;
|
||||
private _sessionId?;
|
||||
private _reconnectionOptions;
|
||||
private _protocolVersion?;
|
||||
private _hasCompletedAuthFlow;
|
||||
private _lastUpscopingHeader?;
|
||||
private _serverRetryMs?;
|
||||
private _reconnectionTimeout?;
|
||||
onclose?: () => void;
|
||||
onerror?: (error: Error) => void;
|
||||
onmessage?: (message: JSONRPCMessage) => void;
|
||||
@@ -118,9 +124,8 @@ export declare class StreamableHTTPClientTransport implements Transport {
|
||||
* @returns Time to wait in milliseconds before next reconnection attempt
|
||||
*/
|
||||
private _getNextReconnectionDelay;
|
||||
private _normalizeHeaders;
|
||||
/**
|
||||
* Schedule a reconnection attempt with exponential backoff
|
||||
* Schedule a reconnection attempt using server-provided retry interval or backoff
|
||||
*
|
||||
* @param lastEventId The ID of the last received event for resumability
|
||||
* @param attemptCount Current reconnection attempt count for this specific stream
|
||||
@@ -152,5 +157,15 @@ export declare class StreamableHTTPClientTransport implements Transport {
|
||||
terminateSession(): Promise<void>;
|
||||
setProtocolVersion(version: string): void;
|
||||
get protocolVersion(): string | undefined;
|
||||
/**
|
||||
* Resume an SSE stream from a previous event ID.
|
||||
* Opens a GET SSE connection with Last-Event-ID header to replay missed events.
|
||||
*
|
||||
* @param lastEventId The event ID to resume from
|
||||
* @param options Optional callback to receive new resumption tokens
|
||||
*/
|
||||
resumeStream(lastEventId: string, options?: {
|
||||
onresumptiontoken?: (token: string) => void;
|
||||
}): Promise<void>;
|
||||
}
|
||||
//# sourceMappingURL=streamableHttp.d.ts.map
|
||||
Reference in New Issue
Block a user