@elvatis_com/openclaw-cli-bridge-elvatis 0.2.21 → 0.2.22

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:** `0.2.21`
5
+ **Current version:** `0.2.22`
6
6
 
7
7
  ---
8
8
 
@@ -287,6 +287,9 @@ npm test # vitest run (45 tests)
287
287
 
288
288
  ## Changelog
289
289
 
290
+ ### v0.2.22
291
+ - **fix:** `runClaude()` now detects expired/invalid OAuth tokens immediately (401 in stderr) and throws a clear actionable error instead of waiting for the 30s proxy timeout. Error message includes the exact re-login command.
292
+
290
293
  ### v0.2.21
291
294
  - **fix:** `buildMinimalEnv()` now forwards `XDG_RUNTIME_DIR` and `DBUS_SESSION_BUS_ADDRESS` to Claude Code subprocesses — required for Gnome Keyring / libsecret access when Claude Code is authenticated via `claude.ai` OAuth (Claude Max). Without these, the spawned `claude` process cannot read its OAuth token from the system keyring, resulting in `401 Invalid authentication credentials` and a 30-second timeout on `/cli-test` and all `/cli-claude/*` requests.
292
295
 
package/SKILL.md CHANGED
@@ -53,4 +53,4 @@ Each command runs `openclaw models set <model>` atomically and replies with a co
53
53
 
54
54
  See `README.md` for full configuration reference and architecture diagram.
55
55
 
56
- **Version:** 0.2.21
56
+ **Version:** 0.2.22
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "openclaw-cli-bridge-elvatis",
3
3
  "name": "OpenClaw CLI Bridge",
4
- "version": "0.2.21",
4
+ "version": "0.2.22",
5
5
  "description": "Phase 1: openai-codex auth bridge. Phase 2: local HTTP proxy routing model calls through gemini/claude CLIs (vllm provider).",
6
6
  "providers": [
7
7
  "openai-codex"
@@ -36,4 +36,4 @@
36
36
  }
37
37
  }
38
38
  }
39
- }
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvatis_com/openclaw-cli-bridge-elvatis",
3
- "version": "0.2.21",
3
+ "version": "0.2.22",
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": {
package/src/cli-runner.ts CHANGED
@@ -264,7 +264,16 @@ export async function runClaude(
264
264
  const result = await runCli("claude", args, prompt, timeoutMs);
265
265
 
266
266
  if (result.exitCode !== 0 && result.stdout.length === 0) {
267
- throw new Error(`claude exited ${result.exitCode}: ${result.stderr || "(no output)"}`);
267
+ const stderr = result.stderr || "(no output)";
268
+ // Detect expired/invalid OAuth token early and give a clear actionable message
269
+ // instead of letting the caller time out after 30s.
270
+ if (stderr.includes("401") || stderr.includes("Invalid authentication credentials") || stderr.includes("authentication_error")) {
271
+ throw new Error(
272
+ "Claude CLI OAuth token expired or invalid. " +
273
+ "Re-login required: run `claude auth logout && claude auth login` in a terminal, then retry."
274
+ );
275
+ }
276
+ throw new Error(`claude exited ${result.exitCode}: ${stderr}`);
268
277
  }
269
278
 
270
279
  return result.stdout;