import { type SessionTokenBudget, type SessionTokenBudgetStore } from '../../store/budget/index.js'; import type { TurnId } from '../../types/ids/index.js'; import type { TurnBudgetBinding } from '../../types/session/turn.js'; import type { QueryParams } from './index.js'; /** The ledger reference a checkpoint (or a selected resume state) carries. */ export interface SavedBudgetReference { readonly binding?: TurnBudgetBinding; readonly accountId?: string; } /** * Resolve one ledger authority before any model request or recovered tool * dispatch. * * The ledger is keyed by `(rootSessionId, rootTurnId)`: a root turn opens its * own ledger with its own limit; a child session's turns bind to the key of * the root turn that spawned them (they are handed that account); a resumed * paused turn reuses its key. A limit that changes between two turns of one * session is therefore two ledgers, never a mismatch. */ export declare function resolveQueryBudget(params: QueryParams, turnId: TurnId, store: SessionTokenBudgetStore, saved?: SavedBudgetReference): Promise; //# sourceMappingURL=token-budget.d.ts.map