/** A single cost entry for one session within a task */
export interface CostEntry {
	taskId: string
	sessionId: string
	providerId: string // "anthropic", "openai"
	modelId: string // "claude-opus-4-6", "gpt-4o"
	inputTokens: number
	outputTokens: number
	thinkingTokens?: number
	cacheReadTokens?: number
	cacheCreationTokens?: number
	costUsd: number // Calculated cost in USD
	timestamp: string // ISO 8601
	durationMs: number
}

/** Aggregated cost summary for all sessions within a task */
export interface TaskCostSummary {
	taskId: string
	totalCostUsd: number
	totalInputTokens: number
	totalOutputTokens: number
	totalThinkingTokens: number
	sessionCount: number
	totalDurationMs: number
	entries: CostEntry[]
	costPerSession: number // Average cost per session
}

/** Provider-level cost comparison for a single task */
export interface ProviderCostComparison {
	taskId: string
	byProvider: Array<{
		providerId: string
		modelId: string
		totalCostUsd: number
		totalTokens: number
		sessionCount: number
	}>
}

/** Cost trend data over a time period */
export interface CostTrend {
	dataPoints: Array<{
		date: string // YYYY-MM-DD
		taskCount: number
		totalCostUsd: number
		avgCostPerTask: number
		tokenTotal: number
	}>
	periodDays: number
}
