import type { GatewayClient } from "./server-methods/types.js";
export type MutatingAdminRpcRateLimitMethod = "chat.inject" | "doctor.memory.repair.execute" | "push.test" | "web.login.start" | "web.login.wait";
export type MutatingAdminRpcRateLimitPolicy = {
    maxRequests: number;
    windowMs: number;
    label: string;
};
export declare function isMutatingAdminRpcRateLimitedMethod(method: string): method is MutatingAdminRpcRateLimitMethod;
export declare function resolveMutatingAdminRpcRateLimitKey(params: {
    method: MutatingAdminRpcRateLimitMethod;
    client: GatewayClient | null;
}): string;
export declare function consumeMutatingAdminRpcBudget(params: {
    method: string;
    client: GatewayClient | null;
    nowMs?: number;
}): {
    applies: false;
} | {
    applies: true;
    allowed: boolean;
    retryAfterMs: number;
    remaining: number;
    key: string;
    policy: MutatingAdminRpcRateLimitPolicy;
};
export declare const __testing: {
    resetMutatingAdminRpcRateLimitState(): void;
};
