@agenticmail/cli 0.5.57 → 0.5.58

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.
Files changed (3) hide show
  1. package/README.md +19 -1
  2. package/dist/cli.js +48 -1
  3. package/package.json +2 -2
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 OpenClaw is detected, automatically registers the plugin.
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: "Secure Tunnel"
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/cli",
3
- "version": "0.5.57",
3
+ "version": "0.5.58",
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,7 +28,7 @@
28
28
  "prepublishOnly": "npm run build"
29
29
  },
30
30
  "dependencies": {
31
- "@agenticmail/api": "^0.5.56",
31
+ "@agenticmail/api": "^0.5.58",
32
32
  "@agenticmail/core": "^0.5.0",
33
33
  "json5": "^2.2.3"
34
34
  },