@simonyea/holysheep-cli 2.1.62 → 2.1.64

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.62",
4102
+ version: "2.1.64",
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.62",
15
+ version: "2.1.64",
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();
@@ -5036,7 +5045,7 @@ var require_setup = __commonJS({
5036
5045
  }
5037
5046
  }
5038
5047
  const MODEL_CHOICES = [
5039
- { name: "gpt-5.4 (GPT 5.4, \u901A\u7528\u7F16\u7801)", value: "gpt-5.4", checked: true },
5048
+ { name: "gpt-5.5 (GPT 5.5, \u901A\u7528\u7F16\u7801)", value: "gpt-5.5", checked: true },
5040
5049
  { name: "gpt-5.3-codex-spark (GPT 5.3 Codex Spark, \u7F16\u7801)", value: "gpt-5.3-codex-spark", checked: true },
5041
5050
  { name: "claude-sonnet-4-6 (Sonnet 4.6, \u5747\u8861\u63A8\u8350)", value: "claude-sonnet-4-6", checked: true },
5042
5051
  { name: "claude-opus-4-7 (Opus 4.7, \u5F3A\u529B\u65D7\u8230)", value: "claude-opus-4-7", checked: true },
@@ -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",
@@ -8165,7 +8175,7 @@ ${installCmd}
8165
8175
  return res.end();
8166
8176
  }
8167
8177
  const allModelIds = [
8168
- "gpt-5.4",
8178
+ "gpt-5.5",
8169
8179
  "gpt-5.3-codex-spark",
8170
8180
  "claude-sonnet-4-6",
8171
8181
  "claude-opus-4-7",
@@ -8588,7 +8598,7 @@ ${installCmd}
8588
8598
  __name(handleEnvClean, "handleEnvClean");
8589
8599
  function handleModels(_req, res) {
8590
8600
  json(res, [
8591
- { id: "gpt-5.4", label: "GPT 5.4", desc: "\u901A\u7528\u7F16\u7801" },
8601
+ { id: "gpt-5.5", label: "GPT 5.5", desc: "\u901A\u7528\u7F16\u7801" },
8592
8602
  { id: "gpt-5.3-codex-spark", label: "GPT 5.3 Codex Spark", desc: "\u7F16\u7801" },
8593
8603
  { id: "claude-sonnet-4-6", label: "Sonnet 4.6", desc: "\u5747\u8861\u63A8\u8350" },
8594
8604
  { id: "claude-sonnet-4-6[1m]", label: "Sonnet 4.6 (1M)", desc: "\u5747\u8861\u63A8\u8350\xB7100\u4E07\u4E0A\u4E0B\u6587" },
@@ -9508,9 +9518,13 @@ var require_aionui_wrapper = __commonJS({
9508
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>';
9509
9519
  var verText=t.version?'<span style="color:#888;font-size:11px">v'+t.version+'</span>':'';
9510
9520
  var btns='';
9511
- 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>';
9512
- 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>';
9513
- 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>';
9514
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>';
9515
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>';
9516
9530
  Array.prototype.forEach.call(panel.querySelectorAll('button[data-act]'),function(b){
@@ -9520,6 +9534,33 @@ var require_aionui_wrapper = __commonJS({
9520
9534
  if(allBtn)allBtn.addEventListener('click',function(){runAllUpgrade(allBtn)});
9521
9535
  }
9522
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
+ }
9523
9564
  b.disabled=true;b.style.opacity='.5';b.textContent=act==='install'?'\u5B89\u88C5\u4E2D...':act==='upgrade'?'\u5347\u7EA7\u4E2D...':'\u914D\u7F6E\u4E2D...';
9524
9565
  logEl.style.display='block';logEl.textContent='';
9525
9566
  var path=act==='install'?'tool/install':act==='upgrade'?'tool/upgrade':'tool/configure';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.62",
3
+ "version": "2.1.64",
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",