create-openclaw-bot 5.6.4 → 5.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/cli.js +36 -19
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -191,14 +191,13 @@ function resolveNative9RouterDesktopLaunch() {
|
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
function build9RouterSmartRouteSyncScript(dbPath) {
|
|
195
|
-
const safeDbPath = JSON.stringify(dbPath);
|
|
196
|
-
return `function bootstrap() {
|
|
197
|
-
const fs = require('fs');
|
|
198
|
-
const path = require('path');
|
|
199
|
-
const
|
|
200
|
-
const
|
|
201
|
-
const ROUTER='http://localhost:20128';
|
|
194
|
+
function build9RouterSmartRouteSyncScript(dbPath) {
|
|
195
|
+
const safeDbPath = JSON.stringify(dbPath);
|
|
196
|
+
return `function bootstrap() {
|
|
197
|
+
const fs = require('fs');
|
|
198
|
+
const path = require('path');
|
|
199
|
+
const dbPath = ${safeDbPath};
|
|
200
|
+
const ROUTER='http://localhost:20128';
|
|
202
201
|
const MODEL_PRIORITY = {
|
|
203
202
|
openai: ['openai/gpt-4o', 'openai/gpt-4.1'],
|
|
204
203
|
anthropic: ['anthropic/claude-sonnet-4', 'anthropic/claude-haiku-3.5'],
|
|
@@ -865,14 +864,23 @@ async function runUpgradeCommand() {
|
|
|
865
864
|
}
|
|
866
865
|
}
|
|
867
866
|
|
|
868
|
-
function startNative9RouterPm2({ isVi, projectDir, appName, syncScriptPath }) {
|
|
869
|
-
const routerAppName = `${appName}-9router`;
|
|
870
|
-
const routerLaunch = resolveNative9RouterDesktopLaunch();
|
|
871
|
-
const normalizedProjectDir = projectDir.replace(/\\/g, '/');
|
|
872
|
-
const normalizedSyncScriptPath = syncScriptPath ? syncScriptPath.replace(/\\/g, '/') : '';
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
867
|
+
function startNative9RouterPm2({ isVi, projectDir, appName, syncScriptPath }) {
|
|
868
|
+
const routerAppName = `${appName}-9router`;
|
|
869
|
+
const routerLaunch = resolveNative9RouterDesktopLaunch();
|
|
870
|
+
const normalizedProjectDir = projectDir.replace(/\\/g, '/');
|
|
871
|
+
const normalizedSyncScriptPath = syncScriptPath ? syncScriptPath.replace(/\\/g, '/') : '';
|
|
872
|
+
try {
|
|
873
|
+
execSync(`pm2 delete ${routerAppName}`, {
|
|
874
|
+
cwd: projectDir,
|
|
875
|
+
stdio: 'ignore',
|
|
876
|
+
shell: true
|
|
877
|
+
});
|
|
878
|
+
} catch {
|
|
879
|
+
// ignore missing app
|
|
880
|
+
}
|
|
881
|
+
execFileSync('pm2', [
|
|
882
|
+
'start',
|
|
883
|
+
routerLaunch.command,
|
|
876
884
|
'--name',
|
|
877
885
|
routerAppName,
|
|
878
886
|
'--cwd',
|
|
@@ -888,15 +896,24 @@ function startNative9RouterPm2({ isVi, projectDir, appName, syncScriptPath }) {
|
|
|
888
896
|
});
|
|
889
897
|
if (syncScriptPath) {
|
|
890
898
|
const syncAppName = `${appName}-9router-sync`;
|
|
899
|
+
try {
|
|
900
|
+
execSync(`pm2 delete ${syncAppName}`, {
|
|
901
|
+
cwd: projectDir,
|
|
902
|
+
stdio: 'ignore',
|
|
903
|
+
shell: true
|
|
904
|
+
});
|
|
905
|
+
} catch {
|
|
906
|
+
// ignore missing app
|
|
907
|
+
}
|
|
891
908
|
execFileSync('pm2', [
|
|
892
909
|
'start',
|
|
893
|
-
|
|
910
|
+
normalizedSyncScriptPath,
|
|
894
911
|
'--name',
|
|
895
912
|
syncAppName,
|
|
896
913
|
'--cwd',
|
|
897
914
|
normalizedProjectDir,
|
|
898
|
-
'--',
|
|
899
|
-
|
|
915
|
+
'--interpreter',
|
|
916
|
+
process.execPath
|
|
900
917
|
], {
|
|
901
918
|
cwd: projectDir,
|
|
902
919
|
stdio: 'inherit',
|