One turn through OpenClaw
architecture node:
User input:
Representation at this boundary
Source modules
Loop map
One pass — Telegram update → channel adapter → SQLite ingress queue →
runChannelTurn (ingest → classify → preflight → resolve → assemble → dispatch → finalize) → session binding → four-layer loop → approval chain → reply pipeline → durable sender. Every message pays the admission cost, even when the verdict is trivially dispatch.Durable before executed — the inbound message is persisted to the session store before the agent runs. The ingress queue drains with per-lane serialization, retry, dead-letter, and a stall watchdog for at-least-once ordered delivery.
Gateway, not CLI — channels run in-process as tenants of one long-running server. Route resolution maps channel + account + peer to a session key; approval prompts surface as native channel UI (Telegram inline buttons). The next message re-enters at step 1.