import { type AccountStorage, type OAuthQuotaSnapshot } from '@cortexkit/anthropic-auth-core'; import type { Plugin } from '@opencode-ai/plugin'; /** * Format the user-facing 429 message for a killswitch block. When the block * is scoped-driven (the request's model matches a scoped window that is at * or below the killswitch threshold), the message names the model so the * operator can distinguish a per-model weekly block from a whole-account * kill. Otherwise the generic account-level message is used. */ export declare function formatKillswitchBlockMessage(input: { retryAfterSeconds: number; modelName?: string; }): string; /** * Decide whether a killswitch block is scoped-driven (a per-model weekly * block) versus a whole-account 5h/7d-driven block. A block is scoped-driven * only when the request's model matches a scoped window AND that window is * actually at or below the per-account scoped threshold. A Fable request * with a healthy Fable window is therefore correctly classified as * account-level (the 5h/7d breach killed the account, not the Fable quota). * * Priority: account-level 5h/7d always wins. `killswitchPassesPolicy` called * WITHOUT a modelId evaluates only 5h/7d; if it returns false, 5h/7d drove * the block, so this is account-level regardless of the scoped window's * state. Only when 5h/7d pass AND the matched scoped window is at/below the * scoped threshold do we call it scoped-driven. */ export declare function resolveScopedDrivenBlock(input: { mainQuota: OAuthQuotaSnapshot | undefined; requestModelId: string | undefined; storage: AccountStorage | null; }): { isScopedDriven: true; modelName: string; modelId: string; } | { isScopedDriven: false; }; export declare const AnthropicAuthPlugin: Plugin;