

























@@ -7,7 +7,7 @@ title: "Gateway architecture"
7788## Overview
9910-- A single long‑lived **Gateway** owns all messaging surfaces (WhatsApp via
10+- A single long-lived **Gateway** owns all messaging surfaces (WhatsApp via
1111 Baileys, Telegram via grammY, Slack, Discord, Signal, iMessage, WebChat).
1212- Control-plane clients (macOS app, CLI, web UI, automations) connect to the
1313 Gateway over **WebSocket** on the configured bind host (default
@@ -25,7 +25,7 @@ title: "Gateway architecture"
2525### Gateway (daemon)
26262727- Maintains provider connections.
28-- Exposes a typed WS API (requests, responses, server‑push events).
28+- Exposes a typed WS API (requests, responses, server-push events).
2929- Validates inbound frames against JSON Schema.
3030- Emits events like `agent`, `chat`, `presence`, `health`, `heartbeat`, `cron`.
3131@@ -38,7 +38,7 @@ title: "Gateway architecture"
3838### Nodes (macOS / iOS / Android / headless)
39394040- Connect to the **same WS server** with `role: node`.
41-- Provide a device identity in `connect`; pairing is **device‑based** (role `node`) and
41+- Provide a device identity in `connect`; pairing is **device-based** (role `node`) and
4242 approval lives in the device pairing store.
4343- Expose commands like `canvas.*`, `camera.*`, `screen.record`, `location.get`.
4444@@ -90,8 +90,8 @@ sequenceDiagram
9090 instead of `connect.params.auth.*`.
9191- Private-ingress `gateway.auth.mode: "none"` disables shared-secret auth
9292 entirely; keep that mode off public/untrusted ingress.
93-- Idempotency keys are required for side‑effecting methods (`send`, `agent`) to
94- safely retry; the server keeps a short‑lived dedupe cache.
93+- Idempotency keys are required for side-effecting methods (`send`, `agent`) to
94+ safely retry; the server keeps a short-lived dedupe cache.
9595- Nodes must include `role: "node"` plus caps/commands/permissions in `connect`.
96969797## Pairing + local trust
@@ -109,7 +109,7 @@ sequenceDiagram
109109- Signature payload `v3` also binds `platform` + `deviceFamily`; the gateway
110110 pins paired metadata on reconnect and requires repair pairing for metadata
111111 changes.
112-- **Non‑local** connects still require explicit approval.
112+- **Non-local** connects still require explicit approval.
113113- Gateway auth (`gateway.auth.*`) still applies to **all** connections, local or
114114 remote.
115115@@ -138,12 +138,12 @@ Details: [Gateway protocol](/gateway/protocol), [Pairing](/channels/pairing),
138138139139- Start: `openclaw gateway` (foreground, logs to stdout).
140140- Health: `health` over WS (also included in `hello-ok`).
141-- Supervision: launchd/systemd for auto‑restart.
141+- Supervision: launchd/systemd for auto-restart.
142142143143## Invariants
144144145145- Exactly one Gateway controls a single Baileys session per host.
146-- Handshake is mandatory; any non‑JSON or non‑connect first frame is a hard close.
146+- Handshake is mandatory; any non-JSON or non-connect first frame is a hard close.
147147- Events are not replayed; clients must refresh on gaps.
148148149149## Related
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。