@aiyiran/myclaw 1.0.76 → 1.0.78
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/launch.js +13 -11
- package/package.json +1 -1
- package/wsl2.js +13 -5
package/launch.js
CHANGED
|
@@ -109,17 +109,19 @@ function stepGatewayAndOpen() {
|
|
|
109
109
|
detached: false,
|
|
110
110
|
});
|
|
111
111
|
|
|
112
|
-
//
|
|
113
|
-
console.log('[4/4]
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
112
|
+
// 打开浏览器(延时 3 秒确保 Gateway 充分启动)
|
|
113
|
+
console.log('[4/4] 等待 3 秒后自动打开浏览器...');
|
|
114
|
+
setTimeout(() => {
|
|
115
|
+
try {
|
|
116
|
+
execSync('node "' + path.join(__dirname, 'index.js') + '" open', {
|
|
117
|
+
stdio: 'pipe',
|
|
118
|
+
timeout: 10000,
|
|
119
|
+
});
|
|
120
|
+
console.log(' ' + C.g + '[OK] 浏览器已触发' + C.nc);
|
|
121
|
+
} catch {
|
|
122
|
+
console.log(' ' + C.y + '[跳过] 触发浏览器失败' + C.nc);
|
|
123
|
+
}
|
|
124
|
+
}, 3000);
|
|
123
125
|
console.log('');
|
|
124
126
|
|
|
125
127
|
// 等待 gateway 进程退出(关闭终端会终止)
|
package/package.json
CHANGED
package/wsl2.js
CHANGED
|
@@ -26,8 +26,7 @@ const os = require('os');
|
|
|
26
26
|
|
|
27
27
|
const WSL_CDN = {
|
|
28
28
|
wsl: 'https://cdn.yiranlaoshi.com/software/myclaw/wsl.2.7.1.0.x64.msi',
|
|
29
|
-
|
|
30
|
-
rootfs: 'https://openclaw.ai/wsl/openclaw-rootfs.tar',
|
|
29
|
+
rootfs: 'https://cdn.yiranlaoshi.com/software/myclaw/openclaw-rootfs.tar',
|
|
31
30
|
};
|
|
32
31
|
|
|
33
32
|
const isWindows = os.platform() === 'win32';
|
|
@@ -131,10 +130,9 @@ if ($resolved) {
|
|
|
131
130
|
if ($userInput) {
|
|
132
131
|
Write-Host ' 将改为从网络下载...'
|
|
133
132
|
}
|
|
134
|
-
Write-Host '
|
|
133
|
+
Write-Host ' 正在从网络下载 (带有下载进度条,请耐心等待文件较大)...'
|
|
135
134
|
try {
|
|
136
|
-
|
|
137
|
-
Invoke-WebRequest -Uri '${cdnUrl}' -OutFile ${destVar} -UseBasicParsing
|
|
135
|
+
Start-BitsTransfer -Source '${cdnUrl}' -Destination ${destVar} -Description '下载 OpenClaw 核心镜像' -DisplayName 'OpenClaw'
|
|
138
136
|
Write-Host ' 下载完成!'
|
|
139
137
|
} catch {
|
|
140
138
|
Write-Host ' [失败] 下载失败,请检查网络后重试 myclaw wsl2'
|
|
@@ -356,6 +354,16 @@ if ($installed) {
|
|
|
356
354
|
Write-Host '========================================'
|
|
357
355
|
Write-Host ''
|
|
358
356
|
|
|
357
|
+
# 显示镜像构建信息
|
|
358
|
+
Write-Host '[镜像信息]'
|
|
359
|
+
try {
|
|
360
|
+
$buildInfo = wsl -d $distroName -- cat /etc/openclaw-build-info 2>&1
|
|
361
|
+
Write-Host $buildInfo
|
|
362
|
+
} catch {
|
|
363
|
+
Write-Host ' (无法读取构建信息)'
|
|
364
|
+
}
|
|
365
|
+
Write-Host ''
|
|
366
|
+
|
|
359
367
|
# 统一启动流程:update + patch + gateway + open
|
|
360
368
|
wsl -d $distroName -- myclaw launch
|
|
361
369
|
} else {
|