@lightcone-ai/daemon 0.9.41 → 0.9.42

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.41",
3
+ "version": "0.9.42",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -114,6 +114,14 @@ export class BrowserLoginSession {
114
114
  // Ensure profile dir exists
115
115
  try { mkdirSync(this._profileDir, { recursive: true }); } catch {}
116
116
 
117
+ // Delete the Cookies file before Chrome starts so stale session cookies can't fool the login check
118
+ for (const cookiePath of [
119
+ path.join(this._profileDir, 'Default', 'Cookies'),
120
+ path.join(this._profileDir, 'Cookies'),
121
+ ]) {
122
+ try { if (existsSync(cookiePath)) rmSync(cookiePath, { force: true }); } catch {}
123
+ }
124
+
117
125
  // Kill any process holding the CDP port
118
126
  try {
119
127
  if (process.platform !== 'win32') {
@@ -177,9 +185,6 @@ export class BrowserLoginSession {
177
185
  source: `Object.defineProperty(navigator, 'webdriver', { get: () => undefined });`,
178
186
  });
179
187
 
180
- // Clear the session cookie so we only detect a *fresh* login, not stale cached cookies
181
- await this._clearSessionCookies();
182
-
183
188
  await this.send('Page.navigate', { url: this._config.loginUrl });
184
189
 
185
190
  this._startPolling(connection);