@abraca/resend
v2.29.0
Published
Resend bridge for Abracadabra — Inbox + Outbox documents wired to email send/receive
Downloads
1,960
Readme
@abraca/resend
Resend bridge for Abracadabra. Bind it to a Space and it bootstraps two top-level documents:
- Outbox — a kanban with
Draft → Ready → Sent → Failed. Move a draft card into Ready and it gets rendered to HTML and sent via Resend, then auto-moved to Sent (or Failed with the error attached). - Inbox — receives email landed by Resend Inbound. Each incoming message
becomes a child document whose label is the subject and whose body is the
email content; sender / recipients / message-id are stored in
meta.
Identity is an Ed25519 key (auto-generated on first run; same shape as
@abraca/mcp). The process exposes a small HTTP server for the Resend Inbound
webhook; the operator is responsible for making the port reachable (tunnel /
reverse proxy) and pointing Resend at it.
Install
pnpm add -g @abraca/resendEnvironment
| Var | Required | Default | Notes |
|---|---|---|---|
| ABRA_URL | yes | — | Abracadabra server URL |
| ABRA_SPACE_ID | no | first visible space | Which space to bind |
| ABRA_KEY_FILE | no | ~/.abracadabra/resend.key | Ed25519 seed |
| ABRA_INVITE_CODE | no | — | Used only on first-run register |
| ABRA_AGENT_NAME | no | Resend Bridge | Presence display name |
| RESEND_API_KEY | yes | — | |
| RESEND_FROM | yes | — | Default from address |
| RESEND_INBOUND_ENABLED | no | true | Set false to skip the webhook server |
| RESEND_INBOUND_PORT | no | 0 (ephemeral) | Bind port for /inbound |
| RESEND_INBOUND_HOST | no | 0.0.0.0 | Bind host |
| RESEND_INBOUND_SECRET | required if inbound enabled | — | Svix signing secret from Resend dashboard |
Outbox doc conventions
A doc in the Outbox carries its addressing in meta:
to: ["[email protected]"]
cc: ["[email protected]"]
bcc: []
subject: "Project kickoff" # falls back to the doc's label
from: "[email protected]" # falls back to RESEND_FROM
replyTo: "[email protected]"When the doc is moved into the Ready column, the watcher renders its body to
HTML via @abraca/convert and sends. On success, meta.resendId and
meta.sentAt are written and the doc is moved to Sent. On failure, meta.error
meta.errorAtare written and the doc is moved toFailed.
Sends are idempotent: if meta.resendId is already set, the doc is left alone.
Inbox doc conventions
Each inbound message is created under Inbox with:
label= subject (or"(no subject)")- body = email plain-text (markdown-shaped)
meta.from,meta.to,meta.cc,meta.subject,meta.receivedAt,meta.messageId,meta.inReplyTo- attachments uploaded via the REST API; their handles land in
meta.attachments[]
Run
ABRA_URL=https://your-server \
RESEND_API_KEY=re_xxx \
[email protected] \
RESEND_INBOUND_SECRET=whsec_xxx \
RESEND_INBOUND_PORT=8787 \
abracadabra-resend