@elvatis_com/openclaw-cli-bridge-elvatis 1.3.4 β†’ 1.5.0

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.
@@ -1,39 +1,36 @@
1
1
  # DASHBOARD.md β€” openclaw-cli-bridge-elvatis
2
2
 
3
- _Last updated: 2026-03-11_
3
+ _Last updated: 2026-03-12_
4
4
 
5
5
  <!-- SECTION: plugin_status -->
6
- ## πŸ—οΈ Plugin Status
6
+ ## Plugin Status
7
7
 
8
8
  | Component | Version | Build | Tests | Status |
9
9
  |-----------|---------|-------|-------|--------|
10
- | openclaw-cli-bridge-elvatis | 0.2.25 | βœ… | βœ… 51/51 | βœ… Stable |
10
+ | openclaw-cli-bridge-elvatis | 1.4.0 | βœ… | βœ… 96/96 | βœ… Stable |
11
11
  <!-- /SECTION: plugin_status -->
12
12
 
13
13
  <!-- SECTION: release_state -->
14
- ## πŸš€ Release State
14
+ ## Release State
15
15
 
16
16
  | Platform | Published Version | Status |
17
17
  |----------|------------------|--------|
18
- | GitHub | v0.2.23 | βœ… Tagged + Release |
19
- | npm | 0.2.23 | βœ… Published |
20
- | ClawHub | 0.2.23 | βœ… Published |
21
- | Local | 0.2.25 | ⏳ Built + tested, pending publish |
18
+ | GitHub | v1.3.5 | βœ… Tagged + Release |
19
+ | Local | 1.4.0 | ⏳ Built + tested, pending push |
22
20
  <!-- /SECTION: release_state -->
23
21
 
24
22
  <!-- SECTION: open_tasks -->
25
- ## πŸ“‹ Open Tasks
23
+ ## Open Tasks
26
24
 
27
- | ID | Task | Priority | Blocked by | Ready? |
28
- |----|------|----------|-----------|--------|
29
- | T-010 | Publish v0.2.25 to GitHub + npm + ClawHub | 🟑 MEDIUM | β€” | βœ… Ready |
25
+ _No open tasks._
30
26
  <!-- /SECTION: open_tasks -->
31
27
 
32
28
  <!-- SECTION: completed_tasks -->
33
- ## βœ… Completed Tasks
29
+ ## Completed Tasks
34
30
 
35
31
  | Task | Title | Version |
36
32
  |------|-------|---------|
33
+ | T-012 | Persistent browser fallback for Claude/Gemini/ChatGPT (no CDP required) | 1.4.0 |
37
34
  | T-011 | Session-safe staged model switching (/cli-apply, /cli-pending, --now) | 0.2.25 |
38
35
  | T-009 | Stability: sleep-resilient token refresh + stopTokenRefresh cleanup | 0.2.25 |
39
36
  | T-103 | Explicit model allowlist for CLI execution | 0.2.23 |
@@ -4,11 +4,14 @@
4
4
  Alle Provider (Claude, Gemini, Codex/ChatGPT, Grok) ΓΌber Playwright Browser-Sessions
5
5
  betreiben β€” keine lokalen CLI-Binaries mehr nΓΆtig. Ein headless Chromium, ein Proxy.
6
6
 
7
- ## Aktueller Stand (v0.2.28)
7
+ ## Aktueller Stand (v1.4.0)
8
8
  - βœ… Grok: DOM-Polling via grok.com (FERTIG, produktiv)
9
- - ⏳ Claude: claude CLI binary β†’ Ziel: claude.ai headless
10
- - ⏳ Gemini: gemini CLI binary β†’ Ziel: gemini.google.com headless
11
- - ⏳ Codex: codex CLI binary β†’ Ziel: chatgpt.com headless
9
+ - βœ… Claude: claude.ai headless (FERTIG, persistent Chromium fallback)
10
+ - βœ… Gemini: gemini.google.com headless (FERTIG, persistent Chromium fallback)
11
+ - βœ… ChatGPT: chatgpt.com headless (FERTIG, persistent Chromium fallback)
12
+
13
+ All 4 providers now work without CDP (OpenClaw browser). Persistent Chromium profiles
14
+ are used as fallback when CDP on port 18800 is unavailable.
12
15
 
13
16
  ## Reihenfolge
14
17
  1. **Claude headless** (claude.ai) β€” hΓΆchste PrioritΓ€t, meistgenutzt
@@ -4,6 +4,50 @@ _Last 10 sessions. Older entries in LOG-ARCHIVE.md._
4
4
 
5
5
  ---
6
6
 
7
+ ## 2026-03-12 β€” Session 7 (Claude Opus 4.6)
8
+
9
+ > **Agent:** claude-opus-4-6
10
+ > **Phase:** fix
11
+ > **Commit before:** v1.3.5
12
+ > **Commit after:** v1.4.0
13
+
14
+ **T-012: Persistent browser fallback for Claude/Gemini/ChatGPT login commands**
15
+
16
+ ### Problem
17
+ `/claude-login`, `/gemini-login`, `/chatgpt-login` all called `connectToOpenClawBrowser()` directly,
18
+ which only tries CDP on `http://127.0.0.1:18800`. If Chrome was not running with
19
+ `--remote-debugging-port=18800`, all three commands failed with "Could not connect to OpenClaw browser".
20
+ Grok already had the fallback pattern (CDP -> persistent Chromium) since v0.2.27, but the other
21
+ three providers never got it.
22
+
23
+ ### Fix (index.ts)
24
+
25
+ **New constants:** `CLAUDE_PROFILE_DIR`, `GEMINI_PROFILE_DIR`, `CHATGPT_PROFILE_DIR`
26
+
27
+ **New functions:** `getOrLaunchClaudeContext()`, `getOrLaunchGeminiContext()`, `getOrLaunchChatGPTContext()`
28
+ - Same pattern as `getOrLaunchGrokContext()`: return existing context -> try CDP -> fall back to persistent Chromium
29
+ - Concurrent launch requests coalesced via promise guard (no duplicate Chromium spawns)
30
+
31
+ **Updated login handlers:** `/claude-login`, `/gemini-login`, `/chatgpt-login` now follow the Grok pattern:
32
+ 1. Try to import cookies from CDP (optional, catches errors gracefully)
33
+ 2. `getOrLaunchXxxContext()` (CDP or persistent Chromium fallback)
34
+ 3. Inject imported cookies if available
35
+ 4. Navigate and verify
36
+
37
+ **Updated proxy callbacks:** `connectClaudeContext`, `connectGeminiContext`, `connectChatGPTContext` in
38
+ both proxy server setup blocks now use `getOrLaunchXxxContext()` instead of `connectToOpenClawBrowser()`.
39
+
40
+ **Updated `cleanupBrowsers()`:** Now properly closes Claude, Gemini, and ChatGPT persistent contexts.
41
+
42
+ ### Build + Tests
43
+ - `npm run build` - only pre-existing errors (openclaw/plugin-sdk not available locally)
44
+ - `npm test` - 96/96 green, 0 failures
45
+
46
+ ### Version
47
+ 1.3.5 -> 1.4.0 (feature: persistent fallback for all providers)
48
+
49
+ ---
50
+
7
51
  ## 2026-03-11 β€” Session 6 (Akido / claude-sonnet-4-6)
8
52
 
9
53
  > **Agent:** claude-sonnet-4-6
@@ -1,46 +1,36 @@
1
1
  # NEXT_ACTIONS.md β€” openclaw-cli-bridge-elvatis
2
2
 
3
- _Last updated: 2026-03-11_
3
+ _Last updated: 2026-03-12_
4
4
 
5
5
  <!-- SECTION: summary -->
6
6
  ## Status Summary
7
7
 
8
8
  | Status | Count |
9
9
  |---------|-------|
10
- | Done | 11 |
11
- | Ready | 1 |
10
+ | Done | 12 |
11
+ | Ready | 0 |
12
12
  | Blocked | 0 |
13
13
  <!-- /SECTION: summary -->
14
14
 
15
15
  ---
16
16
 
17
- ## ⚑ Ready β€” Work These Next
17
+ ## Ready - Work These Next
18
18
 
19
- ### T-010: [medium] β€” Publish v0.2.25 to all platforms
20
-
21
- - **Goal:** Publish v0.2.25 to GitHub, npm, and ClawHub.
22
- - **Context:** v0.2.25 built + 51/51 tests pass. Changes: staged model switching (session-safe /cli-*), sleep-resilient token refresh, stopTokenRefresh cleanup.
23
- - **What to do:**
24
- 1. `git add -u && git commit -m "feat(cli): staged switch + token refresh stability (v0.2.25)"`
25
- 2. `git tag v0.2.25 && git push origin main && git push origin v0.2.25`
26
- 3. `gh release create v0.2.25 --title "v0.2.25 β€” Session-safe model switching" --notes "..."`
27
- 4. `npm publish --access public`
28
- 5. ClawHub publish via rsync workaround (see CONVENTIONS.md)
29
- 6. Update STATUS.md platform table after publish
30
- - **Definition of done:** v0.2.25 live on GitHub + npm + ClawHub.
19
+ _No pending tasks._
31
20
 
32
21
  ---
33
22
 
34
- ## 🚫 Blocked
23
+ ## Blocked
35
24
 
36
25
  _No blocked tasks._
37
26
 
38
27
  ---
39
28
 
40
- ## βœ… Recently Completed
29
+ ## Recently Completed
41
30
 
42
31
  | Task | Title | Date |
43
32
  |-------|--------------------------------------------------------------------|------------|
33
+ | T-012 | Persistent browser fallback for Claude/Gemini/ChatGPT (no CDP) | 2026-03-12 |
44
34
  | T-011 | Session-safe staged model switching (/cli-apply, /cli-pending) | 2026-03-11 |
45
35
  | T-009 | Stability: sleep-resilient token refresh + stopTokenRefresh cleanup | 2026-03-11 |
46
36
  | T-008 | Validate proxy endpoints + vllm model calls end-to-end | 2026-03-08 |
@@ -1,8 +1,8 @@
1
1
  # STATUS β€” openclaw-cli-bridge-elvatis
2
2
 
3
- ## Current Version: 1.3.3 (npm + ClawHub + GitHub) βœ… RELEASED
3
+ ## Current Version: 1.4.0
4
4
 
5
- ## All 4 Providers Available β€” on-demand via /xxx-login
5
+ ## All 4 Providers Available β€” on-demand via /xxx-login (no CDP required)
6
6
  | Provider | Status | Models | Command |
7
7
  |---|---|---|---|
8
8
  | Grok | βœ… | web-grok/grok-3, grok-3-fast, grok-3-mini, grok-3-mini-fast | /grok-login |
@@ -16,29 +16,31 @@
16
16
  - 0 zombie Chromium processes at startup (browsers on-demand only)
17
17
  - Cookie expiry tracking for all 4 providers
18
18
  - Singleton guard on ensureAllProviderContexts (no concurrent spawns)
19
+ - Persistent Chromium fallback for all 4 providers (no CDP dependency)
19
20
 
20
21
  ## Architecture: Browser Lifecycle
21
22
  - **On plugin start:** NO browser launched automatically
22
- - **On /xxx-login:** launches persistent Chromium for that provider only
23
- - **On request (no context):** returns null β†’ caller sees "not logged in" error
23
+ - **On /xxx-login:** tries CDP import (optional) then launches persistent Chromium for that provider
24
+ - **CDP unavailable?** No problem - persistent Chromium from saved profile is used automatically
25
+ - **On request (no context):** proxy callbacks also use persistent fallback before returning null
24
26
  - **On /xxx-logout:** closes context + deletes session file
25
27
 
26
28
  ## Known Issues
27
- - Cloudflare may block headless Chromium for Claude/Gemini without a valid CDP session
28
- β†’ Workaround: have OpenClaw browser open on the provider's page, then /xxx-login
29
+ - Cloudflare may block headless Chromium for some providers without cookies
30
+ - Workaround: first login via OpenClaw browser (CDP), subsequent restarts use saved profile
29
31
 
30
32
  ## Release History
31
- - v1.3.3 (2026-03-12): Remove startup auto-connect β€” browsers on-demand only (OOM fix)
33
+ - v1.4.0 (2026-03-12): Persistent browser fallback for Claude/Gemini/ChatGPT (no CDP required)
34
+ - v1.3.5 (2026-03-12): Startup restore guard - runs only once per process (SIGUSR1 fix)
35
+ - v1.3.4 (2026-03-12): Safe sequential session restore from saved profiles
36
+ - v1.3.3 (2026-03-12): Remove startup auto-connect - browsers on-demand only (OOM fix)
32
37
  - v1.3.2 (2026-03-12): Singleton guard on ensureAllProviderContexts (resource leak fix)
33
38
  - v1.3.1 (2026-03-11): Cookie baking into persistent profiles on login
34
39
  - v1.3.0 (2026-03-11): Browser auto-reconnect after gateway restart
35
40
  - v1.2.0 (2026-03-11): Fresh page per request + ChatGPT model switching
36
41
  - v1.1.0 (2026-03-11): Auto-connect on startup + /bridge-status
37
- - v1.0.0 (2026-03-11): All 4 providers headless (Grok/Claude/Gemini/ChatGPT) β€” 96/96 tests
38
- - v0.2.x: Grok (v0.2.26-28), Claude (v0.2.29), Gemini (v0.2.30)
39
- - v0.2.25: Sleep-resilient token refresh + staged /cli-* switching
42
+ - v1.0.0 (2026-03-11): All 4 providers headless (Grok/Claude/Gemini/ChatGPT) - 96/96 tests
40
43
 
41
44
  ## Next Steps
42
45
  - Context-window management for long conversations
43
46
  - Gemini model switching (2.5 Pro vs Flash vs 3) via UI
44
- - /bridge-status: show per-provider login state + cookie expiry
@@ -0,0 +1,14 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm run:*)",
5
+ "Bash(npx tsc:*)",
6
+ "Bash(ls node_modules/.bin/tsc*)",
7
+ "Bash(npm install:*)",
8
+ "Bash(./node_modules/.bin/tsc)",
9
+ "Bash(node_modules/.bin/tsc)",
10
+ "Bash(node_modules/.bin/tsc -p tsconfig.check.json)",
11
+ "Bash(node_modules/.bin/vitest run:*)"
12
+ ]
13
+ }
14
+ }
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.3.4`
5
+ **Current version:** `1.5.0`
6
6
 
7
7
  ---
8
8
 
@@ -81,6 +81,48 @@ All commands use gateway-level `commands.allowFrom` for authorization (`requireA
81
81
 
82
82
  ---
83
83
 
84
+ ### Phase 4 β€” Web Browser Providers (headless, no API key needed)
85
+
86
+ Routes requests through real browser sessions on the provider's web UI. Requires a valid login session (free or paid tier). Uses persistent Chromium profiles β€” sessions survive gateway restarts.
87
+
88
+ **Grok** (grok.com β€” SuperGrok subscription):
89
+
90
+ | Model | Notes |
91
+ |---|---|
92
+ | `web-grok/grok-3` | Full model |
93
+ | `web-grok/grok-3-fast` | Faster variant |
94
+ | `web-grok/grok-3-mini` | Lightweight |
95
+ | `web-grok/grok-3-mini-fast` | Fastest |
96
+
97
+ | Command | What it does |
98
+ |---|---|
99
+ | `/grok-login` | Authenticate via X.com OAuth, save session to `~/.openclaw/grok-profile/` |
100
+ | `/grok-status` | Show session validity + cookie expiry |
101
+ | `/grok-logout` | Clear session |
102
+
103
+ **Gemini** (gemini.google.com):
104
+
105
+ | Model | Notes |
106
+ |---|---|
107
+ | `web-gemini/gemini-2-5-pro` | Gemini 2.5 Pro |
108
+ | `web-gemini/gemini-2-5-flash` | Gemini 2.5 Flash |
109
+ | `web-gemini/gemini-3-pro` | Gemini 3 Pro |
110
+ | `web-gemini/gemini-3-flash` | Gemini 3 Flash |
111
+
112
+ | Command | What it does |
113
+ |---|---|
114
+ | `/gemini-login` | Authenticate, save cookies to `~/.openclaw/gemini-profile/` |
115
+ | `/gemini-status` | Show session validity + cookie expiry |
116
+ | `/gemini-logout` | Clear session |
117
+
118
+ **Session lifecycle:**
119
+ - First use: run `/xxx-login` once - authenticates and saves cookies to persistent Chromium profile
120
+ - **No CDP required:** `/xxx-login` no longer depends on the OpenClaw browser (CDP port 18800). If CDP is available, cookies are imported from it; otherwise a standalone persistent Chromium is launched automatically.
121
+ - After gateway restart: sessions are **automatically restored** from saved profiles on startup (sequential, ~25s after start)
122
+ - `/bridge-status` β€” shows all providers at a glance with login state + expiry info
123
+
124
+ ---
125
+
84
126
  ## Requirements
85
127
 
86
128
  - [OpenClaw](https://openclaw.ai) gateway (tested with `2026.3.x`)
@@ -280,13 +322,45 @@ Slash commands (requireAuth=false, gateway commands.allowFrom is the auth layer)
280
322
 
281
323
  ```bash
282
324
  npm run typecheck # tsc --noEmit
283
- npm test # vitest run (45 tests)
325
+ npm test # vitest run (83 tests)
284
326
  ```
285
327
 
286
328
  ---
287
329
 
288
330
  ## Changelog
289
331
 
332
+ ### v1.5.0
333
+ - **refactor:** Removed `/claude-login`, `/claude-logout`, `/claude-status`, `/chatgpt-login`, `/chatgpt-logout`, `/chatgpt-status` commands and all related browser automation code. Claude is fully covered by `cli-claude/*` via CLI proxy, ChatGPT by `openai-codex` + `copilot-proxy`.
334
+ - **refactor:** Removed `web-claude/*` and `web-chatgpt/*` proxy routes and model entries from proxy server.
335
+ - **refactor:** Removed `getOrLaunchClaudeContext()` and `getOrLaunchChatGPTContext()` functions, claude/chatgpt session state, cookie expiry tracking, and startup restore for these providers.
336
+ - **cleanup:** Deleted `test/claude-proxy.test.ts` and `test/chatgpt-proxy.test.ts`.
337
+ - **result:** Cleaner codebase, no browser timeout on startup for unused providers. Only Grok and Gemini browser providers remain.
338
+
339
+ ### v1.4.3
340
+ - **fix:** Full stealth mode for all browser launches - `ignoreDefaultArgs: ['--enable-automation']` removes Playwright's automation flag, `--disable-blink-features=AutomationControlled` hides `navigator.webdriver`, and `--disable-infobars` suppresses the "Chrome is being controlled by automated software" banner. Combined with `channel: "chrome"` (v1.4.2), this bypasses Cloudflare human verification completely.
341
+ - **root cause:** Even with system Chrome (`channel: "chrome"`), Playwright injects `--enable-automation` by default, which sets `navigator.webdriver = true` and shows the automation infobar. Cloudflare checks both signals.
342
+
343
+ ### v1.4.2
344
+ - **fix:** All browser launches now use `channel: "chrome"` (real system Chrome) instead of Playwright's bundled Chromium. Cloudflare human verification no longer blocks `/xxx-login` commands.
345
+ - **root cause:** Playwright's bundled Chromium is fingerprinted by Cloudflare as an automation browser, triggering CAPTCHA challenges that cannot be completed. System Chrome is not flagged.
346
+
347
+ ### v1.4.1
348
+ - **fix:** `/claude-login`, `/gemini-login`, `/chatgpt-login` now fall back to a **headed** (visible) Chromium browser when headless login fails (no saved cookies in profile). The user can log in manually in the opened browser window (5 min timeout). After login, cookies are saved to the persistent profile for future headless use.
349
+ - **fix:** Added missing `claude-opus-4-6` and `claude-haiku-4-5` entries to the Claude browser MODEL_MAP
350
+ - **root cause:** Headless Chromium without saved cookies sees a login page, not the editor - the user cannot interact with a headless browser to log in
351
+
352
+ ### v1.4.0
353
+ - **feat:** Persistent browser fallback for all providers - `/claude-login`, `/gemini-login`, `/chatgpt-login` no longer require the OpenClaw browser (CDP port 18800). If CDP is available, cookies are imported; otherwise a standalone persistent headless Chromium is launched automatically from the saved profile directory.
354
+ - **feat:** New helper functions `getOrLaunchClaudeContext()`, `getOrLaunchGeminiContext()`, `getOrLaunchChatGPTContext()` - same pattern as the existing `getOrLaunchGrokContext()` (try CDP, fall back to persistent Chromium, coalesce concurrent launches)
355
+ - **fix:** Proxy server `connectXxxContext` callbacks now use the persistent fallback too - no more "not logged in" errors when CDP is unavailable but a saved profile exists
356
+ - **fix:** `cleanupBrowsers()` now properly closes Claude, Gemini, and ChatGPT persistent contexts on plugin teardown (previously only cleaned up Grok + CDP)
357
+ - **root cause:** All 3 login commands (Claude, Gemini, ChatGPT) called `connectToOpenClawBrowser()` directly, which only tries CDP on 127.0.0.1:18800. If Chrome was not running with `--remote-debugging-port=18800`, login always failed. Grok already had the fallback pattern since v0.2.27 - now all 4 providers are consistent.
358
+
359
+ ### v1.3.5
360
+ - **fix:** Startup session restore now runs only once per process lifetime β€” `_startupRestoreDone` module-level guard prevents re-running on every hot-reload (SIGUSR1), which was triggered every ~60s by the openclaw-control-ui dashboard poll
361
+ - **root cause:** Gateway `reload.mode=hybrid` + dashboard status polling caused plugin to reinitialize every 60s β†’ each reload spawned a new Gemini Chromium instance β†’ RAM/CPU OOM loop
362
+ - **behavior:** First load after gateway start: sequential profile restore runs once. All subsequent hot-reloads: skip restore, reuse existing in-memory contexts
363
+
290
364
  ### v1.3.4
291
365
  - **feat:** Safe sequential session restore on startup β€” if a saved profile exists, providers are reconnected automatically after gateway restart (one at a time, 3s delay between each, headless)
292
366
  - **fix:** No manual `/xxx-login` needed after reboot if profile is already saved
@@ -340,7 +414,7 @@ No CLI binaries required β€” just authenticated browser sessions.
340
414
  - **feat:** `web-chatgpt/*` models: gpt-4o, gpt-4o-mini, gpt-o3, gpt-o4-mini, gpt-5
341
415
  - **feat:** `/chatgpt-login`, `/chatgpt-status`, `/chatgpt-logout` + cookie-expiry tracking
342
416
  - **feat:** All 4 providers headless: Grok βœ… Claude βœ… Gemini βœ… ChatGPT βœ…
343
- - **test:** 96/96 tests green (8 test files)
417
+ - **test:** 96/83 tests green (8 test files)
344
418
  - **fix:** Singleton CDP connection, cleanupBrowsers() on plugin stop
345
419
 
346
420
  ### v0.2.30