/** * SearchApi credential resolution. * * Single source of truth for the SearchApi.io API key * (`SEARCHAPI_API_KEY`, with the legacy `SERPAPI_API_KEY` accepted as a * lower-precedence fallback). Whitespace-only values are treated as * absent, matching the descriptor's `isConfigured` contract. Resolved * keys are returned trimmed so wire headers never carry stray * whitespace. * * Boundary rules (ARCHITECTURE.md ยง2): * - May import the normalized-error contract only. * - Must NOT import transport, command presentation, or another * Provider's Adapter. * * Missing credentials are surfaced as {@link ConfigurationError} * (exit 3), distinct from {@link AuthError} (exit 1) which means the * Provider REJECTED a presented credential. */ /** Credential environment names read by this module (#232 derivation pin). */ export declare const ENV_NAMES: readonly ["SEARCHAPI_API_KEY", "SERPAPI_API_KEY"]; /** * Resolve the SearchApi API key without throwing. Returns the trimmed * key or `undefined` when no non-blank value is present. * `SEARCHAPI_API_KEY` wins over the legacy `SERPAPI_API_KEY`. */ export declare function getSearchApiKey(env: NodeJS.ProcessEnv): string | undefined; /** * Resolve the SearchApi API key or throw {@link ConfigurationError} * (exit 3) when it is missing. Call this at every capability * invocation gate. */ export declare function requireSearchApiKey(env: NodeJS.ProcessEnv): string; /** * True when a non-blank SearchApi API key is configured. Metadata-only: * performs no transport construction and reads no other Provider's * credentials. */ export declare function isSearchApiConfigured(env: NodeJS.ProcessEnv): boolean; /** * Lowercase hex SHA-256 fingerprint of the SearchApi API key. Used for * partitioned cache identity; the raw key must never appear in cache * filenames, errors, or logs. */ export declare function hashSearchApiKey(key: string): string; //# sourceMappingURL=credentials.d.ts.map