@lightcone-ai/daemon 0.9.45 → 0.9.46

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightcone-ai/daemon",
3
- "version": "0.9.45",
3
+ "version": "0.9.46",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -273,8 +273,11 @@ export class BrowserLoginSession {
273
273
  if (this._loginCheckTimer) { clearInterval(this._loginCheckTimer); this._loginCheckTimer = null; }
274
274
  }
275
275
 
276
- close() {
276
+ async close() {
277
277
  this._stopTimers();
278
+ // Use CDP Browser.close for graceful shutdown so Chrome flushes cookies to disk
279
+ try { await this.send('Browser.close', {}, 3000); } catch {}
280
+ await sleep(1000);
278
281
  if (this._ws) { try { this._ws.close(); } catch {} this._ws = null; }
279
282
  if (this._proc) { try { this._proc.kill('SIGKILL'); } catch {} this._proc = null; }
280
283
  }