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
imsgStatus: legacy external CLI integration. Gateway spawns
imsg rpcPreferred iMessage path for new setups.
iMessage DMs default to pairing mode.
Full iMessage field reference.
text<Step title="Configure OpenClaw"> ```json5} { channels: { imessage: { enabled: true, cliPath: "/usr/local/bin/imsg", dbPath: "/Users/user/Library/Messages/chat.db", }, }, } ``` </Step> <Step title="Start gateway"> ```bash} openclaw gateway ``` </Step> <Step title="Approve first DM pairing (default dmPolicy)"> ```bash} openclaw pairing list imessage openclaw pairing approve imessage <CODE> ``` Pairing requests expire after 1 hour. </Step> </Steps>
text```bash} #!/usr/bin/env bash exec ssh -T gateway-host imsg "$@" ``` Recommended config when attachments are enabled: ```json5} { channels: { imessage: { enabled: true, cliPath: "~/.openclaw/scripts/imsg-ssh", remoteHost: "user@gateway-host", // used for SCP attachment fetches includeAttachments: true, // Optional: override allowed attachment roots. // Defaults include /Users/*/Library/Messages/Attachments attachmentRoots: ["/Users/*/Library/Messages/Attachments"], remoteAttachmentRoots: ["/Users/*/Library/Messages/Attachments"], }, }, } ``` If `remoteHost` is not set, OpenClaw attempts to auto-detect it by parsing the SSH wrapper script. `remoteHost` must be `host` or `user@host` (no spaces or SSH options). OpenClaw uses strict host-key checking for SCP, so the relay host key must already exist in `~/.ssh/known_hosts`. Attachment paths are validated against allowed roots (`attachmentRoots` / `remoteAttachmentRoots`).
imsgimsgbashimsg chats --limit 1 # or imsg send <handle> "test"
text* `pairing` (default) * `allowlist` * `open` (requires `allowFrom` to include `"*"`) * `disabled` Allowlist field: `channels.imessage.allowFrom`. Allowlist entries can be handles or chat targets (`chat_id:*`, `chat_guid:*`, `chat_identifier:*`).
text* `allowlist` (default when configured) * `open` * `disabled` Group sender allowlist: `channels.imessage.groupAllowFrom`. Runtime fallback: if `groupAllowFrom` is unset, iMessage group sender checks fall back to `allowFrom` when available. Runtime note: if `channels.imessage` is completely missing, runtime falls back to `groupPolicy="allowlist"` and logs a warning (even if `channels.defaults.groupPolicy` is set). Mention gating for groups: * iMessage has no native mention metadata * mention detection uses regex patterns (`agents.list[].groupChat.mentionPatterns`, fallback `messages.groupChat.mentionPatterns`) * with no configured patterns, mention gating cannot be enforced Control commands from authorized senders can bypass mention gating in groups.
textGroup-ish thread behavior: Some multi-participant iMessage threads can arrive with `is_group=false`. If that `chat_id` is explicitly configured under `channels.imessage.groups`, OpenClaw treats it as group traffic (group gating + group session isolation).
Legacy iMessage chats can also be bound to ACP sessions.
Fast operator flow:
/acp spawn codex --bind here/new/reset/acp closeConfigured persistent bindings are supported through top-level
bindings[]type: "acp"match.channel: "imessage"match.peer.id+15555550123user@example.comchat_id:<id>chat_guid:<guid>chat_identifier:<identifier>Example:
json5{ agents: { list: [ { id: "codex", runtime: { type: "acp", acp: { agent: "codex", backend: "acpx", mode: "persistent" }, }, }, ], }, bindings: [ { type: "acp", agentId: "codex", match: { channel: "imessage", accountId: "default", peer: { kind: "group", id: "chat_id:123" }, }, acp: { label: "codex-group" }, }, ], }
See ACP Agents for shared ACP binding behavior.
iMessage allows channel-initiated config writes by default (for
/config set|unsetcommands.config: trueDisable:
json5{ channels: { imessage: { configWrites: false, }, }, }
© 2024 TaskFlow Mirror
Powered by TaskFlow Sync Engine