Purpose
-------
JSONL audit logger for the ``oct-mcp`` server. Writes one JSON object per
line to ``~/.oct-mcp/audit.log`` with size-based rotation (5 MB per file)
and count-based pruning (keep the 20 newest files).
Responsibilities
----------------
- Define :class:`McpAuditRecord` — the on-disk schema (blueprint §5.7).
- Implement :class:`McpAuditLogger` with the same rotation/pruning logic
as :class:`oct.git.audit.AuditLogger`, adapted for the global
``~/.oct-mcp/`` path and the richer MCP schema.
- Never log raw ``args`` when ``args_redacted`` is True — callers pass
the redacted dict; logger serialises whatever it receives.
- Emit diagnostic events via ``_dbg("MCP", ..., level)``.
Diagnostics
-----------
Domain: MCP
Levels:
L1 — errors: IO failures, serialisation failures
L2 — lifecycle: file opened/rotated, files pruned
L4 — deep trace: every write() call
Contracts
---------
- This module does not import ``click``, the MCP SDK, or any other
``oct.mcp.*`` module (no cycles).
- :meth:`McpAuditLogger.write` must never raise. IO failures are logged
at level 1 and swallowed — audit logging is observability, not
correctness.
- Filenames follow ``mcp-audit-YYYYMMDD-HHMMSS.jsonl`` strictly so
lexical ordering matches chronological ordering for pruning.
- Every :class:`McpAuditRecord` field is JSON-serialisable.