gun) and Chrome's HTTP control endpoint. 14-operation typed capability interface with auth + argument validation.gen_statem agent loop enforcing configurable action, time, network, and search-iteration limits before any tool call reaches the browser. 7-state FSM from created → completed/failed/terminated.rest_for_one at the root — if the event bus dies, everything that depends on it restarts too. Each browser and agent is its own isolated process with its own restart budget.hyperkitty_sup (rest_for_one, intensity 8/10) ├── hk_event_sup (one_for_one) │ └── hk_event_bus [gen_server] append-only audit log + pub/sub ├── hk_messaging_sup (one_for_one) │ └── hk_messaging_portal [gen_server] HK-MSG ├── hk_browser_sup (one_for_one) │ ├── hk_browser_registry [gen_server] session_id → pid │ └── hk_browser_session_sup (simple_one_for_one, transient) │ └── hk_browser_session [gen_server] owns a Chrome OS process per session ├── hk_agent_sup (one_for_one) │ ├── hk_agent_registry [gen_server] agent_id → pid │ └── hk_agent_fsm_sup (simple_one_for_one, transient) │ └── hk_agent_fsm [gen_statem] one per agent, 7-state FSM ├── hk_search_sup (one_for_one) │ ├── hk_search_registry │ └── hk_search_job_sup (simple_one_for_one) │ └── hk_search_job [gen_statem] 11-stage pipeline per job ├── hk_api_sup │ ├── hk_api_listener [Cowboy] REST + WS (trap_exit for clean teardown) │ └── hk_frontend_* connected client registry └── hk_health [gen_server] aggregate subsystem health
gen_statem process. No tool call reaches the browser without passing through this FSM — configurable action limits, time limits, and network limits are enforced structurally, not by the LLM.ready state's tool-call handler routed to wrong next state — silently dropping the action. Fixed: correct state transition target.hk_sup_util retry-on-death-wait helper + trap_exit on hk_api_listener.PUT for /json/new — newer Chrome dropped support for GET on that endpoint. hk_chrome_http.erl updated accordingly./api/events/ws streams every event in real time.rebar3 eunit.