@elvatis_com/openclaw-cli-bridge-elvatis 1.7.2 → 1.7.3

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/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > OpenClaw plugin that bridges locally installed AI CLIs (Codex, Gemini, Claude Code) as model providers — with slash commands for instant model switching, restore, health testing, and model listing.
4
4
 
5
- **Current version:** `1.7.2`
5
+ **Current version:** `1.7.3`
6
6
 
7
7
  ---
8
8
 
@@ -362,6 +362,9 @@ npm test # vitest run (83 tests)
362
362
 
363
363
  ## Changelog
364
364
 
365
+ ### v1.7.3
366
+ - **fix:** Claude cookie expiry now uses the longest-lived auth cookie (`sessionKey`, ~1 year) instead of the earliest-expiring one. `__cf_bm` (Cloudflare, ~30 min) was previously causing false "session expired" alerts every 30 minutes.
367
+
365
368
  ### v1.7.2
366
369
  - **fix:** Startup restore now uses cookie expiry file as primary check — if cookies are still valid (>1h left), the persistent context is launched immediately without a fragile browser selector check. This eliminates false "not logged in" errors for Grok/Claude/ChatGPT caused by slow page loads or DOM selector changes.
367
370
  - **fix:** Grok cookie file path corrected to `grok-cookie-expiry.json` (was `grok-session.json`).
package/SKILL.md CHANGED
@@ -66,4 +66,4 @@ On gateway restart, if any session has expired, a **WhatsApp alert** is sent aut
66
66
 
67
67
  See `README.md` for full configuration reference and architecture diagram.
68
68
 
69
- **Version:** 1.7.2
69
+ **Version:** 1.7.3
package/index.ts CHANGED
@@ -149,11 +149,13 @@ function loadClaudeExpiry(): ClaudeExpiryInfo | null {
149
149
  async function scanClaudeCookieExpiry(ctx: BrowserContext): Promise<ClaudeExpiryInfo | null> {
150
150
  try {
151
151
  const cookies = await ctx.cookies(["https://claude.ai"]);
152
- const auth = cookies.filter(c => ["sessionKey", "__cf_bm", "lastActiveOrg"].includes(c.name) && c.expires && c.expires > 0);
152
+ const auth = cookies.filter(c => ["sessionKey", "lastActiveOrg"].includes(c.name) && c.expires && c.expires > 0);
153
153
  if (!auth.length) return null;
154
- auth.sort((a, b) => (a.expires ?? 0) - (b.expires ?? 0));
155
- const earliest = auth[0];
156
- return { expiresAt: (earliest.expires ?? 0) * 1000, loginAt: Date.now(), cookieName: earliest.name };
154
+ // Use the LONGEST-lived auth cookie (sessionKey) for expiry tracking,
155
+ // not short-lived Cloudflare cookies like __cf_bm (~30 min).
156
+ auth.sort((a, b) => (b.expires ?? 0) - (a.expires ?? 0));
157
+ const longest = auth[0];
158
+ return { expiresAt: (longest.expires ?? 0) * 1000, loginAt: Date.now(), cookieName: longest.name };
157
159
  } catch { return null; }
158
160
  }
159
161
 
@@ -912,7 +914,7 @@ function proxyTestRequest(
912
914
  const plugin = {
913
915
  id: "openclaw-cli-bridge-elvatis",
914
916
  name: "OpenClaw CLI Bridge",
915
- version: "1.7.2",
917
+ version: "1.7.3",
916
918
  description:
917
919
  "Phase 1: openai-codex auth bridge. " +
918
920
  "Phase 2: HTTP proxy for gemini/claude CLIs. " +
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openclaw-cli-bridge-elvatis",
3
3
  "name": "OpenClaw CLI Bridge",
4
- "version": "1.7.2",
4
+ "version": "1.7.3",
5
5
  "license": "MIT",
6
6
  "description": "Phase 1: openai-codex auth bridge. Phase 2: local HTTP proxy routing model calls through gemini/claude CLIs (vllm provider).",
7
7
  "providers": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvatis_com/openclaw-cli-bridge-elvatis",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "Bridges gemini, claude, and codex CLI tools as OpenClaw model providers. Reads existing CLI auth without re-login.",
5
5
  "type": "module",
6
6
  "openclaw": {