clawmoney 0.13.12 → 0.13.15

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.
@@ -57,8 +57,12 @@ export const API_PRICES = {
57
57
  "antigravity-gemini-3-pro": { input: 2, output: 12 },
58
58
  "antigravity-gemini-3.1-pro": { input: 2, output: 12 },
59
59
  "antigravity-gemini-3-flash": { input: 0.50, output: 3 },
60
- "antigravity-claude-sonnet-4-6": { input: 3, output: 15 },
60
+ "antigravity-gemini-2.5-pro": { input: 1.25, output: 10 },
61
+ "antigravity-gemini-2.5-flash": { input: 0.30, output: 2.50 },
62
+ "antigravity-claude-opus-4-6": { input: 5, output: 25 },
61
63
  "antigravity-claude-opus-4-6-thinking": { input: 5, output: 25 },
64
+ "antigravity-claude-sonnet-4-6": { input: 3, output: 15 },
65
+ "antigravity-claude-sonnet-4-5": { input: 3, output: 15 },
62
66
  // ── Google (Gemini) ──
63
67
  // Verified against LiteLLM pricing DB.
64
68
  "gemini-3.1-pro-preview": { input: 2, output: 12 },
@@ -97,8 +97,30 @@ function loadRelayConfig(cliOverride) {
97
97
  agent_id: raw.agent_id,
98
98
  agent_slug: raw.agent_slug,
99
99
  relay,
100
+ proxy: typeof raw.proxy === "string" ? raw.proxy : undefined,
100
101
  };
101
102
  }
103
+ /**
104
+ * Export the config's `proxy` setting into process.env so every downstream
105
+ * module (claude-api, codex-api, gemini-api, antigravity-api) that already
106
+ * reads HTTPS_PROXY at startup picks it up without any per-module changes.
107
+ * Silently no-ops if the env var is already set by the user's shell.
108
+ */
109
+ function applyProxyFromConfig(config) {
110
+ if (!config.proxy)
111
+ return;
112
+ const alreadySet = process.env.HTTPS_PROXY ||
113
+ process.env.https_proxy ||
114
+ process.env.HTTP_PROXY ||
115
+ process.env.http_proxy;
116
+ if (alreadySet) {
117
+ logger.info(`[provider] shell HTTPS_PROXY=${alreadySet} overrides config.yaml proxy=${config.proxy}`);
118
+ return;
119
+ }
120
+ process.env.HTTPS_PROXY = config.proxy;
121
+ process.env.HTTP_PROXY = config.proxy;
122
+ logger.info(`[provider] using config.yaml proxy=${config.proxy}`);
123
+ }
102
124
  // ── Request handler ──
103
125
  function messagesToPrompt(messages) {
104
126
  return messages.map((m) => String(m.content ?? "")).join("\n");
@@ -239,6 +261,10 @@ export function runRelayProvider(cliOverride) {
239
261
  process.exit(1);
240
262
  }
241
263
  const config = loadRelayConfig(cliOverride);
264
+ // Make the config-level proxy visible to every upstream module that reads
265
+ // process.env.HTTPS_PROXY / http_proxy at init time. Must run BEFORE any
266
+ // preflight call so the first outbound request already goes through it.
267
+ applyProxyFromConfig(config);
242
268
  // Prepare relay sandbox assets once at startup.
243
269
  ensureEmptyMcpConfig();
244
270
  ensureSandboxDir();
@@ -87,4 +87,14 @@ export interface RelayProviderConfig {
87
87
  agent_id?: string;
88
88
  agent_slug?: string;
89
89
  relay: RelayProviderSettings;
90
+ /**
91
+ * Upstream HTTPS proxy. When set, the daemon exports HTTPS_PROXY /
92
+ * HTTP_PROXY before running any fetch, so providers on GFW-side machines
93
+ * don't have to remember to `export https_proxy=` in every shell. Only
94
+ * plain HTTP(S) proxies are supported (SOCKS is ignored with a warning).
95
+ *
96
+ * Example:
97
+ * proxy: http://127.0.0.1:7897
98
+ */
99
+ proxy?: string;
90
100
  }
@@ -94,17 +94,31 @@ const GENERATE_PATH = "/v1internal:streamGenerateContent?alt=sse";
94
94
  * names.
95
95
  */
96
96
  const ANTIGRAVITY_MODEL_MAP = {
97
- // Gemini 3 Pro was retired in April 2026 — Google now returns a plain-text
98
- // "no longer available, switch to Gemini 3.1 Pro" body if you ask for it.
99
- // Route both the 3-pro and 3.1-pro market IDs to 3.1-pro-high.
97
+ // Verified live against a real Ultra account's
98
+ // `v1internal:fetchAvailableModels` response on 2026-04-11. sub2api
99
+ // migration 049's mapping is stale Google has retired most `4-5`
100
+ // Claude variants and only `claude-opus-4-6-thinking` / `claude-sonnet-4-6`
101
+ // remain, both of which are thinking variants (the displayName literally
102
+ // says "(Thinking)" even for the plain id).
103
+ //
104
+ // Gemini: both `gemini-3-pro-high/low` and `gemini-3.1-pro-high/low` are
105
+ // available — prefer 3.1 for new traffic since Google's generate path
106
+ // sends "no longer available" plain text for 3-pro-high.
100
107
  "antigravity-gemini-3-pro": "gemini-3.1-pro-high",
101
108
  "antigravity-gemini-3.1-pro": "gemini-3.1-pro-high",
109
+ "antigravity-gemini-3.1-pro-low": "gemini-3.1-pro-low",
102
110
  "antigravity-gemini-3-flash": "gemini-3-flash",
103
111
  "antigravity-gemini-2.5-pro": "gemini-2.5-pro",
104
112
  "antigravity-gemini-2.5-flash": "gemini-2.5-flash",
105
- "antigravity-claude-sonnet-4-6": "claude-sonnet-4-5",
106
- "antigravity-claude-opus-4-6-thinking": "claude-opus-4-5-thinking",
107
- "antigravity-claude-opus-4-6": "claude-opus-4-6",
113
+ // Claude. All supported variants are thinking-mode; "4-5" market IDs fall
114
+ // through to 4-6 because that's what Google currently exposes.
115
+ "antigravity-claude-opus-4-6": "claude-opus-4-6-thinking",
116
+ "antigravity-claude-opus-4-6-thinking": "claude-opus-4-6-thinking",
117
+ "antigravity-claude-opus-4-5-thinking": "claude-opus-4-6-thinking",
118
+ "antigravity-claude-sonnet-4-6": "claude-sonnet-4-6",
119
+ "antigravity-claude-sonnet-4-5": "claude-sonnet-4-6",
120
+ "antigravity-claude-sonnet-4-5-thinking": "claude-sonnet-4-6",
121
+ "antigravity-claude-haiku-4-5": "claude-sonnet-4-6",
108
122
  };
109
123
  function resolveAntigravityUpstreamModel(model) {
110
124
  return ANTIGRAVITY_MODEL_MAP[model] ?? model;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmoney",
3
- "version": "0.13.12",
3
+ "version": "0.13.15",
4
4
  "description": "ClawMoney CLI -- Earn rewards with your AI agent",
5
5
  "type": "module",
6
6
  "bin": {