@aiyiran/myclaw 1.1.4 → 1.1.5
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/gateway.js +4 -8
- package/index.js +3 -3
- package/package.json +1 -1
package/gateway.js
CHANGED
|
@@ -143,9 +143,9 @@ function start() {
|
|
|
143
143
|
// 等待启动完成
|
|
144
144
|
execSync(isWin ? 'timeout /t 3 /nobreak >nul' : 'sleep 3', { stdio: 'ignore' });
|
|
145
145
|
|
|
146
|
-
//
|
|
147
|
-
|
|
148
|
-
if (!isWin) {
|
|
146
|
+
// 注册守卫(仅非 Docker 环境)
|
|
147
|
+
const isDocker = require('fs').existsSync('/.dockerenv');
|
|
148
|
+
if (!isWin && !isDocker) {
|
|
149
149
|
try {
|
|
150
150
|
execSync('openclaw gateway install', { stdio: 'pipe', timeout: 10000 });
|
|
151
151
|
console.log('[守卫] ' + colors.green + 'LaunchAgent 已注册,崩溃/重启会自动拉起' + colors.nc);
|
|
@@ -175,11 +175,7 @@ function start() {
|
|
|
175
175
|
function restart() {
|
|
176
176
|
stop();
|
|
177
177
|
console.log('');
|
|
178
|
-
|
|
179
|
-
try {
|
|
180
|
-
execSync('mc up', { stdio: 'inherit' });
|
|
181
|
-
} catch {}
|
|
182
|
-
return result;
|
|
178
|
+
return start();
|
|
183
179
|
}
|
|
184
180
|
|
|
185
181
|
module.exports = { stop, start, restart, PORT };
|
package/index.js
CHANGED
|
@@ -1077,7 +1077,7 @@ function runNuke(cliArgs) {
|
|
|
1077
1077
|
console.log(' 此命令将执行以下操作:');
|
|
1078
1078
|
console.log(' 1. ' + colors.red + 'rm -rf /root/.openclaw' + colors.nc);
|
|
1079
1079
|
console.log(' 2. ' + colors.red + 'rm -rf ~/.openclaw' + colors.nc);
|
|
1080
|
-
console.log(' 3. openclaw onboard --non-interactive --accept-risk --skip-health');
|
|
1080
|
+
console.log(' 3. openclaw onboard --non-interactive --accept-risk --skip-health --install-daemon');
|
|
1081
1081
|
console.log(' 4. mc up');
|
|
1082
1082
|
console.log(' 5. mc patch');
|
|
1083
1083
|
console.log(' 6. mc restart');
|
|
@@ -1119,9 +1119,9 @@ function runNuke(cliArgs) {
|
|
|
1119
1119
|
console.log('');
|
|
1120
1120
|
|
|
1121
1121
|
// Step 3: openclaw onboard
|
|
1122
|
-
console.log('[3/6] openclaw onboard --non-interactive --accept-risk --skip-health');
|
|
1122
|
+
console.log('[3/6] openclaw onboard --non-interactive --accept-risk --skip-health --install-daemon');
|
|
1123
1123
|
try {
|
|
1124
|
-
execSync('openclaw onboard --non-interactive --accept-risk --skip-health', { stdio: 'inherit' });
|
|
1124
|
+
execSync('openclaw onboard --non-interactive --accept-risk --skip-health --install-daemon', { stdio: 'inherit' });
|
|
1125
1125
|
console.log(' ' + colors.green + '✓ 完成' + colors.nc);
|
|
1126
1126
|
} catch (err) {
|
|
1127
1127
|
console.log(' ' + colors.red + '✗ 失败: ' + err.message + colors.nc);
|