import { type RateLimitSource } from '../../domain/costs/rate-limit-throttle.js'; import type { CodexQuotaReading } from '../../domain/costs/codex-quota.js'; import type { AgentSpawnConfig } from '../types.js'; /** Signature of the throttle entry point; injected in tests, defaulted to the real one. */ type SubmitRateLimit = (info: { rateLimitType: string; utilization: number; resetsAt: number; }, source: RateLimitSource) => Promise; /** * Resolve the two keys the dispatch gate looks a throttle up by. `configIsRateLimited` asks * `isProviderModeRateLimited(resolveRateLimitProvider(config), config.mode || 'api')`, so a reading * filed under any other pair would be recorded and then never consulted. The provider mirrors * `resolveRateLimitProvider` (profile provider, else the backend name); the mode is recovered from * the gateway sub-path `/m//` that spawn-config derives from the profile's mode, * and its absence means the profile had no mode — which the gate reads as 'api'. */ export declare function resolveQuotaSource(config: Pick): RateLimitSource; /** * File each advertised window as its own throttle event. The throttle owns the thresholds and * decides whether a window is worth pausing for, so every window is submitted as observed — * including the ones far below the line, which keep the recorded reset time fresh. */ export declare function reportCodexQuota(reading: CodexQuotaReading, source: RateLimitSource, submit?: SubmitRateLimit): Promise; export {};