@blockrun/clawrouter 0.12.311 → 0.12.313

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/clawrouter",
3
- "version": "0.12.311",
3
+ "version": "0.12.313",
4
4
  "description": "Smart LLM router — save 84% on inference costs. 91 models (8 free). Pay by credit card (API key) or USDC (x402 wallet).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -96,10 +96,10 @@
96
96
  "@scure/bip32": "^2.0.1",
97
97
  "@scure/bip39": "^1.5.0",
98
98
  "@solana/kit": "^8.6.0",
99
- "@x402/core": "~2.29.0",
100
- "@x402/evm": "~2.29.0",
101
- "@x402/fetch": "~2.29.0",
102
- "@x402/svm": "~2.29.0",
99
+ "@x402/core": "~2.30.0",
100
+ "@x402/evm": "~2.30.0",
101
+ "@x402/fetch": "~2.30.0",
102
+ "@x402/svm": "~2.30.0",
103
103
  "axios": "^1.20.0",
104
104
  "bs58": "^6.0.0",
105
105
  "https-proxy-agent": "^9.1.0",
@@ -115,7 +115,7 @@
115
115
  }
116
116
  },
117
117
  "devDependencies": {
118
- "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/b95efe2f025c9968742e6479bc9ec71b6a40c0f4",
118
+ "@blockrun/model-catalog": "https://codeload.github.com/BlockRunAI/model-catalog/tar.gz/1c5e954abb24592521dc3863512bb5fd97990261",
119
119
  "@blockrun/router-core": "https://codeload.github.com/BlockRunAI/router-core/tar.gz/273c2af0a9abe70212efbad7117b72eb3038cffc",
120
120
  "@eslint/js": "^10.0.1",
121
121
  "eslint": "^10.2.0",
@@ -135,6 +135,7 @@
135
135
  "postcss": "^8.5.25",
136
136
  "esbuild": "^0.28.1",
137
137
  "brace-expansion": "^5.0.12",
138
+ "minimatch": "11.0.5",
138
139
  "fast-uri": "^3.1.8",
139
140
  "tar": "^7.5.22",
140
141
  "hono": "^4.13.5",
@@ -154,6 +155,6 @@
154
155
  }
155
156
  },
156
157
  "engines": {
157
- "node": ">=22"
158
+ "node": ">=22.19.0"
158
159
  }
159
160
  }
package/scripts/update.sh CHANGED
@@ -112,6 +112,40 @@ if (best) console.log(path.dirname(best.packagePath));
112
112
  NODE
113
113
  }
114
114
 
115
+ # Print the EVM address for the wallet key in $1, or $2 if it can't be derived.
116
+ # The key is read by node from the file itself: it must never be interpolated
117
+ # into a `node -e` program or passed as an argument, because a process's argv
118
+ # is visible to other local users (/proc/<pid>/cmdline) and to exec auditing.
119
+ # See GHSA-27x5-82hg-xwr6.
120
+ derive_wallet_address() {
121
+ local address
122
+ # The heredoc lives in its own function: bash 3.2 (macOS /bin/bash) can't
123
+ # parse a heredoc nested inside $(...).
124
+ address=$(print_wallet_address "$1" 2>/dev/null) || address=""
125
+ if [ -n "$address" ]; then
126
+ echo "$address"
127
+ else
128
+ echo "$2"
129
+ fi
130
+ }
131
+
132
+ print_wallet_address() {
133
+ WALLET_KEY_FILE="$1" PACKAGE_DIR="$ACTIVE_PACKAGE_DIR" node <<'NODE'
134
+ try {
135
+ const fs = require('fs');
136
+ const key = fs.readFileSync(process.env.WALLET_KEY_FILE, 'utf8').replace(/\s+/g, '');
137
+ if (!/^0x[0-9a-fA-F]{64}$/.test(key)) process.exit(1);
138
+ const { privateKeyToAccount } = require(
139
+ require.resolve('viem/accounts', { paths: [process.env.PACKAGE_DIR || process.cwd()] }),
140
+ );
141
+ console.log(privateKeyToAccount(key).address);
142
+ } catch {
143
+ // viem not resolvable yet (fresh install path) or unreadable key file
144
+ process.exit(1);
145
+ }
146
+ NODE
147
+ }
148
+
115
149
  sync_cli_shim() {
116
150
  local package_dir="$1"
117
151
  if [ -z "$package_dir" ] || [ ! -f "$package_dir/dist/cli.js" ]; then
@@ -256,16 +290,7 @@ if [ -f "$WALLET_FILE" ]; then
256
290
 
257
291
  if [[ "$WALLET_KEY" == 0x* ]] && [ "$KEY_LEN" -eq 66 ]; then
258
292
  # Derive wallet address via node (viem is available post-install)
259
- WALLET_ADDRESS=$(node -e "
260
- try {
261
- const { privateKeyToAccount } = require(require.resolve('viem/accounts', { paths: ['$ACTIVE_PACKAGE_DIR'] }));
262
- const acct = privateKeyToAccount('$WALLET_KEY');
263
- console.log(acct.address);
264
- } catch {
265
- // viem not available yet (fresh install path), skip address check
266
- console.log('(address check skipped)');
267
- }
268
- " 2>/dev/null || echo "(address check skipped)")
293
+ WALLET_ADDRESS=$(derive_wallet_address "$WALLET_FILE" "(address check skipped)")
269
294
 
270
295
  WALLET_BACKUP="$(mktemp "$HOME/.openclaw/blockrun/wallet.key.bak.XXXXXX")"
271
296
  cp "$WALLET_FILE" "$WALLET_BACKUP"
@@ -1251,13 +1276,7 @@ echo ""
1251
1276
 
1252
1277
  # Show final wallet address
1253
1278
  if [ -f "$WALLET_FILE" ]; then
1254
- FINAL_KEY=$(cat "$WALLET_FILE" | tr -d '[:space:]')
1255
- FINAL_ADDRESS=$(node -e "
1256
- try {
1257
- const { privateKeyToAccount } = require(require.resolve('viem/accounts', { paths: ['$ACTIVE_PACKAGE_DIR'] }));
1258
- console.log(privateKeyToAccount('$FINAL_KEY').address);
1259
- } catch { console.log('(run /wallet in OpenClaw to see your address)'); }
1260
- " 2>/dev/null || echo "(run /wallet in OpenClaw to see your address)")
1279
+ FINAL_ADDRESS=$(derive_wallet_address "$WALLET_FILE" "(run /wallet in OpenClaw to see your address)")
1261
1280
 
1262
1281
  echo " Wallet: $FINAL_ADDRESS"
1263
1282
  echo " Key file: $WALLET_FILE"
@@ -193,7 +193,7 @@ Realtime prices and historical OHLC across every asset class. The agent should c
193
193
  | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
194
194
  | `blockrun_image_generation` | 12 image models — GPT Image 1/2/2.5 (Flare, Sunburst), Nano Banana / 2 / Pro, Seedream 5 Pro, Grok Imagine / 2.0 / Pro, CogView-4 | per model — see [Model Prices](#model-prices--look-them-up-live) |
195
195
  | `blockrun_image_edit` | Edit / inpaint existing image (GPT Image 1/2, 2.5 Sunburst, Nano Banana; `model` param) | per model — see [Model Prices](#model-prices--look-them-up-live) |
196
- | `blockrun_video_generation` | Grok Imagine (`xai/grok-imagine-video`, `-1.5`, up to 15s) + ByteDance Seedance (1.5-pro up to 12s; 2.0-fast / 2.0-mini / 2.0 up to 15s; 2.5 up to 30s) at 720p with synced audio (t2v default). Seedance is token-priced upstream (~20,256 tokens/sec at the 720p+audio default — 2× the prior 480p rate); `image_url` (image-to-video) costs the same as t2v since 2026-06-01. Seedance 2.0 variants accept optional `real_face_asset_id` (`ta_…`) for BytePlus RealFace character-consistency — mutually exclusive with `image_url`. | per model — see [Model Prices](#model-prices--look-them-up-live) |
196
+ | `blockrun_video_generation` | Grok Imagine (`xai/grok-imagine-video`, `-1.5`, up to 15s) + ByteDance Seedance (1.5-pro up to 12s; 2.0-fast / 2.0-mini / 2.0 up to 15s; 2.5 up to 30s) at 720p with synced audio (every input). Seedance is token-priced upstream (~20,256 tokens/sec at the 720p+audio default — 2× the prior 480p rate); `image_url` (image-to-video) costs the same as t2v since 2026-06-01. Seedance 2.0 variants accept optional `real_face_asset_id` (`ta_…`) for BytePlus RealFace character-consistency — mutually exclusive with `image_url`. | per model — see [Model Prices](#model-prices--look-them-up-live) |
197
197
 
198
198
  ### Phone & Voice (Twilio + Bland.ai)
199
199