import type { AgentTurnPolicy, AgentTurnPolicyOptions } from './agent-turn-policy.js'; export declare const DELEGATION_BUDGETS: { readonly light: { readonly maxToolCalls: 15; readonly maxTotalTokens: 50000; readonly timeoutMs: 120000; }; readonly standard: { readonly maxToolCalls: 30; readonly maxTotalTokens: 100000; readonly timeoutMs: 300000; }; readonly deep: { readonly maxToolCalls: 60; readonly maxTotalTokens: 200000; readonly timeoutMs: 600000; }; }; export type DelegationBudgetTier = keyof typeof DELEGATION_BUDGETS; export type DelegationStopReason = 'completed' | 'needs_user' | 'tool_calls' | 'total_tokens' | 'model_turns' | 'tool_failures' | 'timeout' | 'deadline_exceeded' | 'user_cancelled' | 'parent_cancelled' | 'provider_error' | 'cancelled' | 'parent_policy' | 'credit_budget' | 'runtime_error' | 'verification'; export declare function resolveDelegationBudget(tier?: DelegationBudgetTier, maxIterations?: number, timeoutMs?: number): { tier: "standard" | "light" | "deep"; limits: { maxToolCalls: number; maxTotalTokens: 50000 | 100000 | 200000; maxModelTurns: number; maxToolFailures: number; timeoutMs: number; handoffReserveMs: number; }; }; /** Reserve the last 20% for one tool-free handoff, without bypassing hard limits. */ export declare function createDelegationBudgetPolicy(budget: ReturnType, options: { isComplete?: () => boolean; authorizeToolCall?: AgentTurnPolicyOptions['authorizeToolCall']; finalizeFromEvidence?: boolean; }, now?: () => number): { policy: AgentTurnPolicy; requestHandoff: (reason: DelegationStopReason) => void; remainingMs: () => number; researchRemainingMs: () => number; addTokens(tokens: number): void; stop(reason: DelegationStopReason, message?: string): void; snapshot(): { usage: { elapsedMs: number; toolCalls: number; totalTokens: number; modelTurns: number; toolFailures: number; }; stopReason: DelegationStopReason | undefined; stopMessage: string | undefined; handoffRequested: boolean; handoffRequestStarted: boolean; handoffReason: DelegationStopReason | undefined; tier: "standard" | "light" | "deep"; limits: { maxToolCalls: number; maxTotalTokens: 50000 | 100000 | 200000; maxModelTurns: number; maxToolFailures: number; timeoutMs: number; handoffReserveMs: number; }; }; };