import type { Tool, ToolCall } from '../../../types/tools.js'; import type { ToolRuntimeContext } from '../context.js'; import type { PhaseResult, ToolExecutionRecord } from '../types.js'; /** * budget, Budget enforcement phase for the tool execution pipeline. * * This phase is inserted at two points: * - "entry": just before execute (checks elapsed wall-clock time). * - "exit": just after mapOutput (checks token and cost budgets). * * When a hard budget is exceeded the phase returns `abort: true` with a * typed `budgetExceedReason` so the executor can surface a diagnostic * event before terminating the pipeline. * * All budget fields are optional in ToolRuntimeContext.budget, an absent * field means "unlimited" and the corresponding check is skipped. */ /** The point in the pipeline at which the budget check fires. */ export type BudgetCheckPoint = 'entry' | 'exit'; export declare function budgetPhase(_call: ToolCall, _tool: Tool, context: ToolRuntimeContext, record: ToolExecutionRecord, checkpoint: BudgetCheckPoint, defaultBudget?: { maxMs?: number | undefined; maxTokens?: number | undefined; maxCostUsd?: number | undefined; } | undefined): Promise; //# sourceMappingURL=budget.d.ts.map