@lightcone-ai/daemon 0.9.37 → 0.9.38

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,8 +33,15 @@ export class XhsAdapter {
33
33
  }
34
34
 
35
35
  async checkLoginStatus() {
36
- const result = await this._cdp.send('Network.getAllCookies', {});
37
- return (result.cookies ?? []).some(c => c.name === 'web_session' && c.value?.length > 0);
36
+ // Navigate to publish page — if redirected away, session is expired
37
+ await this._cdp.send('Page.navigate', { url: 'https://creator.xiaohongshu.com/publish/publish' });
38
+ await sleep(4000);
39
+ const result = await this._cdp.send('Runtime.evaluate', {
40
+ expression: 'window.location.href',
41
+ returnByValue: true,
42
+ });
43
+ const url = result.result?.value ?? '';
44
+ return url.includes('creator.xiaohongshu.com/publish');
38
45
  }
39
46
 
40
47
  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.9.37",
3
+ "version": "0.9.38",
4
4
  "type": "module",
5
5
  "main": "src/index.js",
6
6
  "bin": {