@agenticmail/core 0.5.13 → 0.5.15
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/index.d.ts +1 -0
- package/dist/index.js +40 -24
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1416,6 +1416,7 @@ type InstallProgress = (message: string) => void;
|
|
|
1416
1416
|
*/
|
|
1417
1417
|
declare class DependencyInstaller {
|
|
1418
1418
|
private onProgress;
|
|
1419
|
+
private _firstLaunchMode;
|
|
1419
1420
|
constructor(onProgress?: InstallProgress);
|
|
1420
1421
|
/**
|
|
1421
1422
|
* Ensure Docker is installed AND the daemon is running.
|
package/dist/index.js
CHANGED
|
@@ -6061,6 +6061,7 @@ function hasHomebrew() {
|
|
|
6061
6061
|
}
|
|
6062
6062
|
var DependencyInstaller = class {
|
|
6063
6063
|
onProgress;
|
|
6064
|
+
_firstLaunchMode = false;
|
|
6064
6065
|
constructor(onProgress) {
|
|
6065
6066
|
this.onProgress = onProgress ?? (() => {
|
|
6066
6067
|
});
|
|
@@ -6235,12 +6236,14 @@ var DependencyInstaller = class {
|
|
|
6235
6236
|
}
|
|
6236
6237
|
}
|
|
6237
6238
|
if (isFirstLaunch) {
|
|
6239
|
+
this._firstLaunchMode = true;
|
|
6238
6240
|
this.onProgress("__progress__:50:Opening Docker \u2014 please accept the license agreement...");
|
|
6239
6241
|
try {
|
|
6240
6242
|
execFileSync2("open", ["-a", appPath], { timeout: 1e4, stdio: "ignore" });
|
|
6241
6243
|
} catch {
|
|
6242
6244
|
}
|
|
6243
6245
|
await this.waitForDocker();
|
|
6246
|
+
this._firstLaunchMode = false;
|
|
6244
6247
|
this.configureDockerHeadless();
|
|
6245
6248
|
this.hideDockerWindow();
|
|
6246
6249
|
} else {
|
|
@@ -6371,12 +6374,14 @@ var DependencyInstaller = class {
|
|
|
6371
6374
|
await unlink(dmgPath);
|
|
6372
6375
|
} catch {
|
|
6373
6376
|
}
|
|
6377
|
+
this._firstLaunchMode = true;
|
|
6374
6378
|
this.onProgress("__progress__:70:Opening Docker \u2014 please accept the license agreement...");
|
|
6375
6379
|
try {
|
|
6376
6380
|
execFileSync2("open", ["-a", "/Applications/Docker.app"], { timeout: 1e4, stdio: "ignore" });
|
|
6377
6381
|
} catch {
|
|
6378
6382
|
}
|
|
6379
6383
|
await this.waitForDocker();
|
|
6384
|
+
this._firstLaunchMode = false;
|
|
6380
6385
|
this.configureDockerHeadless();
|
|
6381
6386
|
this.hideDockerWindow();
|
|
6382
6387
|
}
|
|
@@ -6539,34 +6544,45 @@ var DependencyInstaller = class {
|
|
|
6539
6544
|
}
|
|
6540
6545
|
const elapsed = Date.now() - start;
|
|
6541
6546
|
const pct = Math.min(95, Math.round(elapsed / totalTime * 100));
|
|
6542
|
-
|
|
6543
|
-
if (currentStrategyElapsed >= perStrategyTime && strategyIdx < strategies.length - 1) {
|
|
6544
|
-
strategyIdx++;
|
|
6545
|
-
const strategy = strategies[strategyIdx];
|
|
6546
|
-
const msgs = {
|
|
6547
|
-
cli: "Checking engine...",
|
|
6548
|
-
reopen: "Restarting engine...",
|
|
6549
|
-
background: "Trying direct launch...",
|
|
6550
|
-
install: "Re-running installer...",
|
|
6551
|
-
service: "Trying service command...",
|
|
6552
|
-
snap: "Trying snap..."
|
|
6553
|
-
};
|
|
6554
|
-
this.onProgress(`__progress__:${pct}:${msgs[strategy] || "Trying another approach..."}`);
|
|
6555
|
-
this.startDockerDaemon(strategy);
|
|
6556
|
-
} else {
|
|
6547
|
+
if (this._firstLaunchMode) {
|
|
6557
6548
|
const msgs = [
|
|
6558
|
-
"
|
|
6559
|
-
"Waiting for
|
|
6560
|
-
"
|
|
6561
|
-
"
|
|
6562
|
-
"Still starting up...",
|
|
6563
|
-
"First launch takes a bit longer...",
|
|
6564
|
-
"Hang tight..."
|
|
6549
|
+
"Please accept the license agreement in the Docker window...",
|
|
6550
|
+
"Waiting for you to accept the terms...",
|
|
6551
|
+
"Accept the agreement to continue...",
|
|
6552
|
+
"Still waiting..."
|
|
6565
6553
|
];
|
|
6566
|
-
const msgIdx = Math.floor(elapsed /
|
|
6554
|
+
const msgIdx = Math.floor(elapsed / 8e3) % msgs.length;
|
|
6567
6555
|
this.onProgress(`__progress__:${pct}:${msgs[msgIdx]}`);
|
|
6556
|
+
} else {
|
|
6557
|
+
const currentStrategyElapsed = elapsed - strategyIdx * perStrategyTime;
|
|
6558
|
+
if (currentStrategyElapsed >= perStrategyTime && strategyIdx < strategies.length - 1) {
|
|
6559
|
+
strategyIdx++;
|
|
6560
|
+
const strategy = strategies[strategyIdx];
|
|
6561
|
+
const msgs = {
|
|
6562
|
+
cli: "Checking engine...",
|
|
6563
|
+
reopen: "Restarting engine...",
|
|
6564
|
+
background: "Trying direct launch...",
|
|
6565
|
+
install: "Re-running installer...",
|
|
6566
|
+
service: "Trying service command...",
|
|
6567
|
+
snap: "Trying snap..."
|
|
6568
|
+
};
|
|
6569
|
+
this.onProgress(`__progress__:${pct}:${msgs[strategy] || "Trying another approach..."}`);
|
|
6570
|
+
this.startDockerDaemon(strategy);
|
|
6571
|
+
} else {
|
|
6572
|
+
const msgs = [
|
|
6573
|
+
"Starting engine...",
|
|
6574
|
+
"Waiting for engine...",
|
|
6575
|
+
"Loading...",
|
|
6576
|
+
"Almost there...",
|
|
6577
|
+
"Still starting up...",
|
|
6578
|
+
"First launch takes a bit longer...",
|
|
6579
|
+
"Hang tight..."
|
|
6580
|
+
];
|
|
6581
|
+
const msgIdx = Math.floor(elapsed / 1e4) % msgs.length;
|
|
6582
|
+
this.onProgress(`__progress__:${pct}:${msgs[msgIdx]}`);
|
|
6583
|
+
}
|
|
6584
|
+
if (os === "darwin") this.hideDockerWindow();
|
|
6568
6585
|
}
|
|
6569
|
-
if (os === "darwin" && this.isDockerLicenseAccepted()) this.hideDockerWindow();
|
|
6570
6586
|
await new Promise((r) => setTimeout(r, 3e3));
|
|
6571
6587
|
}
|
|
6572
6588
|
throw new Error(
|