//! Audit Log System
//!
//! External audit logging for zsqlite that provides:
//! - v1.0: Complete operation auditing with verifiable integrity (hash chain)
//! - v2.0: Time travel to any point in history (future)
//!
//! ## Features
//!
//! - Captures INSERT, UPDATE, DELETE operations
//! - Records before/after values
//! - Tracks context (user, app, host, pid)
//! - Hash chain for integrity verification
//! - Automatic file rotation by size/age
//! - JSON Lines format (human readable)
//!
//! ## Quick Start
//!
//! ```zig
//! const audit = @import("zsqlite").audit;
//!
//! // Initialize
//! var log = try audit.AuditLog.init(allocator, &db, .{
//!     .log_dir = "./mydb_audit",
//!     .app_name = "myapp",
//! });
//! defer log.deinit();
//!
//! // Set user after login
//! try log.setUser("alice");
//!
//! // Operations are captured automatically
//! try db.exec("INSERT INTO users (name) VALUES ('Bob')");
//!
//! // Verify integrity
//! var result = try audit.verifyChain(allocator, "./mydb_audit");
//! defer result.deinit(allocator);
//! if (!result.valid) {
//!     std.debug.print("Corrupted at seq {}\n", .{result.first_invalid_seq});
//! }
//! ```

// Core types
pub const Entry = @import("entry.zig").Entry;
pub const EntryBuilder = @import("entry.zig").EntryBuilder;
pub const Operation = @import("entry.zig").Operation;
pub const Context = @import("entry.zig").Context;

// Context management
pub const AuditContext = @import("context.zig").AuditContext;
pub const EntryContext = @import("context.zig").EntryContext;
pub const OwnedEntryContext = @import("context.zig").OwnedEntryContext;

// Index and file management
pub const Index = @import("index.zig").Index;
pub const FileInfo = @import("index.zig").FileInfo;
pub const RotationConfig = @import("index.zig").RotationConfig;
pub const generateFilename = @import("index.zig").generateFilename;

// Writer
pub const Writer = @import("writer.zig").Writer;
pub const WriterStats = @import("writer.zig").Stats;
pub const WriterError = @import("writer.zig").WriterError;

// Main audit log
pub const AuditLog = @import("log.zig").AuditLog;
pub const Config = @import("log.zig").Config;
pub const CaptureConfig = @import("log.zig").CaptureConfig;
pub const Stats = @import("log.zig").Stats;

// Verification
pub const verify = @import("verify.zig");
pub const verifyChain = verify.verifyChain;
pub const quickCheck = verify.quickCheck;
pub const VerifyResult = verify.VerifyResult;

// Tests
test {
    _ = @import("entry.zig");
    _ = @import("context.zig");
    _ = @import("index.zig");
    _ = @import("writer.zig");
    _ = @import("log.zig");
    _ = @import("verify.zig");
}
