Documentation Index
Fetch the complete documentation index at: https://ancplua.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
iMessage (legacy: imsg)
Status: legacy external CLI integration. Gateway spawnsimsg rpc and communicates over JSON-RPC on stdio (no separate
daemon/port).
Quick setup
- Local Mac (fast path)
- Remote Mac over SSH
Requirements and permissions (macOS)
- Messages must be signed in on the Mac running
imsg. - Full Disk Access is required for the process context running Datzi/
imsg(Messages DB access). - Automation permission is required to send messages through Messages.app.
Access control and routing
channels.imessage.dmPolicy controls direct messages:
pairing(default)allowlistopen(requiresallowFromto include"*")disabled
channels.imessage.allowFrom.
channels.imessage.groupPolicy controls group handling:
allowlist(default when configured)opendisabled
channels.imessage.groupAllowFrom.
Sessions:
- DMs use direct routing; groups use group routing.
- With default
session.dmScope=main, iMessage DMs collapse into the agent main session. - Group sessions are isolated (
agent:<agentId>:imessage:group:<chat_id>).
Deployment patterns
Dedicated bot macOS user (separate iMessage identity)
Use a dedicated Apple ID and macOS user so bot traffic is isolated from your personal Messages profile. Typical flow:- Create/sign in a dedicated macOS user.
- Sign into Messages with the bot Apple ID in that user.
- Install
imsgin that user. - Create SSH wrapper so Datzi can run
imsgin that user context. - Point
channels.imessage.accounts.<id>.cliPathand.dbPathto that user profile.
Remote Mac over Tailscale (example)
Common topology:- gateway runs on Linux/VM
- iMessage +
imsgruns on a Mac in your tailnet cliPathwrapper uses SSH to runimsgremoteHostenables SCP attachment fetches
Media, chunking, and delivery targets
- inbound attachment ingestion is optional:
channels.imessage.includeAttachments - remote attachment paths can be fetched via SCP when
remoteHostis set - attachment paths must match allowed roots
- outbound media size uses
channels.imessage.mediaMaxMb(default 16 MB) - text chunk limit:
channels.imessage.textChunkLimit(default 4000)
chat_id:123(recommended for stable routing)chat_guid:...chat_identifier:...
Config writes
iMessage allows channel-initiated config writes by default (for/config set|unset when commands.config: true).
Disable:
Troubleshooting
- imsg not found or RPC unsupported: validate the binary and RPC support with
imsg rpc --helpanddatzi channels status --probe. - DMs are ignored: check
channels.imessage.dmPolicy,channels.imessage.allowFrom, and pairing approvals. - Group messages are ignored: check
channels.imessage.groupPolicy,channels.imessage.groupAllowFrom, and mention pattern configuration. - Remote attachments fail: verify
remoteHost, key auth, andknown_hosts. - macOS permission prompts were missed: re-run
imsg chats --limit 1in an interactive GUI terminal in the same user/session context.
Configuration reference pointers
- Configuration reference - iMessage
- Gateway configuration
- Pairing
- BlueBubbles (see the channels overview for details)
