UNPKG

gaunt-sloth-assistant

Version:

[![Tests and Lint](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/Galvanized-Pukeko/gaunt-sloth-assistant/actions/workflows/unit-tests.yml) [![Integration Tests](https://github.co

37 lines (36 loc) 1.59 kB
import type { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js'; import type { OAuthClientInformationFull, OAuthClientMetadata, OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth.js'; import { StreamableHTTPConnection } from '@langchain/mcp-adapters'; import http from 'http'; interface OAuthClientProviderConfig { redirectUrl: string; serverUrl: string; } /** * Please note most of these "unused" methods are part of {@link OAuthClientProvider} */ export declare class OAuthClientProviderImpl implements OAuthClientProvider { private config; private innerState; private storagePath; constructor(config: OAuthClientProviderConfig); private loadStorageData; private saveStorageData; state(): string | Promise<string>; get redirectUrl(): string; get clientMetadata(): OAuthClientMetadata; saveClientInformation(clientInformation: OAuthClientInformationFull): Promise<void>; clientInformation(): Promise<OAuthClientInformationFull | undefined>; saveTokens(tokens: OAuthTokens): Promise<void>; tokens(): OAuthTokens | undefined; saveCodeVerifier(codeVerifier: string): Promise<void>; codeVerifier(): Promise<string>; redirectToAuthorization(authUrl: URL): Promise<void>; } export declare function createAuthProviderAndAuthenticate(mcpServer: StreamableHTTPConnection): Promise<OAuthClientProviderImpl>; export declare function createOAuthRedirectServer(path: string, portParam?: number): Promise<{ port: number; server: http.Server; codePromise: Promise<string>; }>; export {};