create-openclaw-bot 5.6.7 → 5.6.8
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 +52 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -186,7 +186,9 @@ function resolveNative9RouterDesktopLaunch() {
|
|
|
186
186
|
args: ['-n', '-H', '0.0.0.0', '-p', '20128', '--skip-update'],
|
|
187
187
|
env: {
|
|
188
188
|
PORT: '20128',
|
|
189
|
-
HOSTNAME: '0.0.0.0'
|
|
189
|
+
HOSTNAME: '0.0.0.0',
|
|
190
|
+
// Ensures 9router stores data in the user home dir, matching where sync script writes db.json
|
|
191
|
+
DATA_DIR: getNative9RouterDataDir(),
|
|
190
192
|
}
|
|
191
193
|
};
|
|
192
194
|
}
|
|
@@ -198,10 +200,32 @@ function build9RouterSmartRouteSyncScript(dbPath) {
|
|
|
198
200
|
const path = require('path');
|
|
199
201
|
const dbPath = ${safeDbPath};
|
|
200
202
|
const ROUTER='http://localhost:20128';
|
|
201
|
-
const MODEL_PRIORITY = {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
203
|
+
const MODEL_PRIORITY = {
|
|
204
|
+
codex: ['cx/gpt-5.4', 'cx/gpt-5.3-codex', 'cx/gpt-5.3-codex-high', 'cx/gpt-5.2-codex', 'cx/gpt-5.2', 'cx/gpt-5.1-codex-max', 'cx/gpt-5.1-codex', 'cx/gpt-5.1', 'cx/gpt-5-codex'],
|
|
205
|
+
'claude-code': ['cc/claude-opus-4-6', 'cc/claude-sonnet-4-6', 'cc/claude-opus-4-5-20251101', 'cc/claude-sonnet-4-5-20250929', 'cc/claude-haiku-4-5-20251001'],
|
|
206
|
+
github: ['gh/gpt-5.4', 'gh/gpt-5.3-codex', 'gh/gpt-5.2-codex', 'gh/gpt-5.2', 'gh/gpt-5.1-codex-max', 'gh/gpt-5.1-codex', 'gh/gpt-5.1', 'gh/gpt-5', 'gh/gpt-4.1', 'gh/gpt-4o', 'gh/claude-opus-4.6', 'gh/claude-sonnet-4.6', 'gh/claude-sonnet-4.5', 'gh/claude-opus-4.5', 'gh/claude-haiku-4.5', 'gh/gemini-3-pro-preview', 'gh/gemini-3-flash-preview', 'gh/gemini-2.5-pro'],
|
|
207
|
+
cursor: ['cu/default', 'cu/claude-4.6-opus-max', 'cu/claude-4.5-opus-high-thinking', 'cu/claude-4.5-sonnet-thinking', 'cu/claude-4.5-sonnet', 'cu/gpt-5.3-codex', 'cu/gpt-5.2-codex', 'cu/gemini-3-flash-preview'],
|
|
208
|
+
kilo: ['kc/anthropic/claude-sonnet-4-20250514', 'kc/anthropic/claude-opus-4-20250514', 'kc/google/gemini-2.5-pro', 'kc/google/gemini-2.5-flash', 'kc/openai/gpt-4.1', 'kc/deepseek/deepseek-chat'],
|
|
209
|
+
cline: ['cl/anthropic/claude-sonnet-4.6', 'cl/anthropic/claude-opus-4.6', 'cl/openai/gpt-5.3-codex', 'cl/openai/gpt-5.4', 'cl/google/gemini-3.1-pro-preview'],
|
|
210
|
+
'gemini-cli': ['gc/gemini-3-flash-preview', 'gc/gemini-3-pro-preview'],
|
|
211
|
+
iflow: ['if/qwen3-coder-plus', 'if/kimi-k2', 'if/kimi-k2-thinking', 'if/glm-4.7', 'if/deepseek-r1', 'if/deepseek-v3.2', 'if/deepseek-v3', 'if/qwen3-max', 'if/qwen3-235b', 'if/iflow-rome-30ba3b'],
|
|
212
|
+
qwen: ['qw/qwen3-coder-plus', 'qw/qwen3-coder-flash', 'qw/vision-model', 'qw/coder-model'],
|
|
213
|
+
kiro: ['kr/claude-sonnet-4.5', 'kr/claude-haiku-4.5', 'kr/deepseek-3.2', 'kr/deepseek-3.1', 'kr/qwen3-coder-next'],
|
|
214
|
+
ollama: ['ollama/gemma4:e2b', 'ollama/gemma4:e4b', 'ollama/gemma4:26b', 'ollama/gemma4:31b', 'ollama/qwen3.5', 'ollama/kimi-k2.5', 'ollama/glm-5', 'ollama/glm-4.7-flash', 'ollama/minimax-m2.5', 'ollama/gpt-oss:120b'],
|
|
215
|
+
'kimi-coding': ['kmc/kimi-k2.5', 'kmc/kimi-k2.5-thinking', 'kmc/kimi-latest'],
|
|
216
|
+
glm: ['glm/glm-5.1', 'glm/glm-5', 'glm/glm-4.7'],
|
|
217
|
+
'glm-cn': ['glm/glm-5.1', 'glm/glm-5', 'glm/glm-4.7'],
|
|
218
|
+
minimax: ['minimax/MiniMax-M2.7', 'minimax/MiniMax-M2.5', 'minimax/MiniMax-M2.1'],
|
|
219
|
+
kimi: ['kimi/kimi-k2.5', 'kimi/kimi-k2.5-thinking', 'kimi/kimi-latest'],
|
|
220
|
+
deepseek: ['deepseek/deepseek-chat', 'deepseek/deepseek-reasoner'],
|
|
221
|
+
xai: ['xai/grok-4', 'xai/grok-4-fast-reasoning', 'xai/grok-code-fast-1'],
|
|
222
|
+
mistral: ['mistral/mistral-large-latest', 'mistral/codestral-latest'],
|
|
223
|
+
groq: ['groq/llama-3.3-70b-versatile', 'groq/openai/gpt-oss-120b'],
|
|
224
|
+
cerebras: ['cerebras/gpt-oss-120b'],
|
|
225
|
+
alicode: ['alicode/qwen3.5-plus', 'alicode/qwen3-coder-plus'],
|
|
226
|
+
openai: ['openai/gpt-4o', 'openai/gpt-4.1'],
|
|
227
|
+
anthropic: ['anthropic/claude-sonnet-4', 'anthropic/claude-haiku-3.5'],
|
|
228
|
+
gemini: ['gemini/gemini-2.5-flash', 'gemini/gemini-2.5-pro'],
|
|
205
229
|
};
|
|
206
230
|
const sync = async () => {
|
|
207
231
|
try {
|
|
@@ -429,8 +453,10 @@ function resolveCommandOnPath(command) {
|
|
|
429
453
|
async function writeNative9RouterSyncScript(projectDir) {
|
|
430
454
|
const syncScriptPath = path.join(projectDir, '.openclaw', '9router-smart-route-sync.js');
|
|
431
455
|
await fs.ensureDir(path.dirname(syncScriptPath));
|
|
432
|
-
|
|
433
|
-
|
|
456
|
+
// Use native home data dir so sync script writes to same place 9router binary reads from
|
|
457
|
+
const nativeDataDir = getNative9RouterDataDir();
|
|
458
|
+
await fs.ensureDir(nativeDataDir);
|
|
459
|
+
await fs.writeFile(syncScriptPath, build9RouterSmartRouteSyncScript(path.join(nativeDataDir, 'db.json')));
|
|
434
460
|
return syncScriptPath;
|
|
435
461
|
}
|
|
436
462
|
|
|
@@ -2281,6 +2307,20 @@ async function main() {
|
|
|
2281
2307
|
);
|
|
2282
2308
|
// Generate ecosystem.config.js for PM2 native multi-bot
|
|
2283
2309
|
if (deployMode === 'native') {
|
|
2310
|
+
// Also write config to ~/.openclaw/ — openclaw binary on Linux/Mac reads from home dir
|
|
2311
|
+
const homeClawDir = path.join(os.homedir(), '.openclaw');
|
|
2312
|
+
await fs.ensureDir(homeClawDir);
|
|
2313
|
+
const homeConfig = JSON.parse(JSON.stringify(sharedConfig));
|
|
2314
|
+
for (const agent of (homeConfig.agents && homeConfig.agents.list || [])) {
|
|
2315
|
+
// workspace is relative to projectDir (.openclaw/workspace-X); agentDir is relative to rootClawDir (agents/X/agent)
|
|
2316
|
+
if (agent.workspace && !path.isAbsolute(agent.workspace)) agent.workspace = path.join(projectDir, agent.workspace);
|
|
2317
|
+
if (agent.agentDir && !path.isAbsolute(agent.agentDir)) agent.agentDir = path.join(rootClawDir, agent.agentDir);
|
|
2318
|
+
}
|
|
2319
|
+
await fs.writeJson(path.join(homeClawDir, 'openclaw.json'), homeConfig, { spaces: 2 });
|
|
2320
|
+
if (Object.keys(authProfilesJson).length > 0) {
|
|
2321
|
+
await fs.writeJson(path.join(homeClawDir, 'auth-profiles.json'), authProfilesJson, { spaces: 2 });
|
|
2322
|
+
}
|
|
2323
|
+
const safeRootClawDir = rootClawDir.replace(/\\/g, '/');
|
|
2284
2324
|
const pm2Apps = [
|
|
2285
2325
|
' {',
|
|
2286
2326
|
` name: 'openclaw-multibot',`,
|
|
@@ -2290,7 +2330,11 @@ async function main() {
|
|
|
2290
2330
|
` interpreter: 'none',`,
|
|
2291
2331
|
` autorestart: true,`,
|
|
2292
2332
|
` watch: false,`,
|
|
2293
|
-
` env: {
|
|
2333
|
+
` env: {`,
|
|
2334
|
+
` NODE_ENV: 'production',`,
|
|
2335
|
+
` OPENCLAW_HOME: '\',`,
|
|
2336
|
+
` OPENCLAW_STATE_DIR: '\',`,
|
|
2337
|
+
` }`,
|
|
2294
2338
|
' }',
|
|
2295
2339
|
].join('\n');
|
|
2296
2340
|
const ecosystemContent = [
|