Caricamento in corso...
Caricamento in corso...
Last synced: Today, 22:00
Technical reference for the OpenClaw framework. Real-time synchronization with the official documentation engine.
Use this file to discover all available pages before exploring further.
The macOS app is the menu‑bar companion for OpenClaw. It owns permissions, manages/attaches to the Gateway locally (launchd or manual), and exposes macOS capabilities to the agent as a node.
system.runopenclawopenclaw gateway installThe app manages a per‑user LaunchAgent labeled
ai.openclaw.gatewayai.openclaw.<profile>--profileOPENCLAW_PROFILEcom.openclaw.*bashlaunchctl kickstart -k gui/$UID/ai.openclaw.gateway launchctl bootout gui/$UID/ai.openclaw.gateway
Replace the label with
ai.openclaw.<profile>If the LaunchAgent isn’t installed, enable it from the app or run
openclaw gateway installThe macOS app presents itself as a node. Common commands:
canvas.presentcanvas.navigatecanvas.evalcanvas.snapshotcanvas.a2ui.*camera.snapcamera.clipscreen.snapshotscreen.recordsystem.runsystem.notifyThe node reports a
permissionsNode service + app IPC:
system.runDiagram (SCI):
textGateway -> Node Service (WS) | IPC (UDS + token + HMAC + TTL) v Mac App (UI + TCC + system.run)
system.runtext~/.openclaw/exec-approvals.json
Example:
json{ "version": 1, "defaults": { "security": "deny", "ask": "on-miss" }, "agents": { "main": { "security": "allowlist", "ask": "on-miss", "allowlist": [{ "pattern": "/opt/homebrew/bin/rg" }] } } }
Notes:
allowlist&&||;|`$<>()system.runPATHDYLD_*LD_*NODE_OPTIONSPYTHON*PERL*RUBYOPTSHELLOPTSPS4bash|sh|zsh ... -c/-lcTERMLANGLC_*COLORTERMNO_COLORFORCE_COLORenvnicenohupstdbuftimeoutThe app registers the
openclaw://openclaw://agentTriggers a Gateway
agentbashopen 'openclaw://agent?message=Hello%20from%20deep%20link'
Query parameters:
messagesessionKeythinkingdelivertochanneltimeoutSecondskeySafety:
keykeydelivertochannelkeyAvoid putting your OpenClaw state dir in iCloud or other cloud-synced folders. Sync-backed paths can add latency and occasionally cause file-lock/sync races for sessions and credentials.
Prefer a local non-synced state path such as:
bashOPENCLAW_STATE_DIR=~/.openclaw
If
openclaw doctor~/Library/Mobile Documents/com~apple~CloudDocs/...~/Library/CloudStorage/...it will warn and recommend moving back to a local path.
cd apps/macos && swift buildswift run OpenClawscripts/package-mac-app.shUse the debug CLI to exercise the same Gateway WebSocket handshake and discovery logic that the macOS app uses, without launching the app.
bashcd apps/macos swift run openclaw-mac connect --json swift run openclaw-mac discover --timeout 3000 --json
Connect options:
--url <ws://host:port>--mode <local|remote>--probe--timeout <ms>15000--jsonDiscovery options:
--include-local--timeout <ms>2000--jsonWhen the macOS app runs in Remote mode, it opens an SSH tunnel so local UI components can talk to a remote Gateway as if it were on localhost.
18789ssh -N -L <local>:127.0.0.1:<remote>127.0.0.1For setup steps, see macOS remote access. For protocol details, see Gateway protocol.
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine