@aiyiran/myclaw 1.1.72 → 1.1.73

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.
Files changed (2) hide show
  1. package/index.js +26 -26
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -256,7 +256,7 @@ function runLock42() {
256
256
  try {
257
257
  const ver = execSync('openclaw --version', { encoding: 'utf8' }).trim();
258
258
  console.log('[验证] ' + colors.green + ver + colors.nc);
259
- } catch {}
259
+ } catch { }
260
260
 
261
261
  console.log('');
262
262
  console.log(bar);
@@ -920,7 +920,7 @@ function createDesktopShortcut(url) {
920
920
  );
921
921
  }
922
922
  for (const d of candidates) {
923
- try { if (fs.existsSync(d)) return d; } catch {}
923
+ try { if (fs.existsSync(d)) return d; } catch { }
924
924
  }
925
925
  return null;
926
926
  }
@@ -954,7 +954,7 @@ URL=${url}
954
954
  Icon=text-html
955
955
  `;
956
956
  fs.writeFileSync(desktop, content, 'utf8');
957
- try { execSync('chmod +x "' + desktop + '"', { stdio: 'pipe' }); } catch {}
957
+ try { execSync('chmod +x "' + desktop + '"', { stdio: 'pipe' }); } catch { }
958
958
  console.log('[shortcut] ✅ 桌面快捷方式已更新: OpenClaw.desktop');
959
959
  } else if (platform === 'win32') {
960
960
  // Windows: .url 文件(Internet Shortcut),Windows 原生支持,双击在默认浏览器打开
@@ -1505,11 +1505,11 @@ const MACHINE_CONFIG = [
1505
1505
  { name: 'Mo靖宇', claw: 'claw4', desc: 'Mo靖宇 的机器' },
1506
1506
  { name: '高兴', claw: 'claw5', desc: '高兴 的机器' },
1507
1507
  { name: '伊伊', claw: 'claw6', desc: '伊伊 的机器' },
1508
- { name: '雨熙', claw: 'claw7', desc: '雨熙 的机器' },
1509
- { name: '绍博', claw: 'claw8', desc: '绍博 的机器' },
1508
+ { name: 'Thomas', claw: 'claw7', desc: 'Thomas 的机器' },
1509
+ { name: 'Eric', claw: 'claw8', desc: 'Eric 的机器' },
1510
1510
  { name: 'Mia', claw: 'claw9', desc: 'Mia 的机器' },
1511
- { name: 'Thomas', claw: 'claw10', desc: 'Thomas 的机器' },
1512
- { name: 'Eric', claw: 'claw11', desc: 'Eric 的机器' },
1511
+ { name: '雨熙', claw: 'claw10', desc: '雨熙 的机器' },
1512
+ { name: '绍博', claw: 'claw11', desc: '绍博 的机器' },
1513
1513
  ];
1514
1514
 
1515
1515
  function openMachine(selected) {
@@ -1846,7 +1846,7 @@ function runSyncTemplates() {
1846
1846
  let data = '';
1847
1847
  res.on('data', chunk => data += chunk);
1848
1848
  res.on('end', () => {
1849
- try { cb(null, JSON.parse(data)); } catch(e) { cb(e); }
1849
+ try { cb(null, JSON.parse(data)); } catch (e) { cb(e); }
1850
1850
  });
1851
1851
  }).on('error', cb);
1852
1852
  }
@@ -2085,20 +2085,20 @@ function runDelete() {
2085
2085
 
2086
2086
  const isDeep = args.includes('--deep'); // 加 --deep 则自动执行阶段2,不询问
2087
2087
 
2088
- const G = colors.green;
2089
- const Y = colors.yellow;
2090
- const R = colors.red;
2091
- const B = colors.blue;
2092
- const D = colors.dim;
2088
+ const G = colors.green;
2089
+ const Y = colors.yellow;
2090
+ const R = colors.red;
2091
+ const B = colors.blue;
2092
+ const D = colors.dim;
2093
2093
  const NC = colors.nc;
2094
2094
 
2095
2095
  const BAR = '─'.repeat(52);
2096
2096
 
2097
2097
  function fmtDate(ms) {
2098
2098
  if (!ms) return '未知';
2099
- const d = new Date(ms);
2099
+ const d = new Date(ms);
2100
2100
  const pad = n => String(n).padStart(2, '0');
2101
- return `${d.getFullYear()}/${pad(d.getMonth()+1)}/${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
2101
+ return `${d.getFullYear()}/${pad(d.getMonth() + 1)}/${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}`;
2102
2102
  }
2103
2103
 
2104
2104
  function fmtStatus(ag) {
@@ -2113,9 +2113,9 @@ function runDelete() {
2113
2113
  console.log(D + ' 序号 状态 ID 会话 最后更新' + NC);
2114
2114
  console.log(D + ' ─────────────────────────────────────────────────────' + NC);
2115
2115
  agents.forEach((ag, i) => {
2116
- const num = String(i + 1).padStart(3, ' ');
2117
- const idPad = ag.id.padEnd(28, ' ').slice(0, 28);
2118
- const cnt = String(ag.sessionCount).padStart(4, ' ');
2116
+ const num = String(i + 1).padStart(3, ' ');
2117
+ const idPad = ag.id.padEnd(28, ' ').slice(0, 28);
2118
+ const cnt = String(ag.sessionCount).padStart(4, ' ');
2119
2119
  const updated = fmtDate(ag.lastUpdated);
2120
2120
  console.log(` ${num}. ${fmtStatus(ag)} ${idPad} ${cnt} ${D}${updated}${NC}`);
2121
2121
  });
@@ -2317,20 +2317,20 @@ function runListAgents() {
2317
2317
  return;
2318
2318
  }
2319
2319
 
2320
- const G = colors.green;
2321
- const Y = colors.yellow;
2322
- const D = colors.dim;
2320
+ const G = colors.green;
2321
+ const Y = colors.yellow;
2322
+ const D = colors.dim;
2323
2323
  const NC = colors.nc;
2324
2324
 
2325
2325
  console.log('');
2326
2326
  console.log('序号 状态 ID 会话 最后更新');
2327
2327
  console.log('─'.repeat(62));
2328
2328
  agents.forEach((ag, i) => {
2329
- const num = String(i + 1).padStart(3);
2330
- const idPad = ag.id.padEnd(28).slice(0, 28);
2331
- const cnt = String(ag.sessionCount).padStart(4);
2332
- const date = ag.lastUpdated ? new Date(ag.lastUpdated).toLocaleDateString('zh-CN') : '未知';
2333
- const status = ag.inJson ? G + '● 已注册' + NC : Y + '○ 孤立 ' + NC;
2329
+ const num = String(i + 1).padStart(3);
2330
+ const idPad = ag.id.padEnd(28).slice(0, 28);
2331
+ const cnt = String(ag.sessionCount).padStart(4);
2332
+ const date = ag.lastUpdated ? new Date(ag.lastUpdated).toLocaleDateString('zh-CN') : '未知';
2333
+ const status = ag.inJson ? G + '● 已注册' + NC : Y + '○ 孤立 ' + NC;
2334
2334
  console.log(`${num}. ${status} ${idPad} ${cnt} ${D}${date}${NC}`);
2335
2335
  });
2336
2336
  console.log('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.1.72",
3
+ "version": "1.1.73",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {