/**
 * normalize-agent-status (#10) — clean-room vendor-event → bucket mapping.
 *
 * Different coding agents (claude, opencode, codex/gemini, goose, qwen) emit
 * lifecycle hook events under inconsistent names: PascalCase (`SessionStart`),
 * snake_case (`session_start`), camelCase (`sessionStart`), and a handful of
 * provider-specific approval events (`exec_approval_request`). This module
 * collapses every known event name into one of three coarse signals:
 *
 *   working  — the agent is actively progressing a turn
 *   blocked  — the agent is waiting on a human (permission / approval / question)
 *   done     — the turn / session ended cleanly
 *
 * `null` is returned for anything unrecognized so callers can ignore noise.
 *
 * Built now for the scoped status-publish, but specifically shaped for reuse by
 * the documented config-injection follow-on: a future notify-hook injected into
 * each agent's native config will POST the RAW vendor event name to a BooCoder
 * endpoint, which runs this helper to derive the normalized status. The names
 * below are facts about each agent's hook surface — not copied vendor code.
 */

export type AgentStatus = 'working' | 'blocked' | 'idle' | 'error';
