@agenticmail/api 0.7.1 → 0.7.2
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/README.md +17 -2
- package/REFERENCE.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,9 @@ This package runs a web server that handles everything: sending email and SMS, r
|
|
|
10
10
|
npm install @agenticmail/api
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
**Requirements:** Node.js
|
|
13
|
+
**Requirements:** Node.js 22+ (uses Node's built-in `node:sqlite`, no native compilation), `@agenticmail/core@^0.7.0`, Stalwart Mail Server running (via Docker / Colima).
|
|
14
|
+
|
|
15
|
+
**Default listen address:** `http://127.0.0.1:3829`. The port changed from `3100` to `3829` in `0.7.x` to avoid clashes with common dev-tool defaults (Grafana Loki, Express scaffolds, etc.). Override via `AGENTICMAIL_API_PORT` env var or `api.port` in `~/.agenticmail/config.json`.
|
|
14
16
|
|
|
15
17
|
---
|
|
16
18
|
|
|
@@ -24,8 +26,21 @@ The API server is the central hub. It sits between agents (or any client) and th
|
|
|
24
26
|
- **The interactive shell** (`agenticmail start`) — powers every command in the CLI
|
|
25
27
|
- **The MCP server** (`@agenticmail/mcp`) — translates AI tool calls into API requests
|
|
26
28
|
- **OpenClaw sub-agents** (`@agenticmail/openclaw`) — same thing but for the OpenClaw framework
|
|
29
|
+
- **Claude Code sessions** (`@agenticmail/claudecode`) — surfaces every AgenticMail agent as a callable subagent and bridges inbound mail/tasks to Claude-powered workers via a dispatcher daemon. The API auto-mounts integration routes under `/api/agenticmail/integrations/claudecode/*` when `@agenticmail/claudecode` is installed as an optional dependency.
|
|
27
30
|
- **Your own code** — any HTTP client can use the API
|
|
28
31
|
|
|
32
|
+
### Claude Code self-install endpoint
|
|
33
|
+
|
|
34
|
+
When `@agenticmail/claudecode` is installed alongside the API server, three additional routes light up:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
GET /api/agenticmail/integrations/claudecode/status
|
|
38
|
+
POST /api/agenticmail/integrations/claudecode/install
|
|
39
|
+
POST /api/agenticmail/integrations/claudecode/uninstall
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
These are mounted **before** the master-key auth middleware on purpose — a fresh Claude Code session that doesn't yet have AgenticMail wired up has no way to know the master key, so requiring it would defeat the "agent installs itself" use case. The API binds to `127.0.0.1` by default, so anything that can reach these endpoints can already read `~/.agenticmail/config.json` — the unauthenticated install endpoint doesn't widen the attack surface beyond that. **If you bind the API to a non-loopback interface, put auth or a firewall in front of it** (same caveat as every other unauthenticated route on the server, e.g. `/health`).
|
|
43
|
+
|
|
29
44
|
---
|
|
30
45
|
|
|
31
46
|
## How Authentication Works
|
|
@@ -354,7 +369,7 @@ JSON parse errors (malformed request bodies) return a clear 400 error rather tha
|
|
|
354
369
|
| Variable | Required | Default | Description |
|
|
355
370
|
|----------|----------|---------|-------------|
|
|
356
371
|
| `AGENTICMAIL_MASTER_KEY` | Yes | — | Admin API key (the human owner's key) |
|
|
357
|
-
| `AGENTICMAIL_API_PORT` | No | `
|
|
372
|
+
| `AGENTICMAIL_API_PORT` | No | `3829` | Port for the API server |
|
|
358
373
|
| `STALWART_URL` | No | `http://localhost:8080` | Stalwart mail server admin URL |
|
|
359
374
|
| `STALWART_ADMIN_USER` | No | `admin` | Stalwart admin username |
|
|
360
375
|
| `STALWART_ADMIN_PASSWORD` | No | `changeme` | Stalwart admin password |
|
package/REFERENCE.md
CHANGED
|
@@ -1297,7 +1297,7 @@ Signals: SIGTERM and SIGINT both trigger shutdown.
|
|
|
1297
1297
|
| Variable | Required | Default | Description |
|
|
1298
1298
|
|----------|----------|---------|-------------|
|
|
1299
1299
|
| `AGENTICMAIL_MASTER_KEY` | Yes | — | Master API key |
|
|
1300
|
-
| `AGENTICMAIL_API_PORT` | No | `
|
|
1300
|
+
| `AGENTICMAIL_API_PORT` | No | `3829` | Server port |
|
|
1301
1301
|
| `STALWART_URL` | No | `http://localhost:8080` | Stalwart admin URL |
|
|
1302
1302
|
| `STALWART_ADMIN_USER` | No | `admin` | Stalwart admin user |
|
|
1303
1303
|
| `STALWART_ADMIN_PASSWORD` | No | `changeme` | Stalwart admin password |
|