@blockrun/clawrouter 0.12.259 → 0.12.261
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/dist/cli.js +39 -1
- package/dist/index.d.ts +15 -2
- package/dist/index.js +39 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -38926,6 +38926,14 @@ var init_models = __esm({
|
|
|
38926
38926
|
toolCalling: true
|
|
38927
38927
|
},
|
|
38928
38928
|
{
|
|
38929
|
+
// vision LIVE-VERIFIED 2026-08-31: 3 of 3 proxy probes with a 64x64 solid-red
|
|
38930
|
+
// PNG answered "Red", each served as itself. blockrun's catalog does not tag
|
|
38931
|
+
// it (same under-claim class as the Claude models below), and without the
|
|
38932
|
+
// flag filterByVision() excluded the CHEAPEST paid model in the catalog from
|
|
38933
|
+
// every image request — so image turns escalated past a $0.10/$0.40 rung that
|
|
38934
|
+
// handles them. It is also router-core's eco SIMPLE cheapest-paid fallback.
|
|
38935
|
+
// Unrelated to its presence in TOOL_NONCOMPLIANT_MODELS (proxy.ts), which is
|
|
38936
|
+
// about tool schemas, not image input.
|
|
38929
38937
|
id: "google/gemini-2.5-flash-lite",
|
|
38930
38938
|
name: "Gemini 2.5 Flash Lite",
|
|
38931
38939
|
version: "2.5",
|
|
@@ -38933,6 +38941,7 @@ var init_models = __esm({
|
|
|
38933
38941
|
outputPrice: 0.4,
|
|
38934
38942
|
contextWindow: 1048576,
|
|
38935
38943
|
maxOutput: 65536,
|
|
38944
|
+
vision: true,
|
|
38936
38945
|
toolCalling: true
|
|
38937
38946
|
},
|
|
38938
38947
|
{
|
|
@@ -226792,7 +226801,8 @@ import {
|
|
|
226792
226801
|
readdirSync,
|
|
226793
226802
|
mkdirSync as mkdirSync3,
|
|
226794
226803
|
copyFileSync,
|
|
226795
|
-
renameSync as renameSync2
|
|
226804
|
+
renameSync as renameSync2,
|
|
226805
|
+
unlinkSync
|
|
226796
226806
|
} from "fs";
|
|
226797
226807
|
import { readFile as readFileAsync } from "fs/promises";
|
|
226798
226808
|
import { homedir as homedir13 } from "os";
|
|
@@ -227137,6 +227147,15 @@ function injectAuthProfile(logger48) {
|
|
|
227137
227147
|
for (const agentId of agents) {
|
|
227138
227148
|
const authDir = join16(agentsDir, agentId, "agent");
|
|
227139
227149
|
const authPath = join16(authDir, "auth-profiles.json");
|
|
227150
|
+
const sqlitePath = join16(authDir, "openclaw-agent.sqlite");
|
|
227151
|
+
if (existsSync4(sqlitePath)) {
|
|
227152
|
+
removeInjectedAuthPlaceholder(authPath, logger48, agentId);
|
|
227153
|
+
continue;
|
|
227154
|
+
}
|
|
227155
|
+
if (agentId === "main") {
|
|
227156
|
+
removeInjectedAuthPlaceholder(authPath, logger48, agentId);
|
|
227157
|
+
continue;
|
|
227158
|
+
}
|
|
227140
227159
|
if (!existsSync4(authDir)) {
|
|
227141
227160
|
try {
|
|
227142
227161
|
mkdirSync3(authDir, { recursive: true });
|
|
@@ -227179,6 +227198,25 @@ function injectAuthProfile(logger48) {
|
|
|
227179
227198
|
logger48.info(`Auth injection failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
227180
227199
|
}
|
|
227181
227200
|
}
|
|
227201
|
+
function removeInjectedAuthPlaceholder(authPath, logger48, agentId) {
|
|
227202
|
+
try {
|
|
227203
|
+
if (!existsSync4(authPath)) return;
|
|
227204
|
+
const parsed = JSON.parse(readTextFileSync(authPath));
|
|
227205
|
+
const profiles = parsed?.profiles;
|
|
227206
|
+
if (!profiles || typeof profiles !== "object" || Array.isArray(profiles)) return;
|
|
227207
|
+
const keys = Object.keys(profiles);
|
|
227208
|
+
if (keys.length !== 1 || keys[0] !== "blockrun:default") return;
|
|
227209
|
+
const entry = profiles["blockrun:default"];
|
|
227210
|
+
if (!entry || typeof entry !== "object") return;
|
|
227211
|
+
const profile = entry;
|
|
227212
|
+
if (profile.type !== "api_key" || profile.provider !== "blockrun" || profile.key !== "x402-proxy-handles-auth") {
|
|
227213
|
+
return;
|
|
227214
|
+
}
|
|
227215
|
+
unlinkSync(authPath);
|
|
227216
|
+
logger48.info(`Removed legacy BlockRun auth placeholder for agent: ${agentId}`);
|
|
227217
|
+
} catch {
|
|
227218
|
+
}
|
|
227219
|
+
}
|
|
227182
227220
|
function clearDeferredProxyStartTimer(proc = process) {
|
|
227183
227221
|
if (!proc.__clawrouterDeferredStartTimer) return false;
|
|
227184
227222
|
clearTimeout(proc.__clawrouterDeferredStartTimer);
|
package/dist/index.d.ts
CHANGED
|
@@ -1692,8 +1692,21 @@ declare function syncAgentModelCache(logger: {
|
|
|
1692
1692
|
}): void;
|
|
1693
1693
|
/**
|
|
1694
1694
|
* Inject dummy auth profile for BlockRun into agent auth stores.
|
|
1695
|
-
*
|
|
1696
|
-
*
|
|
1695
|
+
*
|
|
1696
|
+
* The legacy ``auth-profiles.json`` write is now deliberately narrow:
|
|
1697
|
+
*
|
|
1698
|
+
* - Wherever ``openclaw-agent.sqlite`` exists, the SQLite auth store is
|
|
1699
|
+
* authoritative. Writing the legacy JSON beside it is at best ignored, at
|
|
1700
|
+
* worst a failed-closed migration trigger: since OpenClaw 2026.8.1 a
|
|
1701
|
+
* leftover legacy file beside a store that holds no profiles fails auth
|
|
1702
|
+
* migration for the whole agent fleet. So we never write there, and we
|
|
1703
|
+
* clean up the placeholder we previously injected.
|
|
1704
|
+
* - The shared auth-owner directory (``main``) is managed by OpenClaw
|
|
1705
|
+
* itself; a placeholder written there can shadow that state. The
|
|
1706
|
+
* provider's real auth comes from the x402 proxy (and the apiKey
|
|
1707
|
+
* injectModelsConfig writes into openclaw.json), so nothing is lost.
|
|
1708
|
+
* - Only on very old installs with no SQLite store at all do we keep the
|
|
1709
|
+
* original JSON bootstrap, which those releases import.
|
|
1697
1710
|
*/
|
|
1698
1711
|
declare function injectAuthProfile(logger: {
|
|
1699
1712
|
info: (msg: string) => void;
|
package/dist/index.js
CHANGED
|
@@ -1329,6 +1329,14 @@ var init_models = __esm({
|
|
|
1329
1329
|
toolCalling: true
|
|
1330
1330
|
},
|
|
1331
1331
|
{
|
|
1332
|
+
// vision LIVE-VERIFIED 2026-08-31: 3 of 3 proxy probes with a 64x64 solid-red
|
|
1333
|
+
// PNG answered "Red", each served as itself. blockrun's catalog does not tag
|
|
1334
|
+
// it (same under-claim class as the Claude models below), and without the
|
|
1335
|
+
// flag filterByVision() excluded the CHEAPEST paid model in the catalog from
|
|
1336
|
+
// every image request — so image turns escalated past a $0.10/$0.40 rung that
|
|
1337
|
+
// handles them. It is also router-core's eco SIMPLE cheapest-paid fallback.
|
|
1338
|
+
// Unrelated to its presence in TOOL_NONCOMPLIANT_MODELS (proxy.ts), which is
|
|
1339
|
+
// about tool schemas, not image input.
|
|
1332
1340
|
id: "google/gemini-2.5-flash-lite",
|
|
1333
1341
|
name: "Gemini 2.5 Flash Lite",
|
|
1334
1342
|
version: "2.5",
|
|
@@ -1336,6 +1344,7 @@ var init_models = __esm({
|
|
|
1336
1344
|
outputPrice: 0.4,
|
|
1337
1345
|
contextWindow: 1048576,
|
|
1338
1346
|
maxOutput: 65536,
|
|
1347
|
+
vision: true,
|
|
1339
1348
|
toolCalling: true
|
|
1340
1349
|
},
|
|
1341
1350
|
{
|
|
@@ -226539,7 +226548,8 @@ import {
|
|
|
226539
226548
|
readdirSync,
|
|
226540
226549
|
mkdirSync as mkdirSync3,
|
|
226541
226550
|
copyFileSync,
|
|
226542
|
-
renameSync as renameSync2
|
|
226551
|
+
renameSync as renameSync2,
|
|
226552
|
+
unlinkSync
|
|
226543
226553
|
} from "fs";
|
|
226544
226554
|
import { readFile as readFileAsync } from "fs/promises";
|
|
226545
226555
|
import { homedir as homedir13 } from "os";
|
|
@@ -226884,6 +226894,15 @@ function injectAuthProfile(logger48) {
|
|
|
226884
226894
|
for (const agentId of agents) {
|
|
226885
226895
|
const authDir = join16(agentsDir, agentId, "agent");
|
|
226886
226896
|
const authPath = join16(authDir, "auth-profiles.json");
|
|
226897
|
+
const sqlitePath = join16(authDir, "openclaw-agent.sqlite");
|
|
226898
|
+
if (existsSync3(sqlitePath)) {
|
|
226899
|
+
removeInjectedAuthPlaceholder(authPath, logger48, agentId);
|
|
226900
|
+
continue;
|
|
226901
|
+
}
|
|
226902
|
+
if (agentId === "main") {
|
|
226903
|
+
removeInjectedAuthPlaceholder(authPath, logger48, agentId);
|
|
226904
|
+
continue;
|
|
226905
|
+
}
|
|
226887
226906
|
if (!existsSync3(authDir)) {
|
|
226888
226907
|
try {
|
|
226889
226908
|
mkdirSync3(authDir, { recursive: true });
|
|
@@ -226926,6 +226945,25 @@ function injectAuthProfile(logger48) {
|
|
|
226926
226945
|
logger48.info(`Auth injection failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
226927
226946
|
}
|
|
226928
226947
|
}
|
|
226948
|
+
function removeInjectedAuthPlaceholder(authPath, logger48, agentId) {
|
|
226949
|
+
try {
|
|
226950
|
+
if (!existsSync3(authPath)) return;
|
|
226951
|
+
const parsed = JSON.parse(readTextFileSync(authPath));
|
|
226952
|
+
const profiles = parsed?.profiles;
|
|
226953
|
+
if (!profiles || typeof profiles !== "object" || Array.isArray(profiles)) return;
|
|
226954
|
+
const keys = Object.keys(profiles);
|
|
226955
|
+
if (keys.length !== 1 || keys[0] !== "blockrun:default") return;
|
|
226956
|
+
const entry = profiles["blockrun:default"];
|
|
226957
|
+
if (!entry || typeof entry !== "object") return;
|
|
226958
|
+
const profile = entry;
|
|
226959
|
+
if (profile.type !== "api_key" || profile.provider !== "blockrun" || profile.key !== "x402-proxy-handles-auth") {
|
|
226960
|
+
return;
|
|
226961
|
+
}
|
|
226962
|
+
unlinkSync(authPath);
|
|
226963
|
+
logger48.info(`Removed legacy BlockRun auth placeholder for agent: ${agentId}`);
|
|
226964
|
+
} catch {
|
|
226965
|
+
}
|
|
226966
|
+
}
|
|
226929
226967
|
function clearDeferredProxyStartTimer(proc = process) {
|
|
226930
226968
|
if (!proc.__clawrouterDeferredStartTimer) return false;
|
|
226931
226969
|
clearTimeout(proc.__clawrouterDeferredStartTimer);
|
package/package.json
CHANGED