@aiyiran/myclaw 1.0.127 → 1.0.128

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.0.127",
3
+ "version": "1.0.128",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "_doc": "MyClaw 注入清单 (auto-generated)。strategy: auto | on | off | delete",
3
- "_generated": "2026-04-03T04:10:10.404Z",
3
+ "_generated": "2026-04-03T04:31:22.236Z",
4
4
  "agents": [
5
5
  {
6
6
  "id": "danci",
package/wsl2.js CHANGED
@@ -36,6 +36,10 @@ const C = isWindows
36
36
  const STATE_FILE = path.join(os.homedir(), '.myclaw_wsl_state');
37
37
  const MARKER_PATH_PS = STATE_FILE.replace(/\\/g, '\\\\');
38
38
 
39
+ const WORK_DIR = path.join(os.homedir(), '.myclaw_tmp');
40
+ try { fs.mkdirSync(WORK_DIR, { recursive: true }); } catch {}
41
+ const WORK_DIR_PS = WORK_DIR.replace(/\\/g, '\\\\');
42
+
39
43
  // ============================================================================
40
44
  // 工具函数
41
45
  // ============================================================================
@@ -186,7 +190,7 @@ Write-Host ' 配置系统 + 下载全部安装素材'
186
190
  Write-Host '========================================'
187
191
  Write-Host ''
188
192
 
189
- $dir = "$env:LOCALAPPDATA\\\\myclaw"
193
+ $dir = "${WORK_DIR_PS}"
190
194
  New-Item -ItemType Directory -Force -Path $dir | Out-Null
191
195
  $msi = "$dir\\\\wsl_full.msi"
192
196
  $tarPath = "$dir\\\\openclaw-rootfs.tar"
@@ -246,9 +250,16 @@ Write-Host ''
246
250
  Write-Host '========================================'
247
251
  Write-Host ' 阶段 1/2 完成! 所有文件已准备就绪!'
248
252
  Write-Host ''
249
- Write-Host ' >>> 请立即 [重启电脑] <<<'
253
+ Write-Host ' >>> 需要重启电脑才能继续安装 <<<'
250
254
  Write-Host ''
251
- Write-Host ' 重启后请点击桌面上的 [龙虾图标] 继续安装'
255
+ $answer = Read-Host ' 是否立即重启? 请先保存好其他工作 (y/n)'
256
+ if ($answer -match '^[Yy]') {
257
+ Write-Host ' 正在重启...'
258
+ Restart-Computer -Force
259
+ } else {
260
+ Write-Host ''
261
+ Write-Host ' 请手动重启电脑,重启后点击桌面 [龙虾图标] 继续安装'
262
+ }
252
263
  Write-Host '========================================'
253
264
 
254
265
  } catch {
@@ -298,7 +309,7 @@ Write-Host ' 导入预制 Linux 环境'
298
309
  Write-Host '========================================'
299
310
  Write-Host ''
300
311
 
301
- $dir = "$env:LOCALAPPDATA\\\\myclaw"
312
+ $dir = "${WORK_DIR_PS}"
302
313
  New-Item -ItemType Directory -Force -Path $dir | Out-Null
303
314
  $tarPath = "$dir\\\\openclaw-rootfs.tar"
304
315
  $distroName = 'OpenClaw'