/**
 * Shared Gemini API credentials and non-tool model constants.
 *
 * Three tiers, highest priority first:
 *   1. Per-agent bundle (`credentialBundle.body.gemini.apiKey`) — delivered
 *      by the heartbeat. Authoritative when present.
 *   2. Shared in-memory heartbeat cache (`sharedKeys.geminiApiKey`).
 *   3. Local `config.geminiApiKey` — manual or per-agent persisted fallback.
 *      The per-agent bundle apply overwrites this slot unconditionally;
 *      the shared-keys apply only seeds it when currently empty.
 *
 * Model constants for the unified Gemini tool live in gemini-models.ts
 * (dynamic discovery) and gemini.ts (fallback defaults).
 */
/** The Gemini model used for transcript summary generation (cheap & fast). */
export const GEMINI_SUMMARY_MODEL = "gemini-3-flash-preview";
/** The Gemini model used for generating text embeddings (768-dim vectors). */
export const GEMINI_EMBEDDING_MODEL = "gemini-embedding-2-preview";
let bundleGeminiApiKey;
let sharedGeminiApiKey;
export function setBundleGeminiApiKey(apiKey) {
    if (bundleGeminiApiKey === apiKey)
        return false;
    bundleGeminiApiKey = apiKey;
    return true;
}
export function setSharedGeminiApiKey(apiKey) {
    if (sharedGeminiApiKey === apiKey)
        return false;
    sharedGeminiApiKey = apiKey;
    return true;
}
/**
 * Resolve the Gemini API key to use.
 *
 * Precedence: per-agent bundle > shared cache > local config (offline cache).
 */
export function resolveGeminiApiKey(config) {
    return bundleGeminiApiKey ?? sharedGeminiApiKey ?? config.geminiApiKey;
}
//# sourceMappingURL=gemini-credentials.js.map