import { type Config, type OffloadRule, type OffloadScope } from "./config.js"; /** Runtime view of one or all client-specific offload rules. */ export interface OffloadState { /** Selected client's state, or true when any client rule is enabled in aggregate status. */ enabled: boolean; /** Selected scope; aggregate status reports `mixed` when rules disagree. */ scope: OffloadScope | "mixed"; /** Originating harness selected by the caller, when this is a targeted view. */ client?: string; /** Tier → spec map consulted when the selected rule applies. */ subagents: Record; /** All independently configurable client rules. Empty for the legacy boolean form. */ clients: Record; persisted: boolean; configPath?: string; /** Why persistence failed, when it did. */ persistError?: string; /** Advisory: the targeted client name is one no request path ever produces (dead rule). */ warning?: string; /** * Targeted view only: the `freeOnly` the rule governing this client actually DECLARED — * a boolean when the operator wrote one, ABSENT when unset. Never defaulted here: the effective * value is two-sided (`freeOnlyApplies` in server.ts — `rule.freeOnly ?? rerouted`; unset means * ON for offload-rerouted traffic and OFF for a directly addressed `pool/`), and materializing * a single answer would misdescribe half of them. Same rule as `parseOffload` in config.ts: * store exactly what was configured and apply the default where the flag is consulted. */ freeOnlyDeclared?: boolean; } export declare function offloadState(cfg: Config, client?: string): OffloadState; /** * Flip one client rule, or the legacy/global set when no client is supplied, on the live Config. * A scope may be supplied when setting a targeted rule; existing scopes are preserved otherwise. * The next request sees the in-memory change without a restart. */ export declare function setOffload(cfg: Config, enabled: boolean, client?: string, scope?: OffloadScope): OffloadState;