/** * Application Default Credentials (ADC) resolution for Vertex AI. * * Replaces `google-auth-library` with a direct WebCrypto + REST implementation. * Sources, in priority order: * 1. `GOOGLE_APPLICATION_CREDENTIALS` env → service account, user, or workforce ADC file. * 2. gcloud user ADC: `%APPDATA%\gcloud\application_default_credentials.json` on Windows, * `~/.config/gcloud/application_default_credentials.json` elsewhere. * 3. GCE / Cloud Run metadata server (`metadata.google.internal`). * * Tokens are cached per source key and refreshed `GOOGLE_VERTEX_REFRESH_SKEW_MS` before expiry * (default 60s). Concurrent callers waiting on a refresh share the same in-flight promise. */ import type { FetchImpl } from "../types.js"; /** gcloud's user ADC file: `%APPDATA%\gcloud\…` on Windows, `~/.config/gcloud/…` elsewhere. */ export declare function userAdcPath(platform?: typeof process.platform, appData?: string | undefined): string; /** * Returns a Bearer access token suitable for the `Authorization` header on Vertex AI calls. * The token is cached in module scope and refreshed `GOOGLE_VERTEX_REFRESH_SKEW_MS` ms before it expires. */ export declare function getVertexAccessToken(options?: { signal?: AbortSignal; fetch?: FetchImpl; }): Promise; /** Test seam: clears every cached token. */ export declare function __resetVertexTokenCache(): void;