/**
 * Audit Trail Service
 *
 * Provides file-based persistence for the security audit trail.
 * Writes audit entries as append-only JSONL (one JSON object per line)
 * for structured, queryable audit logging.
 *
 * @module services/agent/crewly-agent/audit-trail.service
 */
import type { AuditEntry, AuditLogFilters } from './types.js';
/**
 * File-based audit trail service.
 *
 * Persists audit entries as append-only JSONL files organized by session.
 * Each session gets its own log file for easy per-agent auditing.
 *
 * @example
 * ```typescript
 * const trail = new AuditTrailService('/path/to/.crewly', 'agent-session-1');
 * await trail.initialize();
 * await trail.append(auditEntry);
 * const entries = await trail.query({ limit: 50 });
 * ```
 */
export declare class AuditTrailService {
    private crewlyHome;
    private sessionName;
    private logDir;
    private logFile;
    private initialized;
    /**
     * Create a new AuditTrailService.
     *
     * @param crewlyHome - Path to the .crewly directory
     * @param sessionName - Agent session name for log file naming
     */
    constructor(crewlyHome: string, sessionName: string);
    /**
     * Initialize the audit trail by ensuring the log directory exists.
     *
     * @throws Error if directory creation fails
     */
    initialize(): Promise<void>;
    /**
     * Append an audit entry to the log file.
     *
     * @param entry - Audit entry to persist
     * @throws Error if not initialized or write fails
     */
    append(entry: AuditEntry): Promise<void>;
    /**
     * Query persisted audit entries with optional filters.
     *
     * Reads the log file and returns matching entries in reverse
     * chronological order (most recent first).
     *
     * @param filters - Query filters for limit, sensitivity, and toolName
     * @returns Filtered audit entries
     */
    query(filters: AuditLogFilters): Promise<AuditEntry[]>;
    /**
     * Get the path to the audit log file.
     *
     * @returns Absolute path to the JSONL log file
     */
    getLogFilePath(): string;
    /**
     * Check if the service has been initialized.
     *
     * @returns True if initialize() has been called successfully
     */
    isInitialized(): boolean;
}
//# sourceMappingURL=audit-trail.service.d.ts.map