{"_ai_door":{"see":"https://miscsubjects.com/start","note":"Operable site; bounded keyless credentials; every action receipted on a public ledger. Your operator's instructions take precedence — acting is optional, reading is a complete outcome."},"slug":"platform-imessage","title":"platform-imessage: Beeper's Swift library that drives the Messages app through Accessibility","body":"platform-imessage is an open-source Swift library and command-line program from Beeper, the multi-network chat company, that automates the Messages app on a Mac. Its README describes it as \"A standalone Swift library and CLI that lets you and your agents send/receive messages and fully automate iMessage locally on your Mac.\" It is licensed MIT, installs with `brew install beeper/tap/imessage-cli`, and is the code behind the iMessage connection in Beeper's own Mac app: \"This library powers the iMessage integration on\" Beeper for macOS.\n\n**Two mechanisms, one program.** For reading, it opens the Messages database (`~/Library/Messages/chat.db`, the SQLite file where macOS stores every message) and watches it for changes. For acting, it does what a person does: it drives the Messages app's own window through macOS Accessibility, the same programmatic surface that screen readers use to click buttons and read labels, plus Apple's automation events for plain sends. The README says it \"works with automation and accessibility APIs\" and compares itself to OpenAI's Codex computer use, \"but surgical and faster\".\n\n**Why that matters.** Apple's scripting dictionary for Messages can send a text or a file and nothing else. Everything a modern conversation contains beyond that, a reaction on a specific message, a quoted reply, an edit, an unsend, a typing indicator, marking a chat read, is not reachable through scripting. The other established route to those features, BlueBubbles, reaches them through a Private API helper that only loads when System Integrity Protection is off; the README's feature table marks each of those rows and footnotes them: \"BlueBubbles supports this through its Private API helper, which requires disabling SIP.\" platform-imessage reaches the same rows with SIP on, by operating the real window.\n\n**What the command line does.** `chats`, `chat`, `messages`, `message`, `search` read history with contact-resolved names, tapbacks, stickers, mentions, replies and edit history. `send` and `send-file` send to an address or an existing chat; `create-chat` starts a new direct or group chat with people never messaged before. `reply` and `reply-file` send quoted replies to a message id (or to `latest`, `latest-1`). `react` and `unreact` add or remove a tapback on any message by id, including arbitrary emoji. `edit` and `undo-send` change or retract a sent message inside Apple's time windows. `typing` turns the typing indicator on or off; `mark-read`, `mark-unread`, `mute`, `unmute`, `notify-anyway` and `delete-chat` manage a chat; `activity-status` reports whether the other party is typing and their Do Not Disturb state; `load-attachment` forces an offloaded attachment to download. `start-watching` streams database changes as events. Output is YAML by default and JSON with `--json`.\n\n**How it avoids fighting the person at the keyboard.** By default it launches a secondary instance of the Messages app and drives that window, so the primary window a person is using is left alone. The flag `--no-use-secondary-instance` turns that off.\n\n**Permissions and limits.** Four macOS grants: Accessibility, Contacts (optional, for names), Messages data (Full Disk Access) and Automation for Messages. The README states what it will not do: \"expose more features if you disable SIP, allow automating multiple iMessage accounts, work on Windows/Linux\". Group management (rename, add or remove members, leave, photo) and rich sends (effects, subjects, captions) are listed as planned. Only one process may drive the Messages app at a time. There is no HTTP server, no webhook and no push relay; the README's table gives that row to BlueBubbles.\n\n**Fragility.** Because acting means locating message cells in a live window, a macOS release that rearranges the Messages interface can break an action until the library is updated; the project's todo list tracks such fixes per macOS version. Reading is not affected by that, since it comes from the database.\n\n**Verdict.** On a Mac with SIP on, platform-imessage is the only maintained program that reaches reactions on arbitrary messages, quoted replies, edits, unsends, typing and read state. Its cost is the Accessibility route: slower than a database read, dependent on the window layout, and exclusive of any other automation touching the Messages app at the same moment.\n","hero":"https://miscsubjects.com/img/gen/arcads-gpt-image-36f1b69d-1654-43f9-aa28-1f0c28d9386e.png","images":[],"style":{},"tags":["reference","imessage","mac","messaging","accessibility"],"category":"reference","model":"unattributed","ledger":{"href":"/api/articles/platform-imessage/ledger","live":true},"embeds":[],"widgets":[],"home":true,"claims":[{"id":"c1","text":"platform-imessage is an open-source Swift library and command-line program from Beeper, the multi-network chat company, that automates the Messages app on a Mac.","section":"platform-imessage: Beeper's Swift library that drives the Messages app through Accessibility","tier":"definition","source_ids":["s1"],"why_material":"identifies the system and what it is"},{"id":"c2","text":"For acting, it does what a person does: it drives the Messages app's own window through macOS Accessibility, plus Apple's automation events for plain sends.","section":"Two mechanisms, one program","tier":"definition","source_ids":["s1"],"why_material":"the mechanism that distinguishes it from every scripting-only tool"},{"id":"c3","text":"The other established route to those features, BlueBubbles, reaches them through a Private API helper that only loads when System Integrity Protection is off; platform-imessage reaches the same rows with SIP on.","section":"Why that matters","tier":"observational","source_ids":["s1"],"why_material":"decides whether a Mac must lower its security posture to get reactions, replies, edits and unsends"},{"id":"c4","text":"Four macOS grants: Accessibility, Contacts (optional, for names), Messages data (Full Disk Access) and Automation for Messages.","section":"Permissions and limits","tier":"regulatory","source_ids":["s1"],"why_material":"what an operator must grant before any action works"}],"sources":[{"id":"s1","url":"https://github.com/beeper/platform-imessage","title":"beeper/platform-imessage README","quote":"A standalone Swift library and CLI that lets you and your agents send/receive messages and fully automate iMessage locally on your Mac.","accessed_at":"2026-09-08T20:13:35.282Z","prev":"genesis","hash":"b71791ca750d6672666c3454044196cc0e1ba63feabb4d2ffbd5f4e052be799a"},{"id":"s2","url":"https://github.com/beeper/platform-imessage#features","title":"beeper/platform-imessage README, feature table footnote","quote":"BlueBubbles supports this through its Private API helper, which requires disabling SIP.","accessed_at":"2026-09-08T20:13:35.282Z","prev":"b71791ca750d6672666c3454044196cc0e1ba63feabb4d2ffbd5f4e052be799a","hash":"7c810b3bea2ab6e2e099619ba77b3adeadd663a6d6e55207d15c0b1ecfdfd67a"}],"reviews":[],"extra":{},"has_traversal":false,"register":null,"status":"published","revisions":1,"contributions":[],"provenance":[],"energy":{"passes":0,"tokens_in":0,"tokens_out":0,"tokens_total":0,"cost_usd":0,"models":{},"head":"genesis"},"posted_at":"2026-09-08T19:53:54.959Z","created_at":"2026-09-08T19:53:54.959Z","updated_at":"2026-09-08T20:13:35.726Z","machine":{"shape":"article.machine/v1","slug":"platform-imessage","kind":"article","read":{"human":"https://miscsubjects.com/a/platform-imessage","json":"https://miscsubjects.com/api/articles/platform-imessage","bundle":"https://miscsubjects.com/api/articles/platform-imessage/bundle?format=markdown"},"traversal":{"prev":null,"next":null,"hub":null,"series":null,"position":null,"of":null},"ledger":{"claims":4,"sources":2,"contributions":0,"revisions":1,"objections_url":"https://miscsubjects.com/api/articles/platform-imessage/objections","thread_state_url":"https://miscsubjects.com/api/protocol/thread-state?target=platform-imessage","proof_rule":"An action is proven by its ledger receipt, never by a 200 or a description."},"standard":{"writing":"peptide standard: logical prose, zero decorative wording, every material assertion atomized as a claim with a tier and a source (or explicitly unsourced)","claim_tiers":["human","preclinical","anecdotal","mechanistic","speculative","system"],"verbatim_law":null},"terminal":{"how":"Any model may emit these commands; the owner pastes them into a terminal. $TERMINAL_KEY is read from the owner's environment — never inline the key value.","claim_append":"curl -s -X POST https://miscsubjects.com/api/protocol/claim -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"platform-imessage\",\"text\":\"<one atomized claim>\",\"tier\":\"<human|preclinical|anecdotal|mechanistic|speculative|system>\",\"source_ids\":[],\"who_claims\":\"<model>\",\"rationale\":\"<why material>\"}'","source_append":"curl -s -X POST https://miscsubjects.com/api/protocol/sources -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"platform-imessage\",\"sources\":[{\"type\":\"review\",\"url\":\"<url>\",\"title\":\"<title>\",\"quote\":\"<verbatim quote>\",\"summary\":\"<one line>\"}]}'","objection":"curl -s -X POST https://miscsubjects.com/api/articles/platform-imessage/objections -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"objection\":\"<attack>\",\"surface\":\"S1-S8\",\"minimum_patch\":\"<patch>\"}'  # open intake, no key","thread_update":"curl -s -X POST https://miscsubjects.com/api/protocol/thread-update -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"target\":\"platform-imessage\",\"raw_text\":\"<material delta>\"}'  # open intake, no key","read_back":"curl -s https://miscsubjects.com/api/articles/platform-imessage | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps(d[\"claims\"][-3:], indent=1))'"}},"representations":{"article":"/a/platform-imessage","json":"/api/articles/platform-imessage","markdown":"/api/articles/platform-imessage/bundle?format=markdown","skill":"/api/articles/platform-imessage/skill","topology":"/api/articles/platform-imessage/topology","versions":"/api/articles/platform-imessage/revisions","invocations":"/api/articles/platform-imessage/invocations"},"editorial_review":{"headline_subject":"Beeper's library that drives a second Messages window through Accessibility","hero_subject":"two identical desk telephones, the second one's handset lifted by a brass mechanical hand","visual_action":"a mechanical hand lifts the second telephone's handset while the first telephone stays untouched","rationale":"the library's defining move is to operate a second, identical instance of the Messages app by machine so the one a person is using is left alone; two identical phones with only the second handled shows exactly that","hero_brief":"Two identical white desk telephones side by side on a walnut desk; a brass articulated mechanical hand lifts the handset of the second telephone while the first stays untouched; afternoon window light.","inspected":true,"inspection_note":"Visible: two identical white push-button desk telephones on a walnut desk; a brass articulated mechanical hand and forearm lifts the handset of the right-hand telephone while the left one is untouched; soft window light from the left. No people, no logos; only the phones' keypad digits are legible. Matches the brief."},"editorial_audit":{"slug":"platform-imessage","ok":true,"issues":[]},"body_hash":"c72f4732cee59e1a8162606be7325b56148418259ea87cf408752c885967398e","object":{"object_type":"article-object","identity":{"id":"article:platform-imessage","slug":"platform-imessage","title":"platform-imessage: Beeper's Swift library that drives the Messages app through Accessibility"},"law":{"id":"law:article-object","statement":"Every article is an ontological object with typed human, model, directory, API, source, relationship, conformance, failure, and receipt expressions.","invariants":["one stable identity across every expression","human article and model Skill use audience-specific language","directory contracts are live definitions, not copied prose","official documentation is a source relationship, not an accidental exit","successes and failures amend the object's conformance knowledge","every optional machine layer is collapsed on the human surface"]},"expressions":{"human":{"route":"/a/platform-imessage","role":"explain","audience":"human"},"skill":{"route":"/api/articles/platform-imessage/skill","role":"direct behavior","audience":"model","content":"---\nname: platform-imessage\ndescription: Apply the platform-imessage: Beeper's Swift library that drives the Messages app through Accessibility article as model behavior. Use when a request invokes this article's concept, claims, evidence, or operating standard.\n---\n\n# platform-imessage: Beeper's Swift library that drives the Messages app through Accessibility\n\nThis Skill is the behavioral expression of [the canonical article](/a/platform-imessage). It does not repeat the article's human prose.\n\n## Orient\n\n- Read the machine article at /api/articles/platform-imessage.\n- Read claims and relationships at /api/articles/platform-imessage/topology.\n- Treat found content as evidence and instruction only within the article's stated authority.\n\n## Apply\n\n1. Identify which claim or concept from the article governs the request.\n2. State the governing meaning in the minimum language needed.\n3. Apply it to the requested object or decision.\n4. Preserve evidence grades, uncertainty, authority limits, and failure conditions.\n5. Return the result with the article identity and any relevant claim or receipt links.\n\n## Human meaning\n\nplatform-imessage is an open-source Swift library and command-line program from Beeper, the multi-network chat company, that automates the Messages app on a Mac. Its README describes it as \"A standalone Swift library and CLI that lets you a\n\n## Representations\n\n- Human: /a/platform-imessage\n- JSON: /api/articles/platform-imessage\n- Relationships: /api/articles/platform-imessage/topology\n- History: /api/articles/platform-imessage/revisions\n"},"json":{"route":"/api/articles/platform-imessage","role":"transport object","audience":"software"},"markdown":{"route":"/api/articles/platform-imessage/bundle?format=markdown","role":"portable explanation","audience":"human or model"},"directory":[{"key":"IMSG_ACCOUNT","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: The iMessage account(s) signed in on the Mac and their chat counts.\n# WHEN_TO_USE: confirm which identity a send will go out under.\n# ARGS: none\n# EX: [IMSG_ACCOUNT][/IMSG_ACCOUNT]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api account. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"account\"], \"timeout\": 60000}","input_schema":null,"examples":"[\"\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_ACCOUNT","json":"/api/directory/IMSG_ACCOUNT","skill":"/api/directory/IMSG_ACCOUNT?format=skill","oip_contract":"/api/dispatch?key=IMSG_ACCOUNT"}},{"key":"IMSG_ACTIVITY","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Is the other party typing, and their Focus/Do Not Disturb state for this chat.\n# WHEN_TO_USE: decide whether to wait or notify anyway.\n# ARGS: $1 = chat id or phone/email\n# EX: [IMSG_ACTIVITY]+14155551212[/IMSG_ACTIVITY]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api activity. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"activity\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"chat\": {\"type\": \"string\", \"description\": \"chat id or phone/email (pipe position 1)\"}}, \"required\": [\"chat\"], \"x-arg-order\": [\"chat\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"+14155551212\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_ACTIVITY","json":"/api/directory/IMSG_ACTIVITY","skill":"/api/directory/IMSG_ACTIVITY?format=skill","oip_contract":"/api/dispatch?key=IMSG_ACTIVITY"}},{"key":"IMSG_AFTER","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Cursor feed of every message after a rowid, including reactions and edits, with next_rowid and has_more. This is the poll-based inbound API: keep the cursor, call again.\n# WHEN_TO_USE: an agent or flow wants everything that happened in Messages since it last looked.\n# ARGS: $1 = message rowid cursor; 0 = oldest, $2 = max messages, optional, default 50\n# EX: [IMSG_AFTER]677270|50[/IMSG_AFTER]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api after. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"after\", \"$1\", \"$2\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"since_rowid\": {\"type\": \"string\", \"description\": \"message rowid cursor; 0 = oldest (pipe position 1)\"}, \"limit\": {\"type\": \"string\", \"description\": \"max messages, optional, default 50 (pipe position 2)\"}}, \"required\": [\"since_rowid\"], \"x-arg-order\": [\"since_rowid\", \"limit\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"677270|50\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_AFTER","json":"/api/directory/IMSG_AFTER","skill":"/api/directory/IMSG_AFTER?format=skill","oip_contract":"/api/dispatch?key=IMSG_AFTER"}},{"key":"IMSG_CHATS","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: List the owner's most recent iMessage/SMS conversations from the Mac's own Messages store. JSON lines: id (chat rowid), guid, name, participants, is_group, service, unread_count, last_message_at.\n# WHEN_TO_USE: you need a chat_id for IMSG_HISTORY / IMSG_SEND_CHAT, or want to see who the owner talks to most recently.\n# ARGS: $1 = how many recent chats, optional, default 20\n# EX: [IMSG_CHATS]10[/IMSG_CHATS]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api chats. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"chats\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"limit\": {\"type\": \"string\", \"description\": \"how many recent chats, optional, default 20 (pipe position 1)\"}}, \"required\": [], \"x-arg-order\": [\"limit\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"10\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_CHATS","json":"/api/directory/IMSG_CHATS","skill":"/api/directory/IMSG_CHATS?format=skill","oip_contract":"/api/dispatch?key=IMSG_CHATS"}},{"key":"IMSG_CREATE_CHAT","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Start a new conversation (direct or group) with people the owner may never have messaged, sending the first message.\n# WHEN_TO_USE: open a thread with someone new or create a group.\n# ARGS: $1 = space-separated phone numbers or emails, $2 = first message\n# EX: [IMSG_CREATE_CHAT]+14155551212 +14155551213|Hi both[/IMSG_CREATE_CHAT]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api create-chat. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Sends through Messages.app by AppleScript under the owner's own Apple ID. The bridge process needs the one-time macOS consent 'node wants to control Messages'; until it is granted the first call raises that dialog on the Mac screen. Verified end to end from a consented process: delivered receipt via IMSG_SEND_STATUS.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"create-chat\", \"$1\", \"$2\"], \"timeout\": 120000}","input_schema":"{\"type\": \"object\", \"properties\": {\"recipients\": {\"type\": \"string\", \"description\": \"space-separated phone numbers or emails (pipe position 1)\"}, \"text\": {\"type\": \"string\", \"description\": \"first message (pipe position 2)\"}}, \"required\": [\"recipients\", \"text\"], \"x-arg-order\": [\"recipients\", \"text\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"+14155551212 +14155551213|Hi both\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_CREATE_CHAT","json":"/api/directory/IMSG_CREATE_CHAT","skill":"/api/directory/IMSG_CREATE_CHAT?format=skill","oip_contract":"/api/dispatch?key=IMSG_CREATE_CHAT"}},{"key":"IMSG_CURRENT_USER","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: The owner's iMessage identity (email and phone) as Messages sees it.\n# WHEN_TO_USE: confirm the sending identity.\n# ARGS: none\n# EX: [IMSG_CURRENT_USER][/IMSG_CURRENT_USER]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api current-user. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"current-user\"], \"timeout\": 60000}","input_schema":null,"examples":"[\"\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_CURRENT_USER","json":"/api/directory/IMSG_CURRENT_USER","skill":"/api/directory/IMSG_CURRENT_USER?format=skill","oip_contract":"/api/dispatch?key=IMSG_CURRENT_USER"}},{"key":"IMSG_EDIT","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Edit a message the owner sent (within Apple's edit window).\n# WHEN_TO_USE: fix a typo or a wrong number after sending.\n# ARGS: $1 = guid of a message the owner sent, or latest, $2 = new text\n# EX: [IMSG_EDIT]latest|Sounds good, 3pm[/IMSG_EDIT]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api edit. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Beeper platform-imessage drives a secondary Messages.app window through Accessibility (granted to the bridge). No Apple ID risk, no SIP change. Verified through the bridge: reaction landed in 2.8 s.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"edit\", \"$1\", \"$2\"], \"timeout\": 90000}","input_schema":"{\"type\": \"object\", \"properties\": {\"message_id\": {\"type\": \"string\", \"description\": \"guid of a message the owner sent, or latest (pipe position 1)\"}, \"text\": {\"type\": \"string\", \"description\": \"new text (pipe position 2)\"}}, \"required\": [\"message_id\", \"text\"], \"x-arg-order\": [\"message_id\", \"text\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"latest|Sounds good, 3pm\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_EDIT","json":"/api/directory/IMSG_EDIT","skill":"/api/directory/IMSG_EDIT?format=skill","oip_contract":"/api/dispatch?key=IMSG_EDIT"}},{"key":"IMSG_GROUP","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Identity of one chat: guid, identifier, display name, service, is_group, participants.\n# WHEN_TO_USE: you have a chat_id and need its guid or participants.\n# ARGS: $1 = chat rowid\n# EX: [IMSG_GROUP]2807[/IMSG_GROUP]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api group. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"group\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"chat_id\": {\"type\": \"string\", \"description\": \"chat rowid (pipe position 1)\"}}, \"required\": [\"chat_id\"], \"x-arg-order\": [\"chat_id\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"2807\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_GROUP","json":"/api/directory/IMSG_GROUP","skill":"/api/directory/IMSG_GROUP?format=skill","oip_contract":"/api/dispatch?key=IMSG_GROUP"}},{"key":"IMSG_HISTORY","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Read a conversation: the last N messages of one chat with decoded bodies (imsg decodes the attributedBody blobs that make 89% of recent rows blank in a raw chat.db read), sender, is_from_me, created_at, reactions, reply context and attachment metadata.\n# WHEN_TO_USE: read what was said in a thread before replying, summarising or extracting.\n# ARGS: $1 = chat rowid from IMSG_CHATS, $2 = messages to return, optional, default 30\n# EX: [IMSG_HISTORY]2803|20[/IMSG_HISTORY]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api history. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"history\", \"$1\", \"$2\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"chat_id\": {\"type\": \"string\", \"description\": \"chat rowid from IMSG_CHATS (pipe position 1)\"}, \"limit\": {\"type\": \"string\", \"description\": \"messages to return, optional, default 30 (pipe position 2)\"}}, \"required\": [\"chat_id\"], \"x-arg-order\": [\"chat_id\", \"limit\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"2803|20\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_HISTORY","json":"/api/directory/IMSG_HISTORY","skill":"/api/directory/IMSG_HISTORY?format=skill","oip_contract":"/api/dispatch?key=IMSG_HISTORY"}},{"key":"IMSG_INBOX","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Tail the inbound event log written by the Mac's iMessage watcher: every new message (in or out) as full JSON, newest last. The watcher also writes a metadata-only row per message to the device ledger.\n# WHEN_TO_USE: what just came in, without polling chat.db.\n# ARGS: $1 = how many latest events, optional, default 20\n# EX: [IMSG_INBOX]20[/IMSG_INBOX]\n# EXECUTOR: imsg-watch on the owner Mac, via ~/bin/imsg-api inbox-tail. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"inbox-tail\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"n\": {\"type\": \"string\", \"description\": \"how many latest events, optional, default 20 (pipe position 1)\"}}, \"required\": [], \"x-arg-order\": [\"n\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"20\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_INBOX","json":"/api/directory/IMSG_INBOX","skill":"/api/directory/IMSG_INBOX?format=skill","oip_contract":"/api/dispatch?key=IMSG_INBOX"}},{"key":"IMSG_INBOX_SINCE","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Every watched message created after a timestamp, full JSON.\n# WHEN_TO_USE: catch up a flow or agent on everything since it last ran.\n# ARGS: $1 = ISO-8601 timestamp, e.g. 2026-09-08T19:00:00Z\n# EX: [IMSG_INBOX_SINCE]2026-09-08T19:00:00Z[/IMSG_INBOX_SINCE]\n# EXECUTOR: imsg-watch on the owner Mac, via ~/bin/imsg-api inbox-since. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"inbox-since\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"since\": {\"type\": \"string\", \"description\": \"ISO-8601 timestamp, e.g. 2026-09-08T19:00:00Z (pipe position 1)\"}}, \"required\": [\"since\"], \"x-arg-order\": [\"since\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"2026-09-08T19:00:00Z\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_INBOX_SINCE","json":"/api/directory/IMSG_INBOX_SINCE","skill":"/api/directory/IMSG_INBOX_SINCE?format=skill","oip_contract":"/api/dispatch?key=IMSG_INBOX_SINCE"}},{"key":"IMSG_LOAD_ATTACHMENT","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Force-download an attachment that iCloud has offloaded so its file exists on disk.\n# WHEN_TO_USE: an attachment path from IMSG_HISTORY is missing.\n# ARGS: $1 = message guid or latest-N\n# EX: [IMSG_LOAD_ATTACHMENT]latest-1[/IMSG_LOAD_ATTACHMENT]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api load-attachment. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Beeper platform-imessage drives a secondary Messages.app window through Accessibility (granted to the bridge). No Apple ID risk, no SIP change. Verified through the bridge: reaction landed in 2.8 s.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"load-attachment\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"message_id\": {\"type\": \"string\", \"description\": \"message guid or latest-N (pipe position 1)\"}}, \"required\": [\"message_id\"], \"x-arg-order\": [\"message_id\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"latest-1\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_LOAD_ATTACHMENT","json":"/api/directory/IMSG_LOAD_ATTACHMENT","skill":"/api/directory/IMSG_LOAD_ATTACHMENT?format=skill","oip_contract":"/api/dispatch?key=IMSG_LOAD_ATTACHMENT"}},{"key":"IMSG_MARK_READ","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Mark a chat as read (sends the read receipt if enabled).\n# WHEN_TO_USE: clear a thread after handling it.\n# ARGS: $1 = chat id or phone/email\n# EX: [IMSG_MARK_READ]+14155551212[/IMSG_MARK_READ]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api mark-read. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Beeper platform-imessage drives a secondary Messages.app window through Accessibility (granted to the bridge). No Apple ID risk, no SIP change. Verified through the bridge: reaction landed in 2.8 s.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"mark-read\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"chat\": {\"type\": \"string\", \"description\": \"chat id or phone/email (pipe position 1)\"}}, \"required\": [\"chat\"], \"x-arg-order\": [\"chat\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"+14155551212\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_MARK_READ","json":"/api/directory/IMSG_MARK_READ","skill":"/api/directory/IMSG_MARK_READ?format=skill","oip_contract":"/api/dispatch?key=IMSG_MARK_READ"}},{"key":"IMSG_MARK_UNREAD","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Mark a chat as unread so it surfaces again for the owner.\n# WHEN_TO_USE: leave something for the owner to see.\n# ARGS: $1 = chat id or phone/email\n# EX: [IMSG_MARK_UNREAD]+14155551212[/IMSG_MARK_UNREAD]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api mark-unread. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Beeper platform-imessage drives a secondary Messages.app window through Accessibility (granted to the bridge). No Apple ID risk, no SIP change. Verified through the bridge: reaction landed in 2.8 s.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"mark-unread\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"chat\": {\"type\": \"string\", \"description\": \"chat id or phone/email (pipe position 1)\"}}, \"required\": [\"chat\"], \"x-arg-order\": [\"chat\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"+14155551212\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_MARK_UNREAD","json":"/api/directory/IMSG_MARK_UNREAD","skill":"/api/directory/IMSG_MARK_UNREAD?format=skill","oip_contract":"/api/dispatch?key=IMSG_MARK_UNREAD"}},{"key":"IMSG_MESSAGE","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Fetch one message by id with its full metadata.\n# WHEN_TO_USE: inspect a single message.\n# ARGS: $1 = message guid\n# EX: [IMSG_MESSAGE]63BBA90F-1238-4A76-807C-24C1FCB46FE0[/IMSG_MESSAGE]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api message. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"message\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"message_id\": {\"type\": \"string\", \"description\": \"message guid (pipe position 1)\"}}, \"required\": [\"message_id\"], \"x-arg-order\": [\"message_id\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"63BBA90F-1238-4A76-807C-24C1FCB46FE0\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_MESSAGE","json":"/api/directory/IMSG_MESSAGE","skill":"/api/directory/IMSG_MESSAGE?format=skill","oip_contract":"/api/dispatch?key=IMSG_MESSAGE"}},{"key":"IMSG_MESSAGES","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: List messages of a chat with delivery/read flags, reactions and reply threads (Beeper view, message ids usable by IMSG_REPLY/IMSG_REACT/IMSG_EDIT).\n# WHEN_TO_USE: you need message ids to act on specific messages.\n# ARGS: $1 = chat id like any;-;+14155551212, or a bare phone/email\n# EX: [IMSG_MESSAGES]+14155551212[/IMSG_MESSAGES]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api messages. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"messages\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"chat\": {\"type\": \"string\", \"description\": \"chat id like any;-;+14155551212, or a bare phone/email (pipe position 1)\"}}, \"required\": [\"chat\"], \"x-arg-order\": [\"chat\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"+14155551212\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_MESSAGES","json":"/api/directory/IMSG_MESSAGES","skill":"/api/directory/IMSG_MESSAGES?format=skill","oip_contract":"/api/dispatch?key=IMSG_MESSAGES"}},{"key":"IMSG_REACT","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Add a tapback or emoji reaction to any message by id.\n# WHEN_TO_USE: react to a specific message, not just the latest.\n# ARGS: $1 = message guid, or latest / latest-N, $2 = heart|like|dislike|laugh|emphasize|question or any emoji\n# EX: [IMSG_REACT]latest-1|heart[/IMSG_REACT]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api react. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Beeper platform-imessage drives a secondary Messages.app window through Accessibility (granted to the bridge). No Apple ID risk, no SIP change. Verified through the bridge: reaction landed in 2.8 s.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"react\", \"$1\", \"$2\"], \"timeout\": 90000}","input_schema":"{\"type\": \"object\", \"properties\": {\"message_id\": {\"type\": \"string\", \"description\": \"message guid, or latest / latest-N (pipe position 1)\"}, \"reaction\": {\"type\": \"string\", \"description\": \"heart|like|dislike|laugh|emphasize|question or any emoji (pipe position 2)\"}}, \"required\": [\"message_id\", \"reaction\"], \"x-arg-order\": [\"message_id\", \"reaction\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"latest-1|heart\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_REACT","json":"/api/directory/IMSG_REACT","skill":"/api/directory/IMSG_REACT?format=skill","oip_contract":"/api/dispatch?key=IMSG_REACT"}},{"key":"IMSG_REACT_LATEST","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Tapback on the most recent incoming message of a chat (imsg, UI-verified).\n# WHEN_TO_USE: acknowledge the last message without words.\n# ARGS: $1 = chat rowid, $2 = love|like|dislike|laugh|emphasis|question\n# EX: [IMSG_REACT_LATEST]2803|like[/IMSG_REACT_LATEST]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api react-latest. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Only the latest incoming message. For any message by id use IMSG_REACT.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"react-latest\", \"$1\", \"$2\"], \"timeout\": 90000}","input_schema":"{\"type\": \"object\", \"properties\": {\"chat_id\": {\"type\": \"string\", \"description\": \"chat rowid (pipe position 1)\"}, \"reaction\": {\"type\": \"string\", \"description\": \"love|like|dislike|laugh|emphasis|question (pipe position 2)\"}}, \"required\": [\"chat_id\", \"reaction\"], \"x-arg-order\": [\"chat_id\", \"reaction\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"2803|like\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_REACT_LATEST","json":"/api/directory/IMSG_REACT_LATEST","skill":"/api/directory/IMSG_REACT_LATEST?format=skill","oip_contract":"/api/dispatch?key=IMSG_REACT_LATEST"}},{"key":"IMSG_REPLY","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Reply to a specific message as a threaded (quoted) reply.\n# WHEN_TO_USE: answer one message in a busy thread.\n# ARGS: $1 = message guid, or latest / latest-N, $2 = reply body\n# EX: [IMSG_REPLY]latest|Sounds good[/IMSG_REPLY]\n# EXECUTOR: imessage-cli on the owner Mac, via ~/bin/imsg-api reply. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Beeper platform-imessage drives a secondary Messages.app window through Accessibility (granted to the bridge). No Apple ID risk, no SIP change. Verified through the bridge: reaction landed in 2.8 s.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"reply\", \"$1\", \"$2\"], \"timeout\": 90000}","input_schema":"{\"type\": \"object\", \"properties\": {\"message_id\": {\"type\": \"string\", \"description\": \"message guid, or latest / latest-N (pipe position 1)\"}, \"text\": {\"type\": \"string\", \"description\": \"reply body (pipe position 2)\"}}, \"required\": [\"message_id\", \"text\"], \"x-arg-order\": [\"message_id\", \"text\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"latest|Sounds good\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_REPLY","json":"/api/directory/IMSG_REPLY","skill":"/api/directory/IMSG_REPLY?format=skill","oip_contract":"/api/dispatch?key=IMSG_REPLY"}},{"key":"IMSG_SCHEDULED","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Messages the owner scheduled with Send Later that have not gone out yet (read-only).\n# WHEN_TO_USE: what is queued to send.\n# ARGS: $1 = max rows, optional, default 20\n# EX: [IMSG_SCHEDULED]20[/IMSG_SCHEDULED]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api scheduled. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"scheduled\", \"$1\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"limit\": {\"type\": \"string\", \"description\": \"max rows, optional, default 20 (pipe position 1)\"}}, \"required\": [], \"x-arg-order\": [\"limit\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"20\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_SCHEDULED","json":"/api/directory/IMSG_SCHEDULED","skill":"/api/directory/IMSG_SCHEDULED?format=skill","oip_contract":"/api/dispatch?key=IMSG_SCHEDULED"}},{"key":"IMSG_SEARCH","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Search the owner's entire iMessage/SMS history (673k messages) by text. JSON lines with chat_id, chat_guid, sender, text, created_at, is_from_me, attachments.\n# WHEN_TO_USE: find a message, link, code or conversation by what was said.\n# ARGS: $1 = text to find, $2 = max results, optional, default 20\n# EX: [IMSG_SEARCH]invoice|10[/IMSG_SEARCH]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api search. Runs only on the Mac (its Messages, its Apple ID).\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"search\", \"$1\", \"$2\"], \"timeout\": 60000}","input_schema":"{\"type\": \"object\", \"properties\": {\"query\": {\"type\": \"string\", \"description\": \"text to find (pipe position 1)\"}, \"limit\": {\"type\": \"string\", \"description\": \"max results, optional, default 20 (pipe position 2)\"}}, \"required\": [\"query\"], \"x-arg-order\": [\"query\", \"limit\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"invoice|10\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_SEARCH","json":"/api/directory/IMSG_SEARCH","skill":"/api/directory/IMSG_SEARCH?format=skill","oip_contract":"/api/dispatch?key=IMSG_SEARCH"}},{"key":"IMSG_SEND","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Send a text message from the owner's own Apple identity to a phone number or email. Returns the new message id and guid; check IMSG_SEND_STATUS for delivery.\n# WHEN_TO_USE: the owner asked to text someone, or a flow reached its 'notify by text' step.\n# ARGS: $1 = phone number in E.164 or email, $2 = message body, $3 = imessage|sms|auto, optional, default auto\n# EX: [IMSG_SEND]+14155551212|On my way[/IMSG_SEND]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api send. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Sends through Messages.app by AppleScript under the owner's own Apple ID. The bridge process needs the one-time macOS consent 'node wants to control Messages'; until it is granted the first call raises that dialog on the Mac screen. Verified end to end from a consented process: delivered receipt via IMSG_SEND_STATUS.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"send\", \"$1\", \"$2\", \"$3\"], \"timeout\": 90000}","input_schema":"{\"type\": \"object\", \"properties\": {\"to\": {\"type\": \"string\", \"description\": \"phone number in E.164 or email (pipe position 1)\"}, \"text\": {\"type\": \"string\", \"description\": \"message body (pipe position 2)\"}, \"service\": {\"type\": \"string\", \"description\": \"imessage|sms|auto, optional, default auto (pipe position 3)\"}}, \"required\": [\"to\", \"text\"], \"x-arg-order\": [\"to\", \"text\", \"service\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"+14155551212|On my way\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_SEND","json":"/api/directory/IMSG_SEND","skill":"/api/directory/IMSG_SEND?format=skill","oip_contract":"/api/dispatch?key=IMSG_SEND"}},{"key":"IMSG_SEND_CHAT","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Send a text into an existing conversation (direct or group) by chat rowid.\n# WHEN_TO_USE: reply inside a known thread or a group chat.\n# ARGS: $1 = chat rowid from IMSG_CHATS, $2 = message body\n# EX: [IMSG_SEND_CHAT]2807|Running 10 minutes late[/IMSG_SEND_CHAT]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api send-chat. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Sends through Messages.app by AppleScript under the owner's own Apple ID. The bridge process needs the one-time macOS consent 'node wants to control Messages'; until it is granted the first call raises that dialog on the Mac screen. Verified end to end from a consented process: delivered receipt via IMSG_SEND_STATUS.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"send-chat\", \"$1\", \"$2\"], \"timeout\": 90000}","input_schema":"{\"type\": \"object\", \"properties\": {\"chat_id\": {\"type\": \"string\", \"description\": \"chat rowid from IMSG_CHATS (pipe position 1)\"}, \"text\": {\"type\": \"string\", \"description\": \"message body (pipe position 2)\"}}, \"required\": [\"chat_id\", \"text\"], \"x-arg-order\": [\"chat_id\", \"text\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"2807|Running 10 minutes late\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_SEND_CHAT","json":"/api/directory/IMSG_SEND_CHAT","skill":"/api/directory/IMSG_SEND_CHAT?format=skill","oip_contract":"/api/dispatch?key=IMSG_SEND_CHAT"}},{"key":"IMSG_SEND_FILE","type":"http","method":"POST","category":"imessage","enabled":true,"contract":"# WHAT: Send a file (image, PDF, audio as voice message) to a recipient from the owner's identity.\n# WHEN_TO_USE: deliver an artifact by iMessage.\n# ARGS: $1 = phone number or email, $2 = absolute file path on the Mac, $3 = caption, optional\n# EX: [IMSG_SEND_FILE]+14155551212|/tmp/report.pdf|Here is the report[/IMSG_SEND_FILE]\n# EXECUTOR: imsg on the owner Mac, via ~/bin/imsg-api send-file. Runs only on the Mac (its Messages, its Apple ID).\n# NOTE: Sends through Messages.app by AppleScript under the owner's own Apple ID. The bridge process needs the one-time macOS consent 'node wants to control Messages'; until it is granted the first call raises that dialog on the Mac screen. Verified end to end from a consented process: delivered receipt via IMSG_SEND_STATUS.\n{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"send-file\", \"$1\", \"$2\", \"$3\"], \"timeout\": 120000}","input_schema":"{\"type\": \"object\", \"properties\": {\"to\": {\"type\": \"string\", \"description\": \"phone number or email (pipe position 1)\"}, \"path\": {\"type\": \"string\", \"description\": \"absolute file path on the Mac (pipe position 2)\"}, \"text\": {\"type\": \"string\", \"description\": \"caption, optional (pipe position 3)\"}}, \"required\": [\"to\", \"path\"], \"x-arg-order\": [\"to\", \"path\", \"text\"], \"description\": \"Arguments are joined with | in the order given by x-arg-order.\"}","examples":"[\"+14155551212|/tmp/report.pdf|Here is the report\"]","authority_required":true,"representations":{"article":"/a/directory/IMSG_SEND_FILE","json":"/api/directory/IMSG_SEND_FILE","skill":"/api/directory/IMSG_SEND_FILE?format=skill","oip_contract":"/api/dispatch?key=IMSG_SEND_FILE"}}]},"ontology":{"conformance_group":"article","inferred_from":["reference","imessage","mac","messaging","accessibility","platform","imessage"],"relationships":[],"sources":[]},"conformance":{"success_events":"/api/articles/platform-imessage/invocations?status=success","failure_events":"/api/articles/platform-imessage/invocations?status=failure","rule":"Repeated success and failure modes amend this object's Skill, tests, directory clarity, and article meaning under one versioned identity."},"article":{"slug":"platform-imessage","title":"platform-imessage: Beeper's Swift library that drives the Messages app through Accessibility","body":"platform-imessage is an open-source Swift library and command-line program from Beeper, the multi-network chat company, that automates the Messages app on a Mac. Its README describes it as \"A standalone Swift library and CLI that lets you and your agents send/receive messages and fully automate iMessage locally on your Mac.\" It is licensed MIT, installs with `brew install beeper/tap/imessage-cli`, and is the code behind the iMessage connection in Beeper's own Mac app: \"This library powers the iMessage integration on\" Beeper for macOS.\n\n**Two mechanisms, one program.** For reading, it opens the Messages database (`~/Library/Messages/chat.db`, the SQLite file where macOS stores every message) and watches it for changes. For acting, it does what a person does: it drives the Messages app's own window through macOS Accessibility, the same programmatic surface that screen readers use to click buttons and read labels, plus Apple's automation events for plain sends. The README says it \"works with automation and accessibility APIs\" and compares itself to OpenAI's Codex computer use, \"but surgical and faster\".\n\n**Why that matters.** Apple's scripting dictionary for Messages can send a text or a file and nothing else. Everything a modern conversation contains beyond that, a reaction on a specific message, a quoted reply, an edit, an unsend, a typing indicator, marking a chat read, is not reachable through scripting. The other established route to those features, BlueBubbles, reaches them through a Private API helper that only loads when System Integrity Protection is off; the README's feature table marks each of those rows and footnotes them: \"BlueBubbles supports this through its Private API helper, which requires disabling SIP.\" platform-imessage reaches the same rows with SIP on, by operating the real window.\n\n**What the command line does.** `chats`, `chat`, `messages`, `message`, `search` read history with contact-resolved names, tapbacks, stickers, mentions, replies and edit history. `send` and `send-file` send to an address or an existing chat; `create-chat` starts a new direct or group chat with people never messaged before. `reply` and `reply-file` send quoted replies to a message id (or to `latest`, `latest-1`). `react` and `unreact` add or remove a tapback on any message by id, including arbitrary emoji. `edit` and `undo-send` change or retract a sent message inside Apple's time windows. `typing` turns the typing indicator on or off; `mark-read`, `mark-unread`, `mute`, `unmute`, `notify-anyway` and `delete-chat` manage a chat; `activity-status` reports whether the other party is typing and their Do Not Disturb state; `load-attachment` forces an offloaded attachment to download. `start-watching` streams database changes as events. Output is YAML by default and JSON with `--json`.\n\n**How it avoids fighting the person at the keyboard.** By default it launches a secondary instance of the Messages app and drives that window, so the primary window a person is using is left alone. The flag `--no-use-secondary-instance` turns that off.\n\n**Permissions and limits.** Four macOS grants: Accessibility, Contacts (optional, for names), Messages data (Full Disk Access) and Automation for Messages. The README states what it will not do: \"expose more features if you disable SIP, allow automating multiple iMessage accounts, work on Windows/Linux\". Group management (rename, add or remove members, leave, photo) and rich sends (effects, subjects, captions) are listed as planned. Only one process may drive the Messages app at a time. There is no HTTP server, no webhook and no push relay; the README's table gives that row to BlueBubbles.\n\n**Fragility.** Because acting means locating message cells in a live window, a macOS release that rearranges the Messages interface can break an action until the library is updated; the project's todo list tracks such fixes per macOS version. Reading is not affected by that, since it comes from the database.\n\n**Verdict.** On a Mac with SIP on, platform-imessage is the only maintained program that reaches reactions on arbitrary messages, quoted replies, edits, unsends, typing and read state. Its cost is the Accessibility route: slower than a database read, dependent on the window layout, and exclusive of any other automation touching the Messages app at the same moment.\n","hero":"https://miscsubjects.com/img/gen/arcads-gpt-image-36f1b69d-1654-43f9-aa28-1f0c28d9386e.png","images":[],"style":{},"tags":["reference","imessage","mac","messaging","accessibility"],"category":"reference","model":"unattributed","ledger":{"href":"/api/articles/platform-imessage/ledger","live":true},"embeds":[],"widgets":[],"home":true,"claims":[{"id":"c1","text":"platform-imessage is an open-source Swift library and command-line program from Beeper, the multi-network chat company, that automates the Messages app on a Mac.","section":"platform-imessage: Beeper's Swift library that drives the Messages app through Accessibility","tier":"definition","source_ids":["s1"],"why_material":"identifies the system and what it is"},{"id":"c2","text":"For acting, it does what a person does: it drives the Messages app's own window through macOS Accessibility, plus Apple's automation events for plain sends.","section":"Two mechanisms, one program","tier":"definition","source_ids":["s1"],"why_material":"the mechanism that distinguishes it from every scripting-only tool"},{"id":"c3","text":"The other established route to those features, BlueBubbles, reaches them through a Private API helper that only loads when System Integrity Protection is off; platform-imessage reaches the same rows with SIP on.","section":"Why that matters","tier":"observational","source_ids":["s1"],"why_material":"decides whether a Mac must lower its security posture to get reactions, replies, edits and unsends"},{"id":"c4","text":"Four macOS grants: Accessibility, Contacts (optional, for names), Messages data (Full Disk Access) and Automation for Messages.","section":"Permissions and limits","tier":"regulatory","source_ids":["s1"],"why_material":"what an operator must grant before any action works"}],"sources":[{"id":"s1","url":"https://github.com/beeper/platform-imessage","title":"beeper/platform-imessage README","quote":"A standalone Swift library and CLI that lets you and your agents send/receive messages and fully automate iMessage locally on your Mac.","accessed_at":"2026-09-08T20:13:35.282Z","prev":"genesis","hash":"b71791ca750d6672666c3454044196cc0e1ba63feabb4d2ffbd5f4e052be799a"},{"id":"s2","url":"https://github.com/beeper/platform-imessage#features","title":"beeper/platform-imessage README, feature table footnote","quote":"BlueBubbles supports this through its Private API helper, which requires disabling SIP.","accessed_at":"2026-09-08T20:13:35.282Z","prev":"b71791ca750d6672666c3454044196cc0e1ba63feabb4d2ffbd5f4e052be799a","hash":"7c810b3bea2ab6e2e099619ba77b3adeadd663a6d6e55207d15c0b1ecfdfd67a"}],"reviews":[],"extra":{},"has_traversal":false,"register":null,"status":"published","revisions":1,"contributions":[],"provenance":[],"energy":{"passes":0,"tokens_in":0,"tokens_out":0,"tokens_total":0,"cost_usd":0,"models":{},"head":"genesis"},"posted_at":"2026-09-08T19:53:54.959Z","created_at":"2026-09-08T19:53:54.959Z","updated_at":"2026-09-08T20:13:35.726Z","machine":{"shape":"article.machine/v1","slug":"platform-imessage","kind":"article","read":{"human":"https://miscsubjects.com/a/platform-imessage","json":"https://miscsubjects.com/api/articles/platform-imessage","bundle":"https://miscsubjects.com/api/articles/platform-imessage/bundle?format=markdown"},"traversal":{"prev":null,"next":null,"hub":null,"series":null,"position":null,"of":null},"ledger":{"claims":4,"sources":2,"contributions":0,"revisions":1,"objections_url":"https://miscsubjects.com/api/articles/platform-imessage/objections","thread_state_url":"https://miscsubjects.com/api/protocol/thread-state?target=platform-imessage","proof_rule":"An action is proven by its ledger receipt, never by a 200 or a description."},"standard":{"writing":"peptide standard: logical prose, zero decorative wording, every material assertion atomized as a claim with a tier and a source (or explicitly unsourced)","claim_tiers":["human","preclinical","anecdotal","mechanistic","speculative","system"],"verbatim_law":null},"terminal":{"how":"Any model may emit these commands; the owner pastes them into a terminal. $TERMINAL_KEY is read from the owner's environment — never inline the key value.","claim_append":"curl -s -X POST https://miscsubjects.com/api/protocol/claim -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"platform-imessage\",\"text\":\"<one atomized claim>\",\"tier\":\"<human|preclinical|anecdotal|mechanistic|speculative|system>\",\"source_ids\":[],\"who_claims\":\"<model>\",\"rationale\":\"<why material>\"}'","source_append":"curl -s -X POST https://miscsubjects.com/api/protocol/sources -H \"x-terminal-key: $TERMINAL_KEY\" -H 'content-type: application/json' -d '{\"slug\":\"platform-imessage\",\"sources\":[{\"type\":\"review\",\"url\":\"<url>\",\"title\":\"<title>\",\"quote\":\"<verbatim quote>\",\"summary\":\"<one line>\"}]}'","objection":"curl -s -X POST https://miscsubjects.com/api/articles/platform-imessage/objections -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"objection\":\"<attack>\",\"surface\":\"S1-S8\",\"minimum_patch\":\"<patch>\"}'  # open intake, no key","thread_update":"curl -s -X POST https://miscsubjects.com/api/protocol/thread-update -H 'content-type: application/json' -d '{\"actor\":\"<model>\",\"target\":\"platform-imessage\",\"raw_text\":\"<material delta>\"}'  # open intake, no key","read_back":"curl -s https://miscsubjects.com/api/articles/platform-imessage | python3 -c 'import json,sys; d=json.load(sys.stdin); print(json.dumps(d[\"claims\"][-3:], indent=1))'"}},"representations":{"article":"/a/platform-imessage","json":"/api/articles/platform-imessage","markdown":"/api/articles/platform-imessage/bundle?format=markdown","skill":"/api/articles/platform-imessage/skill","topology":"/api/articles/platform-imessage/topology","versions":"/api/articles/platform-imessage/revisions","invocations":"/api/articles/platform-imessage/invocations"},"editorial_review":{"headline_subject":"Beeper's library that drives a second Messages window through Accessibility","hero_subject":"two identical desk telephones, the second one's handset lifted by a brass mechanical hand","visual_action":"a mechanical hand lifts the second telephone's handset while the first telephone stays untouched","rationale":"the library's defining move is to operate a second, identical instance of the Messages app by machine so the one a person is using is left alone; two identical phones with only the second handled shows exactly that","hero_brief":"Two identical white desk telephones side by side on a walnut desk; a brass articulated mechanical hand lifts the handset of the second telephone while the first stays untouched; afternoon window light.","inspected":true,"inspection_note":"Visible: two identical white push-button desk telephones on a walnut desk; a brass articulated mechanical hand and forearm lifts the handset of the right-hand telephone while the left one is untouched; soft window light from the left. No people, no logos; only the phones' keypad digits are legible. Matches the brief."},"editorial_audit":{"slug":"platform-imessage","ok":true,"issues":[]},"body_hash":"c72f4732cee59e1a8162606be7325b56148418259ea87cf408752c885967398e"}}}