Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 v0.2.1 May 26, 2026 Changes in this version + func ClassifyTaskComplexity(task string) string + func CompressForContext(text string, budget int) (string, int) + func CountTokens(text string) int + func CountTokensFast(text string) int + func DynamicMaxTokens(messages []types.EyrieMessage, contextSize int, taskType string) int + func EstimateMessageTokens(m types.EyrieMessage) int + func EstimateTokens(msgs []types.EyrieMessage) int + func FormatPrediction(pred *Prediction, model string) string + func WarnIfExpensive(pred *Prediction, budgetUSD float64) string + type BudgetAlert struct + Level string + Message string + Percentage float64 + Triggered time.Time + type Prediction struct + Confidence float64 + EstimatedCost float64 + InputTokens int + OutputTokens int + Reasoning string + TotalTokens int + type PredictionRecord struct + Accuracy float64 + Actual int + Model string + Predicted int + TaskType string + Timestamp time.Time + type TokenEntry struct + CostUSD float64 + Cumulative int + InputTokens int + Model string + OutputTokens int + Timestamp time.Time + ToolName string + type TokenPredictor struct + History []PredictionRecord + ModelFactors map[string]float64 + func NewTokenPredictor() *TokenPredictor + func (tp *TokenPredictor) Calibrate() + func (tp *TokenPredictor) EstimateCost(tokens int, model string) float64 + func (tp *TokenPredictor) GetAccuracy(model string) float64 + func (tp *TokenPredictor) Predict(task string, contextSize int, model string) *Prediction + func (tp *TokenPredictor) RecordActual(taskType string, predicted, actual int, model string) + type TokenReporter struct + Alerts []BudgetAlert + Entries []TokenEntry + SessionBudget int + SessionSpent int + func NewTokenReporter(sessionBudget int) *TokenReporter + func (tr *TokenReporter) CheckBudget() *BudgetAlert + func (tr *TokenReporter) FormatAlert(alert *BudgetAlert) string + func (tr *TokenReporter) GetHistory(last int) []TokenEntry + func (tr *TokenReporter) GetRemaining() int + func (tr *TokenReporter) GetUsageRate() float64 + func (tr *TokenReporter) ProjectCompletion() time.Duration + func (tr *TokenReporter) Record(input, output int, model, tool string, cost float64) + func (tr *TokenReporter) RenderBreakdown() string + func (tr *TokenReporter) RenderLive() string + func (tr *TokenReporter) Reset()