export interface AuditEventInput { score: number; axes: { tokens: number | null; a11y: number | null; components: number | null; stories: number | null; }; findings_count: number; } export interface AuditEvent extends AuditEventInput { schema_version: number; event_type: "audit"; timestamp: string; commit_sha: string | null; lyse_version: string; } interface CommandInvokedEvent { schema_version: number; event_type: "command_invoked"; timestamp: string; command: string; outcome: "success" | "user_cancelled" | "error"; duration_ms: number; } interface McpSetupCompletedEvent { schema_version: number; event_type: "mcp_setup_completed"; timestamp: string; ide: "cursor" | "claude-code" | "copilot" | "both" | "all"; } interface InitStepCompletedEvent { schema_version: number; event_type: "init_step_completed"; timestamp: string; step: string; } export type HistoryEvent = AuditEvent | CommandInvokedEvent | McpSetupCompletedEvent | InitStepCompletedEvent; export declare function appendAuditEvent(cwd: string, input: AuditEventInput, commitSha: string | null): Promise; /** * Append a CommandInvokedEvent to history. * Only emitted when consent has been accepted. Pass `suppress: true` on the run * that just requested consent — per ADR 0012, no telemetry is recorded for the * run during which consent is first granted, even though the cache now reads as * accepted. */ export declare function appendCommandInvokedEvent(cwd: string, command: string, outcome: "success" | "user_cancelled" | "error", durationMs: number, opts?: { suppress?: boolean; }): Promise; /** * Append a McpSetupCompletedEvent to history. * Only emitted when consent has been accepted. */ export declare function appendMcpSetupCompletedEvent(cwd: string, ide: "cursor" | "claude-code" | "copilot" | "both" | "all"): Promise; /** * Append an InitStepCompletedEvent to history. * Only emitted when consent has been accepted. */ export declare function appendInitStepCompletedEvent(cwd: string, step: string): Promise; export declare function readRecent(cwd: string, n?: number): Promise; export declare function computeDelta(current: AuditEventInput, previous: AuditEvent): { score: number; days: number; }; export {};