From fc66c6d78d7c701e98d25301b9ebb5e9fd246f9c Mon Sep 17 00:00:00 2001 From: Matias Date: Tue, 24 Feb 2026 17:08:40 -0300 Subject: [PATCH 1/2] chore: npm install --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32e79c6..0979824 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@blockrun/clawrouter", - "version": "0.10.4", + "version": "0.10.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@blockrun/clawrouter", - "version": "0.10.4", + "version": "0.10.9", "license": "MIT", "dependencies": { "viem": "^2.39.3" From 3e5ab4d3d60fa208e85a203e626af905b9deadab Mon Sep 17 00:00:00 2001 From: Matias Date: Tue, 24 Feb 2026 17:08:51 -0300 Subject: [PATCH 2/2] chore: apply prettier formatting --- RELEASE-v0.10.5.md | 50 +++++++++++++++++++++---------------------- RELEASE-v0.10.7.md | 19 +++++++++------- RELEASE-v0.10.8.md | 6 +++--- src/auth.ts | 12 ++++++----- src/cli.ts | 4 +++- src/index.ts | 17 +++++++++------ src/partners/tools.ts | 5 +---- src/proxy.ts | 10 +++++++-- 8 files changed, 68 insertions(+), 55 deletions(-) diff --git a/RELEASE-v0.10.5.md b/RELEASE-v0.10.5.md index 5510809..78c2ce3 100644 --- a/RELEASE-v0.10.5.md +++ b/RELEASE-v0.10.5.md @@ -21,43 +21,43 @@ OpenClaw 2026.2.22 added multilingual memory search for Spanish, Portuguese, Jap ### Keywords Added Across All 12 Dimensions -| Dimension | ES | PT | KO | AR | -| ---------------------- | -- | -- | -- | -- | -| codeKeywords | ✅ | ✅ | ✅ | ✅ | -| reasoningKeywords | ✅ | ✅ | ✅ | ✅ | -| simpleKeywords | ✅ | ✅ | ✅ | ✅ | -| technicalKeywords | ✅ | ✅ | ✅ | ✅ | -| creativeKeywords | ✅ | ✅ | ✅ | ✅ | -| imperativeVerbs | ✅ | ✅ | ✅ | ✅ | -| constraintIndicators | ✅ | ✅ | ✅ | ✅ | -| outputFormatKeywords | ✅ | ✅ | ✅ | ✅ | -| referenceKeywords | ✅ | ✅ | ✅ | ✅ | -| negationKeywords | ✅ | ✅ | ✅ | ✅ | -| domainSpecificKeywords | ✅ | ✅ | ✅ | ✅ | -| agenticTaskKeywords | ✅ | ✅ | ✅ | ✅ | +| Dimension | ES | PT | KO | AR | +| ---------------------- | --- | --- | --- | --- | +| codeKeywords | ✅ | ✅ | ✅ | ✅ | +| reasoningKeywords | ✅ | ✅ | ✅ | ✅ | +| simpleKeywords | ✅ | ✅ | ✅ | ✅ | +| technicalKeywords | ✅ | ✅ | ✅ | ✅ | +| creativeKeywords | ✅ | ✅ | ✅ | ✅ | +| imperativeVerbs | ✅ | ✅ | ✅ | ✅ | +| constraintIndicators | ✅ | ✅ | ✅ | ✅ | +| outputFormatKeywords | ✅ | ✅ | ✅ | ✅ | +| referenceKeywords | ✅ | ✅ | ✅ | ✅ | +| negationKeywords | ✅ | ✅ | ✅ | ✅ | +| domainSpecificKeywords | ✅ | ✅ | ✅ | ✅ | +| agenticTaskKeywords | ✅ | ✅ | ✅ | ✅ | --- ## 📝 Metadata Updates -| File | Change | -| ---------------------- | ----------------------------------- | -| `package.json` | Version 0.10.4 → 0.10.5 | -| `package.json` | Description: "41 models" → "41+" | +| File | Change | +| ---------------------- | ------------------------------------- | +| `package.json` | Version 0.10.4 → 0.10.5 | +| `package.json` | Description: "41 models" → "41+" | | `openclaw.plugin.json` | "30+ models, 78%" → "41+ models, 92%" | -| `README.md` | All model counts: 38+/30+ → 41+ | +| `README.md` | All model counts: 38+/30+ → 41+ | --- ## 📋 OpenClaw 2026.2.22 Compatibility Notes -| OpenClaw Feature | ClawRouter Impact | Status | -| ------------------------ | ----------------- | ---------- | +| OpenClaw Feature | ClawRouter Impact | Status | +| ------------------------ | ----------------- | ---------------------------------------- | | Mistral provider support | Add models | ⏳ Pending (blocked on BlockRun backend) | -| Multilingual memory | Keyword expansion | ✅ Done | -| Auto-updater | No impact | ✅ N/A | -| Cron parallel runs | Proxy handles it | ✅ OK | -| 40+ security fixes | No impact | ✅ N/A | +| Multilingual memory | Keyword expansion | ✅ Done | +| Auto-updater | No impact | ✅ N/A | +| Cron parallel runs | Proxy handles it | ✅ OK | +| 40+ security fixes | No impact | ✅ N/A | --- diff --git a/RELEASE-v0.10.7.md b/RELEASE-v0.10.7.md index 2386c0e..75b7df1 100644 --- a/RELEASE-v0.10.7.md +++ b/RELEASE-v0.10.7.md @@ -23,12 +23,14 @@ The `blockrun_x_users_lookup` tool was registered correctly but the AI rarely ca **Root cause:** The description said what the tool _is_, not when the AI _must_ use it. **Before:** + ``` "Look up Twitter/X user profiles by username. Returns follower counts, verification status, bio, and more. Accepts up to 100 usernames per request." ``` **After:** + ``` "ALWAYS use this tool to look up real-time Twitter/X user profiles. Call this when the user asks about any Twitter/X account, username, handle, @@ -68,6 +70,7 @@ The `/partners` command output now includes a **How to use** line so users know Previously, if the wallet file existed but had an invalid format, ClawRouter would silently fall through and generate a new empty wallet — potentially abandoning a funded wallet. **Now:** throws a descriptive error with recovery instructions: + ``` CRITICAL: Wallet file exists but has invalid format! Refusing to auto-generate new wallet to protect existing funds. @@ -80,14 +83,14 @@ Also adds a prominent backup reminder banner when a new wallet is generated for ## 📋 Files Changed -| File | Change | -|------|--------| -| `src/partners/registry.ts` | Directive tool description for `x_users_lookup` | -| `src/index.ts` | Usage hint in `/partners` command output | -| `src/router/selector.ts` | Fix `BASELINE_MODEL_ID` typo (`4-5` → `4.6`) | -| `src/router/selector.test.ts` | Update test mock to match corrected baseline ID | -| `src/auth.ts` | Wallet corruption safety + new-wallet backup reminder | -| `package.json` | Version bump `0.10.6` → `0.10.7` | +| File | Change | +| ----------------------------- | ----------------------------------------------------- | +| `src/partners/registry.ts` | Directive tool description for `x_users_lookup` | +| `src/index.ts` | Usage hint in `/partners` command output | +| `src/router/selector.ts` | Fix `BASELINE_MODEL_ID` typo (`4-5` → `4.6`) | +| `src/router/selector.test.ts` | Update test mock to match corrected baseline ID | +| `src/auth.ts` | Wallet corruption safety + new-wallet backup reminder | +| `package.json` | Version bump `0.10.6` → `0.10.7` | --- diff --git a/RELEASE-v0.10.8.md b/RELEASE-v0.10.8.md index d6362b2..0439fee 100644 --- a/RELEASE-v0.10.8.md +++ b/RELEASE-v0.10.8.md @@ -24,10 +24,10 @@ OpenClaw expects `{ content: [{ type: "text", text: "..." }], details: ... }`. C ## 📋 File Changed -| File | Change | -|------|--------| +| File | Change | +| ----------------------- | ------------------------------------------- | | `src/partners/tools.ts` | Fix all 3 OpenClaw tool API contract issues | -| `package.json` | Version bump `0.10.7` → `0.10.8` | +| `package.json` | Version bump `0.10.7` → `0.10.8` | --- diff --git a/src/auth.ts b/src/auth.ts index 8ac9eae..cd04193 100644 --- a/src/auth.ts +++ b/src/auth.ts @@ -51,11 +51,13 @@ async function loadSavedWallet(): Promise { console.error(`[ClawRouter] ✗ CRITICAL: Wallet file exists but has invalid format!`); console.error(`[ClawRouter] File: ${WALLET_FILE}`); console.error(`[ClawRouter] Expected: 0x followed by 64 hex characters (66 chars total)`); - console.error(`[ClawRouter] To fix: restore your backup key or set BLOCKRUN_WALLET_KEY env var`); + console.error( + `[ClawRouter] To fix: restore your backup key or set BLOCKRUN_WALLET_KEY env var`, + ); throw new Error( `Wallet file at ${WALLET_FILE} is corrupted or has wrong format. ` + - `Refusing to auto-generate new wallet to protect existing funds. ` + - `Restore your backup key or set BLOCKRUN_WALLET_KEY environment variable.`, + `Refusing to auto-generate new wallet to protect existing funds. ` + + `Restore your backup key or set BLOCKRUN_WALLET_KEY environment variable.`, ); } catch (err) { // Re-throw corruption errors (not ENOENT) @@ -69,8 +71,8 @@ async function loadSavedWallet(): Promise { ); throw new Error( `Cannot read wallet file at ${WALLET_FILE}: ${err instanceof Error ? err.message : String(err)}. ` + - `Refusing to auto-generate new wallet to protect existing funds. ` + - `Fix file permissions or set BLOCKRUN_WALLET_KEY environment variable.`, + `Refusing to auto-generate new wallet to protect existing funds. ` + + `Fix file permissions or set BLOCKRUN_WALLET_KEY environment variable.`, ); } } diff --git a/src/cli.ts b/src/cli.ts index 1d0a1e2..1038db7 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -154,7 +154,9 @@ async function main(): Promise { console.log(` ${svc.description}`); console.log(` Tool: blockrun_${svc.id}`); console.log(` Method: ${svc.method} /v1${svc.proxyPath}`); - console.log(` Pricing: ${svc.pricing.perUnit} per ${svc.pricing.unit} (min ${svc.pricing.minimum}, max ${svc.pricing.maximum})`); + console.log( + ` Pricing: ${svc.pricing.perUnit} per ${svc.pricing.unit} (min ${svc.pricing.minimum}, max ${svc.pricing.maximum})`, + ); console.log(); } diff --git a/src/index.ts b/src/index.ts index 7ac29ba..371b15c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -679,7 +679,9 @@ const plugin: OpenClawPluginDefinition = { api.registerTool(tool); } if (partnerTools.length > 0) { - api.logger.info(`Registered ${partnerTools.length} partner tool(s): ${partnerTools.map((t) => t.name).join(", ")}`); + api.logger.info( + `Registered ${partnerTools.length} partner tool(s): ${partnerTools.map((t) => t.name).join(", ")}`, + ); } // Register /partners command @@ -693,17 +695,18 @@ const plugin: OpenClawPluginDefinition = { return { text: "No partner APIs available." }; } - const lines = [ - "**Partner APIs** (paid via your ClawRouter wallet)", - "", - ]; + const lines = ["**Partner APIs** (paid via your ClawRouter wallet)", ""]; for (const svc of PARTNER_SERVICES) { lines.push(`**${svc.name}** (${svc.partner})`); lines.push(` ${svc.description}`); lines.push(` Tool: \`${`blockrun_${svc.id}`}\``); - lines.push(` Pricing: ${svc.pricing.perUnit} per ${svc.pricing.unit} (min ${svc.pricing.minimum}, max ${svc.pricing.maximum})`); - lines.push(` **How to use:** Ask "Look up Twitter user @elonmusk" or "Get info on these X accounts: @naval, @balajis"`); + lines.push( + ` Pricing: ${svc.pricing.perUnit} per ${svc.pricing.unit} (min ${svc.pricing.minimum}, max ${svc.pricing.maximum})`, + ); + lines.push( + ` **How to use:** Ask "Look up Twitter user @elonmusk" or "Get info on these X accounts: @naval, @balajis"`, + ); lines.push(""); } diff --git a/src/partners/tools.ts b/src/partners/tools.ts index a988b80..1697178 100644 --- a/src/partners/tools.ts +++ b/src/partners/tools.ts @@ -23,10 +23,7 @@ export type PartnerToolDefinition = { /** * Build a single partner tool from a service definition. */ -function buildTool( - service: PartnerServiceDefinition, - proxyBaseUrl: string, -): PartnerToolDefinition { +function buildTool(service: PartnerServiceDefinition, proxyBaseUrl: string): PartnerToolDefinition { // Build JSON Schema properties from service params const properties: Record = {}; const required: string[] = []; diff --git a/src/proxy.ts b/src/proxy.ts index a3b705e..f40cc54 100644 --- a/src/proxy.ts +++ b/src/proxy.ts @@ -973,7 +973,12 @@ async function proxyPartnerRequest( // Forward headers (strip hop-by-hop) const headers: Record = {}; for (const [key, value] of Object.entries(req.headers)) { - if (key === "host" || key === "connection" || key === "transfer-encoding" || key === "content-length") + if ( + key === "host" || + key === "connection" || + key === "transfer-encoding" || + key === "content-length" + ) continue; if (typeof value === "string") headers[key] = value; } @@ -1025,7 +1030,8 @@ async function proxyPartnerRequest( baselineCost: 0, savings: 0, latencyMs, - partnerId: (req.url?.split("?")[0] ?? "").replace(/^\/v1\//, "").replace(/\//g, "_") || "unknown", + partnerId: + (req.url?.split("?")[0] ?? "").replace(/^\/v1\//, "").replace(/\//g, "_") || "unknown", service: "partner", }).catch(() => {}); }