class AuditService
implements IAuditLogger

Audit service backed by an IAuditStorage port.

Implements the committed write-only IAuditLogger contract: log() stamps the record with id (runtime.uuid()) and timestamp (runtime.now()), deep-freezes it (immutability), then appends it to storage.

Constructors

AuditService(
storage: IAuditStorage,
runtime: IRuntimeServices
)

Methods

log(entry: AuditEntry): Promise<void>

Appends an entry to the audit trail. Entries are immutable once written.

Usage

import { AuditService } from "audit-plugin/src/index.ts";