CLI shell for offline session replay over the event NDJSON — M2.7.
Purpose
-------
A thin ``argparse`` front-end over :mod:`oc_chat.core.replay`. Resolves an event
directory, reads + reconstructs the session tree, and prints it as text or
``replay/v0`` JSON. Three subcommands: ``session`` (full tree), ``turn`` (one
turn by id or ≥4-char prefix), ``summary`` (per-kind counts only). Never calls a
provider; never mutates the log.
Responsibilities
----------------
- :func:`main` — parse args, dispatch, map outcomes to exit codes (0 ok,
1 unexpected error, 2 user error) with a one-line ``error:`` on stderr.
- :func:`_resolve_turn` — turn-id prefix matching with ambiguity handling.
Diagnostics
-----------
Domain: OC_CHAT.REPLAY
Levels:
L2 — CLI invocation + chosen subcommand.
L3 — resolution detail (event count, matched turn).
L4 — module-load coverage marker.
Contracts
---------
- Exit 0 on success, 2 on user error (missing dir / bad prefix / bad args),
1 on unexpected exception; all errors print ``error: …`` to stderr first.
- Read-only: no provider calls, no mutation of the event log.
Dependencies
------------
- oc_diagnostics (structured debug logging via _dbg)
- oc_chat.core.replay (read_events_from_dir, build_replay_tree, renderers)