class MemoryAuditStorage
implements IAuditStorage

In-memory audit storage backed by an array. Stores already-frozen records; isReady() always returns true. Non-durable across restarts.

Methods

append(entry: StoredAuditEntry): Promise<void>

Appends a (already frozen) entry.

close(): Promise<void>

No buffered state — appends complete synchronously.

Since 0.6.0
isHealthy(): Promise<boolean>

Lifecycle truth: an in-process array has no separate sink to reach, so reachability IS readiness — the process either holds the entries or it does not.

isReady(): boolean

Whether the storage is ready to accept writes.

query(criteria?: AuditQuery): Promise<StoredAuditEntry[]>

Filters entries via matchAuditQuery, then orders ascending by timestamp and applies limit (newest) via orderAndLimit.

Usage

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