@agenticmail/core 0.5.15 → 0.5.16

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 (2) hide show
  1. package/dist/index.js +28 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6223,7 +6223,6 @@ var DependencyInstaller = class {
6223
6223
  */
6224
6224
  async setupExistingDockerApp(appPath) {
6225
6225
  const installBin = join6(appPath, "Contents", "MacOS", "install");
6226
- const isFirstLaunch = !this.isDockerLicenseAccepted();
6227
6226
  if (existsSync4(installBin)) {
6228
6227
  this.onProgress("__progress__:30:Setting up CLI tools...");
6229
6228
  const user = process.env.USER || execSync("whoami", { timeout: 5e3 }).toString().trim();
@@ -6235,23 +6234,39 @@ var DependencyInstaller = class {
6235
6234
  } catch {
6236
6235
  }
6237
6236
  }
6238
- if (isFirstLaunch) {
6239
- this._firstLaunchMode = true;
6240
- this.onProgress("__progress__:50:Opening Docker \u2014 please accept the license agreement...");
6237
+ this.onProgress("__progress__:50:Starting engine...");
6238
+ this.startDockerDaemon();
6239
+ let dockerReady = false;
6240
+ for (let i = 0; i < 5; i++) {
6241
+ await new Promise((r) => setTimeout(r, 3e3));
6241
6242
  try {
6242
- execFileSync2("open", ["-a", appPath], { timeout: 1e4, stdio: "ignore" });
6243
+ execFileSync2("docker", ["info"], { timeout: 5e3, stdio: "ignore" });
6244
+ dockerReady = true;
6245
+ break;
6243
6246
  } catch {
6244
6247
  }
6245
- await this.waitForDocker();
6246
- this._firstLaunchMode = false;
6247
- this.configureDockerHeadless();
6248
- this.hideDockerWindow();
6249
- } else {
6250
- this.onProgress("__progress__:50:Starting engine...");
6251
- this.startDockerDaemon();
6248
+ }
6249
+ if (dockerReady) {
6250
+ this.onProgress("__progress__:100:Engine is ready!");
6252
6251
  this.hideDockerWindow();
6253
- await this.waitForDocker();
6252
+ this.configureDockerHeadless();
6253
+ return;
6254
6254
  }
6255
+ try {
6256
+ execSync(`osascript -e 'quit app "Docker"'`, { timeout: 5e3, stdio: "ignore" });
6257
+ } catch {
6258
+ }
6259
+ await new Promise((r) => setTimeout(r, 2e3));
6260
+ this._firstLaunchMode = true;
6261
+ this.onProgress("__progress__:50:Please accept the Docker license agreement...");
6262
+ try {
6263
+ execFileSync2("open", ["-a", appPath], { timeout: 1e4, stdio: "ignore" });
6264
+ } catch {
6265
+ }
6266
+ await this.waitForDocker();
6267
+ this._firstLaunchMode = false;
6268
+ this.configureDockerHeadless();
6269
+ this.hideDockerWindow();
6255
6270
  }
6256
6271
  /**
6257
6272
  * Hide Docker Desktop completely — close all windows, hide from dock, make invisible.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/core",
3
- "version": "0.5.15",
3
+ "version": "0.5.16",
4
4
  "description": "Core SDK for AgenticMail \u2014 email, SMS, and phone number access for AI agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",