import type { Anomaly } from '../debug/detector.js'; export interface BudgetLimit { /** Investigations per period; 0 = the observer never starts one on its own. */ limit: number; periodMs: number; } export declare const DEFAULT_BUDGET: BudgetLimit; /** Investigations waiting behind the running one; more would be stale by the time their turn comes. */ export declare const MAX_WAITING = 2; export interface BudgetState extends BudgetLimit { /** Started within the last period. */ used: number; /** When the next one may start, if all are used now; null while there is room (or with a limit of 0: never). */ nextAtMs: number | null; /** `used`, per incident type. */ byType: Partial>; } export declare class InvestigationBudget { private starts; readonly options: BudgetLimit; constructor(options?: BudgetLimit); /** Takes one for an anomaly of this type; false when the period's budget is spent. */ take(type: Anomaly['type'], nowMs: number): boolean; state(nowMs: number): BudgetState; private prune; } /** OBSERVE_AUTO_INVESTIGATIONS: `5` (per 60 min), `5/30m`, `5/2h`, `0` (off). Unset → the default. */ export declare function parseBudget(value: string | undefined): BudgetLimit;