import type { KeychainPromptOutcome } from './audit.js'; export type SecretUsageEvent = 'access' | 'unlock' | 'import' | 'export' | 'create' | 'view'; export declare const SECRET_USAGE_EVENTS: readonly SecretUsageEvent[]; export interface UsageStat { count: number; last: string | null; } export interface BundleUsageSummary { bundle: string; total: number; events: Record; lastUsedAt: string | null; firstUsedAt: string | null; byAgent: Array<{ agent: string; count: number; }>; } export interface PromptDetail { step: string | null; itemCount: number | null; outcome: KeychainPromptOutcome | null; durationMs: number | null; command: string | null; pid: number | null; parentPid: number | null; error: string | null; } export interface SecretUsageHistoryEntry { ts: string; bundle: string; event: SecretUsageEvent | 'prompt'; agent: string | null; host: string | null; source: string | null; status: string | null; keyCount: number | null; prompt?: PromptDetail; } export declare function getAllBundleUsage(): Map; export declare function getBundleUsage(bundle: string): BundleUsageSummary | undefined; export declare function getUsageHistory(bundle: string | undefined, limit?: number): SecretUsageHistoryEntry[];