@agenticmail/cli 0.7.0 → 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/dist/cli.js +22 -7
- package/package.json +4 -4
package/dist/cli.js
CHANGED
|
@@ -5634,7 +5634,7 @@ async function cmdBootstrap() {
|
|
|
5634
5634
|
log2(" Pipeline:");
|
|
5635
5635
|
log2(` ${c2.dim("1.")} agenticmail setup --yes ${c2.dim("(skips email/SMS; local-only)")}`);
|
|
5636
5636
|
log2(` ${c2.dim("2.")} agenticmail service install ${c2.dim("(auto-start the API)")}`);
|
|
5637
|
-
log2(` ${c2.dim("3.")} wait for API on http://127.0.0.1
|
|
5637
|
+
log2(` ${c2.dim("3.")} wait for API on http://127.0.0.1:<configured port>/api/agenticmail/health`);
|
|
5638
5638
|
log2(` ${c2.dim("4.")} agenticmail claudecode ${c2.dim("(wire Claude Code integration)")}`);
|
|
5639
5639
|
log2("");
|
|
5640
5640
|
log2(` ${c2.bold("Notes:")}`);
|
|
@@ -5671,11 +5671,12 @@ async function cmdBootstrap() {
|
|
|
5671
5671
|
process.argv = savedArgvSvc;
|
|
5672
5672
|
}
|
|
5673
5673
|
log2("");
|
|
5674
|
-
|
|
5674
|
+
const { apiUrl: healthUrl } = readApiUrlFromConfig();
|
|
5675
|
+
log2(` ${c2.bold("Phase 3 of 4")} ${c2.dim("\u2014")} ${c2.bold("Waiting for the API to come online")} ${c2.dim("(" + healthUrl + ")")}`);
|
|
5675
5676
|
log2("");
|
|
5676
|
-
const apiHealthOk = await waitForApiHealth(6e4);
|
|
5677
|
+
const apiHealthOk = await waitForApiHealth(healthUrl, 6e4);
|
|
5677
5678
|
if (!apiHealthOk) {
|
|
5678
|
-
fail2(`API did not respond on
|
|
5679
|
+
fail2(`API did not respond on ${healthUrl}/api/agenticmail/health within 60 s`);
|
|
5679
5680
|
info2("Check the logs: tail -f ~/.agenticmail/logs/server.log");
|
|
5680
5681
|
process.exit(1);
|
|
5681
5682
|
}
|
|
@@ -5701,11 +5702,25 @@ async function cmdBootstrap() {
|
|
|
5701
5702
|
log2(` ${c2.dim("To add an external email relay later:")} ${c2.green("agenticmail setup")}`);
|
|
5702
5703
|
log2("");
|
|
5703
5704
|
}
|
|
5704
|
-
|
|
5705
|
+
function readApiUrlFromConfig() {
|
|
5706
|
+
const configPath = join(homedir(), ".agenticmail", "config.json");
|
|
5707
|
+
let host = "127.0.0.1";
|
|
5708
|
+
let port = 3829;
|
|
5709
|
+
if (existsSync2(configPath)) {
|
|
5710
|
+
try {
|
|
5711
|
+
const cfg = JSON.parse(readFileSync2(configPath, "utf-8"));
|
|
5712
|
+
if (cfg?.api?.host) host = cfg.api.host;
|
|
5713
|
+
if (typeof cfg?.api?.port === "number") port = cfg.api.port;
|
|
5714
|
+
} catch {
|
|
5715
|
+
}
|
|
5716
|
+
}
|
|
5717
|
+
return { apiUrl: `http://${host}:${port}`, host, port };
|
|
5718
|
+
}
|
|
5719
|
+
async function waitForApiHealth(baseUrl, timeoutMs) {
|
|
5705
5720
|
const deadline = Date.now() + timeoutMs;
|
|
5706
5721
|
while (Date.now() < deadline) {
|
|
5707
5722
|
try {
|
|
5708
|
-
const res = await fetch(
|
|
5723
|
+
const res = await fetch(`${baseUrl}/api/agenticmail/health`, {
|
|
5709
5724
|
signal: AbortSignal.timeout(3e3)
|
|
5710
5725
|
});
|
|
5711
5726
|
if (res.ok) return true;
|
|
@@ -6589,7 +6604,7 @@ async function cmdStatus() {
|
|
|
6589
6604
|
log2("");
|
|
6590
6605
|
const configPath = join(homedir(), ".agenticmail", "config.json");
|
|
6591
6606
|
let apiHost = "127.0.0.1";
|
|
6592
|
-
let apiPort =
|
|
6607
|
+
let apiPort = 3829;
|
|
6593
6608
|
let masterKey = process.env.AGENTICMAIL_MASTER_KEY;
|
|
6594
6609
|
if (existsSync2(configPath)) {
|
|
6595
6610
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agenticmail/cli",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
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,12 +28,12 @@
|
|
|
28
28
|
"prepublishOnly": "npm run build"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@agenticmail/api": "^0.6.
|
|
32
|
-
"@agenticmail/core": "^0.
|
|
31
|
+
"@agenticmail/api": "^0.6.2",
|
|
32
|
+
"@agenticmail/core": "^0.6.1",
|
|
33
33
|
"json5": "^2.2.3"
|
|
34
34
|
},
|
|
35
35
|
"optionalDependencies": {
|
|
36
|
-
"@agenticmail/claudecode": "^0.1.
|
|
36
|
+
"@agenticmail/claudecode": "^0.1.4"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"tsup": "^8.4.0",
|