@simonyea/holysheep-cli 1.3.6 → 1.3.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/package.json +1 -1
- package/src/tools/openclaw.js +4 -5
package/package.json
CHANGED
package/src/tools/openclaw.js
CHANGED
|
@@ -47,6 +47,7 @@ function writeCorrectConfig(apiKey, baseUrl) {
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
gateway: {
|
|
50
|
+
mode: 'local', // 必须设置,否则 gateway start 被 blocked
|
|
50
51
|
port: 18789,
|
|
51
52
|
bind: 'loopback', // 新格式,不用 "127.0.0.1"
|
|
52
53
|
auth: {
|
|
@@ -136,13 +137,11 @@ module.exports = {
|
|
|
136
137
|
*/
|
|
137
138
|
function _startGateway() {
|
|
138
139
|
if (isWin) {
|
|
139
|
-
// Windows:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
shell: false,
|
|
140
|
+
// Windows: 用 shell:true + start 弹出新窗口运行 gateway
|
|
141
|
+
spawnSync('cmd /c start cmd /k "npx openclaw gateway --port 18789"', [], {
|
|
142
|
+
shell: true,
|
|
143
143
|
timeout: 5000,
|
|
144
144
|
stdio: 'ignore',
|
|
145
|
-
detached: true,
|
|
146
145
|
})
|
|
147
146
|
} else {
|
|
148
147
|
const child = spawn('openclaw', ['gateway', '--port', '18789'], {
|