import type { LimitCheckerConfig, StopReason } from '../types/session/index.js'; export interface LimitCheckerState { aborted: boolean; totalTokens: number; totalCost: number; /** * Tokens accumulated at no known rate, from `CostInfo.unpricedTokens`. * * The cost checks below read `totalCost`, and `totalCost` omits whatever * these cost. Without this field they cannot tell a turn that has spent * nothing from one whose spend was never computed, so a `costLimitUsd` * silently never fires — which is what every turn did, because nothing fed * the cost calculation at all. */ unpricedTokens: number; currentIteration: number; startTime: number; } export type LimitCheckResult = { type: 'ok'; } | { type: 'warning'; reason: StopReason; } | { type: 'hard_stop'; reason: StopReason; }; export declare function checkLimitsDetailed(config: LimitCheckerConfig, state: LimitCheckerState): LimitCheckResult; export declare function buildLimitConfig(tokenBudget: number, timeoutMs: number, costLimitUsd?: number, maxIterations?: number, budgetWarningThreshold?: number): LimitCheckerConfig; //# sourceMappingURL=LimitChecker.d.ts.map