@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
20 lines • 1.05 kB
TypeScript
import type { OAuthServerInfo } from "@modelcontextprotocol/sdk/client/auth.js";
import type { AuthorizationServerMetadata, OAuthTokens } from "@modelcontextprotocol/sdk/shared/auth.js";
import type { FetchLike } from "@modelcontextprotocol/sdk/shared/transport.js";
import type { McpOAuthProvider } from "./oauth-provider.ts";
import type { McpStoredAuth } from "./token-store.ts";
export interface RefreshManagerOptions {
fetchFn?: FetchLike;
maxRetries?: number;
retryDelayMs?: number;
discover?: (serverUrl: string) => Promise<OAuthServerInfo>;
}
export declare function isTokenStale(record: McpStoredAuth | undefined, now: number): boolean;
export declare function assertS256Supported(metadata: AuthorizationServerMetadata | undefined, serverName: string): void;
export declare class McpRefreshManager {
#private;
constructor(provider: McpOAuthProvider, options?: RefreshManagerOptions);
ensureFresh(): Promise<OAuthTokens | undefined>;
refresh(): Promise<OAuthTokens>;
}
//# sourceMappingURL=oauth-refresh.d.ts.map