/**
 * History Store
 *
 * Append-only storage for certification and scan history.
 * Uses JSONL format for efficient streaming reads/writes.
 *
 * @module history/store
 */
import type { HistoryEntry, HistoryEntryType, HistoryQueryOptions, HistoryQueryResult, TrendPeriod, TrendAnalysis, ActorIdentity } from "./types.js";
/**
 * Calculate SHA-256 hash of an entry (excluding the integrity field)
 */
export declare function calculateEntryHash(entry: HistoryEntry): string;
/**
 * Get the hash of the last entry in the history file
 */
export declare function getLastEntryHash(projectPath: string): Promise<string>;
/**
 * Options for appending history entries
 */
export interface AppendHistoryOptions {
    /** Actor performing this action */
    actor?: ActorIdentity;
    /** Enable integrity proof (hash chain) */
    enableIntegrity?: boolean;
    /** Sign the entry with Sigstore (requires integrity) */
    sign?: boolean;
}
/**
 * Append a history entry
 */
export declare function appendHistoryEntry(projectPath: string, entry: Omit<HistoryEntry, "id" | "timestamp" | "projectPath">, options?: AppendHistoryOptions): Promise<HistoryEntry>;
/**
 * Query history entries with filtering and pagination
 */
export declare function queryHistory(projectPath: string, options?: HistoryQueryOptions): Promise<HistoryQueryResult>;
/**
 * Calculate trends from history data
 */
export declare function calculateTrends(projectPath: string, options?: {
    period?: TrendPeriod;
    startDate?: string;
    endDate?: string;
}): Promise<TrendAnalysis>;
/**
 * Get recent activity summary
 */
export declare function getRecentActivity(projectPath: string, days?: number): Promise<{
    certifications: number;
    scans: number;
    findings: number;
    fixed: number;
    latestCertification?: {
        id: string;
        score: number;
        level: string;
        timestamp: string;
    };
}>;
/**
 * Format trends as markdown
 */
export declare function formatTrendsAsMarkdown(analysis: TrendAnalysis): string;
/**
 * Get history file stats
 */
export declare function getHistoryStats(projectPath: string): Promise<{
    exists: boolean;
    entries: number;
    sizeBytes: number;
    oldestEntry?: string;
    newestEntry?: string;
}>;
/**
 * Audit export format
 */
export type AuditExportFormat = "json" | "jsonl" | "csv";
/**
 * Audit export options
 */
export interface AuditExportOptions {
    /** Export format */
    format?: AuditExportFormat;
    /** Start date filter */
    startDate?: string;
    /** End date filter */
    endDate?: string;
    /** Entry types to include */
    types?: HistoryEntryType[];
    /** Include integrity proofs */
    includeIntegrity?: boolean;
    /** Output file path (optional - returns content if not provided) */
    outputPath?: string;
}
/**
 * Audit export result
 */
export interface AuditExportResult {
    /** Export timestamp */
    exportedAt: string;
    /** Project path */
    projectPath: string;
    /** Number of entries exported */
    entryCount: number;
    /** Date range covered */
    dateRange: {
        start: string;
        end: string;
    };
    /** Chain integrity at export time */
    chainIntegrity: {
        genesisHash?: string;
        headHash?: string;
        entriesWithIntegrity: number;
    };
    /** Output file path if written to disk */
    outputPath?: string;
    /** Content if not written to disk */
    content?: string;
}
/**
 * Export audit trail for compliance purposes
 *
 * Creates a portable, verifiable export of the audit history
 * suitable for external compliance review.
 */
export declare function exportAuditTrail(projectPath: string, options?: AuditExportOptions): Promise<AuditExportResult>;
//# sourceMappingURL=store.d.ts.map