@agenticmail/cli 0.5.57 → 0.5.59
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 +19 -1
- package/dist/cli.js +74 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ Running `agenticmail setup` walks you through everything needed to get email wor
|
|
|
46
46
|
|
|
47
47
|
5. **Phone number access (optional)** — set up Google Voice for SMS. Agents can receive verification codes and send texts. The wizard validates Gmail/Google Voice email matching, warns about mismatches, and collects separate credentials when needed. SMS reading prioritizes direct Google Voice web access (instant) with email forwarding as fallback.
|
|
48
48
|
|
|
49
|
-
6. **OpenClaw integration** — if
|
|
49
|
+
6. **OpenClaw integration** — if you opt in by running `agenticmail openclaw`, the wizard registers and configures the plugin and restarts the OpenClaw gateway. Plugin registration only happens through that explicit flow — running `agenticmail setup` alone (without the `openclaw` subcommand) won't touch your OpenClaw config.
|
|
50
50
|
|
|
51
51
|
### Relay Mode (Recommended for Getting Started)
|
|
52
52
|
|
|
@@ -444,6 +444,24 @@ npm prefix -g
|
|
|
444
444
|
|
|
445
445
|
Update the path in `~/.openclaw/openclaw.json` accordingly.
|
|
446
446
|
|
|
447
|
+
### Verifying OpenClaw plugin registration
|
|
448
|
+
|
|
449
|
+
`openclaw plugins inspect agenticmail` returning `Plugin not found: agenticmail` means the plugin entry hasn't been added to your `~/.openclaw/openclaw.json`. Run `agenticmail openclaw` to register it; running plain `agenticmail setup` does NOT touch your OpenClaw config — that step only fires through the explicit `openclaw` subcommand. To verify by hand: open `~/.openclaw/openclaw.json` and check that `plugins.entries` includes an entry with `"id": "agenticmail"` plus a `"path"` pointing at `<npm prefix>/lib/node_modules/@agenticmail/openclaw`.
|
|
450
|
+
|
|
451
|
+
### `cloudflared` shows up after a localhost-only install
|
|
452
|
+
|
|
453
|
+
The setup wizard always downloads `cloudflared` into `~/.agenticmail/bin/` so the binary is ready when you eventually flip to domain mode. Localhost-only installs leave the binary present but unused — `agenticmail status` no longer reports it as "Secure Tunnel ✅" (V0.5.58 fix); it only surfaces a "Cloudflared CLI" line when domain mode is actually configured.
|
|
454
|
+
|
|
455
|
+
### Storage API hangs / 500s
|
|
456
|
+
|
|
457
|
+
`POST /storage/tables` returning success or a structured error shape:
|
|
458
|
+
|
|
459
|
+
```json
|
|
460
|
+
{ "ok": true, "table": "agt_<agent>_<name>", "columns": [...], "indexes": [...] }
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
Errors return JSON: `400` (missing `name`/`columns`), `409` (table already exists), `500` (DB-level error with `message` field). If you see a hang on this or any other `/storage/*` endpoint with 0.5.57 or earlier, upgrade to 0.5.58 — that version fixes a wiring bug where the storage routes called an API the underlying SQLite client doesn't expose.
|
|
464
|
+
|
|
447
465
|
### `agenticmail: command not found`
|
|
448
466
|
|
|
449
467
|
If you installed locally with `npm install agenticmail`, use `npx agenticmail` instead. For a global install:
|
package/dist/cli.js
CHANGED
|
@@ -5592,6 +5592,29 @@ function mergePluginConfig(existing, apiUrl, masterKey, agentApiKey, pluginDir)
|
|
|
5592
5592
|
return result;
|
|
5593
5593
|
}
|
|
5594
5594
|
async function cmdOpenClaw() {
|
|
5595
|
+
const sub = process.argv.slice(3);
|
|
5596
|
+
if (sub.includes("--help") || sub.includes("-h") || sub.includes("help")) {
|
|
5597
|
+
log2("");
|
|
5598
|
+
log2(` ${c2.pinkBg(" \u{1F380} AgenticMail for OpenClaw ")}`);
|
|
5599
|
+
log2("");
|
|
5600
|
+
log2(` ${c2.bold("Usage:")} agenticmail openclaw`);
|
|
5601
|
+
log2("");
|
|
5602
|
+
log2(" Interactive setup wizard for the OpenClaw plugin. Walks you");
|
|
5603
|
+
log2(" through six steps:");
|
|
5604
|
+
log2(` ${c2.dim("1.")} Set up the mail server infrastructure (Stalwart)`);
|
|
5605
|
+
log2(` ${c2.dim("2.")} Create an agent email account`);
|
|
5606
|
+
log2(` ${c2.dim("3.")} Set up phone number access (Google Voice)`);
|
|
5607
|
+
log2(` ${c2.dim("4.")} Register + configure the OpenClaw plugin`);
|
|
5608
|
+
log2(` ${c2.dim("5.")} Restart the OpenClaw gateway so the plugin loads`);
|
|
5609
|
+
log2(` ${c2.dim("6.")} Verify the agent's mailbox`);
|
|
5610
|
+
log2("");
|
|
5611
|
+
log2(` ${c2.bold("Flags:")}`);
|
|
5612
|
+
log2(` ${c2.green("-h, --help")} Show this help and exit`);
|
|
5613
|
+
log2("");
|
|
5614
|
+
log2(` Run ${c2.green("agenticmail --help")} for the full command list.`);
|
|
5615
|
+
log2("");
|
|
5616
|
+
return;
|
|
5617
|
+
}
|
|
5595
5618
|
log2("");
|
|
5596
5619
|
log2(` ${c2.pinkBg(" \u{1F380} AgenticMail for OpenClaw ")}`);
|
|
5597
5620
|
log2("");
|
|
@@ -6276,6 +6299,18 @@ function printPluginSnippet(apiUrl, masterKey, agentApiKey) {
|
|
|
6276
6299
|
log2(` ${c2.dim(" }")}`);
|
|
6277
6300
|
log2(` ${c2.dim("}")}`);
|
|
6278
6301
|
}
|
|
6302
|
+
async function isTunnelConfigured() {
|
|
6303
|
+
const configPath = join(homedir(), ".agenticmail", "config.json");
|
|
6304
|
+
if (!existsSync2(configPath)) return false;
|
|
6305
|
+
try {
|
|
6306
|
+
const config = JSON.parse(readFileSync2(configPath, "utf-8"));
|
|
6307
|
+
if (config.gateway?.mode !== "domain") return false;
|
|
6308
|
+
if (!config.gateway?.domain?.tunnelId && !config.gateway?.domain?.domain) return false;
|
|
6309
|
+
return true;
|
|
6310
|
+
} catch {
|
|
6311
|
+
return false;
|
|
6312
|
+
}
|
|
6313
|
+
}
|
|
6279
6314
|
async function cmdStatus() {
|
|
6280
6315
|
log2("");
|
|
6281
6316
|
log2(` ${c2.pinkBg(" \u{1F380} AgenticMail Status ")}`);
|
|
@@ -6284,11 +6319,23 @@ async function cmdStatus() {
|
|
|
6284
6319
|
const FRIENDLY_NAMES = {
|
|
6285
6320
|
docker: "Container Engine",
|
|
6286
6321
|
stalwart: "Mail Server",
|
|
6287
|
-
cloudflared
|
|
6322
|
+
// Issue #21 — `cloudflared` was previously labelled "Secure
|
|
6323
|
+
// Tunnel" and shown as ✅ whenever the binary was present.
|
|
6324
|
+
// The binary is downloaded as part of every setup (even
|
|
6325
|
+
// localhost-only evals), so the green tick implied an active
|
|
6326
|
+
// tunnel that didn't exist. Renamed to make clear we're only
|
|
6327
|
+
// reporting the CLI binary's presence; the actual tunnel
|
|
6328
|
+
// status is surfaced under "Email" below where the gateway
|
|
6329
|
+
// mode is read.
|
|
6330
|
+
cloudflared: "Cloudflared CLI"
|
|
6288
6331
|
};
|
|
6289
6332
|
const deps = await setup.checkDependencies();
|
|
6290
6333
|
log2(` ${c2.bold("Services:")}`);
|
|
6291
6334
|
for (const dep of deps) {
|
|
6335
|
+
if (dep.name === "cloudflared") {
|
|
6336
|
+
const tunnelConfigured = await isTunnelConfigured();
|
|
6337
|
+
if (!tunnelConfigured) continue;
|
|
6338
|
+
}
|
|
6292
6339
|
const friendly = FRIENDLY_NAMES[dep.name] ?? dep.name;
|
|
6293
6340
|
if (dep.installed) {
|
|
6294
6341
|
const ver = dep.version && /^\d/.test(dep.version) ? `v${dep.version}` : dep.version;
|
|
@@ -6434,6 +6481,17 @@ async function cmdStart() {
|
|
|
6434
6481
|
if (svcResult.installed) {
|
|
6435
6482
|
ok2(`${c2.bold("Auto-start")} enabled \u2014 survives reboots`);
|
|
6436
6483
|
}
|
|
6484
|
+
} else {
|
|
6485
|
+
const repair = svc.needsRepair();
|
|
6486
|
+
if (repair) {
|
|
6487
|
+
info2(`Auto-start service is stale (${repair.reason}); refreshing...`);
|
|
6488
|
+
const svcResult = svc.reinstall();
|
|
6489
|
+
if (svcResult.installed) {
|
|
6490
|
+
ok2(`${c2.bold("Auto-start")} refreshed for the new install path`);
|
|
6491
|
+
} else {
|
|
6492
|
+
info2(`Could not refresh auto-start: ${svcResult.message}`);
|
|
6493
|
+
}
|
|
6494
|
+
}
|
|
6437
6495
|
}
|
|
6438
6496
|
} catch {
|
|
6439
6497
|
}
|
|
@@ -6688,6 +6746,21 @@ switch (command) {
|
|
|
6688
6746
|
process.exit(1);
|
|
6689
6747
|
});
|
|
6690
6748
|
break;
|
|
6749
|
+
case "--version":
|
|
6750
|
+
case "-v":
|
|
6751
|
+
case "version": {
|
|
6752
|
+
try {
|
|
6753
|
+
const { readFileSync: readFileSync3 } = await import("fs");
|
|
6754
|
+
const { join: join2, dirname: dirname2 } = await import("path");
|
|
6755
|
+
const { fileURLToPath: fileURLToPath2 } = await import("url");
|
|
6756
|
+
const thisDir = dirname2(fileURLToPath2(import.meta.url));
|
|
6757
|
+
const pkg = JSON.parse(readFileSync3(join2(thisDir, "..", "package.json"), "utf-8"));
|
|
6758
|
+
console.log(pkg.version ?? "unknown");
|
|
6759
|
+
} catch {
|
|
6760
|
+
console.log("unknown");
|
|
6761
|
+
}
|
|
6762
|
+
process.exit(0);
|
|
6763
|
+
}
|
|
6691
6764
|
case "help":
|
|
6692
6765
|
case "--help":
|
|
6693
6766
|
case "-h":
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.59",
|
|
4
4
|
"description": "Email and SMS infrastructure for AI agents — the first platform to give agents real email addresses and phone numbers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"prepublishOnly": "npm run build"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@agenticmail/api": "^0.5.
|
|
32
|
-
"@agenticmail/core": "^0.5.
|
|
31
|
+
"@agenticmail/api": "^0.5.59",
|
|
32
|
+
"@agenticmail/core": "^0.5.59",
|
|
33
33
|
"json5": "^2.2.3"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|