import type { McpLogger } from "../log.ts";
export interface CallbackServerOptions {
    serverName: string;
    port?: number;
    host?: string;
    path?: string;
    timeoutMs?: number;
    logger?: McpLogger;
    validateState: (state: string | undefined) => boolean;
}
export interface CallbackResult {
    code: string;
    state: string | undefined;
    iss: string | undefined;
}
export interface CallbackChannel {
    redirectUrl: string;
    usesLoopback: boolean;
    waitForCode: () => Promise<CallbackResult>;
    close: () => Promise<void>;
}
export declare function openCallbackChannel(options: CallbackServerOptions & {
    overrideUrl?: string;
}): Promise<CallbackChannel>;
export declare class LoopbackCallbackServer {
    #private;
    constructor(options: CallbackServerOptions);
    get redirectUrl(): string | undefined;
    start(): Promise<string>;
    waitForCode(): Promise<CallbackResult>;
    close(): Promise<void>;
}
//# sourceMappingURL=callback.d.ts.map