export class BudgetTracker {
    maxBudgetTokens;
    maxTurns;
    compactAfterTurns;
    constructor(maxBudgetTokens = 2000, maxTurns = 8, compactAfterTurns = 12) {
        this.maxBudgetTokens = maxBudgetTokens;
        this.maxTurns = maxTurns;
        this.compactAfterTurns = compactAfterTurns;
    }
    addTurn(inputTokens, outputTokens) {
        return { inputTokens, outputTokens };
    }
    isBudgetExceeded(usage) {
        return usage.inputTokens + usage.outputTokens > this.maxBudgetTokens;
    }
    isTurnLimitExceeded(currentTurns) {
        return currentTurns >= this.maxTurns;
    }
    shouldCompact(turnCount) {
        return turnCount > this.compactAfterTurns;
    }
}
