/**
 * Audit history persistence and trend detection.
 * Stores audit results per server and detects score changes over time.
 * History entries are validated with Zod .strict() to prevent bloat.
 * detectTrend is version-aware: cross-methodology comparisons return "methodology-change".
 */
import type { AuditResult, AuditHistoryEntry, TrendResult } from "./types.js";
/**
 * Load audit history for a specific server IP.
 * Returns empty array if no history exists, file is corrupt, or any entry fails Zod .strict() validation.
 */
export declare function loadAuditHistory(serverIp: string): AuditHistoryEntry[];
/**
 * Save audit result to history file.
 * Appends to existing history, caps at MAX_ENTRIES_PER_SERVER per server.
 * Uses atomic write pattern (write then rename) for safety.
 * Wrapped in withFileLock to prevent concurrent write corruption.
 */
export declare function saveAuditHistory(result: AuditResult): Promise<void>;
/**
 * Compute trend from audit history entries.
 * Returns a TrendResult with chronological entries, score deltas, and cause attribution.
 * Pure function — no I/O.
 */
export declare function computeTrend(history: AuditHistoryEntry[], options?: {
    days?: number;
}): TrendResult;
/**
 * Detect score trend compared to previous audit.
 * Version-aware: filters history to same auditVersion before comparing.
 * Returns "methodology-change" if no same-version history exists (cross-version comparison unsafe).
 * Legacy entries without auditVersion are treated as "1.0.0".
 */
export declare function detectTrend(currentScore: number, currentVersion: string, history: AuditHistoryEntry[]): string;
//# sourceMappingURL=history.d.ts.map