/**
 * Per-tool contract for `request_oauth`.
 *
 * Bridge-mediated user-gesture tool. The agent emits a tool call, the
 * contract dispatches a `HostToolRequest`, the adapter posts a pending entry
 * into `pendingOAuthRequestsByThreadId`, `OAuthDropdown` opens the consent
 * popup via `platform.openOAuthFlow(...)`; tokens are stored by the SFAE
 * HTTP API after redirect; the resolution lands as
 * `{status: 'success', domain}` or `{status: 'cancelled'}`.
 *
 * The success prefix `"OAuth credentials stored"` is a wire contract: the
 * renderer pattern-matches on it, so this contract preserves the exact string.
 * Cancel and failure also return plain content-only ToolMessages.
 *
 * Approval is always `{ required: false }`. The user gesture surfaces in
 * the dropdown, not the host-tool approval gate.
 */
import { type HostToolRequest, type ToolContract, type ToolLlmOptionsBase } from '../../../contracts/host-tool.js';
export declare const REQUEST_OAUTH_KIND: "requestOauth";
export type RequestOauthKind = typeof REQUEST_OAUTH_KIND;
/** Status the user gesture resolves with. Cancelled is first-class, not an error. */
export type RequestOauthStatus = 'success' | 'cancelled';
export interface RequestOauthParams {
    readonly domain: string;
    readonly scope: string;
    readonly message?: string;
}
/**
 * Resolution the adapter's mailbox produces. Success carries the domain
 * (echoed from the request, matching the web client's resume payload).
 */
export interface RequestOauthDetails {
    readonly status: RequestOauthStatus;
    readonly domain?: string;
}
export type RequestOauthRequest = HostToolRequest & {
    readonly kind: RequestOauthKind;
    readonly params: RequestOauthParams;
};
export declare const REQUEST_OAUTH_TOOL_DESCRIPTION: string;
export declare const REQUEST_OAUTH_DOMAIN_DESCRIPTION = "The API domain requiring OAuth (e.g. 'googleapis.com')";
export declare const REQUEST_OAUTH_SCOPE_DESCRIPTION = "Space-separated OAuth scopes (e.g. 'https://www.googleapis.com/auth/gmail.readonly')";
export declare const REQUEST_OAUTH_MESSAGE_DESCRIPTION = "Explanation shown to the user about why OAuth access is needed";
/** Verbatim prefix the renderer looks for — keep in sync with backend. */
export declare const OAUTH_SUCCESS_CONTENT_PREFIX = "OAuth credentials stored";
export declare const requestOauthContract: ToolContract<RequestOauthParams, RequestOauthDetails, ToolLlmOptionsBase>;
//# sourceMappingURL=contract.d.ts.map