import { type BrowserLogin } from '@salesforce/b2c-tooling-sdk/auth'; import type { ToolResult } from './types.js'; /** How long a browser login may stay pending before the waiting tool call fails. */ export declare const LOGIN_TIMEOUT_MS: number; /** Appended to the result of a call that completed after a browser login. */ export declare const SIGNED_IN_NOTE: string; /** * `openBrowser` hook for logins started by MCP tools. Hands the URL to the * calling tool when its client can open it; otherwise opens the system browser. * The login fails after {@link LOGIN_TIMEOUT_MS}. */ export declare function openBrowserForTool(url: string, login?: BrowserLogin): Promise; /** Tool calls waiting on a browser login, keyed by the `requestState` handed to the client. */ export declare class BrowserLoginContinuations { private readonly pending; /** Whether `requestState` resumes a call waiting on a browser login. */ isContinuation(requestState: unknown): requestState is string; /** * Resumes a call after the client handled the login URL. Accepting waits for * the login to finish; declining or cancelling the request ends it. */ resume(requestState: string, inputResponses?: Record, signal?: AbortSignal): Promise; /** * Runs a tool handler. When it starts a browser login and the client * supports URL elicitation, returns a URL elicitation while the handler * keeps waiting for the login in the background. */ run(supportsUrlElicitation: boolean, handler: () => Promise): Promise; }