export interface DelegationBudgetConfig { maxConcurrentChildrenPerAgent?: number; maxConcurrentAgents?: number; maxTotalAgents?: number; } export type BudgetRefusalReason = 'max_concurrent_children_per_agent' | 'max_concurrent_agents' | 'max_total_agents'; export interface BudgetCheckResult { allowed: boolean; reason?: BudgetRefusalReason; detail?: string; } export declare function resolveDelegationBudgetConfig(): DelegationBudgetConfig | undefined; export interface DelegationBudgetSnapshot { concurrent: number; total: number; config: DelegationBudgetConfig; } export interface SpawnReceipt { release: () => void; rollback: () => void; } export declare class DelegationBudget { private readonly config; private concurrent; private total; private readonly concurrentChildrenByAgent; constructor(config: DelegationBudgetConfig); canSpawn(parentId: string): BudgetCheckResult; recordSpawn(parentId: string): SpawnReceipt; snapshot(): DelegationBudgetSnapshot; } export declare function buildBudgetRefusalMessage(check: BudgetCheckResult): string;