import type { Hook, HookContext } from '../types';
export interface AuditHookOptions {
    projectDir: string;
    /** Override the audit file path. */
    filePath?: string;
    /** Max characters per stringified field (default 2000). */
    maxFieldChars?: number;
    /** Field names whose values are replaced with `[redacted]`. */
    redactFields?: string[];
}
export interface AuditEntry {
    timestamp: string;
    eventType: HookContext['eventType'];
    tool?: string;
    /** Truncated, JSON-stringified input. */
    input?: string;
    /** Truncated tool output (post events only). */
    output?: string;
    error?: string;
}
export declare function auditFilePath(projectDir: string): string;
export declare function createAuditHooks(options: AuditHookOptions): Hook[];
export declare function readAuditLog(projectDir: string, limit?: number): Promise<AuditEntry[]>;
export interface RenderRecentAuditOptions {
    /** Max audit entries to scan from the tail. Defaults to 50. */
    scanLimit?: number;
    /** Only entries newer than this many ms are considered. Defaults to 10 minutes. */
    windowMs?: number;
    /** Only render when at least this many failures appear in the window. Defaults to 2. */
    minFailures?: number;
    /** Override of the audit reader (test seam). */
    reader?: typeof readAuditLog;
}
/**
 * Build a compact summary of recent tool failures for inclusion in the chat
 * system prompt. Returns an empty string when nothing actionable is in the
 * window; the goal is to surface signal, not chatter.
 */
export declare function renderRecentAuditForPrompt(projectDir: string, options?: RenderRecentAuditOptions): Promise<string>;
//# sourceMappingURL=audit.d.ts.map