# Class AuditTrail

Append-only audit trail for security pipeline decisions. Events are bounded by MAX_EVENTS to prevent unbounded growth.

- Defined in packages/nexus-agents/src/security/audit-trail.ts:137

##### Index

### Constructors

constructor

### Accessors

size

### Methods

append
query
clear

## Constructors

### constructor

- new AuditTrail(): AuditTrail

  #### Returns AuditTrail

## Accessors

### size

- get size(): number

  Returns the total number of events.

  #### Returns number

  - Defined in packages/nexus-agents/src/security/audit-trail.ts:180

## Methods

### append

- append(event: Omit<SecurityAuditEvent, "id" | "timestamp">): string

  Appends an event to the trail. Returns the assigned event ID.

  #### Parameters

  - event: Omit<SecurityAuditEvent, "id" | "timestamp">

  #### Returns string

  - Defined in packages/nexus-agents/src/security/audit-trail.ts:142

### query

- query(filter?: SecurityAuditQuery): readonly SecurityAuditEvent[]

  Queries events matching the given filter.

  #### Parameters

  - filter: SecurityAuditQuery = {}

  #### Returns readonly SecurityAuditEvent[]

  - Defined in packages/nexus-agents/src/security/audit-trail.ts:156

### clear

- clear(): void

  Clears all events.

  #### Returns void

  - Defined in packages/nexus-agents/src/security/audit-trail.ts:185