@elvatis_com/openclaw-cli-bridge-elvatis 1.7.2 → 1.7.4
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/.ai/handoff/DASHBOARD.md +4 -3
- package/.ai/handoff/LOG.md +49 -0
- package/.ai/handoff/NEXT_ACTIONS.md +3 -2
- package/.ai/handoff/STATUS.md +16 -6
- package/README.md +11 -1
- package/SKILL.md +1 -1
- package/index.ts +18 -12
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/.ai/handoff/DASHBOARD.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# DASHBOARD.md — openclaw-cli-bridge-elvatis
|
|
2
2
|
|
|
3
|
-
_Last updated: 2026-03-
|
|
3
|
+
_Last updated: 2026-03-13_
|
|
4
4
|
|
|
5
5
|
<!-- SECTION: plugin_status -->
|
|
6
6
|
## Plugin Status
|
|
7
7
|
|
|
8
8
|
| Component | Version | Build | Tests | Status |
|
|
9
9
|
|-----------|---------|-------|-------|--------|
|
|
10
|
-
| openclaw-cli-bridge-elvatis | 1.
|
|
10
|
+
| openclaw-cli-bridge-elvatis | 1.7.3 | ✅ | ✅ 96/96 | ✅ Stable |
|
|
11
11
|
<!-- /SECTION: plugin_status -->
|
|
12
12
|
|
|
13
13
|
<!-- SECTION: release_state -->
|
|
@@ -16,7 +16,7 @@ _Last updated: 2026-03-12_
|
|
|
16
16
|
| Platform | Published Version | Status |
|
|
17
17
|
|----------|------------------|--------|
|
|
18
18
|
| GitHub | v1.3.5 | ✅ Tagged + Release |
|
|
19
|
-
| Local | 1.
|
|
19
|
+
| Local | 1.7.3 | ⏳ Built, pending push |
|
|
20
20
|
<!-- /SECTION: release_state -->
|
|
21
21
|
|
|
22
22
|
<!-- SECTION: open_tasks -->
|
|
@@ -30,6 +30,7 @@ _No open tasks._
|
|
|
30
30
|
|
|
31
31
|
| Task | Title | Version |
|
|
32
32
|
|------|-------|---------|
|
|
33
|
+
| T-013 | Fix cookie expiry tracking — longest-lived auth cookie for all 4 providers | 1.7.3 |
|
|
33
34
|
| T-012 | Persistent browser fallback for Claude/Gemini/ChatGPT (no CDP required) | 1.4.0 |
|
|
34
35
|
| T-011 | Session-safe staged model switching (/cli-apply, /cli-pending, --now) | 0.2.25 |
|
|
35
36
|
| T-009 | Stability: sleep-resilient token refresh + stopTokenRefresh cleanup | 0.2.25 |
|
package/.ai/handoff/LOG.md
CHANGED
|
@@ -4,6 +4,55 @@ _Last 10 sessions. Older entries in LOG-ARCHIVE.md._
|
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
## 2026-03-13 — Session 8 (Claude Opus 4.6)
|
|
8
|
+
|
|
9
|
+
> **Agent:** claude-opus-4-6
|
|
10
|
+
> **Phase:** fix
|
|
11
|
+
> **Commit before:** v1.7.2
|
|
12
|
+
> **Commit after:** v1.7.3
|
|
13
|
+
|
|
14
|
+
**T-013: Fix cookie expiry tracking — longest-lived auth cookie for all 4 providers**
|
|
15
|
+
|
|
16
|
+
### Problem
|
|
17
|
+
`scanClaudeCookieExpiry()` included `__cf_bm` (Cloudflare Bot Management cookie, ~30 min lifetime)
|
|
18
|
+
in its cookie filter list and sorted ascending by expiry (earliest first). Result: the saved
|
|
19
|
+
`claude-cookie-expiry.json` always showed `cookieName: "__cf_bm"` expiring in ~30 minutes.
|
|
20
|
+
|
|
21
|
+
**Impact:**
|
|
22
|
+
- Every gateway startup, the cookie-first check (`expiresAt - Date.now() > 1h`) failed immediately
|
|
23
|
+
- Fallback browser-check (headless `.ProseMirror` selector) also failed (Cloudflare block)
|
|
24
|
+
- `/claude-login` added to `needsLogin[]` → WhatsApp alert sent on every restart
|
|
25
|
+
- Same pattern affected ChatGPT (`_puid` ~7d was picked over longer-lived session tokens),
|
|
26
|
+
Gemini, and Grok (all sorted ascending = shortest wins)
|
|
27
|
+
|
|
28
|
+
### Fix (index.ts)
|
|
29
|
+
|
|
30
|
+
**`scanClaudeCookieExpiry()`** (line 152):
|
|
31
|
+
- Removed `__cf_bm` from cookie filter list (only `sessionKey`, `lastActiveOrg` remain)
|
|
32
|
+
- Reversed sort: `(b.expires) - (a.expires)` → picks longest-lived cookie
|
|
33
|
+
- Renamed variable `earliest` → `longest` for clarity
|
|
34
|
+
|
|
35
|
+
**`scanChatGPTCookieExpiry()`** (line 176):
|
|
36
|
+
- Reversed sort: now picks longest-lived of `__Secure-next-auth.session-token` / `_puid` / `oai-did`
|
|
37
|
+
|
|
38
|
+
**`scanGeminiCookieExpiry()`** (line 135):
|
|
39
|
+
- Reversed sort: now picks longest-lived of `__Secure-1PSID` / `__Secure-3PSID` / `SID`
|
|
40
|
+
|
|
41
|
+
**`scanCookieExpiry()` (Grok)** (line 216):
|
|
42
|
+
- Reversed reduce: `c.expires > min.expires` instead of `<`
|
|
43
|
+
|
|
44
|
+
**Stale files deleted:**
|
|
45
|
+
- `~/.openclaw/claude-cookie-expiry.json` (contained `__cf_bm` with 30-min expiry)
|
|
46
|
+
- `~/.openclaw/chatgpt-cookie-expiry.json` (contained `_puid` with ~7d expiry)
|
|
47
|
+
|
|
48
|
+
### Build
|
|
49
|
+
- `npm run build` — ✅ (pre-existing TS errors from missing openclaw/plugin-sdk, JS emitted via `--noEmitOnError false`)
|
|
50
|
+
|
|
51
|
+
### Version
|
|
52
|
+
1.7.2 → 1.7.3
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
7
56
|
## 2026-03-12 — Session 7 (Claude Opus 4.6)
|
|
8
57
|
|
|
9
58
|
> **Agent:** claude-opus-4-6
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# NEXT_ACTIONS.md — openclaw-cli-bridge-elvatis
|
|
2
2
|
|
|
3
|
-
_Last updated: 2026-03-
|
|
3
|
+
_Last updated: 2026-03-13_
|
|
4
4
|
|
|
5
5
|
<!-- SECTION: summary -->
|
|
6
6
|
## Status Summary
|
|
7
7
|
|
|
8
8
|
| Status | Count |
|
|
9
9
|
|---------|-------|
|
|
10
|
-
| Done |
|
|
10
|
+
| Done | 13 |
|
|
11
11
|
| Ready | 0 |
|
|
12
12
|
| Blocked | 0 |
|
|
13
13
|
<!-- /SECTION: summary -->
|
|
@@ -30,6 +30,7 @@ _No blocked tasks._
|
|
|
30
30
|
|
|
31
31
|
| Task | Title | Date |
|
|
32
32
|
|-------|--------------------------------------------------------------------|------------|
|
|
33
|
+
| T-013 | Fix cookie expiry tracking — longest-lived auth cookie (all 4) | 2026-03-13 |
|
|
33
34
|
| T-012 | Persistent browser fallback for Claude/Gemini/ChatGPT (no CDP) | 2026-03-12 |
|
|
34
35
|
| T-011 | Session-safe staged model switching (/cli-apply, /cli-pending) | 2026-03-11 |
|
|
35
36
|
| T-009 | Stability: sleep-resilient token refresh + stopTokenRefresh cleanup | 2026-03-11 |
|
package/.ai/handoff/STATUS.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# STATUS — openclaw-cli-bridge-elvatis
|
|
2
2
|
|
|
3
|
-
## Current Version: 1.
|
|
3
|
+
## Current Version: 1.7.3
|
|
4
4
|
|
|
5
5
|
## All 4 Providers Available — persistent Chromium profiles
|
|
6
6
|
| Provider | Status | Models | Login Cmd | Cookie Expiry |
|
|
7
7
|
|---|---|---|---|---|
|
|
8
8
|
| Grok | ✅ | web-grok/grok-3, grok-3-fast, grok-3-mini, grok-3-mini-fast | /grok-login | ~178d |
|
|
9
9
|
| Gemini | ✅ | web-gemini/gemini-2-5-pro, gemini-2-5-flash, gemini-3-pro, gemini-3-flash | /gemini-login | ~398d |
|
|
10
|
-
| Claude.ai |
|
|
11
|
-
| ChatGPT |
|
|
10
|
+
| Claude.ai | ✅ | web-claude/claude-sonnet, claude-opus, claude-haiku | /claude-login | ~364d |
|
|
11
|
+
| ChatGPT | ✅ | web-chatgpt/gpt-4o, gpt-4o-mini, gpt-4.1, o3, o4-mini, gpt-5, gpt-5-mini | /chatgpt-login | ~6d (re-run /chatgpt-login to refresh) |
|
|
12
12
|
|
|
13
13
|
## Stats
|
|
14
14
|
- 22 total models (6 CLI + 16 web-session)
|
|
@@ -28,8 +28,19 @@
|
|
|
28
28
|
- 🔴 session expired — needs /xxx-login
|
|
29
29
|
- ⚪ never logged in
|
|
30
30
|
|
|
31
|
+
## Cookie Expiry Tracking (fixed in v1.7.3)
|
|
32
|
+
All 4 providers now track the **longest-lived** auth cookie instead of the shortest:
|
|
33
|
+
- Claude: `sessionKey` (~1 year) — was `__cf_bm` (Cloudflare, ~30 min) causing false alerts
|
|
34
|
+
- ChatGPT: longest of `__Secure-next-auth.session-token` / `_puid` / `oai-did`
|
|
35
|
+
- Gemini: longest of `__Secure-1PSID` / `__Secure-3PSID` / `SID`
|
|
36
|
+
- Grok: longest of `sso` / `sso-rw`
|
|
37
|
+
|
|
31
38
|
## Release History
|
|
32
|
-
- v1.
|
|
39
|
+
- v1.7.3 (2026-03-13): Fix cookie expiry tracking — use longest-lived auth cookie for all 4 providers
|
|
40
|
+
- v1.7.2 (2026-03-13): Cookie-first startup restore (skip fragile browser selector check)
|
|
41
|
+
- v1.7.1 (2026-03-13): /status HTML dashboard at :31337
|
|
42
|
+
- v1.7.0 (2026-03-13): Startup restore timeout fix, auto-relogin, keep-alive verification, vitest suite
|
|
43
|
+
- v1.6.1 (2026-03-13): Fix /bridge-status — use cookie expiry as source of truth
|
|
33
44
|
- v1.6.0 (2026-03-13): Persistent Chromium profiles for all 4 providers (Claude web + ChatGPT)
|
|
34
45
|
- v1.5.1 (2026-03-12): Fix hardcoded plugin version
|
|
35
46
|
- v1.5.0 (2026-03-12): Remove /claude-login and /chatgpt-login (pre-v1.6.0 interim)
|
|
@@ -39,7 +50,6 @@
|
|
|
39
50
|
- v1.0.0 (2026-03-11): All 4 providers headless — 96/96 tests
|
|
40
51
|
|
|
41
52
|
## Next Steps
|
|
42
|
-
- /
|
|
43
|
-
- /chatgpt-login needs to be run in ~6 days
|
|
53
|
+
- /chatgpt-login should be re-run soon (~6d left on _puid cookie)
|
|
44
54
|
- Gemini model switching via UI (2.5 Pro vs Flash vs 3)
|
|
45
55
|
- Context-window management for long conversations
|
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.
|
|
5
|
+
**Current version:** `1.7.4`
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -362,6 +362,16 @@ npm test # vitest run (83 tests)
|
|
|
362
362
|
|
|
363
363
|
## Changelog
|
|
364
364
|
|
|
365
|
+
### v1.7.4
|
|
366
|
+
- **docs:** Handoff docs updated (DASHBOARD, LOG, STATUS, NEXT_ACTIONS)
|
|
367
|
+
|
|
368
|
+
### v1.7.3
|
|
369
|
+
- **fix:** Cookie expiry tracking for all 4 providers now uses the **longest-lived** auth cookie instead of the shortest. Previously, short-lived cookies caused false "session expired" alerts and unnecessary WhatsApp notifications on every gateway restart:
|
|
370
|
+
- **Claude:** `__cf_bm` (Cloudflare, ~30 min) removed from scan list; now tracks `sessionKey` (~1 year)
|
|
371
|
+
- **ChatGPT:** sort reversed; now prefers `__Secure-next-auth.session-token` over `_puid` (~7d)
|
|
372
|
+
- **Gemini:** sort reversed; now uses longest of `__Secure-1PSID` / `__Secure-3PSID` / `SID`
|
|
373
|
+
- **Grok:** sort reversed; now uses longest of `sso` / `sso-rw`
|
|
374
|
+
|
|
365
375
|
### v1.7.2
|
|
366
376
|
- **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
377
|
- **fix:** Grok cookie file path corrected to `grok-cookie-expiry.json` (was `grok-session.json`).
|
package/SKILL.md
CHANGED
package/index.ts
CHANGED
|
@@ -132,9 +132,10 @@ async function scanGeminiCookieExpiry(ctx: BrowserContext): Promise<GeminiExpiry
|
|
|
132
132
|
const cookies = await ctx.cookies(["https://gemini.google.com", "https://accounts.google.com"]);
|
|
133
133
|
const auth = cookies.filter(c => ["__Secure-1PSID", "__Secure-3PSID", "SID"].includes(c.name) && c.expires && c.expires > 0);
|
|
134
134
|
if (!auth.length) return null;
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
// Use the longest-lived auth cookie for expiry tracking
|
|
136
|
+
auth.sort((a, b) => (b.expires ?? 0) - (a.expires ?? 0));
|
|
137
|
+
const longest = auth[0];
|
|
138
|
+
return { expiresAt: (longest.expires ?? 0) * 1000, loginAt: Date.now(), cookieName: longest.name };
|
|
138
139
|
} catch { return null; }
|
|
139
140
|
}
|
|
140
141
|
// ── Claude cookie expiry helpers ─────────────────────────────────────────────
|
|
@@ -149,11 +150,13 @@ function loadClaudeExpiry(): ClaudeExpiryInfo | null {
|
|
|
149
150
|
async function scanClaudeCookieExpiry(ctx: BrowserContext): Promise<ClaudeExpiryInfo | null> {
|
|
150
151
|
try {
|
|
151
152
|
const cookies = await ctx.cookies(["https://claude.ai"]);
|
|
152
|
-
const auth = cookies.filter(c => ["sessionKey", "
|
|
153
|
+
const auth = cookies.filter(c => ["sessionKey", "lastActiveOrg"].includes(c.name) && c.expires && c.expires > 0);
|
|
153
154
|
if (!auth.length) return null;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
155
|
+
// Use the LONGEST-lived auth cookie (sessionKey) for expiry tracking,
|
|
156
|
+
// not short-lived Cloudflare cookies like __cf_bm (~30 min).
|
|
157
|
+
auth.sort((a, b) => (b.expires ?? 0) - (a.expires ?? 0));
|
|
158
|
+
const longest = auth[0];
|
|
159
|
+
return { expiresAt: (longest.expires ?? 0) * 1000, loginAt: Date.now(), cookieName: longest.name };
|
|
157
160
|
} catch { return null; }
|
|
158
161
|
}
|
|
159
162
|
|
|
@@ -171,9 +174,11 @@ async function scanChatGPTCookieExpiry(ctx: BrowserContext): Promise<ChatGPTExpi
|
|
|
171
174
|
const cookies = await ctx.cookies(["https://chatgpt.com", "https://auth0.openai.com"]);
|
|
172
175
|
const auth = cookies.filter(c => ["__Secure-next-auth.session-token", "_puid", "oai-did"].includes(c.name) && c.expires && c.expires > 0);
|
|
173
176
|
if (!auth.length) return null;
|
|
174
|
-
auth
|
|
175
|
-
|
|
176
|
-
|
|
177
|
+
// Use the LONGEST-lived auth cookie for expiry tracking — _puid (~7d) is
|
|
178
|
+
// much shorter than __Secure-next-auth.session-token and triggers false alerts.
|
|
179
|
+
auth.sort((a, b) => (b.expires ?? 0) - (a.expires ?? 0));
|
|
180
|
+
const longest = auth[0];
|
|
181
|
+
return { expiresAt: (longest.expires ?? 0) * 1000, loginAt: Date.now(), cookieName: longest.name };
|
|
177
182
|
} catch { return null; }
|
|
178
183
|
}
|
|
179
184
|
|
|
@@ -209,7 +214,8 @@ async function scanCookieExpiry(ctx: import("playwright").BrowserContext): Promi
|
|
|
209
214
|
const cookies = await ctx.cookies(["https://grok.com", "https://x.ai"]);
|
|
210
215
|
const authCookies = cookies.filter((c) => ["sso", "sso-rw"].includes(c.name) && c.expires > 0);
|
|
211
216
|
if (authCookies.length === 0) return null;
|
|
212
|
-
|
|
217
|
+
// Use the longest-lived auth cookie for expiry tracking
|
|
218
|
+
const earliest = authCookies.reduce((min, c) => (c.expires > min.expires ? c : min));
|
|
213
219
|
return {
|
|
214
220
|
expiresAt: earliest.expires * 1000,
|
|
215
221
|
loginAt: Date.now(),
|
|
@@ -912,7 +918,7 @@ function proxyTestRequest(
|
|
|
912
918
|
const plugin = {
|
|
913
919
|
id: "openclaw-cli-bridge-elvatis",
|
|
914
920
|
name: "OpenClaw CLI Bridge",
|
|
915
|
-
version: "1.7.
|
|
921
|
+
version: "1.7.4",
|
|
916
922
|
description:
|
|
917
923
|
"Phase 1: openai-codex auth bridge. " +
|
|
918
924
|
"Phase 2: HTTP proxy for gemini/claude CLIs. " +
|
package/openclaw.plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-cli-bridge-elvatis",
|
|
3
3
|
"name": "OpenClaw CLI Bridge",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.4",
|
|
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.
|
|
3
|
+
"version": "1.7.4",
|
|
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": {
|