@lightcone-ai/daemon 0.15.8 → 0.15.9

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.
@@ -33,9 +33,16 @@ export class KuaishouAdapter {
33
33
  }
34
34
 
35
35
  async checkLoginStatus() {
36
+ const profileDir = process.env.KUAISHOU_PROFILE_DIR ?? '(not set)';
37
+ await this._cdp.send('Page.navigate', { url: 'https://cp.kuaishou.com/profile' });
38
+ await sleep(4000);
39
+ const urlResult = await this._cdp.send('Runtime.evaluate', { expression: 'window.location.href', returnByValue: true });
40
+ const url = urlResult.result?.value ?? '';
36
41
  const result = await this._cdp.send('Network.getAllCookies', {});
37
42
  const cookies = result.cookies ?? [];
38
- return cookies.some(c => (c.name === 'userId' || c.name === 'passToken') && c.value?.length > 0);
43
+ const loggedIn = cookies.some(c => (c.name === 'userId' || c.name === 'passToken') && c.value?.length > 0);
44
+ console.error(`[KuaishouAdapter] checkLoginStatus: loggedIn=${loggedIn} url=${url}`);
45
+ return { loggedIn, url, profileDir, userId: null, nickname: null };
39
46
  }
40
47
 
41
48
  async publishImageText({ title, text, tags = [], images = [] }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightcone-ai/daemon",
3
- "version": "0.15.8",
3
+ "version": "0.15.9",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {