import type { ContextBlock, ContextType, ContextTruncationPolicy } from '../types/context.js'; import type { ID } from '../types/common.js'; /** Shape of an omitted-block record in ContextResult. */ export interface OmittedBlock { id: ID; type: ContextType; reason: string; } /** Result of budget enforcement. */ export interface BudgetResult { included: ContextBlock[]; omitted: OmittedBlock[]; } /** * Enforce a token budget across a list of ContextBlocks. * * Required blocks (ids in `required`) are always kept unless the `hard_fail` * strategy is in effect and they alone exceed the budget. * * @param blocks - Ordered list of blocks to evaluate. * @param required - Set of block IDs that must be included. * @param budget - Maximum total tokens allowed. * @param policy - Truncation strategy to apply. * @returns `{ included, omitted }` where `omitted` lists dropped blocks with reasons. */ export declare function enforceBudget(blocks: ContextBlock[], required: Set, budget: number, policy: ContextTruncationPolicy): BudgetResult; //# sourceMappingURL=token-budget.d.ts.map