/** * MiniMax Quota Capability (DESIGN.md §12, §13, P4-02). * * Maps the MiniMax remains-endpoint response into the normalized * Provider-quota Interface. The normalizer is pure; the capability * factory owns configuration resolution, the single direct transport * attempt, and failure normalization. Shared execution owns retry. * * MiniMax mapping (DESIGN.md §13): * - Each `model_remains` entry -> one category named by nonempty * `model_name`, unit `requests`, sorted ascending by name. * - Current counts + remaining percent; optional weekly counts + * remaining percent. * - `end_time` / `weekly_end_time` (epoch ms) -> ISO `resetsAt`. * - Only characterized 1.0.16 fields are read: model name, counts, * remaining percentages, reset timestamps. Status and boost fields * are not interpreted. * * Boundary rules (ARCHITECTURE.md §2): * - May import the quota capability contract, Adapter-local config, * Adapter-local quota client, and normalized errors. * - Must NOT import `mmx-cli/sdk`, command presentation, or another * Provider's Adapter. */ import type { ProviderQuotaSuccess, QuotaCapability } from "../../capabilities/quota.js"; import { type MiniMaxQuotaClientDeps } from "./quota-client.js"; /** * Normalize a raw MiniMax remains payload into the shared Interface. * Throws `QUOTA_ERROR` (via {@link buildQuotaWindow}) when an entry has * neither a valid percentage nor valid counts. */ export declare function normalizeMiniMaxQuota(raw: unknown): ProviderQuotaSuccess; /** * Options for the MiniMax QuotaCapability. Configuration is loaded from * `env`; transport dependencies (`fetch`, timer) are injectable for * deterministic tests. */ export interface MiniMaxQuotaCapabilityOptions extends MiniMaxQuotaClientDeps { readonly env: NodeJS.ProcessEnv; } /** * Build the MiniMax QuotaCapability. `invoke` loads Adapter-local * config, performs one direct remains-endpoint attempt, and normalizes * the response. Shared execution wraps this in the retry policy; quota * never uses the response cache and never routes through the SDK. */ export declare function createMiniMaxQuotaCapability(options: MiniMaxQuotaCapabilityOptions): QuotaCapability; //# sourceMappingURL=quota.d.ts.map