@agentcomms/resend 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +112 -0
- package/THIRD_PARTY_LICENSES +1213 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +3458 -0
- package/dist/coerce-BscjcmYU.mjs +34 -0
- package/dist/dist-COPefvtq-D67MoOnB.mjs +9880 -0
- package/dist/index.d.mts +12309 -0
- package/dist/index.mjs +16 -0
- package/dist/mcp-DXXb3Vv3-Co5BzjYe.mjs +16220 -0
- package/dist/schemas-DiGKNDNq.mjs +5885 -0
- package/dist/send-DeGG4u2p.mjs +20220 -0
- package/dist/server-CRIgeZCh.mjs +405 -0
- package/dist/src-D_zzAWoS-BhK0GFdq-XAvBzdGB.mjs +7806 -0
- package/dist/stdio-BR8R87El.mjs +102 -0
- package/dist/stdio-CHZ2WRcx-5iYMXTdw.mjs +607 -0
- package/dist/stdio-entry-CbYlbcyJ.mjs +21 -0
- package/package.json +98 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Criss Moldovan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# @agentcomms/resend
|
|
2
|
+
|
|
3
|
+
Resend for coding agents. Read a team's domains, sent and received mail, metrics and suppressions — and send email
|
|
4
|
+
that **nothing sends without a person's approval of exactly what goes out**, once.
|
|
5
|
+
|
|
6
|
+
```sh
|
|
7
|
+
npm install -g @agentcomms/resend # or run it with npx @agentcomms/resend <command>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
New in 0.7.0.
|
|
11
|
+
|
|
12
|
+
## What it promises, and who enforces it
|
|
13
|
+
|
|
14
|
+
**Read-only is enforced by this package, not by the key.** Resend has no read-only API key. A full-access key can
|
|
15
|
+
read, send, delete domains and create keys; an account in `read` mode is kept from sending by this package's own
|
|
16
|
+
code, but the key itself would not stop anything else that held it. A sending-only key can only send — Resend
|
|
17
|
+
enforces that — and it cannot read anything, so reads with it are reported as unavailable. `agent-resend doctor`
|
|
18
|
+
says this on every run.
|
|
19
|
+
|
|
20
|
+
**Nothing is sent without a person.** A send is prepared, previewed — every recipient, BCC included, the reach
|
|
21
|
+
(unique recipients), the From domain and whether it is verified — and approved: a yes in the conversation under the
|
|
22
|
+
account's `chat` policy, or `agent-resend approve <id>` and a typed code under `confirm`. Above ten recipients, or to
|
|
23
|
+
an address that arrived in mail read here, a person at a terminal approves, whatever the policy. The approval id is
|
|
24
|
+
the request's `Idempotency-Key` and an `agentcomms_approval` tag; a send whose outcome is unknown is never repeated,
|
|
25
|
+
only checked.
|
|
26
|
+
|
|
27
|
+
**The key is typed by a person, at a terminal.** `agent-resend account add` reads it from a hidden prompt, or from
|
|
28
|
+
`RESEND_API_KEY` in that terminal, and stores it in the system keychain. No MCP tool accepts a key: a key typed into
|
|
29
|
+
a chat stays in the transcript.
|
|
30
|
+
|
|
31
|
+
**Received mail is untrusted.** Bodies, subjects, names and attachment names arrive inside the untrusted-content
|
|
32
|
+
envelope with hidden text removed and counted, beside Resend's own SPF, DKIM and DMARC results. Attachments are
|
|
33
|
+
listed, and downloaded only when asked, into the downloads folder.
|
|
34
|
+
|
|
35
|
+
**It stays out of the way of the team's own mail.** Resend's rate limit is shared by every key of a team, and
|
|
36
|
+
Resend does not say which team a key belongs to, so this package asks at most twice a second from a computer in all,
|
|
37
|
+
whichever account asks, and a 429 through any account stops every account until Resend says it may ask again.
|
|
38
|
+
|
|
39
|
+
It never manages domains, API keys, webhooks, broadcasts, contacts or audiences, from any surface.
|
|
40
|
+
|
|
41
|
+
## Getting started
|
|
42
|
+
|
|
43
|
+
A person connects an account at their own terminal, then registers the server with their agent:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npx -y @agentcomms/resend account add acme/resend # type the key when asked; read mode by default
|
|
47
|
+
npx -y @agentcomms/resend mcp install --client claude-code # a registration you approve
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`--client` also takes `codex`, `cursor`, `gemini`, `claude-desktop`, `vscode` and `json`. Add `--account
|
|
51
|
+
acme/resend` to pin the server to one account. From a chat with the core server connected, `comms_server_install`
|
|
52
|
+
with `channel: "resend"` makes the same registration, and either one's approval is good for the other.
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
agent-resend doctor
|
|
56
|
+
agent-resend domains --account acme/resend
|
|
57
|
+
agent-resend received list --account acme/resend
|
|
58
|
+
agent-resend account policy acme/resend --mode send # a change a person approves
|
|
59
|
+
agent-resend send prepare --account acme/resend --from "Acme <hello@acme.test>" --to sam@partner.test \
|
|
60
|
+
--subject "Hello" --text "Hi Sam"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Accounts
|
|
64
|
+
|
|
65
|
+
An account is one Resend API key for one team, named `organisation/resend`. It lives in the one agent-communications
|
|
66
|
+
configuration beside every mailbox and workspace, so `agentcomms names migrate`, `agentcomms secrets migrate` and
|
|
67
|
+
`agentcomms policy --account <name>` treat it like any other; its key is in the one secret store under
|
|
68
|
+
`resend:key:<id>`.
|
|
69
|
+
|
|
70
|
+
Its mode is `read` or `send`. Moving it to `send`, loosening its send policy (`chat`, `confirm`, `never`) or its
|
|
71
|
+
change policy (`chat`, `confirm`), and removing it are **change approvals**: a preview, and nothing until a person
|
|
72
|
+
agrees — in the conversation under the `chat` change policy, at their own terminal under `confirm`. Tightening
|
|
73
|
+
applies at once.
|
|
74
|
+
|
|
75
|
+
## Commands and tools
|
|
76
|
+
|
|
77
|
+
Every command has an MCP tool running the same operation, except three: `account add` (a key is typed at a
|
|
78
|
+
terminal), `approve` (under `confirm`, a person at a terminal) and `mcp` (it starts the server).
|
|
79
|
+
|
|
80
|
+
| Command | MCP tool |
|
|
81
|
+
|---|---|
|
|
82
|
+
| `agent-resend account add <name>` | — typed at a terminal |
|
|
83
|
+
| `agent-resend account list` | `resend_accounts_list` |
|
|
84
|
+
| `agent-resend account show <name>` | `resend_account_show` |
|
|
85
|
+
| `agent-resend account policy <name>` | `resend_account_policy` |
|
|
86
|
+
| `agent-resend account remove <name>` | `resend_account_remove` |
|
|
87
|
+
| `agent-resend doctor` | `resend_doctor` |
|
|
88
|
+
| `agent-resend domains` | `resend_domains` |
|
|
89
|
+
| `agent-resend emails list` | `resend_emails_list` |
|
|
90
|
+
| `agent-resend emails show <id>` | `resend_email_show` |
|
|
91
|
+
| `agent-resend received list` | `resend_received_list` |
|
|
92
|
+
| `agent-resend received show <id>` | `resend_received_show` |
|
|
93
|
+
| `agent-resend received download <id>` | `resend_received_download` |
|
|
94
|
+
| `agent-resend metrics` | `resend_metrics` |
|
|
95
|
+
| `agent-resend suppressions` | `resend_suppressions` |
|
|
96
|
+
| `agent-resend send prepare` | `resend_send_prepare` |
|
|
97
|
+
| `agent-resend send execute <approvalId>` | `resend_send_execute` |
|
|
98
|
+
| `agent-resend send status <approvalId>` | `resend_send_status` |
|
|
99
|
+
| `agent-resend scheduled list` | `resend_scheduled_list` |
|
|
100
|
+
| `agent-resend scheduled cancel <id>` | `resend_scheduled_cancel` |
|
|
101
|
+
| `agent-resend approve <approvalId>` | — a person at a terminal |
|
|
102
|
+
| `agent-resend mcp` | — it starts the server |
|
|
103
|
+
| `agent-resend mcp install --client <client>` | `comms_server_install` (core) |
|
|
104
|
+
| `agent-resend mcp prune` | `comms_server_prune` (core) |
|
|
105
|
+
|
|
106
|
+
Every command takes `--json` for the whole result, with stable exit codes: `0` ok, `10` a send or a change was
|
|
107
|
+
refused or needs approval, `64` usage, `65` bad data, `66` not found, `69` Resend or the secret store unavailable,
|
|
108
|
+
`75` temporary, `77` key or permission needed, `78` configuration problem.
|
|
109
|
+
|
|
110
|
+
The skills `resend-reading` and `resend-sending` teach an agent to use them. Everything else — the other channels,
|
|
111
|
+
the design and the reference pages for every command and tool — is in
|
|
112
|
+
[the repository](https://github.com/crissmoldovan/agent-communications).
|