@simonyea/holysheep-cli 2.1.58 → 2.1.59

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.
@@ -4086,11 +4086,11 @@ var require_package = __commonJS({
4086
4086
  "package.json"(exports2, module2) {
4087
4087
  module2.exports = {
4088
4088
  name: "@simonyea/holysheep-cli",
4089
- version: "2.1.58",
4089
+ version: "2.1.59",
4090
4090
  description: "Claude Code/Cursor/Cline API relay for China \u2014 \xA51=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
4091
4091
  scripts: {
4092
4092
  build: "node scripts/build.mjs",
4093
- test: "node tests/droid.test.js && node tests/workspace-store.test.js && node tests/runtime-stale-upgrade.test.js && node tests/hermes.test.js && node tests/preflight.test.js && node tests/opencode-auth-purge.test.js && node tests/shell-winpath.test.js && node tests/openclaw-atomic-write.test.js && node tests/openclaw-disable-auth-direct.test.js && node tests/opencode-default-model.test.js && node tests/paths-bundled.test.js && node tests/aionui-runtime-resources.test.js && node tests/aionui-wrapper-claude-proxy.test.js && node tests/aionui-wrapper-probe.test.js && node tests/aionui-wrapper-proxy-integration.test.js && node tests/aionui-wrapper-all-clis-autoconf.test.js && node tests/aionui-wrapper-env-signal.test.js && node tests/aionui-wrapper-csp-rewrite.test.js && node tests/aionui-wrapper-version-status.test.js && node tests/version-check.test.js && node tests/runclaude-missing-binary.test.js",
4093
+ test: "node tests/droid.test.js && node tests/workspace-store.test.js && node tests/runtime-stale-upgrade.test.js && node tests/hermes.test.js && node tests/preflight.test.js && node tests/opencode-auth-purge.test.js && node tests/shell-winpath.test.js && node tests/openclaw-atomic-write.test.js && node tests/openclaw-disable-auth-direct.test.js && node tests/opencode-default-model.test.js && node tests/paths-bundled.test.js && node tests/aionui-runtime-resources.test.js && node tests/aionui-wrapper-claude-proxy.test.js && node tests/aionui-wrapper-probe.test.js && node tests/aionui-wrapper-proxy-integration.test.js && node tests/aionui-wrapper-all-clis-autoconf.test.js && node tests/aionui-wrapper-env-signal.test.js && node tests/aionui-wrapper-csp-rewrite.test.js && node tests/aionui-wrapper-version-status.test.js && node tests/acptypes-patch.test.js && node tests/version-check.test.js && node tests/runclaude-missing-binary.test.js",
4094
4094
  prepublishOnly: "npm run build && npm test && node scripts/check-tarball-size.js"
4095
4095
  },
4096
4096
  keywords: [
package/dist/index.js CHANGED
@@ -12,11 +12,11 @@ var require_package = __commonJS({
12
12
  "package.json"(exports2, module2) {
13
13
  module2.exports = {
14
14
  name: "@simonyea/holysheep-cli",
15
- version: "2.1.58",
15
+ version: "2.1.59",
16
16
  description: "Claude Code/Cursor/Cline API relay for China \u2014 \xA51=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
17
17
  scripts: {
18
18
  build: "node scripts/build.mjs",
19
- test: "node tests/droid.test.js && node tests/workspace-store.test.js && node tests/runtime-stale-upgrade.test.js && node tests/hermes.test.js && node tests/preflight.test.js && node tests/opencode-auth-purge.test.js && node tests/shell-winpath.test.js && node tests/openclaw-atomic-write.test.js && node tests/openclaw-disable-auth-direct.test.js && node tests/opencode-default-model.test.js && node tests/paths-bundled.test.js && node tests/aionui-runtime-resources.test.js && node tests/aionui-wrapper-claude-proxy.test.js && node tests/aionui-wrapper-probe.test.js && node tests/aionui-wrapper-proxy-integration.test.js && node tests/aionui-wrapper-all-clis-autoconf.test.js && node tests/aionui-wrapper-env-signal.test.js && node tests/aionui-wrapper-csp-rewrite.test.js && node tests/aionui-wrapper-version-status.test.js && node tests/version-check.test.js && node tests/runclaude-missing-binary.test.js",
19
+ test: "node tests/droid.test.js && node tests/workspace-store.test.js && node tests/runtime-stale-upgrade.test.js && node tests/hermes.test.js && node tests/preflight.test.js && node tests/opencode-auth-purge.test.js && node tests/shell-winpath.test.js && node tests/openclaw-atomic-write.test.js && node tests/openclaw-disable-auth-direct.test.js && node tests/opencode-default-model.test.js && node tests/paths-bundled.test.js && node tests/aionui-runtime-resources.test.js && node tests/aionui-wrapper-claude-proxy.test.js && node tests/aionui-wrapper-probe.test.js && node tests/aionui-wrapper-proxy-integration.test.js && node tests/aionui-wrapper-all-clis-autoconf.test.js && node tests/aionui-wrapper-env-signal.test.js && node tests/aionui-wrapper-csp-rewrite.test.js && node tests/aionui-wrapper-version-status.test.js && node tests/acptypes-patch.test.js && node tests/version-check.test.js && node tests/runclaude-missing-binary.test.js",
20
20
  prepublishOnly: "npm run build && npm test && node scripts/check-tarball-size.js"
21
21
  },
22
22
  keywords: [
@@ -8945,12 +8945,15 @@ ${installCmd}
8945
8945
  handleToolConfigure,
8946
8946
  handleToolReset,
8947
8947
  handleToolLaunch,
8948
+ handleToolUpgrade,
8949
+ handleUpgrade,
8948
8950
  handleBalance,
8949
8951
  handleDoctor,
8950
8952
  handleWhoami,
8951
8953
  handleStatus,
8952
8954
  handleModels,
8953
- handleEnv
8955
+ handleEnv,
8956
+ UPGRADABLE_TOOLS
8954
8957
  };
8955
8958
  }
8956
8959
  });
@@ -9402,6 +9405,87 @@ var require_aionui_wrapper = __commonJS({
9402
9405
  d.addEventListener('click',function(){if(d.parentNode)d.parentNode.removeChild(d);sessionStorage.setItem(DISMISS_KEY,'1')});
9403
9406
  setTimeout(function(){if(d.parentNode)d.parentNode.removeChild(d);},30000);
9404
9407
  })();
9408
+ // [v2.1.59] CLI upgrade panel \u2014 floating "\u{1F527} CLI \u5DE5\u5177" button bottom-left
9409
+ (function(){
9410
+ var btn=el('div','position:fixed;bottom:16px;left:16px;z-index:99998;background:#2d3748;color:#fff;padding:8px 14px;border-radius:20px;font-size:12px;cursor:pointer;box-shadow:0 2px 8px rgba(0,0,0,.2);user-select:none','\u{1F527} CLI \u5DE5\u5177');
9411
+ btn.title='\u67E5\u770B/\u5347\u7EA7\u6240\u6709 CLI \u5DE5\u5177';
9412
+ document.body.appendChild(btn);
9413
+ var panel=null;
9414
+ btn.addEventListener('click',function(){
9415
+ if(panel){if(panel.parentNode)panel.parentNode.removeChild(panel);panel=null;return}
9416
+ panel=el('div','position:fixed;bottom:56px;left:16px;z-index:99998;background:#fff;color:#222;width:420px;max-height:70vh;overflow-y:auto;border-radius:8px;box-shadow:0 4px 20px rgba(0,0,0,.25);padding:16px;font-size:13px',
9417
+ '<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px"><b>CLI \u5DE5\u5177\u7BA1\u7406</b><span id="hs-cli-close" style="cursor:pointer;font-size:16px;color:#999">\xD7</span></div>'+
9418
+ '<div id="hs-cli-list" style="color:#666">\u52A0\u8F7D\u4E2D...</div>'+
9419
+ '<div id="hs-cli-log" style="margin-top:12px;font-size:11px;background:#1e1e1e;color:#0f0;padding:8px;border-radius:4px;max-height:200px;overflow-y:auto;display:none;font-family:monospace;white-space:pre-wrap"></div>');
9420
+ document.body.appendChild(panel);
9421
+ panel.querySelector('#hs-cli-close').addEventListener('click',function(){panel.parentNode.removeChild(panel);panel=null});
9422
+ var listEl=panel.querySelector('#hs-cli-list');
9423
+ var logEl=panel.querySelector('#hs-cli-log');
9424
+ function renderTools(tools){
9425
+ if(!tools.length){listEl.innerHTML='<i>\u6CA1\u6709\u53EF\u7528\u7684\u5DE5\u5177\u6570\u636E</i>';return}
9426
+ listEl.innerHTML=tools.map(function(t){
9427
+ var statusBadge=t.installed?(t.configured?'<span style="color:#22c55e">\u25CF\u5DF2\u914D\u7F6E</span>':'<span style="color:#f59e0b">\u25CF\u5DF2\u88C5\u672A\u914D\u7F6E</span>'):'<span style="color:#9ca3af">\u25CB\u672A\u5B89\u88C5</span>';
9428
+ var verText=t.version?'<span style="color:#888;font-size:11px">v'+t.version+'</span>':'';
9429
+ var btns='';
9430
+ if(!t.installed&&t.canAutoInstall)btns+='<button data-act="install" data-id="'+t.id+'" style="margin-left:6px;padding:3px 8px;font-size:11px;background:#3b82f6;color:#fff;border:0;border-radius:3px;cursor:pointer">\u5B89\u88C5</button>';
9431
+ if(t.installed&&t.canUpgrade)btns+='<button data-act="upgrade" data-id="'+t.id+'" style="margin-left:6px;padding:3px 8px;font-size:11px;background:#22c55e;color:#fff;border:0;border-radius:3px;cursor:pointer">\u5347\u7EA7</button>';
9432
+ if(t.installed&&!t.configured)btns+='<button data-act="configure" data-id="'+t.id+'" style="margin-left:6px;padding:3px 8px;font-size:11px;background:#8b5cf6;color:#fff;border:0;border-radius:3px;cursor:pointer">\u914D\u7F6E</button>';
9433
+ return '<div style="padding:8px 0;border-bottom:1px solid #eee;display:flex;justify-content:space-between;align-items:center"><div><b>'+t.name+'</b> '+statusBadge+' '+verText+'</div><div>'+btns+'</div></div>';
9434
+ }).join('')+'<div style="padding-top:10px"><button id="hs-cli-upgrade-all" style="width:100%;padding:8px;background:#16a34a;color:#fff;border:0;border-radius:4px;cursor:pointer;font-weight:600">\u4E00\u952E\u5347\u7EA7\u5168\u90E8\u5DF2\u5B89\u88C5\u7684 CLI</button></div>';
9435
+ Array.prototype.forEach.call(panel.querySelectorAll('button[data-act]'),function(b){
9436
+ b.addEventListener('click',function(){runAction(b.dataset.act,b.dataset.id,b)});
9437
+ });
9438
+ var allBtn=panel.querySelector('#hs-cli-upgrade-all');
9439
+ if(allBtn)allBtn.addEventListener('click',function(){runAllUpgrade(allBtn)});
9440
+ }
9441
+ function runAction(act,id,b){
9442
+ b.disabled=true;b.style.opacity='.5';b.textContent=act==='install'?'\u5B89\u88C5\u4E2D...':act==='upgrade'?'\u5347\u7EA7\u4E2D...':'\u914D\u7F6E\u4E2D...';
9443
+ logEl.style.display='block';logEl.textContent='';
9444
+ var path=act==='install'?'tool/install':act==='upgrade'?'tool/upgrade':'tool/configure';
9445
+ consumeSse('/api/holysheep/'+path,{toolId:id},logEl,function(ok){
9446
+ b.disabled=false;b.style.opacity='1';b.textContent=ok?'\u2713 \u5B8C\u6210':'\u2717 \u5931\u8D25 (\u91CD\u8BD5)';
9447
+ setTimeout(loadTools,500);
9448
+ });
9449
+ }
9450
+ function runAllUpgrade(b){
9451
+ b.disabled=true;b.style.opacity='.5';b.textContent='\u5347\u7EA7\u4E2D...';
9452
+ logEl.style.display='block';logEl.textContent='';
9453
+ consumeSse('/api/holysheep/upgrade',{},logEl,function(ok){
9454
+ b.disabled=false;b.style.opacity='1';b.textContent=ok?'\u2713 \u5168\u90E8\u5347\u7EA7\u5B8C\u6210':'\u2717 \u90E8\u5206\u5931\u8D25';
9455
+ setTimeout(loadTools,500);
9456
+ });
9457
+ }
9458
+ function consumeSse(url,body,logEl,done){
9459
+ fetch(url,{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(body||{})}).then(function(r){
9460
+ var reader=r.body.getReader();var dec=new TextDecoder();var buf='';var ok=true;
9461
+ function pump(){
9462
+ reader.read().then(function(s){
9463
+ if(s.done){return done(ok)}
9464
+ buf+=dec.decode(s.value,{stream:true});
9465
+ var parts=buf.split('\\n\\n');buf=parts.pop();
9466
+ parts.forEach(function(p){
9467
+ var line=p.split('\\n').find(function(l){return l.startsWith('data:')});
9468
+ if(!line)return;
9469
+ try{
9470
+ var ev=JSON.parse(line.slice(5).trim());
9471
+ if(ev.type==='output'&&ev.text){logEl.textContent+=ev.text;logEl.scrollTop=logEl.scrollHeight}
9472
+ else if(ev.type==='progress'&&ev.message){logEl.textContent+='\u2192 '+ev.message+'\\n';logEl.scrollTop=logEl.scrollHeight}
9473
+ else if(ev.type==='tool'&&ev.status){logEl.textContent+='['+ev.name+'] '+ev.status+(ev.newVer?' v'+ev.newVer:'')+'\\n'}
9474
+ else if(ev.type==='done'){if(ev.success===false)ok=false}
9475
+ }catch(e){}
9476
+ });
9477
+ pump();
9478
+ }).catch(function(e){logEl.textContent+='\\n[\u9519\u8BEF] '+e.message;done(false)})
9479
+ }
9480
+ pump();
9481
+ }).catch(function(e){logEl.textContent='\u8BF7\u6C42\u5931\u8D25: '+e.message;done(false)});
9482
+ }
9483
+ function loadTools(){
9484
+ fetch('/api/holysheep/tools').then(function(r){return r.json()}).then(renderTools).catch(function(e){listEl.innerHTML='<i style="color:#dc2626">\u52A0\u8F7D\u5931\u8D25: '+e.message+'</i>'});
9485
+ }
9486
+ loadTools();
9487
+ });
9488
+ })();
9405
9489
  // 2) AionUi/CLI upgrade banner \u2014 async fetch
9406
9490
  (function(){
9407
9491
  if(sessionStorage.getItem(UPGRADE_DISMISS_KEY))return;
@@ -9446,6 +9530,24 @@ var require_aionui_wrapper = __commonJS({
9446
9530
  </script>`;
9447
9531
  }
9448
9532
  __name(_buildStartupBannerScript, "_buildStartupBannerScript");
9533
+ function _patchAcpTypesJs(src) {
9534
+ if (!src || typeof src !== "string") return src;
9535
+ let out = src;
9536
+ for (const id of ["qwen", "codebuddy"]) {
9537
+ const re = new RegExp(`(${id}:\\{[^{}]*?enabled:)!0`, "g");
9538
+ out = out.replace(re, "$1!1");
9539
+ }
9540
+ const PRIORITY = ["codex", "claude", "opencode"];
9541
+ const priorityJs = JSON.stringify(PRIORITY);
9542
+ const filterMapRe = /(Object\.entries\([a-z]\)\.filter\(\([^)]*\)=>[^)]*\))\.map\(/;
9543
+ const m = out.match(filterMapRe);
9544
+ if (m) {
9545
+ const sortFn = `.sort(function(a,b){var P=${priorityJs};var ai=P.indexOf(a[0]);var bi=P.indexOf(b[0]);if(ai===-1&&bi===-1)return 0;if(ai===-1)return 1;if(bi===-1)return -1;return ai-bi})`;
9546
+ out = out.replace(filterMapRe, m[1] + sortFn + ".map(");
9547
+ }
9548
+ return out;
9549
+ }
9550
+ __name(_patchAcpTypesJs, "_patchAcpTypesJs");
9449
9551
  var BODYLESS_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS"]);
9450
9552
  function proxyHttp(req, res, internalPort) {
9451
9553
  const headers = { ...req.headers };
@@ -9496,6 +9598,25 @@ var require_aionui_wrapper = __commonJS({
9496
9598
  });
9497
9599
  return;
9498
9600
  }
9601
+ const isAcpTypes = /\/assets\/acpTypes-[^/]+\.js(\?|$)/.test(req.url || "");
9602
+ if (isAcpTypes && (upRes.statusCode || 0) < 400) {
9603
+ delete outHeaders["content-length"];
9604
+ delete outHeaders["content-encoding"];
9605
+ res.writeHead(upRes.statusCode, upRes.statusMessage, outHeaders);
9606
+ const chunks = [];
9607
+ upRes.on("data", (c) => chunks.push(c));
9608
+ upRes.on("end", () => {
9609
+ const src = Buffer.concat(chunks).toString("utf8");
9610
+ res.end(_patchAcpTypesJs(src));
9611
+ });
9612
+ upRes.on("error", () => {
9613
+ try {
9614
+ res.end();
9615
+ } catch {
9616
+ }
9617
+ });
9618
+ return;
9619
+ }
9499
9620
  res.writeHead(upRes.statusCode, upRes.statusMessage, outHeaders);
9500
9621
  upRes.pipe(res);
9501
9622
  });
@@ -9668,6 +9789,12 @@ var require_aionui_wrapper = __commonJS({
9668
9789
  if (route === "/api/holysheep/tool/launch" && req.method === "POST") {
9669
9790
  return await legacy().handleToolLaunch(req, res);
9670
9791
  }
9792
+ if (route === "/api/holysheep/tool/upgrade" && req.method === "POST") {
9793
+ return await legacy().handleToolUpgrade(req, res);
9794
+ }
9795
+ if (route === "/api/holysheep/upgrade" && req.method === "POST") {
9796
+ return await legacy().handleUpgrade(req, res);
9797
+ }
9671
9798
  if (route === "/api/holysheep/__wrapper/healthz") {
9672
9799
  return sendJson(res, 200, {
9673
9800
  ok: true,
@@ -10314,7 +10441,9 @@ ${tail.split(/\r?\n/).map((ln) => ` ${ln}`).join("\n")}
10314
10441
  _getVersionStatus,
10315
10442
  _semverCmp,
10316
10443
  _readNpmCacheLatest,
10317
- VERSION_CACHE_FILE
10444
+ VERSION_CACHE_FILE,
10445
+ // [HolySheep v2.1.59] acpTypes JS rewrite for agent ordering / hiding
10446
+ _patchAcpTypesJs
10318
10447
  };
10319
10448
  }
10320
10449
  });
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.58",
3
+ "version": "2.1.59",
4
4
  "description": "Claude Code/Cursor/Cline API relay for China — ¥1=$1, WeChat/Alipay payment, no credit card, no VPN. One command setup for all AI coding tools.",
5
5
  "scripts": {
6
6
  "build": "node scripts/build.mjs",
7
- "test": "node tests/droid.test.js && node tests/workspace-store.test.js && node tests/runtime-stale-upgrade.test.js && node tests/hermes.test.js && node tests/preflight.test.js && node tests/opencode-auth-purge.test.js && node tests/shell-winpath.test.js && node tests/openclaw-atomic-write.test.js && node tests/openclaw-disable-auth-direct.test.js && node tests/opencode-default-model.test.js && node tests/paths-bundled.test.js && node tests/aionui-runtime-resources.test.js && node tests/aionui-wrapper-claude-proxy.test.js && node tests/aionui-wrapper-probe.test.js && node tests/aionui-wrapper-proxy-integration.test.js && node tests/aionui-wrapper-all-clis-autoconf.test.js && node tests/aionui-wrapper-env-signal.test.js && node tests/aionui-wrapper-csp-rewrite.test.js && node tests/aionui-wrapper-version-status.test.js && node tests/version-check.test.js && node tests/runclaude-missing-binary.test.js",
7
+ "test": "node tests/droid.test.js && node tests/workspace-store.test.js && node tests/runtime-stale-upgrade.test.js && node tests/hermes.test.js && node tests/preflight.test.js && node tests/opencode-auth-purge.test.js && node tests/shell-winpath.test.js && node tests/openclaw-atomic-write.test.js && node tests/openclaw-disable-auth-direct.test.js && node tests/opencode-default-model.test.js && node tests/paths-bundled.test.js && node tests/aionui-runtime-resources.test.js && node tests/aionui-wrapper-claude-proxy.test.js && node tests/aionui-wrapper-probe.test.js && node tests/aionui-wrapper-proxy-integration.test.js && node tests/aionui-wrapper-all-clis-autoconf.test.js && node tests/aionui-wrapper-env-signal.test.js && node tests/aionui-wrapper-csp-rewrite.test.js && node tests/aionui-wrapper-version-status.test.js && node tests/acptypes-patch.test.js && node tests/version-check.test.js && node tests/runclaude-missing-binary.test.js",
8
8
  "prepublishOnly": "npm run build && npm test && node scripts/check-tarball-size.js"
9
9
  },
10
10
  "keywords": [