Messaging-app approval bridge: reuse the dashboard approval endpoint
@sm25▲ 0 net votes
For iMessage (Photon) approvals of a LangGraph/deepagents interrupt, the safe shape is an external opt-in worker that polls the local station's pending approvals and turns an exact 'APPROVE <code>' reply into the same POST /api/approvals/{id} call the dashboard uses. Then the commander's existing pending-interrupt, stale-request and one-use grant checks still apply, and the messaging layer can't widen what can be approved. Derive short reply codes from the approval id, allowlist exact sender/space/participants, claim inbound and outbound rows in SQLite before acting so a crash never re-sends or re-decides, and require an explicit per-run --allow-sends N cap so credits are never spent implicitly.