@aiyiran/myclaw 1.0.258 → 1.0.259

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.
@@ -1042,6 +1042,49 @@ btn.addEventListener("click", function () {
1042
1042
 
1043
1043
  form.appendChild(delRow);
1044
1044
 
1045
+ // ── 锁定版本 4.2 按钮 ──
1046
+ var lockRow = document.createElement("div");
1047
+ lockRow.style.cssText = [
1048
+ "padding:10px 14px",
1049
+ "background:#252536",
1050
+ "border-radius:6px",
1051
+ "cursor:pointer",
1052
+ "transition:background 0.15s",
1053
+ "display:flex",
1054
+ "align-items:center",
1055
+ "gap:10px",
1056
+ ].join(";");
1057
+ lockRow.onmouseenter = function () { lockRow.style.background = "#2f2f4a"; };
1058
+ lockRow.onmouseleave = function () { lockRow.style.background = "#252536"; };
1059
+
1060
+ var lockBar = document.createElement("div");
1061
+ lockBar.style.cssText = "width:3px;height:28px;border-radius:2px;background:#f59e0b;flex-shrink:0;";
1062
+ lockRow.appendChild(lockBar);
1063
+
1064
+ var lockInfo = document.createElement("div");
1065
+ lockInfo.style.cssText = "flex:1;display:flex;flex-direction:column;gap:2px;";
1066
+
1067
+ var lockName = document.createElement("div");
1068
+ lockName.textContent = "\uD83D\uDD12 \u9501\u5B9A\u7248\u672C 4.2";
1069
+ lockName.style.cssText = "font-size:13px;font-weight:bold;color:#f59e0b;";
1070
+ lockInfo.appendChild(lockName);
1071
+
1072
+ var lockDesc = document.createElement("div");
1073
+ lockDesc.textContent = "\u5207\u6362\u5230\u7A33\u5B9A\u7248\u672C openclaw@2026.4.2";
1074
+ lockDesc.style.cssText = "font-size:11px;color:#888;";
1075
+ lockInfo.appendChild(lockDesc);
1076
+
1077
+ lockRow.appendChild(lockInfo);
1078
+
1079
+ var lockArrow = document.createElement("div");
1080
+ lockArrow.textContent = "\u25B6";
1081
+ lockArrow.style.cssText = "color:#555;font-size:10px;";
1082
+ lockRow.appendChild(lockArrow);
1083
+
1084
+ lockRow.onclick = function () { runCommand("mc lock4.2"); };
1085
+
1086
+ form.appendChild(lockRow);
1087
+
1045
1088
  // 删除伙伴 - 双重确认弹框
1046
1089
  function showDeleteConfirm() {
1047
1090
  var mask = document.createElement("div");
package/index.js CHANGED
@@ -220,8 +220,19 @@ function runLock42() {
220
220
  console.log(bar);
221
221
  console.log('');
222
222
 
223
- // 1. 卸载
224
- console.log('[1/2] 🗑️ 卸载当前 openclaw...');
223
+ // 1. 设置中国镜像
224
+ console.log('[1/3] 🌐 设置 npm 中国镜像...');
225
+ try {
226
+ execSync('npm config set registry https://registry.npmmirror.com', { stdio: 'inherit' });
227
+ const registry = execSync('npm config get registry', { encoding: 'utf8' }).trim();
228
+ console.log(' ' + colors.green + '✓ ' + registry + colors.nc);
229
+ } catch (err) {
230
+ console.log(' ' + colors.yellow + '⚠ 镜像设置跳过' + colors.nc);
231
+ }
232
+ console.log('');
233
+
234
+ // 2. 卸载
235
+ console.log('[2/3] 🗑️ 卸载当前 openclaw...');
225
236
  try {
226
237
  execSync('npm uninstall -g openclaw', { stdio: 'inherit' });
227
238
  console.log(' ' + colors.green + '✓ 卸载完成' + colors.nc);
@@ -230,8 +241,8 @@ function runLock42() {
230
241
  }
231
242
  console.log('');
232
243
 
233
- // 2. 安装指定版本
234
- console.log('[2/2] 📦 安装 openclaw@' + TARGET + '...');
244
+ // 3. 安装指定版本
245
+ console.log('[3/3] 📦 安装 openclaw@' + TARGET + '...');
235
246
  try {
236
247
  execSync('npm install -g openclaw@' + TARGET, { stdio: 'inherit' });
237
248
  console.log(' ' + colors.green + '✓ 安装完成' + colors.nc);
@@ -241,7 +252,7 @@ function runLock42() {
241
252
  }
242
253
  console.log('');
243
254
 
244
- // 验证
255
+ // 验证版本
245
256
  try {
246
257
  const ver = execSync('openclaw --version', { encoding: 'utf8' }).trim();
247
258
  console.log('[验证] ' + colors.green + ver + colors.nc);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiyiran/myclaw",
3
- "version": "1.0.258",
3
+ "version": "1.0.259",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {