// Extracted from src/db/repository.ts (mechanical split — bodies unchanged).
// audit repository domain. Facade: src/db/repository.ts (Repository class).
import Database from 'better-sqlite3';

  export async function addAuditLog(db: Database.Database, jobId: string | null, action: string, actor: string, detail: object): Promise<void> {
    db
      .prepare('INSERT INTO audit_log (job_id, action, actor, detail) VALUES (?, ?, ?, ?)')
      .run(jobId, action, actor, JSON.stringify(detail));
  }
