{"_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."},"key":"IMSG_SEND","type":"http","target":"POST https://agent.miscsubjects.com/exec","auth":"headers:{\"x-terminal-key\":\"$TERMINAL_KEY\"}","content":"# 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}","updated_at":"2026-09-08T19:38:33.112Z","category":"imessage","allowed_categories":null,"seq":null,"enabled":1,"planner_visible":1,"planner_rank":100,"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\"]","sensitive":1,"runner":"mac","includes":null,"created_at":null,"price_usd":null,"meter_unit":null,"object_kind":"capability","descriptor_json":null,"descriptor_rev":1,"descriptor_hash":null,"invocation":"{\"method\":\"POST\",\"url\":\"https://agent.miscsubjects.com/exec\",\"headers\":{\"x-terminal-key\":\"INJECTED_BY_WORKER\",\"x-trace-id\":\"t_fyd69ip0\",\"Content-Type\":\"application/json\"},\"body\":{\"cmd\":\"sh\",\"args\":[\"-c\",\"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\",\"imsg-api\",\"send\",\"+14155551212\",\"On my way\",\"\"],\"timeout\":90000,\"trace_id\":\"t_fyd69ip0\"}}","last_status":"{\"http\":200,\"ok\":true,\"ms\":3100,\"trace_id\":\"t_fyd69ip0\",\"ledger\":\"/admin/ledger?trace_id=t_fyd69ip0\",\"error\":null,\"at\":\"2026-09-15T06:44:22.608Z\",\"actor\":\"directory-test\"}","last_response":"HTTP 200:{\"ok\":true,\"exit\":0,\"signal\":null,\"killed_by_timeout\":false,\"stdout\":\"{\\\"id\\\":678691,\\\"guid\\\":\\\"08492334-E844-4CDE-A3AD-3D0788A39F63\\\",\\\"status\\\":\\\"sent\\\",\\\"message_id\\\":\\\"08492334-E844-4CDE-A3AD-3D0788A39F63\\\"}\\n\",\"stderr\":\"\",\"duration_ms\":384,\"cmd\":\"sh\",\"args\":[\"-c\",\"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\",\"imsg-api\",\"send\",\"+14155551212\",\"On my way\",\"\"],\"cwd\":\"/Users/the owner\",\"shell\":false,\"execution_substrate\":\"mac_bridge\",\"execution_policy\":\"unclassified\"}","test_state":"🟢 works","tested_at":"2026-09-15T06:44:22.608Z","invocation_curl":"curl -sS -X POST 'https://ops.miscsubjects.com/api/dispatch' \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" \\\n  -H 'content-type: application/json' \\\n  --data '{\"key\":\"IMSG_SEND\",\"body\":\"+14155551212|On my way\"}'","execution":null,"connection_id":"imessage:owner-apple-id","aliases":null,"effects":"[\"send\"]","visibility":null,"origin":null,"returns":null,"context":null,"verification_mode":"safe","ontology":"messaging","provider":"apple","tier":"core","how_to_call":[{"family":"HTTP","id":"curl","label":"curl — the canonical call","when":"Any terminal or script. {key, body}: the arguments are one string, pipe-separated in the order below. The answer is {ok, ran, result, trace_id, receipt}.","code":"curl -sS -X POST 'https://ops.miscsubjects.com/api/dispatch' \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" \\\n  -H 'content-type: application/json' \\\n  --data '{\"key\":\"IMSG_SEND\",\"body\":\"+14155551212|On my way\"}'"},{"family":"HTTP","id":"named","label":"curl — named arguments","when":"The same door with arguments by name: dispatch puts them in the row's order. Add \"idempotency_key\":\"…\" to make a retry safe (72 hours), \"shape\":true to see the request without sending it.","code":"curl -sS -X POST 'https://ops.miscsubjects.com/api/dispatch' \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" \\\n  -H 'content-type: application/json' \\\n  --data '{\"key\":\"IMSG_SEND\",\"args\":{\"to\":\"+14155551212\",\"text\":\"On my way\"}}'"},{"family":"HTTP","id":"url","label":"One URL — Safari, a Shortcut, any fetch tool","when":"A GET that runs the call from one address. The address holds a link scoped to this row that expires (ttl in seconds, uses= to cap the count) — never the master key. https://miscsubjects.com/web/run/IMSG_SEND?body=…&share=… is the same call for a browser model. Run mints a one-use link for itself.","code":"# 1. a link that runs only IMSG_SEND, for an hour (share_token in the answer):\ncurl -sS 'https://ops.miscsubjects.com/api/dispatch?mint_share=1&scope=row:IMSG_SEND&ttl=3600' \\\n  -H \"x-terminal-key: $TERMINAL_KEY\"\n\n# 2. the address — paste it in Safari, a Shortcut or a model's fetch tool:\nhttps://ops.miscsubjects.com/api/dispatch?invoke=IMSG_SEND&body=%2B14155551212%7COn%20my%20way&share=<share_token>"},{"family":"MCP","id":"jsonrpc","label":"MCP over HTTP — misc_run","when":"The build's MCP server. misc_run reaches every row by key and leaves a receipt; misc_find finds the key from a phrase. The answer is result.content[0].text.","code":"curl -sS -X POST 'https://ops.miscsubjects.com/api/mcp' \\\n  -H 'accept: application/json, text/event-stream' \\\n  -H \"authorization: Bearer $MCP_TOKEN\" \\\n  -H 'content-type: application/json' \\\n  --data '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"misc_run\",\"arguments\":{\"key\":\"IMSG_SEND\",\"args\":{\"to\":\"+14155551212\",\"text\":\"On my way\"}}}}'"},{"family":"MCP","id":"claude_code","label":"Claude Code","when":"Claude Code (terminal, desktop, web). The same server works in any Claude Code session once added.","code":"# once, on any machine:\nclaude mcp add --transport http miscsubjects https://ops.miscsubjects.com/api/mcp --header \"Authorization: Bearer $MCP_TOKEN\"\n# then in a session, the model calls:\nmcp__miscsubjects__misc_run {\"key\":\"IMSG_SEND\",\"args\":{\"to\":\"+14155551212\",\"text\":\"On my way\"}}"},{"family":"CLI","id":"misc","label":"misc (on your Mac)","when":"The misc CLI in ~/.local/bin: its words go to /api/resolve (plan, then run), with TERMINAL_KEY from the vault. Arguments are positional, in the order above. `misc find \"words\"` finds a row.","code":"misc run IMSG_SEND +14155551212 \"On my way\"\nmisc imsg send +14155551212 \"On my way\""},{"family":"CLI","id":"console_app","label":"console-app","when":"The Console's own CLI. It reads the key from ~/.build-vault.env or `console-app login`.","code":"npm install -g https://miscsubjects.com/download/llmasos-console-1.1.0.tgz   # once\nconsole-app call IMSG_SEND '+14155551212|On my way'\nconsole-app how IMSG_SEND   # this page, in the terminal"},{"family":"CLI","id":"line","label":"One line of text — the build grammar","when":"/api/resolve parses the same line everywhere: \"run KEY a b\" (arguments in order, quoted when they hold spaces), the key's words (\"imsg send …\"), or a phrase it matches to a row. POST runs; {\"run\":false} returns the plan without running it.","code":"# typed, texted to the build, or emitted by a model with no tools:\nrun IMSG_SEND +14155551212 \"On my way\"\n\ncurl -sS -X POST 'https://ops.miscsubjects.com/api/resolve' \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" \\\n  -H 'content-type: application/json' \\\n  --data '{\"line\":\"run IMSG_SEND +14155551212 \\\"On my way\\\"\",\"run\":true}'"},{"family":"Agents","id":"tag","label":"Tag form — inside an answer","when":"What a model in this build writes mid-answer to call a row; both tags always, even with nothing between them. {\"emit\": text} runs every tag in a piece of text and returns each result.","code":"[IMSG_SEND]+14155551212|On my way[/IMSG_SEND]\n\n# run text that carries tags, exactly as a model wrote it:\ncurl -sS -X POST 'https://ops.miscsubjects.com/api/dispatch' \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" \\\n  -H 'content-type: application/json' \\\n  --data '{\"emit\":\"[IMSG_SEND]+14155551212|On my way[/IMSG_SEND]\"}'"},{"family":"Phone","id":"shortcut","label":"iPhone Shortcut — Get Contents of URL","when":"A Shortcut on the phone, a Siri phrase, an Action Button, or an automation. Swap body for Ask for Input to fill arguments at run time.","code":"Action:   Get Contents of URL\nURL:      https://ops.miscsubjects.com/api/dispatch\nMethod:   POST\nHeaders:  x-terminal-key  →  (Text) your terminal key\n          content-type    →  application/json\nRequest Body: JSON\n          key   (Text)  →  IMSG_SEND\n          body  (Text)  →  +14155551212|On my way\nThen:     Get Dictionary Value  result  from  Contents of URL"},{"family":"Webhook","id":"webhook","label":"A webhook any service can call","when":"Stripe, GitHub, Slack, Zapier, a form. IMSG_SEND sends or deletes, so its hook must be signed (Standard Webhooks, with the secret shown once); POST /api/hooks/<id>/test fires a correctly signed sample.","code":"# 1. once: make a hook that may run only IMSG_SEND (the answer holds its id and url, and its signing secret, shown once)\ncurl -sS -X POST 'https://ops.miscsubjects.com/api/hooks' \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" \\\n  -H 'content-type: application/json' \\\n  --data '{\"label\":\"IMSG_SEND webhook\",\"source\":\"standard\",\"allow_keys\":[\"IMSG_SEND\"],\"effects_max\":\"send\",\"mode\":\"sync\"}'\n\n# 2. then any service POSTs the arguments, by name, to that url:\ncurl -sS -X POST 'https://ops.miscsubjects.com/hook/<hook id>/IMSG_SEND' \\\n  -H 'webhook-id: msg_1' \\\n  -H 'webhook-timestamp: <unix seconds>' \\\n  -H 'webhook-signature: v1,<base64 HMAC-SHA256 of id.timestamp.body with the secret>' \\\n  -H 'content-type: application/json' \\\n  --data '{\"to\":\"+14155551212\",\"text\":\"On my way\"}'"},{"family":"Upstream","id":"upstream","label":"The raw request the build makes (POST agent.miscsubjects.com)","when":"Straight to the service, bypassing the build: no receipt, no ledger, no gates. Credentials are the vault variables the row names.","code":"curl -sS -X POST 'https://agent.miscsubjects.com/exec' \\\n  -H \"x-terminal-key: $TERMINAL_KEY\" \\\n  -H 'content-type: application/json' \\\n  --data '{\"cmd\": \"sh\", \"args\": [\"-c\", \"exec \\\"$HOME/bin/imsg-api\\\" \\\"$@\\\"\", \"imsg-api\", \"send\", \"+14155551212\", \"On my way\", \"\"], \"timeout\": 90000}'"}],"row_num":847,"_rest":{"read":"GET /api/directory/IMSG_SEND","update":"PUT /api/directory/IMSG_SEND","patch":"PATCH /api/directory/IMSG_SEND","delete":"DELETE /api/directory/IMSG_SEND","invoke":"POST /api/dispatch {\"key\":\"IMSG_SEND\",\"body\":\"<args>\"}","model_call":"POST /api/invoke {\"key\":\"IMSG_SEND\",\"input\":\"<message>\"}  ·  batch: {\"key\":\"IMSG_SEND\",\"inputs\":[\"a\",\"b\",\"c\"]}","lab":"/admin/prompts/IMSG_SEND"},"_schema":{"key":"string · primary key · the invocation name","type":"fn | http | agent | flow","target":"fn: FN_MAP name · http: \"METHOD url\" (e.g. \"GET https://…/$1\") · agent: model id · flow: \"\" (content holds the DSL)","auth":"http only: \"bearer:ENV_VAR\" | \"headers:{...}\" | \"query:k=$ENV\" | \"\"","content":"fn/http: \"# docs\\n<arg template>\" · agent: the system prompt body · flow: the DSL","includes":"agent only: comma-separated prompt_block keys (e.g. BLOCK_VOICE,BLOCK_ROUTING) composed before content at runtime","category":"string tag","allowed_categories":"csv of categories, or \"*\"","seq":"int (sort)","enabled":"1|0","planner_visible":"1|0","planner_rank":"int","input_schema":"optional JSON string","examples":"optional JSON string","object_kind":"optional canonical object kind (page, route, prompt, model, sheet, source, law, skill, store, external, capability)","descriptor_json":"canonical miscsubjects/environment-object/1 JSON: identity, exact operations, relationships, governance, comparables, representations","descriptor_rev":"monotonic descriptor revision; incremented whenever descriptor_json changes","descriptor_hash":"sha256 of canonical descriptor JSON","invocation":"the raw REST JSON that invokes this row: {method,url,headers,body} with the credential left as INJECTED_BY_WORKER; written by POST /api/directory/<key>/test","invocation_curl":"the same request as a curl that runs when pasted into the owner's terminal: credential written as the vault variable for its host ($XAI_API_KEY, $TERMINAL_KEY)","last_status":"transport record of the last test: {http, ok, ms, trace_id, ledger, error, at} — or {skipped, reason}","last_response":"the full payload the last test returned (up to 60k chars)","test_state":"🟢 works | 🔴 broken | 🟡 untested — decided only by POST /api/directory/<key>/test, never by hand","tested_at":"when test_state was decided","row_num":"int · computed · 1-based position in the canonical directory list (stable for a given ordering)"},"_object":{"identity":"directory:IMSG_SEND","object_type":"directory-object","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"},"ontology":{"parent":"category:imessage","siblings":[{"id":"directory:IMSG_ACCOUNT","key":"IMSG_ACCOUNT","relation":"shares_capability_family","article":"/a/directory/IMSG_ACCOUNT","skill":"/api/directory/IMSG_ACCOUNT?format=skill"},{"id":"directory:IMSG_ACTIVITY","key":"IMSG_ACTIVITY","relation":"shares_capability_family","article":"/a/directory/IMSG_ACTIVITY","skill":"/api/directory/IMSG_ACTIVITY?format=skill"},{"id":"directory:IMSG_AFTER","key":"IMSG_AFTER","relation":"shares_capability_family","article":"/a/directory/IMSG_AFTER","skill":"/api/directory/IMSG_AFTER?format=skill"},{"id":"directory:IMSG_CHATS","key":"IMSG_CHATS","relation":"shares_capability_family","article":"/a/directory/IMSG_CHATS","skill":"/api/directory/IMSG_CHATS?format=skill"},{"id":"directory:IMSG_CREATE_CHAT","key":"IMSG_CREATE_CHAT","relation":"shares_capability_family","article":"/a/directory/IMSG_CREATE_CHAT","skill":"/api/directory/IMSG_CREATE_CHAT?format=skill"},{"id":"directory:IMSG_CURRENT_USER","key":"IMSG_CURRENT_USER","relation":"shares_capability_family","article":"/a/directory/IMSG_CURRENT_USER","skill":"/api/directory/IMSG_CURRENT_USER?format=skill"},{"id":"directory:IMSG_EDIT","key":"IMSG_EDIT","relation":"shares_capability_family","article":"/a/directory/IMSG_EDIT","skill":"/api/directory/IMSG_EDIT?format=skill"},{"id":"directory:IMSG_GROUP","key":"IMSG_GROUP","relation":"shares_capability_family","article":"/a/directory/IMSG_GROUP","skill":"/api/directory/IMSG_GROUP?format=skill"},{"id":"directory:IMSG_HISTORY","key":"IMSG_HISTORY","relation":"shares_capability_family","article":"/a/directory/IMSG_HISTORY","skill":"/api/directory/IMSG_HISTORY?format=skill"},{"id":"directory:IMSG_INBOX","key":"IMSG_INBOX","relation":"shares_capability_family","article":"/a/directory/IMSG_INBOX","skill":"/api/directory/IMSG_INBOX?format=skill"},{"id":"directory:IMSG_INBOX_SINCE","key":"IMSG_INBOX_SINCE","relation":"shares_capability_family","article":"/a/directory/IMSG_INBOX_SINCE","skill":"/api/directory/IMSG_INBOX_SINCE?format=skill"},{"id":"directory:IMSG_LOAD_ATTACHMENT","key":"IMSG_LOAD_ATTACHMENT","relation":"shares_capability_family","article":"/a/directory/IMSG_LOAD_ATTACHMENT","skill":"/api/directory/IMSG_LOAD_ATTACHMENT?format=skill"},{"id":"directory:IMSG_MARK_READ","key":"IMSG_MARK_READ","relation":"shares_capability_family","article":"/a/directory/IMSG_MARK_READ","skill":"/api/directory/IMSG_MARK_READ?format=skill"},{"id":"directory:IMSG_MARK_UNREAD","key":"IMSG_MARK_UNREAD","relation":"shares_capability_family","article":"/a/directory/IMSG_MARK_UNREAD","skill":"/api/directory/IMSG_MARK_UNREAD?format=skill"},{"id":"directory:IMSG_MESSAGE","key":"IMSG_MESSAGE","relation":"shares_capability_family","article":"/a/directory/IMSG_MESSAGE","skill":"/api/directory/IMSG_MESSAGE?format=skill"},{"id":"directory:IMSG_MESSAGES","key":"IMSG_MESSAGES","relation":"shares_capability_family","article":"/a/directory/IMSG_MESSAGES","skill":"/api/directory/IMSG_MESSAGES?format=skill"},{"id":"directory:IMSG_REACT","key":"IMSG_REACT","relation":"shares_capability_family","article":"/a/directory/IMSG_REACT","skill":"/api/directory/IMSG_REACT?format=skill"},{"id":"directory:IMSG_REACT_LATEST","key":"IMSG_REACT_LATEST","relation":"shares_capability_family","article":"/a/directory/IMSG_REACT_LATEST","skill":"/api/directory/IMSG_REACT_LATEST?format=skill"},{"id":"directory:IMSG_REPLY","key":"IMSG_REPLY","relation":"shares_capability_family","article":"/a/directory/IMSG_REPLY","skill":"/api/directory/IMSG_REPLY?format=skill"},{"id":"directory:IMSG_SCHEDULED","key":"IMSG_SCHEDULED","relation":"shares_capability_family","article":"/a/directory/IMSG_SCHEDULED","skill":"/api/directory/IMSG_SCHEDULED?format=skill"},{"id":"directory:IMSG_SEARCH","key":"IMSG_SEARCH","relation":"shares_capability_family","article":"/a/directory/IMSG_SEARCH","skill":"/api/directory/IMSG_SEARCH?format=skill"},{"id":"directory:IMSG_SEND_CHAT","key":"IMSG_SEND_CHAT","relation":"shares_capability_family","article":"/a/directory/IMSG_SEND_CHAT","skill":"/api/directory/IMSG_SEND_CHAT?format=skill"},{"id":"directory:IMSG_SEND_FILE","key":"IMSG_SEND_FILE","relation":"shares_capability_family","article":"/a/directory/IMSG_SEND_FILE","skill":"/api/directory/IMSG_SEND_FILE?format=skill"},{"id":"directory:IMSG_SEND_STATUS","key":"IMSG_SEND_STATUS","relation":"shares_capability_family","article":"/a/directory/IMSG_SEND_STATUS","skill":"/api/directory/IMSG_SEND_STATUS?format=skill"}]},"law":"This directory definition is also a human article, model Skill, and invocable OIP object under one identity."},"_environment":{"ref":"directory://imsg_send","descriptor_rev":1,"descriptor_hash":null,"describe":"/api/environment/objects?ref=directory%3A%2F%2Fimsg_send","governance":"/api/environment/governance?ref=directory%3A%2F%2Fimsg_send","comparables":"/api/environment/comparables?ref=directory%3A%2F%2Fimsg_send","manual":"/api/environment?format=markdown","edit_descriptor":"PATCH /api/directory/IMSG_SEND {\"descriptor_json\":{...},\"expected_descriptor_rev\":1}"}}