/**
 * Secrets usage read-model — thin adapter over the analytics usage warehouse
 * (`kind=secret`). Kept so `secrets view` / `list` / `activity` keep their API
 * while the durable store lives at ~/.agents/.history/analytics/usage.db.
 */
export type SecretUsageEvent = 'access' | 'unlock' | 'import' | 'export' | 'create' | 'view';
export declare const SECRET_USAGE_EVENTS: readonly SecretUsageEvent[];
export interface RecordUsageParams {
    bundle: string;
    event: SecretUsageEvent;
    agent?: string;
    host?: string;
    source?: string;
    status?: 'success' | 'error';
    keyCount?: number;
}
export interface UsageStat {
    count: number;
    last: string | null;
}
export interface BundleUsageSummary {
    bundle: string;
    total: number;
    events: Record<SecretUsageEvent, UsageStat>;
    lastUsedAt: string | null;
    firstUsedAt: string | null;
    byAgent: Array<{
        agent: string;
        count: number;
    }>;
}
export interface SecretUsageHistoryEntry {
    ts: string;
    bundle: string;
    event: SecretUsageEvent;
    agent: string | null;
    host: string | null;
    source: string | null;
    status: string | null;
    keyCount: number | null;
}
export declare function recordSecretUsage(p: RecordUsageParams): void;
export declare function getBundleUsage(bundle: string): BundleUsageSummary | undefined;
export declare function getAllBundleUsage(): Map<string, BundleUsageSummary>;
export declare function getUsageHistory(bundle: string | undefined, limit?: number): SecretUsageHistoryEntry[];
export declare function closeSecretsUsageDb(): void;
