@blockrun/clawrouter 0.12.225 → 0.12.226
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 -9
- package/dist/index.js +6 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -34527,6 +34527,12 @@ var init_models = __esm({
|
|
|
34527
34527
|
// redirect to its successor so pinned callers land on 3.1-pro, not an error.
|
|
34528
34528
|
"google/gemini-3-pro-preview": "google/gemini-3.1-pro",
|
|
34529
34529
|
"gemini-3-pro-preview": "google/gemini-3.1-pro",
|
|
34530
|
+
// Bare Pro shorthands — `gemini-3-pro` was never a real id (the 3-series Pro
|
|
34531
|
+
// shipped as the -preview above, then 3.1), but callers reach for it anyway.
|
|
34532
|
+
// Point them at the current Pro instead of a 400. (Thanks @0xCheetah1, #206.)
|
|
34533
|
+
"gemini-pro": "google/gemini-3.1-pro",
|
|
34534
|
+
"gemini-3-pro": "google/gemini-3.1-pro",
|
|
34535
|
+
"gemini-3.1-pro": "google/gemini-3.1-pro",
|
|
34530
34536
|
gemini: "google/gemini-2.5-pro",
|
|
34531
34537
|
flash: "google/gemini-2.5-flash",
|
|
34532
34538
|
"gemini-3.1-pro-preview": "google/gemini-3.1-pro",
|
|
@@ -220209,22 +220215,46 @@ Cache Stats
|
|
|
220209
220215
|
}
|
|
220210
220216
|
async function cmdSetup() {
|
|
220211
220217
|
const { execFileSync, execSync } = await import("child_process");
|
|
220218
|
+
const { existsSync: existsSync5 } = await import("fs");
|
|
220219
|
+
const { dirname: dirname5, join: join17 } = await import("path");
|
|
220220
|
+
const { homedir: homedir14 } = await import("os");
|
|
220212
220221
|
const { injectModelsConfig: injectModelsConfig2, injectAuthProfile: injectAuthProfile2, syncAgentModelCache: syncAgentModelCache2, VISIBLE_OPENCLAW_MODELS: VISIBLE_OPENCLAW_MODELS2 } = await Promise.resolve().then(() => (init_index(), index_exports));
|
|
220213
220222
|
console.log("\u{1F99E} ClawRouter setup\n");
|
|
220214
|
-
|
|
220215
|
-
|
|
220216
|
-
|
|
220217
|
-
|
|
220218
|
-
|
|
220219
|
-
|
|
220220
|
-
|
|
220221
|
-
|
|
220222
|
-
|
|
220223
|
+
const openclawPath = (() => {
|
|
220224
|
+
const candidates = [];
|
|
220225
|
+
try {
|
|
220226
|
+
const onPath = execSync("command -v openclaw", {
|
|
220227
|
+
encoding: "utf8",
|
|
220228
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
220229
|
+
}).trim();
|
|
220230
|
+
if (onPath) candidates.push(onPath);
|
|
220231
|
+
} catch {
|
|
220232
|
+
}
|
|
220233
|
+
if (process.env.npm_config_prefix) {
|
|
220234
|
+
candidates.push(join17(process.env.npm_config_prefix, "bin", "openclaw"));
|
|
220235
|
+
}
|
|
220236
|
+
try {
|
|
220237
|
+
const npmRoot = execSync("npm root -g", {
|
|
220238
|
+
encoding: "utf8",
|
|
220239
|
+
stdio: ["ignore", "pipe", "ignore"]
|
|
220240
|
+
}).trim();
|
|
220241
|
+
if (npmRoot) candidates.push(join17(dirname5(dirname5(npmRoot)), "bin", "openclaw"));
|
|
220242
|
+
} catch {
|
|
220243
|
+
}
|
|
220244
|
+
candidates.push(
|
|
220245
|
+
join17(homedir14(), ".npm-global", "bin", "openclaw"),
|
|
220246
|
+
join17(homedir14(), ".local", "bin", "openclaw"),
|
|
220247
|
+
"/usr/local/bin/openclaw"
|
|
220248
|
+
);
|
|
220249
|
+
return candidates.find((candidate) => existsSync5(candidate)) ?? "";
|
|
220250
|
+
})();
|
|
220251
|
+
if (!openclawPath) {
|
|
220223
220252
|
console.error(" \u2717 openclaw not found on PATH");
|
|
220224
220253
|
console.error(" Install OpenClaw first: npm install -g openclaw");
|
|
220225
220254
|
console.error(" Then re-run: clawrouter setup");
|
|
220226
220255
|
process.exit(1);
|
|
220227
220256
|
}
|
|
220257
|
+
console.log(` \u2713 Found openclaw at ${openclawPath}`);
|
|
220228
220258
|
console.log("\n\u2192 Registering ClawRouter with OpenClaw...");
|
|
220229
220259
|
let installOk = false;
|
|
220230
220260
|
try {
|
package/dist/index.js
CHANGED
|
@@ -317,6 +317,12 @@ var init_models = __esm({
|
|
|
317
317
|
// redirect to its successor so pinned callers land on 3.1-pro, not an error.
|
|
318
318
|
"google/gemini-3-pro-preview": "google/gemini-3.1-pro",
|
|
319
319
|
"gemini-3-pro-preview": "google/gemini-3.1-pro",
|
|
320
|
+
// Bare Pro shorthands — `gemini-3-pro` was never a real id (the 3-series Pro
|
|
321
|
+
// shipped as the -preview above, then 3.1), but callers reach for it anyway.
|
|
322
|
+
// Point them at the current Pro instead of a 400. (Thanks @0xCheetah1, #206.)
|
|
323
|
+
"gemini-pro": "google/gemini-3.1-pro",
|
|
324
|
+
"gemini-3-pro": "google/gemini-3.1-pro",
|
|
325
|
+
"gemini-3.1-pro": "google/gemini-3.1-pro",
|
|
320
326
|
gemini: "google/gemini-2.5-pro",
|
|
321
327
|
flash: "google/gemini-2.5-flash",
|
|
322
328
|
"gemini-3.1-pro-preview": "google/gemini-3.1-pro",
|
package/package.json
CHANGED