@elvatis_com/openclaw-cli-bridge-elvatis 1.9.0 → 1.9.1

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.9.0`
5
+ **Current version:** `1.9.1`
6
6
 
7
7
  ---
8
8
 
@@ -356,6 +356,13 @@ npm run ci # lint + typecheck + test
356
356
 
357
357
  ## Changelog
358
358
 
359
+ ### v1.9.1
360
+ - **feat:** Full slash command mapping on status page — all models now show their /cli-* command
361
+ - **fix:** Register missing slash commands: /cli-codex-spark, /cli-codex52, /cli-codex-mini, /cli-gemini3-flash (documented but never registered)
362
+ - **feat:** /cli-help command — full reference with CLI/Codex/Web/BitNet sections, expiry info, quick examples, dashboard links
363
+ - **feat:** /cli-list now references /cli-help and shows dashboard URL
364
+
365
+ /
359
366
  ### v1.9.0
360
367
  - **feat:** Auto-source version from `package.json` — eliminates hardcoded version string sync issues (was stale across v1.8.2–v1.8.8)
361
368
  - **feat:** ESLint config (`eslint.config.js`) — TypeScript-aware linting with `npm run lint`, integrated into CI pipeline
package/SKILL.md CHANGED
@@ -68,4 +68,4 @@ On gateway restart, if any session has expired, a **WhatsApp alert** is sent aut
68
68
 
69
69
  See `README.md` for full configuration reference and architecture diagram.
70
70
 
71
- **Version:** 1.9.0
71
+ **Version:** 1.9.1
package/index.ts CHANGED
@@ -752,9 +752,13 @@ const CLI_MODEL_COMMANDS = [
752
752
  { name: "cli-gemini", model: "vllm/cli-gemini/gemini-2.5-pro", description: "Gemini 2.5 Pro (Gemini CLI)", label: "Gemini 2.5 Pro (CLI)" },
753
753
  { name: "cli-gemini-flash", model: "vllm/cli-gemini/gemini-2.5-flash", description: "Gemini 2.5 Flash (Gemini CLI)", label: "Gemini 2.5 Flash (CLI)" },
754
754
  { name: "cli-gemini3", model: "vllm/cli-gemini/gemini-3-pro-preview", description: "Gemini 3 Pro (Gemini CLI)", label: "Gemini 3 Pro (CLI)" },
755
+ { name: "cli-gemini3-flash", model: "vllm/cli-gemini/gemini-3-flash-preview", description: "Gemini 3 Flash (Gemini CLI)", label: "Gemini 3 Flash (CLI)" },
755
756
  // ── Codex CLI (openai-codex provider, OAuth auth) ────────────────────────────
756
757
  { name: "cli-codex", model: "openai-codex/gpt-5.3-codex", description: "GPT-5.3 Codex (Codex CLI auth)", label: "GPT-5.3 Codex" },
758
+ { name: "cli-codex-spark", model: "openai-codex/gpt-5.3-codex-spark", description: "GPT-5.3 Codex Spark (Codex CLI auth)", label: "GPT-5.3 Codex Spark" },
759
+ { name: "cli-codex52", model: "openai-codex/gpt-5.2-codex", description: "GPT-5.2 Codex (Codex CLI auth)", label: "GPT-5.2 Codex" },
757
760
  { name: "cli-codex54", model: "openai-codex/gpt-5.4", description: "GPT-5.4 (Codex CLI auth)", label: "GPT-5.4" },
761
+ { name: "cli-codex-mini", model: "openai-codex/gpt-5.1-codex-mini", description: "GPT-5.1 Codex Mini (Codex CLI auth)", label: "GPT-5.1 Codex Mini" },
758
762
  // ── BitNet local inference (via local proxy → llama-server) ─────────────────
759
763
  { name: "cli-bitnet", model: "vllm/local-bitnet/bitnet-2b", description: "BitNet b1.58 2B (local CPU, no API key)", label: "BitNet 2B (local)" },
760
764
  ] as const;
@@ -1646,12 +1650,158 @@ const plugin = {
1646
1650
  lines.push(" /cli-back Restore previous model + clear staged");
1647
1651
  lines.push(" /cli-test [model] Health check (no model switch)");
1648
1652
  lines.push(" /cli-list This overview");
1653
+ lines.push(" /cli-help Connected providers + examples + dashboard link");
1649
1654
  lines.push("");
1650
1655
  lines.push("*Switching safely:*");
1651
1656
  lines.push(" /cli-sonnet → stages switch (safe, apply later)");
1652
1657
  lines.push(" /cli-sonnet --now → immediate switch (only between sessions!)");
1653
1658
  lines.push("");
1654
- lines.push(`Proxy: \`127.0.0.1:${port}\``);
1659
+ lines.push(`Proxy: \`127.0.0.1:${port}\` · Dashboard: http://127.0.0.1:${port}/status`);
1660
+
1661
+ return { text: lines.join("\n") };
1662
+ },
1663
+ } satisfies OpenClawPluginCommandDefinition);
1664
+
1665
+ // ── Phase 3e: /cli-help — context-aware help with connected providers ─────
1666
+ api.registerCommand({
1667
+ name: "cli-help",
1668
+ description: "Show available models based on currently connected providers, with example commands and status page link.",
1669
+ requireAuth: false,
1670
+ handler: async (): Promise<PluginCommandResult> => {
1671
+ const lines: string[] = [`🌉 *CLI Bridge Help* — v${plugin.version}`, ""];
1672
+
1673
+ // ── CLI models (always available — spawns local CLI) ────────────────
1674
+ lines.push("*CLI Models* (always available — uses locally installed CLIs)");
1675
+ lines.push("");
1676
+ const cliGroups: Record<string, typeof CLI_MODEL_COMMANDS[number][]> = {
1677
+ "Claude Code": [],
1678
+ "Gemini": [],
1679
+ };
1680
+ for (const c of CLI_MODEL_COMMANDS) {
1681
+ if (c.model.startsWith("vllm/cli-claude/")) cliGroups["Claude Code"].push(c);
1682
+ else if (c.model.startsWith("vllm/cli-gemini/")) cliGroups["Gemini"].push(c);
1683
+ }
1684
+ for (const [group, entries] of Object.entries(cliGroups)) {
1685
+ if (entries.length === 0) continue;
1686
+ lines.push(` *${group}*`);
1687
+ for (const c of entries) {
1688
+ const modelShort = c.model.replace(/^vllm\/cli-(claude|gemini)\//, "");
1689
+ lines.push(` \`/${c.name}\` → ${modelShort}`);
1690
+ }
1691
+ }
1692
+ lines.push("");
1693
+
1694
+ // ── Codex models (OAuth — always registered) ────────────────────────
1695
+ const codexEntries = CLI_MODEL_COMMANDS.filter(c => c.model.startsWith("openai-codex/"));
1696
+ if (codexEntries.length > 0) {
1697
+ lines.push("*Codex* (OAuth — direct API, no proxy)");
1698
+ for (const c of codexEntries) {
1699
+ const modelShort = c.model.replace(/^openai-codex\//, "");
1700
+ lines.push(` \`/${c.name}\` → ${modelShort}`);
1701
+ }
1702
+ lines.push("");
1703
+ }
1704
+
1705
+ // ── Web session models (only if connected) ──────────────────────────
1706
+ const webProviders: Array<{
1707
+ name: string;
1708
+ ctx: BrowserContext | null;
1709
+ models: string[];
1710
+ cmds: string[];
1711
+ loginCmd: string;
1712
+ expiry: string | null;
1713
+ }> = [
1714
+ {
1715
+ name: "Grok",
1716
+ ctx: grokContext,
1717
+ models: ["web-grok/grok-3", "web-grok/grok-3-fast", "web-grok/grok-3-mini", "web-grok/grok-3-mini-fast"],
1718
+ cmds: ["openclaw models set vllm/web-grok/grok-3"],
1719
+ loginCmd: "/grok-login",
1720
+ expiry: (() => { const e = loadGrokExpiry(); return e ? formatExpiryInfo(e) : null; })(),
1721
+ },
1722
+ {
1723
+ name: "Gemini (web)",
1724
+ ctx: geminiContext,
1725
+ models: ["web-gemini/gemini-2-5-pro", "web-gemini/gemini-2-5-flash", "web-gemini/gemini-3-pro", "web-gemini/gemini-3-flash"],
1726
+ cmds: ["openclaw models set vllm/web-gemini/gemini-2-5-pro"],
1727
+ loginCmd: "/gemini-login",
1728
+ expiry: (() => { const e = loadGeminiExpiry(); return e ? formatGeminiExpiry(e) : null; })(),
1729
+ },
1730
+ {
1731
+ name: "Claude.ai (web)",
1732
+ ctx: claudeWebContext,
1733
+ models: ["web-claude/*"],
1734
+ cmds: [],
1735
+ loginCmd: "/claude-login",
1736
+ expiry: (() => { const e = loadClaudeExpiry(); return e ? formatClaudeExpiry(e) : null; })(),
1737
+ },
1738
+ {
1739
+ name: "ChatGPT (web)",
1740
+ ctx: chatgptContext,
1741
+ models: ["web-chatgpt/*"],
1742
+ cmds: [],
1743
+ loginCmd: "/chatgpt-login",
1744
+ expiry: (() => { const e = loadChatGPTExpiry(); return e ? formatChatGPTExpiry(e) : null; })(),
1745
+ },
1746
+ ];
1747
+
1748
+ const connectedWeb = webProviders.filter(p => p.ctx !== null);
1749
+ const disconnectedWeb = webProviders.filter(p => p.ctx === null);
1750
+
1751
+ if (connectedWeb.length > 0) {
1752
+ lines.push("*Web Session Models* (connected)");
1753
+ for (const p of connectedWeb) {
1754
+ const expiryNote = p.expiry ? ` — ${p.expiry}` : "";
1755
+ lines.push(` 🟢 *${p.name}*${expiryNote}`);
1756
+ lines.push(` Models: ${p.models.join(", ")}`);
1757
+ if (p.cmds.length > 0) {
1758
+ lines.push(` Example: \`${p.cmds[0]}\``);
1759
+ }
1760
+ }
1761
+ lines.push("");
1762
+ }
1763
+
1764
+ if (disconnectedWeb.length > 0) {
1765
+ lines.push("*Web Session Models* (not connected)");
1766
+ for (const p of disconnectedWeb) {
1767
+ const expiryNote = p.expiry && !p.expiry.startsWith("⚠️ EXPIRED") ? " (cookies valid, auto-connects on use)" : "";
1768
+ lines.push(` ⚪ *${p.name}*${expiryNote} → run \`${p.loginCmd}\``);
1769
+ }
1770
+ lines.push("");
1771
+ }
1772
+
1773
+ // ── BitNet ──────────────────────────────────────────────────────────
1774
+ const bitnetOk = await checkBitNetServer();
1775
+ if (bitnetOk) {
1776
+ lines.push("*Local Inference*");
1777
+ lines.push(" 🟢 *BitNet 2B* — running → \`/cli-bitnet\`");
1778
+ } else {
1779
+ lines.push("*Local Inference*");
1780
+ lines.push(" ⚪ *BitNet 2B* — not running → \`sudo systemctl start bitnet-server\`");
1781
+ }
1782
+ lines.push("");
1783
+
1784
+ // ── Utility commands ────────────────────────────────────────────────
1785
+ lines.push("*Utility Commands*");
1786
+ lines.push(" \`/cli-help\` This help");
1787
+ lines.push(" \`/cli-list\` All models (no status check)");
1788
+ lines.push(" \`/cli-test [model]\` Health check (no model switch)");
1789
+ lines.push(" \`/cli-back\` Restore previous model");
1790
+ lines.push(" \`/cli-apply\` Apply staged model switch");
1791
+ lines.push(" \`/bridge-status\` Full provider diagnostics");
1792
+ lines.push("");
1793
+
1794
+ // ── Quick examples ──────────────────────────────────────────────────
1795
+ lines.push("*Quick Examples*");
1796
+ lines.push(" \`/cli-sonnet\` Switch to Claude Sonnet (staged)");
1797
+ lines.push(" \`/cli-sonnet --now\` Switch immediately");
1798
+ lines.push(" \`/cli-gemini\` Switch to Gemini 2.5 Pro");
1799
+ lines.push(" \`/cli-codex\` Switch to GPT-5.3 Codex");
1800
+ lines.push("");
1801
+
1802
+ // ── Status page link ────────────────────────────────────────────────
1803
+ lines.push(`📊 Dashboard: http://127.0.0.1:${port}/status`);
1804
+ lines.push(`🔍 Health JSON: http://127.0.0.1:${port}/healthz`);
1655
1805
 
1656
1806
  return { text: lines.join("\n") };
1657
1807
  },
@@ -2262,6 +2412,7 @@ const plugin = {
2262
2412
  "/chatgpt-status",
2263
2413
  "/chatgpt-logout",
2264
2414
  "/bridge-status",
2415
+ "/cli-help",
2265
2416
  ];
2266
2417
  api.logger.info(`[cli-bridge] registered ${allCommands.length} commands: ${allCommands.join(", ")}`);
2267
2418
  },
@@ -2,7 +2,7 @@
2
2
  "id": "openclaw-cli-bridge-elvatis",
3
3
  "slug": "openclaw-cli-bridge-elvatis",
4
4
  "name": "OpenClaw CLI Bridge",
5
- "version": "1.9.0",
5
+ "version": "1.9.1",
6
6
  "license": "MIT",
7
7
  "description": "Phase 1: openai-codex auth bridge. Phase 2: local HTTP proxy routing model calls through gemini/claude CLIs (vllm provider).",
8
8
  "providers": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elvatis_com/openclaw-cli-bridge-elvatis",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
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": {