@opentiny/next 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +12 -1
- package/index.js +624 -628
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { AuthInfo } from '@modelcontextprotocol/sdk/server/auth/types.js';
|
|
|
3
3
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
4
4
|
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
5
5
|
import { StreamableHTTPReconnectionOptions, StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
6
|
+
import { WebSocketClientTransport } from '@modelcontextprotocol/sdk/client/websocket.js';
|
|
6
7
|
import { EventSourceInit } from 'eventsource';
|
|
7
8
|
import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
|
|
8
9
|
import { OAuthClientMetadata, OAuthClientInformation, OAuthClientInformationFull, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js';
|
|
@@ -218,6 +219,16 @@ declare const createStreamProxy: (options: ProxyOptions) => Promise<{
|
|
|
218
219
|
transport: StreamableHTTPClientTransport;
|
|
219
220
|
sessionId: string;
|
|
220
221
|
}>;
|
|
222
|
+
/**
|
|
223
|
+
* 创建一个 WebSocket 客户端代理。
|
|
224
|
+
*
|
|
225
|
+
* @param options - 客户端代理选项
|
|
226
|
+
* @returns - 返回一个包含 transport 和 sessionId 的对象
|
|
227
|
+
*/
|
|
228
|
+
declare const createSocketProxy: (options: ProxyOptions) => Promise<{
|
|
229
|
+
transport: WebSocketClientTransport;
|
|
230
|
+
sessionId: string;
|
|
231
|
+
}>;
|
|
221
232
|
|
|
222
233
|
interface AuthClientProviderOptions {
|
|
223
234
|
clientMetadata: OAuthClientMetadata;
|
|
@@ -321,5 +332,5 @@ declare class AuthClientProvider implements OAuthClientProvider {
|
|
|
321
332
|
codeVerifier(): string;
|
|
322
333
|
}
|
|
323
334
|
|
|
324
|
-
export { AuthClientProvider, MessageChannelClientTransport, MessageChannelServerTransport, MessageChannelTransport, attemptConnection, createSseProxy, createStreamProxy, createTransportPair, sseOptions, streamOptions };
|
|
335
|
+
export { AuthClientProvider, MessageChannelClientTransport, MessageChannelServerTransport, MessageChannelTransport, attemptConnection, createSocketProxy, createSseProxy, createStreamProxy, createTransportPair, sseOptions, streamOptions };
|
|
325
336
|
export type { AuthClientProviderOptions, ProxyOptions };
|