theclawbay 0.3.74 → 0.3.76

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.
@@ -29,6 +29,9 @@ const SHELL_START = "# theclawbay-shell-managed:start";
29
29
  const SHELL_END = "# theclawbay-shell-managed:end";
30
30
  const ENV_FILE = node_path_1.default.join(paths_1.theclawbayConfigDir, "env");
31
31
  const ENV_KEY_NAME = "THECLAWBAY_API_KEY";
32
+ const GEMINI_ENV_API_KEY_NAME = "GEMINI_API_KEY";
33
+ const GOOGLE_ENV_API_KEY_NAME = "GOOGLE_API_KEY";
34
+ const GOOGLE_GEMINI_BASE_URL_NAME = "GOOGLE_GEMINI_BASE_URL";
32
35
  const CLAUDE_ENV_API_KEY_NAME = "ANTHROPIC_API_KEY";
33
36
  const CLAUDE_ENV_BASE_URL_NAME = "ANTHROPIC_BASE_URL";
34
37
  const CLAUDE_ENV_SIMPLE_MODE_NAME = "CLAUDE_CODE_SIMPLE";
@@ -63,12 +66,19 @@ const HISTORY_PROVIDER_NEUTRALIZE_SOURCES = new Set([
63
66
  const HISTORY_PROVIDER_DB_MIGRATE_SOURCES = [DEFAULT_PROVIDER_ID, WAN_PROVIDER_ID];
64
67
  const LEGACY_THECLAWBAY_OPENAI_PROXY_SUFFIX = "/api/codex-auth/v1/proxy/v1";
65
68
  const CANONICAL_THECLAWBAY_OPENAI_PROXY_SUFFIX = "/v1";
69
+ const CANONICAL_CODEX_NATIVE_PROXY_SUFFIX = "/backend-api/codex";
66
70
  const THECLAWBAY_CANONICAL_API_HOST = "api.theclawbay.com";
67
71
  const THECLAWBAY_WEBSITE_HOSTS = new Set(["theclawbay.com", "www.theclawbay.com"]);
68
72
  const SUPPORTED_MODEL_IDS = new Set((0, supported_models_1.getSupportedModelIds)());
69
73
  const CONTINUE_MODEL_NAME = "The Claw Bay";
70
74
  const TRAE_PATCH_MARKER = "theclawbay-trae-patch";
71
75
  const TRAE_BUNDLE_BACKUP_SUFFIX = ".theclawbay-managed-backup";
76
+ const MANAGED_EDITOR_TERMINAL_ENV_NAMES = [
77
+ ENV_KEY_NAME,
78
+ GEMINI_ENV_API_KEY_NAME,
79
+ GOOGLE_ENV_API_KEY_NAME,
80
+ GOOGLE_GEMINI_BASE_URL_NAME,
81
+ ];
72
82
  function formatSummaryList(items) {
73
83
  return items.join(", ");
74
84
  }
@@ -133,7 +143,7 @@ function removeTopLevelProviderSelection(source) {
133
143
  filtered.push(line);
134
144
  continue;
135
145
  }
136
- if (match[1] === DEFAULT_PROVIDER_ID)
146
+ if (match[1] === DEFAULT_PROVIDER_ID || match[1] === OPENAI_PROVIDER_ID)
137
147
  continue;
138
148
  filtered.push(line);
139
149
  }
@@ -322,6 +332,21 @@ function isTheClawBayOpenAiCompatibleBaseUrl(value) {
322
332
  return false;
323
333
  }
324
334
  }
335
+ function isTheClawBayCodexNativeBaseUrl(value) {
336
+ if (typeof value !== "string")
337
+ return false;
338
+ const normalized = value.trim();
339
+ if (!normalized)
340
+ return false;
341
+ try {
342
+ const parsed = new URL(normalized);
343
+ return (parsed.hostname.toLowerCase() === THECLAWBAY_CANONICAL_API_HOST &&
344
+ parsed.pathname.replace(/\/+$/g, "") === CANONICAL_CODEX_NATIVE_PROXY_SUFFIX);
345
+ }
346
+ catch {
347
+ return false;
348
+ }
349
+ }
325
350
  function isTheClawBayAnthropicCompatibleBaseUrl(value) {
326
351
  if (typeof value !== "string")
327
352
  return false;
@@ -472,6 +497,7 @@ async function cleanupCodexConfig() {
472
497
  next = removeManagedBlock(next, MANAGED_START, MANAGED_END);
473
498
  next = removeProviderTable(next, DEFAULT_PROVIDER_ID);
474
499
  next = removeTopLevelProviderSelection(next);
500
+ next = removeTopLevelKeyLineIf(next, "openai_base_url", isTheClawBayCodexNativeBaseUrl);
475
501
  next = removeTopLevelKeyLineIf(next, "chatgpt_base_url", isTheClawBayChatgptBaseUrl);
476
502
  return writeIfChanged(configPath, next, existing);
477
503
  }
@@ -1420,6 +1446,9 @@ class LogoutCommand extends base_command_1.BaseCommand {
1420
1446
  throw error;
1421
1447
  }
1422
1448
  delete process.env[ENV_KEY_NAME];
1449
+ delete process.env[GEMINI_ENV_API_KEY_NAME];
1450
+ delete process.env[GOOGLE_ENV_API_KEY_NAME];
1451
+ delete process.env[GOOGLE_GEMINI_BASE_URL_NAME];
1423
1452
  delete process.env[CLAUDE_ENV_API_KEY_NAME];
1424
1453
  delete process.env[CLAUDE_ENV_BASE_URL_NAME];
1425
1454
  delete process.env[CLAUDE_ENV_SIMPLE_MODE_NAME];
@@ -39,6 +39,9 @@ const DEFAULT_ZO_MODEL = DEFAULT_CODEX_MODEL;
39
39
  const DEFAULT_MODELS = [...SUPPORTED_MODEL_IDS];
40
40
  const PREFERRED_MODELS = [...SUPPORTED_MODEL_IDS];
41
41
  const ENV_KEY_NAME = "THECLAWBAY_API_KEY";
42
+ const GEMINI_ENV_API_KEY_NAME = "GEMINI_API_KEY";
43
+ const GOOGLE_ENV_API_KEY_NAME = "GOOGLE_API_KEY";
44
+ const GOOGLE_GEMINI_BASE_URL_NAME = "GOOGLE_GEMINI_BASE_URL";
42
45
  const CLAUDE_ENV_API_KEY_NAME = "ANTHROPIC_API_KEY";
43
46
  const CLAUDE_ENV_BASE_URL_NAME = "ANTHROPIC_BASE_URL";
44
47
  const CLAUDE_ENV_SIMPLE_MODE_NAME = "CLAUDE_CODE_SIMPLE";
@@ -49,6 +52,9 @@ const CLAUDE_CODE_EDITOR_DISABLE_LOGIN_PROMPT_SETTING = "claudeCode.disableLogin
49
52
  const ANTHROPIC_PROVIDER_ID = "anthropic";
50
53
  const MANAGED_EDITOR_TERMINAL_ENV_NAMES = [
51
54
  ENV_KEY_NAME,
55
+ GEMINI_ENV_API_KEY_NAME,
56
+ GOOGLE_ENV_API_KEY_NAME,
57
+ GOOGLE_GEMINI_BASE_URL_NAME,
52
58
  ];
53
59
  const MANAGED_CLAUDE_ENV_NAMES = [
54
60
  CLAUDE_ENV_API_KEY_NAME,
@@ -697,6 +703,9 @@ function isTheClawBayChatgptBaseUrl(value) {
697
703
  function openAiCompatibleProxyUrl(backendUrl) {
698
704
  return `${publicApiOriginForBackendUrl(backendUrl)}${CANONICAL_THECLAWBAY_OPENAI_PROXY_SUFFIX}`;
699
705
  }
706
+ function geminiCompatibleProxyBaseUrl(backendUrl) {
707
+ return publicApiOriginForBackendUrl(backendUrl);
708
+ }
700
709
  function anthropicCompatibleProxyUrl(backendUrl) {
701
710
  return `${publicApiOriginForBackendUrl(backendUrl)}/anthropic`;
702
711
  }
@@ -1585,9 +1594,6 @@ async function writeCodexConfig(params) {
1585
1594
  next = removeTopLevelKeyLineIf(next, "chatgpt_base_url", isTheClawBayChatgptBaseUrl);
1586
1595
  const managedBlock = appendManagedBlock("", [
1587
1596
  MANAGED_START,
1588
- `[plugins."computer-use@openai-bundled"]`,
1589
- "enabled = true",
1590
- "",
1591
1597
  `[model_providers.${DEFAULT_PROVIDER_ID}]`,
1592
1598
  'name = "The Claw Bay (OpenAI compatible)"',
1593
1599
  `base_url = "${nativeCodexBaseUrl}"`,
@@ -1841,6 +1847,11 @@ async function persistApiKeyEnv(params) {
1841
1847
  const envLines = [
1842
1848
  "# Generated by theclawbay setup",
1843
1849
  `export ${ENV_KEY_NAME}=${shellQuote(params.apiKey)}`,
1850
+ "",
1851
+ "# Gemini-compatible applications",
1852
+ `export ${GEMINI_ENV_API_KEY_NAME}=${shellQuote(params.apiKey)}`,
1853
+ `export ${GOOGLE_ENV_API_KEY_NAME}=${shellQuote(params.apiKey)}`,
1854
+ `export ${GOOGLE_GEMINI_BASE_URL_NAME}=${shellQuote(geminiCompatibleProxyBaseUrl(params.backendUrl))}`,
1844
1855
  ];
1845
1856
  if (params.claudeEnabled) {
1846
1857
  envLines.push("", "# Official Claude Code CLI", `export ${CLAUDE_ENV_API_KEY_NAME}=${shellQuote(params.apiKey)}`, `export ${CLAUDE_ENV_BASE_URL_NAME}=${shellQuote(anthropicCompatibleProxyUrl(params.backendUrl))}`);
@@ -1875,6 +1886,9 @@ async function persistApiKeyEnv(params) {
1875
1886
  updated.push(rcPath);
1876
1887
  }
1877
1888
  process.env[ENV_KEY_NAME] = params.apiKey;
1889
+ process.env[GEMINI_ENV_API_KEY_NAME] = params.apiKey;
1890
+ process.env[GOOGLE_ENV_API_KEY_NAME] = params.apiKey;
1891
+ process.env[GOOGLE_GEMINI_BASE_URL_NAME] = geminiCompatibleProxyBaseUrl(params.backendUrl);
1878
1892
  if (params.claudeEnabled) {
1879
1893
  process.env[CLAUDE_ENV_API_KEY_NAME] = params.apiKey;
1880
1894
  process.env[CLAUDE_ENV_BASE_URL_NAME] = anthropicCompatibleProxyUrl(params.backendUrl);
@@ -1891,6 +1905,11 @@ async function persistFishEnv(params) {
1891
1905
  const lines = [
1892
1906
  "# Generated by theclawbay setup",
1893
1907
  `set -gx ${ENV_KEY_NAME} ${shellQuote(params.apiKey)}`,
1908
+ "",
1909
+ "# Gemini-compatible applications",
1910
+ `set -gx ${GEMINI_ENV_API_KEY_NAME} ${shellQuote(params.apiKey)}`,
1911
+ `set -gx ${GOOGLE_ENV_API_KEY_NAME} ${shellQuote(params.apiKey)}`,
1912
+ `set -gx ${GOOGLE_GEMINI_BASE_URL_NAME} ${shellQuote(geminiCompatibleProxyBaseUrl(params.backendUrl))}`,
1894
1913
  ];
1895
1914
  if (params.claudeEnabled) {
1896
1915
  lines.push("", "# Official Claude Code CLI", `set -gx ${CLAUDE_ENV_API_KEY_NAME} ${shellQuote(params.apiKey)}`, `set -gx ${CLAUDE_ENV_BASE_URL_NAME} ${shellQuote(anthropicCompatibleProxyUrl(params.backendUrl))}`);
@@ -1974,6 +1993,9 @@ async function persistPowerShellEnv(params) {
1974
1993
  const lines = [
1975
1994
  SHELL_START,
1976
1995
  `$env:${ENV_KEY_NAME} = ${powerShellQuote(params.apiKey)}`,
1996
+ `$env:${GEMINI_ENV_API_KEY_NAME} = ${powerShellQuote(params.apiKey)}`,
1997
+ `$env:${GOOGLE_ENV_API_KEY_NAME} = ${powerShellQuote(params.apiKey)}`,
1998
+ `$env:${GOOGLE_GEMINI_BASE_URL_NAME} = ${powerShellQuote(geminiCompatibleProxyBaseUrl(params.backendUrl))}`,
1977
1999
  ];
1978
2000
  if (params.claudeEnabled) {
1979
2001
  lines.push(`$env:${CLAUDE_ENV_API_KEY_NAME} = ${powerShellQuote(params.apiKey)}`, `$env:${CLAUDE_ENV_BASE_URL_NAME} = ${powerShellQuote(anthropicCompatibleProxyUrl(params.backendUrl))}`);
@@ -2023,6 +2045,9 @@ function terminalIntegratedEnvSettingsKey() {
2023
2045
  function buildManagedEditorTerminalEnv(params) {
2024
2046
  return {
2025
2047
  [ENV_KEY_NAME]: params.apiKey,
2048
+ [GEMINI_ENV_API_KEY_NAME]: params.apiKey,
2049
+ [GOOGLE_ENV_API_KEY_NAME]: params.apiKey,
2050
+ [GOOGLE_GEMINI_BASE_URL_NAME]: geminiCompatibleProxyBaseUrl(params.backendUrl),
2026
2051
  };
2027
2052
  }
2028
2053
  function buildManagedClaudeEditorEnv(params) {
@@ -2513,10 +2538,6 @@ function buildOpenCodeModelConfig(model) {
2513
2538
  input: ["text", "image"],
2514
2539
  output: ["text"],
2515
2540
  },
2516
- options: {
2517
- include: ["reasoning.encrypted_content"],
2518
- store: false,
2519
- },
2520
2541
  limit: {
2521
2542
  context: modelContextLimit(model.id),
2522
2543
  output: modelOutputLimit(model.id),
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "theclawbay",
3
- "version": "0.3.74",
4
- "description": "CLI for connecting Codex, Continue, Cline, GSD, OpenClaw, OpenCode, Kilo, Roo Code, Aider, experimental Trae, and experimental Zo to The Claw Bay.",
3
+ "version": "0.3.76",
4
+ "description": "CLI for connecting Codex, Gemini-compatible apps, Continue, Cline, GSD, OpenClaw, OpenCode, Kilo, Roo Code, Aider, experimental Trae, and experimental Zo to The Claw Bay.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/RCRTCBHAL900/TheClawBay"
8
+ "url": "git+https://github.com/RCRTCBHAL900/TheClawBay.git"
9
9
  },
10
10
  "bin": {
11
11
  "theclawbay": "dist/index.js"
@@ -33,6 +33,7 @@
33
33
  ],
34
34
  "keywords": [
35
35
  "codex",
36
+ "gemini",
36
37
  "claw-bay",
37
38
  "cli",
38
39
  "setup",
@@ -53,6 +53,15 @@
53
53
  "cachedInputPer1M": 0.175,
54
54
  "outputPer1M": 14.0
55
55
  },
56
+ {
57
+ "id": "codex-auto-review",
58
+ "label": "Codex Auto Review",
59
+ "note": "Compatibility alias for Codex IDE auto-review flows.",
60
+ "tone": "ink",
61
+ "inputPer1M": 1.75,
62
+ "cachedInputPer1M": 0.175,
63
+ "outputPer1M": 14.0
64
+ },
56
65
  {
57
66
  "id": "gpt-5.2-codex",
58
67
  "label": "GPT-5.2 Codex",
@@ -88,5 +97,59 @@
88
97
  "inputPer1M": 0.25,
89
98
  "cachedInputPer1M": 0.025,
90
99
  "outputPer1M": 2.0
100
+ },
101
+ {
102
+ "id": "gemini-2.5-pro",
103
+ "label": "Gemini 2.5 Pro",
104
+ "note": "Google's flagship coding and reasoning model through CliRelay.",
105
+ "tone": "coral",
106
+ "inputPer1M": 1.25,
107
+ "cachedInputPer1M": 0.125,
108
+ "outputPer1M": 10.0
109
+ },
110
+ {
111
+ "id": "gemini-2.5-flash",
112
+ "label": "Gemini 2.5 Flash",
113
+ "note": "Balanced Gemini path for fast multimodal and agentic work.",
114
+ "tone": "ink",
115
+ "inputPer1M": 0.3,
116
+ "cachedInputPer1M": 0.03,
117
+ "outputPer1M": 2.5
118
+ },
119
+ {
120
+ "id": "gemini-2.5-flash-lite",
121
+ "label": "Gemini 2.5 Flash Lite",
122
+ "note": "Lowest-cost Gemini path for lightweight coding and tooling loops.",
123
+ "tone": "sea",
124
+ "inputPer1M": 0.1,
125
+ "cachedInputPer1M": 0.01,
126
+ "outputPer1M": 0.4
127
+ },
128
+ {
129
+ "id": "gemini-3-pro-preview",
130
+ "label": "Gemini 3 Pro Preview",
131
+ "note": "Preview Gemini model for heavier multimodal and coding sessions.",
132
+ "tone": "coral",
133
+ "inputPer1M": 2.0,
134
+ "cachedInputPer1M": 0.2,
135
+ "outputPer1M": 12.0
136
+ },
137
+ {
138
+ "id": "gemini-3.1-pro-preview",
139
+ "label": "Gemini 3.1 Pro Preview",
140
+ "note": "Newest Gemini Pro preview with stronger agentic and coding behavior.",
141
+ "tone": "coral",
142
+ "inputPer1M": 2.0,
143
+ "cachedInputPer1M": 0.2,
144
+ "outputPer1M": 12.0
145
+ },
146
+ {
147
+ "id": "gemini-3-flash-preview",
148
+ "label": "Gemini 3 Flash Preview",
149
+ "note": "Faster Gemini preview tuned for responsive high-volume tasks.",
150
+ "tone": "ink",
151
+ "inputPer1M": 0.5,
152
+ "cachedInputPer1M": 0.05,
153
+ "outputPer1M": 3.0
91
154
  }
92
155
  ]