/** * Usage Optimize subcommand — scans spending history for actionable waste patterns. * * Each detector is a pure function over the full spending ledger. Output is ranked * by urgency (estimated dollar savings), so the user can address the highest-value * issues first. */ import type { CommandAdapter } from '../command-adapter.interface.js'; import { type MCPAuditLoggerService } from '../../mcp/mcp-audit-logger.service.js'; import { type AgentSelectionAnalyticsService } from '../../services/agent-selection-analytics.service.js'; import { type UsageAnalytics } from '../../utils/usage-analytics.js'; export interface OptimizeFinding { details: string; detectorId: string; estimatedSavingsUsd: number; suggestedAction: string; title: string; urgency: OptimizeUrgency; } export type OptimizeUrgency = 'high' | 'low' | 'medium'; export declare class OptimizeScanner { private readonly analytics; private readonly agentAnalytics; private readonly mcpAuditLogger; constructor(analytics: UsageAnalytics, agentAnalytics?: AgentSelectionAnalyticsService, mcpAuditLogger?: MCPAuditLoggerService); scan(): OptimizeFinding[]; private detectAgentMisrouting; private detectFlakyMCPTools; private detectHighIterationCommands; private detectProgressiveDisclosureThrash; private detectUnderutilisedCache; private detectUnknownModelPricing; } export declare function configureUsageOptimizeSubcommand(usageCmd: CommandAdapter): void; //# sourceMappingURL=usage-optimize.d.ts.map