@blockrun/clawrouter 0.6.3 → 0.6.6
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/index.js +105 -17
- package/dist/index.js.map +1 -1
- package/package.json +8 -2
- package/scripts/reinstall.sh +7 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blockrun/clawrouter",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "Smart LLM router — save 78% on inference costs. 30+ models, one wallet, x402 micropayments.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -27,7 +27,13 @@
|
|
|
27
27
|
"typecheck": "tsc --noEmit",
|
|
28
28
|
"lint": "eslint src/",
|
|
29
29
|
"format": "prettier --write .",
|
|
30
|
-
"format:check": "prettier --check ."
|
|
30
|
+
"format:check": "prettier --check .",
|
|
31
|
+
"test:resilience:errors": "npx tsx test/resilience-errors.ts",
|
|
32
|
+
"test:resilience:stability": "DURATION_MINUTES=5 npx tsx test/resilience-stability.ts",
|
|
33
|
+
"test:resilience:stability:full": "DURATION_MINUTES=240 npx tsx test/resilience-stability.ts",
|
|
34
|
+
"test:resilience:lifecycle": "npx tsx test/resilience-lifecycle.ts",
|
|
35
|
+
"test:resilience:quick": "npm run test:resilience:errors && npm run test:resilience:lifecycle",
|
|
36
|
+
"test:resilience:full": "npm run test:resilience:errors && npm run test:resilience:lifecycle && npm run test:resilience:stability:full"
|
|
31
37
|
},
|
|
32
38
|
"keywords": [
|
|
33
39
|
"llm",
|
package/scripts/reinstall.sh
CHANGED
|
@@ -52,11 +52,7 @@ lsof -ti :8402 | xargs kill -9 2>/dev/null || true
|
|
|
52
52
|
echo "→ Cleaning models cache..."
|
|
53
53
|
rm -f ~/.openclaw/agents/main/agent/models.json 2>/dev/null || true
|
|
54
54
|
|
|
55
|
-
# 4.
|
|
56
|
-
echo "→ Installing ClawRouter..."
|
|
57
|
-
openclaw plugins install @blockrun/clawrouter
|
|
58
|
-
|
|
59
|
-
# 5. Inject auth profile (ensures blockrun provider is recognized)
|
|
55
|
+
# 4. Inject auth profile (ensures blockrun provider is recognized)
|
|
60
56
|
echo "→ Injecting auth profile..."
|
|
61
57
|
node -e "
|
|
62
58
|
const os = require('os');
|
|
@@ -100,7 +96,7 @@ if (!store.profiles[profileKey]) {
|
|
|
100
96
|
}
|
|
101
97
|
"
|
|
102
98
|
|
|
103
|
-
#
|
|
99
|
+
# 5. Add plugin to allow list (required for OpenClaw to load it)
|
|
104
100
|
echo "→ Adding to plugins allow list..."
|
|
105
101
|
node -e "
|
|
106
102
|
const os = require('os');
|
|
@@ -133,7 +129,7 @@ if (fs.existsSync(configPath)) {
|
|
|
133
129
|
}
|
|
134
130
|
"
|
|
135
131
|
|
|
136
|
-
#
|
|
132
|
+
# 6. Ensure apiKey is present for /model picker (but DON'T override default model)
|
|
137
133
|
echo "→ Finalizing setup..."
|
|
138
134
|
node -e "
|
|
139
135
|
const os = require('os');
|
|
@@ -164,6 +160,10 @@ if (fs.existsSync(configPath)) {
|
|
|
164
160
|
}
|
|
165
161
|
"
|
|
166
162
|
|
|
163
|
+
# 7. Install plugin (done last so it starts with correct config)
|
|
164
|
+
echo "→ Installing ClawRouter..."
|
|
165
|
+
openclaw plugins install @blockrun/clawrouter
|
|
166
|
+
|
|
167
167
|
echo ""
|
|
168
168
|
echo "✓ Done! Smart routing enabled by default."
|
|
169
169
|
echo ""
|