@simonyea/holysheep-cli 2.1.61 → 2.1.63

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.
@@ -3760,6 +3760,15 @@ var require_openclaw = __commonJS({
3760
3760
  get hint() {
3761
3761
  return `Bridge + Gateway \u5DF2\u914D\u7F6E\uFF0C\u9ED8\u8BA4\u6A21\u578B\u4E3A ${getConfiguredPrimaryModel() || OPENCLAW_DEFAULT_MODEL}`;
3762
3762
  },
3763
+ // [v2.1.63] Top-level launchCmd so the hs web CLI panel can show a 启动 button.
3764
+ // Returns the gateway-start command on the configured port.
3765
+ get launchCmd() {
3766
+ try {
3767
+ return getLaunchCommand();
3768
+ } catch {
3769
+ return "openclaw gateway";
3770
+ }
3771
+ },
3763
3772
  get launchSteps() {
3764
3773
  const bridgePort = getConfiguredBridgePort();
3765
3774
  const port = getConfiguredGatewayPort();
@@ -4090,7 +4099,7 @@ var require_package = __commonJS({
4090
4099
  "package.json"(exports2, module2) {
4091
4100
  module2.exports = {
4092
4101
  name: "@simonyea/holysheep-cli",
4093
- version: "2.1.61",
4102
+ version: "2.1.63",
4094
4103
  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.",
4095
4104
  scripts: {
4096
4105
  build: "node scripts/build.mjs",
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var require_package = __commonJS({
12
12
  "package.json"(exports2, module2) {
13
13
  module2.exports = {
14
14
  name: "@simonyea/holysheep-cli",
15
- version: "2.1.61",
15
+ version: "2.1.63",
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",
@@ -4306,6 +4306,15 @@ var require_openclaw = __commonJS({
4306
4306
  get hint() {
4307
4307
  return `Bridge + Gateway \u5DF2\u914D\u7F6E\uFF0C\u9ED8\u8BA4\u6A21\u578B\u4E3A ${getConfiguredPrimaryModel() || OPENCLAW_DEFAULT_MODEL}`;
4308
4308
  },
4309
+ // [v2.1.63] Top-level launchCmd so the hs web CLI panel can show a 启动 button.
4310
+ // Returns the gateway-start command on the configured port.
4311
+ get launchCmd() {
4312
+ try {
4313
+ return getLaunchCommand();
4314
+ } catch {
4315
+ return "openclaw gateway";
4316
+ }
4317
+ },
4309
4318
  get launchSteps() {
4310
4319
  const bridgePort = getConfiguredBridgePort();
4311
4320
  const port = getConfiguredGatewayPort();
@@ -6453,6 +6462,7 @@ var require_gemini_cli = __commonJS({
6453
6462
  return SETTINGS_FILE;
6454
6463
  },
6455
6464
  hint: "Gemini CLI \u4E0D\u652F\u6301 HolySheep \u4E2D\u7EE7\uFF0C\u9700\u4F7F\u7528 Google \u5B98\u65B9 Gemini API Key",
6465
+ launchCmd: "gemini",
6456
6466
  installCmd: "npm install -g @google/gemini-cli",
6457
6467
  docsUrl: "https://github.com/google-gemini/gemini-cli",
6458
6468
  envVarFormat: "gemini",
@@ -9434,13 +9444,42 @@ var require_aionui_wrapper = __commonJS({
9434
9444
  // Only run on /guid (onboarding) and any agent-picker dialogs (we widen
9435
9445
  // it because the picker also appears in chat). Easy heuristic: any page.
9436
9446
  var nodes = document.querySelectorAll('button, li, [role=menuitem], [role=option], [role=listitem], div');
9447
+ var geminiNodes = [];
9437
9448
  for(var i=0;i<nodes.length;i++){
9438
9449
  var hit = shouldHide(nodes[i]);
9439
9450
  if(hit){
9440
9451
  nodes[i].style.display='none';
9441
9452
  nodes[i].dataset.hsHidden=hit;
9453
+ continue;
9442
9454
  }
9443
- }
9455
+ // [v2.1.62] Move Gemini to the end of its sibling list. gemini is an
9456
+ // AionUi-internal agent (not in acpTypes), so the .sort() injected
9457
+ // there can't reach it. Detect by exact-ish text match and re-parent.
9458
+ if(!nodes[i].dataset.hsMovedGemini){
9459
+ var t = (nodes[i].textContent||'').trim();
9460
+ // Match "Gemini" / "Gemini CLI" / "Gemini API" but not "gemini-with-google-auth" deep DOM
9461
+ if(t.length<=40 && /^Gemini( |$|CLI|API|-)/i.test(t)){
9462
+ // Pick the right granularity: a leaf-ish picker item, not the page heading
9463
+ var role = nodes[i].getAttribute && nodes[i].getAttribute('role');
9464
+ var tag = nodes[i].tagName;
9465
+ var isPick = role==='menuitem'||role==='option'||role==='listitem'||tag==='LI'||tag==='BUTTON'||
9466
+ (tag==='DIV'&&nodes[i].children.length<=8&&t.length<60);
9467
+ if(isPick) geminiNodes.push(nodes[i]);
9468
+ }
9469
+ }
9470
+ }
9471
+ // Re-parent each gemini item to be the last child of its parent. Done
9472
+ // after the scan so we don't perturb iteration. Tag dataset to avoid
9473
+ // re-moving on the next observer tick.
9474
+ geminiNodes.forEach(function(g){
9475
+ try{
9476
+ var p = g.parentNode;
9477
+ if(!p) return;
9478
+ if(p.lastChild===g){g.dataset.hsMovedGemini='1';return}
9479
+ p.appendChild(g); // moves existing node to the end
9480
+ g.dataset.hsMovedGemini='1';
9481
+ }catch(e){}
9482
+ });
9444
9483
  }
9445
9484
  sweep();
9446
9485
  if(typeof MutationObserver==='function'){
@@ -9479,9 +9518,13 @@ var require_aionui_wrapper = __commonJS({
9479
9518
  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>';
9480
9519
  var verText=t.version?'<span style="color:#888;font-size:11px">v'+t.version+'</span>':'';
9481
9520
  var btns='';
9482
- 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>';
9483
- 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>';
9484
- 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>';
9521
+ var btnSty='margin-left:4px;padding:3px 8px;font-size:11px;color:#fff;border:0;border-radius:3px;cursor:pointer';
9522
+ if(!t.installed&&t.canAutoInstall)btns+='<button data-act="install" data-id="'+t.id+'" style="'+btnSty+';background:#3b82f6">\u5B89\u88C5</button>';
9523
+ // [v2.1.63] Always show \u5347\u7EA7 button for any installed canUpgrade tool
9524
+ if(t.installed&&t.canUpgrade)btns+='<button data-act="upgrade" data-id="'+t.id+'" style="'+btnSty+';background:#22c55e">\u5347\u7EA7</button>';
9525
+ if(t.installed&&!t.configured)btns+='<button data-act="configure" data-id="'+t.id+'" style="'+btnSty+';background:#8b5cf6">\u914D\u7F6E</button>';
9526
+ // [v2.1.63] \u542F\u52A8 button \u2014 installed + has launchCmd (covers OpenClaw etc.)
9527
+ if(t.installed&&t.launchCmd)btns+='<button data-act="launch" data-id="'+t.id+'" style="'+btnSty+';background:#f59e0b">\u542F\u52A8</button>';
9485
9528
  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>';
9486
9529
  }).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>';
9487
9530
  Array.prototype.forEach.call(panel.querySelectorAll('button[data-act]'),function(b){
@@ -9491,6 +9534,33 @@ var require_aionui_wrapper = __commonJS({
9491
9534
  if(allBtn)allBtn.addEventListener('click',function(){runAllUpgrade(allBtn)});
9492
9535
  }
9493
9536
  function runAction(act,id,b){
9537
+ // [v2.1.63] launch returns plain JSON (not SSE) with { url, ... }
9538
+ if(act==='launch'){
9539
+ b.disabled=true;b.style.opacity='.5';b.textContent='\u542F\u52A8\u4E2D...';
9540
+ logEl.style.display='block';logEl.textContent='\u6B63\u5728\u542F\u52A8 '+id+'...\\n';
9541
+ fetch('/api/holysheep/tool/launch',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({toolId:id})})
9542
+ .then(function(r){return r.json()})
9543
+ .then(function(j){
9544
+ b.disabled=false;b.style.opacity='1';
9545
+ if(j&&j.url){
9546
+ logEl.textContent+='\u5DF2\u542F\u52A8: '+j.url+'\\n';
9547
+ b.textContent='\u2713 \u5DF2\u542F\u52A8';
9548
+ try{ window.open(j.url,'_blank') }catch(e){}
9549
+ }else if(j&&j.success===false){
9550
+ logEl.textContent+='\u542F\u52A8\u5931\u8D25: '+(j.message||j.error||'unknown')+'\\n';
9551
+ b.textContent='\u2717 \u5931\u8D25 (\u91CD\u8BD5)';
9552
+ }else{
9553
+ logEl.textContent+=JSON.stringify(j)+'\\n';
9554
+ b.textContent='\u2713 \u5DF2\u542F\u52A8';
9555
+ }
9556
+ setTimeout(loadTools,500);
9557
+ })
9558
+ .catch(function(e){
9559
+ b.disabled=false;b.style.opacity='1';b.textContent='\u2717 \u5931\u8D25 (\u91CD\u8BD5)';
9560
+ logEl.textContent+='\u8BF7\u6C42\u5931\u8D25: '+e.message+'\\n';
9561
+ });
9562
+ return;
9563
+ }
9494
9564
  b.disabled=true;b.style.opacity='.5';b.textContent=act==='install'?'\u5B89\u88C5\u4E2D...':act==='upgrade'?'\u5347\u7EA7\u4E2D...':'\u914D\u7F6E\u4E2D...';
9495
9565
  logEl.style.display='block';logEl.textContent='';
9496
9566
  var path=act==='install'?'tool/install':act==='upgrade'?'tool/upgrade':'tool/configure';
@@ -9589,7 +9659,7 @@ var require_aionui_wrapper = __commonJS({
9589
9659
  const re = new RegExp(`(${id}:\\{[^{}]*?enabled:)!0`, "g");
9590
9660
  out = out.replace(re, "$1!1");
9591
9661
  }
9592
- const PRIORITY = ["codex", "claude", "opencode"];
9662
+ const PRIORITY = ["codex", "claude", "opencode", "droid"];
9593
9663
  const priorityJs = JSON.stringify(PRIORITY);
9594
9664
  const filterMapRe = /(Object\.entries\([a-z]\)\.filter\(\([^)]*\)=>[^)]*\))\.map\(/;
9595
9665
  const m = out.match(filterMapRe);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.61",
3
+ "version": "2.1.63",
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",