import { Limit, type Producer } from '../../types.ts'; import type { Policy } from '../base.ts'; import type { Action, ExecuteResultContext, OpsResultContext } from '../types.ts'; export declare const DEFAULT_COMMAND_LIMITS: Record; export declare const FALLBACK_LIMIT: Limit; interface LimitMount { commandLimits: Map; } /** * Resolve one command's limit, the one entry point. * * Precedence: an explicit mountOverride, then the command's own * default, then aggregation across the mounts the command spans * (tightest per field), then the global table. */ export declare function resolveLimit(name: string, mounts?: readonly LimitMount[], commandDefault?: Limit | null, mountOverride?: Limit | null): Limit | null; export declare function resolveAcrossMounts(name: string, mounts: Iterable): Limit | null; export type OverrideLookup = (prefix: string, name: string) => Limit | null; /** * Resolve the bound a producer's facts name. Shared by OutputCapPolicy * and the dispatch sites that still need the resolved timeout locally: * per-prefix override first, then the producer's declared bound, then * the global table, aggregated to the tightest value when the command * spanned several mounts. */ export declare function resolveProducer(producer: Producer, overrideFor: OverrideLookup): Limit | null; /** * The built-in output cap, seeded by the registry. Answers postExecute * with the resolution the `command_limits:` config surface promises * (override semantics, see resolveLimit) and postOps with a * mount's per-op cap. Config parses into this policy; the container * and dispatch know nothing about caps. `overrideFor` maps (mount * prefix, command or op name) to that mount's configured override, * injected by the registry so this module stays a leaf. */ export declare class OutputCapPolicy implements Policy { private readonly overrideFor; constructor(overrideFor: OverrideLookup); postExecute(ctx: ExecuteResultContext): Action | null; postOps(ctx: OpsResultContext): Action | null; } export {}; //# sourceMappingURL=output_cap.d.ts.map