import type { PricingTier } from './common/primitives.js';
export interface UsageEvent {
    /** Tool name that was called */
    readonly toolName: string;
    /** Tier at the time of the call */
    readonly tier: PricingTier;
    /** ISO 8601 timestamp */
    readonly timestamp: string;
    /** Whether the call succeeded (not blocked by license gate) */
    readonly success: boolean;
}
export interface UsageLog {
    /** Array of usage events */
    readonly events: readonly UsageEvent[];
}
export interface DailyUsage {
    /** Date string YYYY-MM-DD */
    readonly date: string;
    /** Number of tool calls today */
    readonly callCount: number;
    /** ISO 8601 timestamp of the last tool call */
    readonly lastCallAt: string;
}
export interface TrialState {
    /** ISO 8601 timestamp of the first Planu execution ever */
    readonly firstRunAt: string;
}
export interface ToolHealthEntry {
    readonly name: string;
    readonly totalCalls: number;
    readonly successCount: number;
    readonly errorCount: number;
    /** 0.0–1.0 */
    readonly successRate: number;
}
export interface UsageStats {
    /** Total tool calls in the period */
    readonly totalCalls: number;
    /** Calls grouped by tool name */
    readonly callsByTool: Record<string, number>;
    /** Calls grouped by tier */
    readonly callsByTier: Record<string, number>;
    /** Top N most-used tools */
    readonly topTools: readonly {
        readonly name: string;
        readonly count: number;
    }[];
    /** Number of active specs */
    readonly activeSpecs: number;
    /** Number of active projects */
    readonly activeProjects: number;
    /** Current tier */
    readonly currentTier: PricingTier;
    /** Days since first run */
    readonly daysSinceFirstRun: number;
    /** Whether in trial period */
    readonly isTrialActive: boolean;
    /** Remaining daily calls (Starter only, -1 for unlimited) */
    readonly remainingDailyCalls: number;
    /** Per-tool health breakdown — sorted by error rate descending (most broken first) */
    readonly toolHealthBreakdown: readonly ToolHealthEntry[];
    /** Tool names with 0 calls in the reporting period (candidates for removal) */
    readonly deadTools: readonly string[];
}
export interface RateLimitResult {
    /** Whether the call is allowed */
    readonly allowed: boolean;
    /** If not allowed, the reason */
    readonly reason: 'daily_limit' | 'cooldown' | null;
    /** Human-readable message */
    readonly message: string;
    /** Remaining daily calls (-1 = unlimited) */
    readonly remainingCalls: number;
}
export interface UsageStatsInput {
    readonly period?: '7d' | '30d' | 'all';
}
export interface UsageReportInput {
    readonly format?: 'json' | 'markdown';
}
export interface ToolUsageReportInput {
    readonly days?: number;
    readonly projectPath?: string;
}
export interface ToolUsageTopEntry {
    readonly name: string;
    readonly count: number;
    readonly trend: '↑' | '↓' | '→';
}
export interface ToolUsageSequence {
    readonly from: string;
    readonly to: string;
    readonly count: number;
}
//# sourceMappingURL=usage.d.ts.map