# admin-audit fragment

**ID:** `fvcms.fragment.admin-audit.001`

## What it is

The **Audit** admin panel. Shows the audit log (last 50 entries) + the event bus (last 50 events), refreshed every 2s. The audit log captures security-relevant actions; the event bus shows all chrome events per §12.7.

## Public API

```js
import { openAdminAudit, renderAdminAudit, logAuditEvent, logEvent } from 'app-fragments/admin-audit/index.js';

// Log a security action (called by other panels or the runtime)
logAuditEvent({ action: 'role.changed', detail: 'operator upgraded coder → reviewer' });

// Log a chrome event (called by the event bus listener)
logEvent({ name: 'region:selected', source: 'admin-pages' });

const panel = openAdminAudit();
```

## Recipe (10-item, abbreviated)

1. **purpose** — read-only audit log + event bus display
2. **inputs** — `logAuditEvent()`, `logEvent()` from other fragments
3. **outputs** — 2 lists, auto-refreshed
4. **state machine** — same as other panels
5. **event bus** — subscribes to all 11 standard events
6. **dependencies** — none
7. **constitutional refs** — app-pact §12.4 (audit in deploy), §12.7 (event bus)
8. **tier** — T2
9. **canonical home** — `app-fragments/admin-audit/`
10. **recipe** — this file
