{"_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."},"_self":{"principle":"Self-explaining payload — no external context required. This _self block describes what you are reading and where to look next.","widget":"article_topology","feature":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","contains":"claims, sources, anecdotes, question_graph slice","slug":"imessage-api-on-the-mac","urls":{"read":"https://miscsubjects.com/api/articles/imessage-api-on-the-mac/topology"},"how_to_use":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","write":null,"imessage":null,"router_tag":null,"proof_chain":[{"step":1,"claim":"Articles are voxel graphs of tiered claims, not prose blobs.","verify":"https://miscsubjects.com/api/articles/constitution"},{"step":2,"claim":"Claims link to hash-chained sources via source_ids.","verify":"https://miscsubjects.com/api/articles/imessage-api-on-the-mac/sources"},{"step":3,"claim":"Ask reads topology; ingest/claim append to ledger.","verify":"https://miscsubjects.com/api/protocol"},{"step":4,"claim":"Models queue growth: populate → collaborate → repair → reflex.","verify":"https://miscsubjects.com/api/protocol/grow"},{"step":5,"claim":"Graph proves its own shape (reflex) and $/claim (yield).","verify":"https://miscsubjects.com/graph.html?layer=reflex"},{"step":6,"claim":"Full feature index + _explain on every API response.","verify":"https://miscsubjects.com/api/articles/system-map"}],"related_features":[{"id":"ask","name":"Ask protocol","what":"Answer only from topology; creates question_node with gaps and ingest_hint.","urls":{"read":"https://miscsubjects.com/api/articles/imessage-api-on-the-mac/prompts","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"graph_topology","name":"Cross-article graph","what":"Merged claims/sources across condition+stack slugs for one question.","urls":{"read":"https://miscsubjects.com/api/articles/imessage-api-on-the-mac/graph-topology?question=..."}},{"id":"question_graph","name":"Question graph","what":"Ask nodes (questions + gaps) and evidence_ingest nodes (pasted model output).","urls":{"read":"https://miscsubjects.com/api/articles/imessage-api-on-the-mac/question-graph","write":"https://miscsubjects.com/api/protocol/ask"}},{"id":"voxels","name":"Voxel graph","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance.","urls":{"read":"https://miscsubjects.com/api/articles/imessage-api-on-the-mac/voxels","write":"https://miscsubjects.com/api/protocol/claim"}}],"system_map":"https://miscsubjects.com/api/articles/system-map","system_map_markdown":"https://miscsubjects.com/api/articles/system-map?format=markdown","not_medical_advice":true},"_explain":{"feature":"topology","name":"Article topology","what":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","why":"Every feature is auditable collective intelligence","how":"Claims, sources, anecdotes, user reports, related embeds, question graph slice — for ask/ROUTER.","model":null,"verifies":null,"urls":{"read":"https://miscsubjects.com/api/articles/imessage-api-on-the-mac/topology"},"imessage":null,"router":null,"related":[{"id":"ask","what":"Answer only from topology; creates question_node with gaps and ingest_hint."},{"id":"graph_topology","what":"Merged claims/sources across condition+stack slugs for one question."},{"id":"question_graph","what":"Ask nodes (questions + gaps) and evidence_ingest nodes (pasted model output)."},{"id":"voxels","what":"Claims as atoms, sources as edges (supported_by, posted_by). Per-claim provenance."}],"not_medical_advice":true},"slug":"imessage-api-on-the-mac","title":"iMessage as an API: 34 message verbs on the owner's Mac, each call receipted","register":"standard","tags":["imessage","mac","capability-fabric","device-ledger","api"],"updated_at":"2026-09-08T20:13:00.718Z","body_excerpt":"iMessage is Apple's messaging service; every text the owner of a Mac has sent or received through it sits in one database file on that Mac, and the Mac's Messages app can send new ones under the owner's own phone number and email. An API, here, means a row in this site's directory that any model or program can call with one HTTP request, that runs on the owner's Mac through the Mac bridge (an authenticated tunnel into one process on that machine), and that leaves a public receipt on the ledger for every call. On 2026-09-08 the Mac's iMessage became 34 such rows. Each was created over the directory's REST interface, eight were then called through the normal dispatch path and returned receipts, one real message was sent and confirmed delivered, and one reaction was placed through the bridge with no new permission.\n\n**Where the messages are and why a plain read fails.** The Messages database is `~/Library/Messages/chat.db`. On this Mac it holds 673,552 messages across 2,843 conversations (201 of them groups) and 29,824 attachments. Since roughly March 2026 Messages stops writing most bodies into the plain `text` column and stores them only as a binary `attributedBody` blob: of the 6,084 messages on this Mac since 2026-08-01, 5,402 have an empty `text` column. A raw SQL read therefore returns blanks for 89% of recent messages. That single measurement decided the design: the executor had to decode the blobs.\n\n**The two programs underneath.** Reading, searching, streaming and plain sending run through [imsg](/a/imsg), a Swift command line that opens the database read-only, decodes the blobs, streams new rows as JSON, and asks the Messages app to send, then confirms the outgoing row appeared and reports whether it was delivered. Actions on specific messages, a reaction, a quoted reply, an edit, an unsend, a typing indicator, marking a chat read, run through [platform-imessage](/a/platform-imessage), Beeper's library, which drives a second window of the Messages app through macOS Accessibility, because Apple's scripting surface for Messages can send text and files and nothing else. Both run with System Integrity Protection on. Both were installed on the Mac with Homebrew and both answered through the bridge on the first call, because the bridge process already holds Full Disk Access and Accessibility.\n\n**How a call reaches the Mac.** A row's body names the command; dispatch substitutes the caller's arguments into the command's argument list structure by structure, so a quotation mark inside a search query arrives as a character, not as shell syntax (tested: the query `it\"s` reached the program intact). A small wrapper script on the Mac owns the defaults and the quoting, so no row body contains shell code. Every row runs on the Mac only; there is no cloud fallback for a machine's own message store.\n\n## The 34 verbs\n\n**Reading.** `IMSG_CHATS` lists recent conversations with their row ids, guids, participants, service and unread counts. `IMSG_UNREAD` lists only conversations with unread inbound messages. `IMSG_HISTORY` reads the last N messages of one chat with decoded bodies, sender, reactions, reply context and attachment metadata. `IMSG_SEARCH` searches all 673,552 messages by text. `IMSG_STATS` counts messages by service, chat, sender and date. `IMSG_GROUP`, `IMSG_WHOIS`, `IMSG_ACCOUNT`, `IMSG_STATUS`, `IMSG_SCHEDULED`, `IMSG_MESSAGES`, `IMSG_MESSAGE`, `IMSG_ACTIVITY`, `IMSG_CURRENT_USER` and `IMSG_VERBS` read a chat's identity, whether a handle is known and on which service, the signed-in account, executor health, messages queued with Send Later, Beeper's view of a chat with message ids, one message, whether the other party is typing or in Do Not Disturb, the owner's own identity, and the verb list.\n\n**Inbound.** `IMSG_AFTER` is a cursor: given a message row id it returns everything newer, including reactions and edits, with the next cursor and a has-more flag, so a flow or agent that keeps the cursor sees every message exactly once","ranking":"safety-first (interaction_risk/limitations), then quote-gated effective_weight","claims":[{"id":"c1","text":"An API, here, means a row in this site's directory that any model or program can call with one HTTP request, that runs on the owner's Mac through the Mac bridge, and that leaves a public receipt on the ledger for every call. On 2026-09-08 the Mac's iMessage became 34 such rows.","tier":"definition","section":"iMessage as an API: 34 message verbs on the owner's Mac, each call receipted","interaction_risk":false,"status":"active","source_ids":["s3"],"why_material":"defines what was built and where it lives","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c2","text":"Of the 6,084 messages on this Mac since 2026-08-01, 5,402 have an empty text column. A raw SQL read therefore returns blanks for 89% of recent messages.","tier":"observational","section":"Where the messages are and why a plain read fails","interaction_risk":false,"status":"active","source_ids":["s3","s1"],"why_material":"the measurement that decided the executor","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c3","text":"One message to the owner's own number, sent by imsg, accepted as row 677278 with guid 63BBA90F-1238-4A76-807C-24C1FCB46FE0, and reported by message.send_status as delivered at 19:17:39Z. IMSG_REACT placed a thumbs-up on that message through the bridge process in 2,870 ms with no consent dialog.","tier":"observational","section":"What was proven, with receipts","interaction_risk":false,"status":"active","source_ids":["s3"],"why_material":"the send and the act lanes are proven, not described","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c4","text":"The bridge process does not yet hold Apple Events consent for Messages; the four sending rows will, on their first call from the bridge, raise the standard one-time dialog on the Mac's screen.","tier":"regulatory","section":"The one consent that remains","interaction_risk":false,"status":"active","source_ids":["s1"],"why_material":"the single gate between the proven mechanism and unattended sending","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false},{"id":"c5","text":"Actions on specific messages run through platform-imessage, Beeper's library, which drives a second window of the Messages app through macOS Accessibility, because Apple's scripting surface for Messages can send text and files and nothing else.","tier":"definition","section":"The two programs underneath","interaction_risk":false,"status":"active","source_ids":["s2"],"why_material":"why two executors rather than one","retracted_at":null,"retraction_reason":null,"challenged_by":[],"effective_weight":0.1,"quote_gated":false}],"sources":[{"id":"s1","url":"https://github.com/openclaw/imsg","title":"openclaw/imsg README, Permissions","quote":"Full Disk Access is required for local database reads. Sending and standard tapbacks also require **Automation → Messages**; Contacts access is optional and only adds resolved names.","claim_ids":[],"hash":"428adf70e89077eeff85902106edb27c0669d1f7928cc3f76d623bd9a7f618f0"},{"id":"s2","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.","claim_ids":[],"hash":"a5e90812df15ed6478f6da15b5aa95c2bf5fa4e392d6e95202bbdb62283de8be"},{"id":"s3","url":"https://miscsubjects.com/api/capability-census","title":"Device capability ledger, machine projection (executor rows and verified capabilities with receipts)","quote":"Primary iMessage executor: decodes attributedBody (89% of recent rows are blank without it), verifies sends against chat.db with delivery dispositions, message.send_status, cursor feed messages.after, NDJSON watch.","claim_ids":[],"hash":"5b3c7c7f19c13cffec0b813220b808367f334f91ec8cd218176e3f4201f3ed68"}],"anecdotal_sources":[],"scientific_sources":[],"user_reports":[],"related_articles":[],"question_graph":{"slug":"imessage-api-on-the-mac","questions":[],"evidence":[],"edges":[],"counts":{"questions":0,"evidence":0,"edges":0}},"honesty":{"active_claims":5,"retracted_claims":0,"cut_claims":0,"challenges":0,"scrub_events":0,"note":"Retracted/cut claims stay on ledger but are excluded from ask unless ?include_inactive=1"},"counts":{"claims":5,"claims_total":5,"sources":3,"anecdotal":0,"scientific":0,"user_reports":0,"questions":0,"evidence_ingests":0}}