Versions in this module Expand all Collapse all v1 v1.5.0 Apr 2, 2026 Changes in this version + type CostAlert struct + ID string + Message string + Severity int + Type string + USD float64 + type CostIntelligence struct + func NewCostIntelligence() *CostIntelligence + func (c *CostIntelligence) ExportCSV() string + func (c *CostIntelligence) Forecast(dailyRate float64) *SpendForecast + func (c *CostIntelligence) GetAnomalies() []CostAlert + func (c *CostIntelligence) GetBudgetStatus(budgetUSD, spentUSD float64) (bool, float64, string) + func (c *CostIntelligence) GetTags() []*CostTag + func (c *CostIntelligence) RecordCost(tag, source string, usd float64) + type CostTag struct + Name string + Source string + Total float64 + type SpendForecast struct + Confidence float64 + DailyUSD float64 + MonthlyUSD float64 + Trend string + WeeklyUSD float64 + YearlyUSD float64 + type WeeklyDigest struct + Recommendations []string + SavingsPct float64 + TopCommand string + TopModel string + TotalCost float64 + TotalTokens int64 + WeekEnd time.Time + WeekStart time.Time + func GenerateWeeklyDigest(costs map[string]float64, tokens int64) *WeeklyDigest