@simonyea/holysheep-cli 2.1.54 → 2.1.56

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.
@@ -1561,10 +1561,10 @@ var require_droid = __commonJS({
1561
1561
  route: "anthropic"
1562
1562
  },
1563
1563
  {
1564
- model: "claude-opus-4-6",
1565
- id: "custom:claude-opus-4-6-0",
1564
+ model: "claude-opus-4-7",
1565
+ id: "custom:claude-opus-4-7-0",
1566
1566
  baseUrlSuffix: "",
1567
- displayName: "Opus 4.6",
1567
+ displayName: "Opus 4.7",
1568
1568
  provider: "anthropic",
1569
1569
  route: "anthropic"
1570
1570
  },
@@ -3425,6 +3425,65 @@ var require_openclaw = __commonJS({
3425
3425
  }
3426
3426
  }
3427
3427
  __name(_disableGatewayAuth, "_disableGatewayAuth");
3428
+ function disableGatewayAuthDirect() {
3429
+ var _a, _b;
3430
+ try {
3431
+ if (!fs.existsSync(CONFIG_FILE)) {
3432
+ return { changed: false, reason: "no-config" };
3433
+ }
3434
+ let cfg;
3435
+ try {
3436
+ cfg = JSON.parse(fs.readFileSync(CONFIG_FILE, "utf8"));
3437
+ } catch (e) {
3438
+ return { changed: false, reason: "error", error: e.message };
3439
+ }
3440
+ const previousMode = (_b = (_a = cfg == null ? void 0 : cfg.gateway) == null ? void 0 : _a.auth) == null ? void 0 : _b.mode;
3441
+ if (previousMode === "none") {
3442
+ return { changed: false, reason: "already-none" };
3443
+ }
3444
+ if (!cfg.gateway) cfg.gateway = {};
3445
+ if (!cfg.gateway.auth) cfg.gateway.auth = {};
3446
+ cfg.gateway.auth.mode = "none";
3447
+ atomicWriteJson(CONFIG_FILE, cfg);
3448
+ return { changed: true, previousMode: previousMode || null };
3449
+ } catch (e) {
3450
+ return { changed: false, reason: "error", error: e.message };
3451
+ }
3452
+ }
3453
+ __name(disableGatewayAuthDirect, "disableGatewayAuthDirect");
3454
+ function killGatewayOnPort(port) {
3455
+ if (!port || !Number.isInteger(port)) return false;
3456
+ try {
3457
+ if (isWin) {
3458
+ const out2 = execSync(
3459
+ `powershell -NonInteractive -Command "(Get-NetTCPConnection -LocalPort ${port} -State Listen -ErrorAction SilentlyContinue).OwningProcess"`,
3460
+ { stdio: "pipe", encoding: "utf8", timeout: 3e3 }
3461
+ );
3462
+ const pids2 = String(out2 || "").match(/\d+/g);
3463
+ if (!pids2 || pids2.length === 0) return false;
3464
+ for (const pid of pids2) {
3465
+ try {
3466
+ execSync(`taskkill /F /PID ${pid}`, { stdio: "ignore", timeout: 3e3 });
3467
+ } catch {
3468
+ }
3469
+ }
3470
+ return true;
3471
+ }
3472
+ const out = execSync(`lsof -ti tcp:${port} -sTCP:LISTEN 2>/dev/null || true`, { stdio: "pipe", encoding: "utf8", timeout: 3e3 });
3473
+ const pids = String(out || "").trim().split(/\s+/).filter(Boolean);
3474
+ if (pids.length === 0) return false;
3475
+ for (const pid of pids) {
3476
+ try {
3477
+ execSync(`kill -TERM ${pid}`, { stdio: "ignore", timeout: 3e3 });
3478
+ } catch {
3479
+ }
3480
+ }
3481
+ return true;
3482
+ } catch {
3483
+ return false;
3484
+ }
3485
+ }
3486
+ __name(killGatewayOnPort, "killGatewayOnPort");
3428
3487
  function _installGatewayService(port, preferNpx = false) {
3429
3488
  if (preferNpx) return false;
3430
3489
  const result = runOpenClaw(["gateway", "install", "--force", "--port", String(port)], {
@@ -3709,7 +3768,10 @@ var require_openclaw = __commonJS({
3709
3768
  docsUrl: "https://docs.openclaw.ai",
3710
3769
  // [HolySheep fork v2.1.38 / hs26] Test-only exports.
3711
3770
  _atomicWriteJson: atomicWriteJson,
3712
- _pruneClobberedBackups: pruneClobberedBackups
3771
+ _pruneClobberedBackups: pruneClobberedBackups,
3772
+ // [HolySheep v2.1.56] Direct JSON-level fixes for hs web auto-recovery.
3773
+ disableGatewayAuthDirect,
3774
+ killGatewayOnPort
3713
3775
  };
3714
3776
  }
3715
3777
  });
@@ -4019,11 +4081,11 @@ var require_package = __commonJS({
4019
4081
  "package.json"(exports2, module2) {
4020
4082
  module2.exports = {
4021
4083
  name: "@simonyea/holysheep-cli",
4022
- version: "2.1.54",
4084
+ version: "2.1.56",
4023
4085
  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.",
4024
4086
  scripts: {
4025
4087
  build: "node scripts/build.mjs",
4026
- 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/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",
4088
+ 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",
4027
4089
  prepublishOnly: "npm run build && npm test && node scripts/check-tarball-size.js"
4028
4090
  },
4029
4091
  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.54",
15
+ version: "2.1.56",
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/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/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: [
@@ -2107,10 +2107,10 @@ var require_droid = __commonJS({
2107
2107
  route: "anthropic"
2108
2108
  },
2109
2109
  {
2110
- model: "claude-opus-4-6",
2111
- id: "custom:claude-opus-4-6-0",
2110
+ model: "claude-opus-4-7",
2111
+ id: "custom:claude-opus-4-7-0",
2112
2112
  baseUrlSuffix: "",
2113
- displayName: "Opus 4.6",
2113
+ displayName: "Opus 4.7",
2114
2114
  provider: "anthropic",
2115
2115
  route: "anthropic"
2116
2116
  },
@@ -3971,6 +3971,65 @@ var require_openclaw = __commonJS({
3971
3971
  }
3972
3972
  }
3973
3973
  __name(_disableGatewayAuth, "_disableGatewayAuth");
3974
+ function disableGatewayAuthDirect() {
3975
+ var _a, _b;
3976
+ try {
3977
+ if (!fs.existsSync(CONFIG_FILE)) {
3978
+ return { changed: false, reason: "no-config" };
3979
+ }
3980
+ let cfg;
3981
+ try {
3982
+ cfg = JSON.parse(fs.readFileSync(CONFIG_FILE, "utf8"));
3983
+ } catch (e) {
3984
+ return { changed: false, reason: "error", error: e.message };
3985
+ }
3986
+ const previousMode = (_b = (_a = cfg == null ? void 0 : cfg.gateway) == null ? void 0 : _a.auth) == null ? void 0 : _b.mode;
3987
+ if (previousMode === "none") {
3988
+ return { changed: false, reason: "already-none" };
3989
+ }
3990
+ if (!cfg.gateway) cfg.gateway = {};
3991
+ if (!cfg.gateway.auth) cfg.gateway.auth = {};
3992
+ cfg.gateway.auth.mode = "none";
3993
+ atomicWriteJson(CONFIG_FILE, cfg);
3994
+ return { changed: true, previousMode: previousMode || null };
3995
+ } catch (e) {
3996
+ return { changed: false, reason: "error", error: e.message };
3997
+ }
3998
+ }
3999
+ __name(disableGatewayAuthDirect, "disableGatewayAuthDirect");
4000
+ function killGatewayOnPort(port) {
4001
+ if (!port || !Number.isInteger(port)) return false;
4002
+ try {
4003
+ if (isWin) {
4004
+ const out2 = execSync(
4005
+ `powershell -NonInteractive -Command "(Get-NetTCPConnection -LocalPort ${port} -State Listen -ErrorAction SilentlyContinue).OwningProcess"`,
4006
+ { stdio: "pipe", encoding: "utf8", timeout: 3e3 }
4007
+ );
4008
+ const pids2 = String(out2 || "").match(/\d+/g);
4009
+ if (!pids2 || pids2.length === 0) return false;
4010
+ for (const pid of pids2) {
4011
+ try {
4012
+ execSync(`taskkill /F /PID ${pid}`, { stdio: "ignore", timeout: 3e3 });
4013
+ } catch {
4014
+ }
4015
+ }
4016
+ return true;
4017
+ }
4018
+ const out = execSync(`lsof -ti tcp:${port} -sTCP:LISTEN 2>/dev/null || true`, { stdio: "pipe", encoding: "utf8", timeout: 3e3 });
4019
+ const pids = String(out || "").trim().split(/\s+/).filter(Boolean);
4020
+ if (pids.length === 0) return false;
4021
+ for (const pid of pids) {
4022
+ try {
4023
+ execSync(`kill -TERM ${pid}`, { stdio: "ignore", timeout: 3e3 });
4024
+ } catch {
4025
+ }
4026
+ }
4027
+ return true;
4028
+ } catch {
4029
+ return false;
4030
+ }
4031
+ }
4032
+ __name(killGatewayOnPort, "killGatewayOnPort");
3974
4033
  function _installGatewayService(port, preferNpx = false) {
3975
4034
  if (preferNpx) return false;
3976
4035
  const result = runOpenClaw(["gateway", "install", "--force", "--port", String(port)], {
@@ -4255,7 +4314,10 @@ var require_openclaw = __commonJS({
4255
4314
  docsUrl: "https://docs.openclaw.ai",
4256
4315
  // [HolySheep fork v2.1.38 / hs26] Test-only exports.
4257
4316
  _atomicWriteJson: atomicWriteJson,
4258
- _pruneClobberedBackups: pruneClobberedBackups
4317
+ _pruneClobberedBackups: pruneClobberedBackups,
4318
+ // [HolySheep v2.1.56] Direct JSON-level fixes for hs web auto-recovery.
4319
+ disableGatewayAuthDirect,
4320
+ killGatewayOnPort
4259
4321
  };
4260
4322
  }
4261
4323
  });
@@ -4968,7 +5030,7 @@ var require_setup = __commonJS({
4968
5030
  { name: "gpt-5.4 (GPT 5.4, \u901A\u7528\u7F16\u7801)", value: "gpt-5.4", checked: true },
4969
5031
  { name: "gpt-5.3-codex-spark (GPT 5.3 Codex Spark, \u7F16\u7801)", value: "gpt-5.3-codex-spark", checked: true },
4970
5032
  { name: "claude-sonnet-4-6 (Sonnet 4.6, \u5747\u8861\u63A8\u8350)", value: "claude-sonnet-4-6", checked: true },
4971
- { name: "claude-opus-4-6 (Opus 4.6, \u5F3A\u529B\u65D7\u8230)", value: "claude-opus-4-6", checked: true },
5033
+ { name: "claude-opus-4-7 (Opus 4.7, \u5F3A\u529B\u65D7\u8230)", value: "claude-opus-4-7", checked: true },
4972
5034
  { name: "MiniMax-M2.7-highspeed (\u9AD8\u901F\u7ECF\u6D4E\u7248)", value: "MiniMax-M2.7-highspeed", checked: true },
4973
5035
  { name: "claude-haiku-4-5 (Haiku 4.5, \u8F7B\u5FEB\u4FBF\u5B9C)", value: "claude-haiku-4-5", checked: true }
4974
5036
  ];
@@ -8013,7 +8075,7 @@ ${AUTO_INSTALL[toolId].cmd}
8013
8075
  "gpt-5.4",
8014
8076
  "gpt-5.3-codex-spark",
8015
8077
  "claude-sonnet-4-6",
8016
- "claude-opus-4-6",
8078
+ "claude-opus-4-7",
8017
8079
  "MiniMax-M2.7-highspeed",
8018
8080
  "claude-haiku-4-5"
8019
8081
  ];
@@ -8437,8 +8499,8 @@ ${AUTO_INSTALL[toolId].cmd}
8437
8499
  { id: "gpt-5.3-codex-spark", label: "GPT 5.3 Codex Spark", desc: "\u7F16\u7801" },
8438
8500
  { id: "claude-sonnet-4-6", label: "Sonnet 4.6", desc: "\u5747\u8861\u63A8\u8350" },
8439
8501
  { id: "claude-sonnet-4-6[1m]", label: "Sonnet 4.6 (1M)", desc: "\u5747\u8861\u63A8\u8350\xB7100\u4E07\u4E0A\u4E0B\u6587" },
8440
- { id: "claude-opus-4-6", label: "Opus 4.6", desc: "\u5F3A\u529B\u65D7\u8230" },
8441
- { id: "claude-opus-4-6[1m]", label: "Opus 4.6 (1M)", desc: "\u5F3A\u529B\u65D7\u8230\xB7100\u4E07\u4E0A\u4E0B\u6587" },
8502
+ { id: "claude-opus-4-7", label: "Opus 4.7", desc: "\u5F3A\u529B\u65D7\u8230" },
8503
+ { id: "claude-opus-4-7[1m]", label: "Opus 4.7 (1M)", desc: "\u5F3A\u529B\u65D7\u8230\xB7100\u4E07\u4E0A\u4E0B\u6587" },
8442
8504
  { id: "MiniMax-M2.7-highspeed", label: "MiniMax M2.7", desc: "\u9AD8\u901F\u7ECF\u6D4E\u7248" },
8443
8505
  { id: "claude-haiku-4-5", label: "Haiku 4.5", desc: "\u8F7B\u5FEB\u4FBF\u5B9C" }
8444
8506
  ]);
@@ -9725,6 +9787,35 @@ var require_aionui_wrapper = __commonJS({
9725
9787
  }
9726
9788
  }
9727
9789
  __name(_checkOpenClawPairingNeeded, "_checkOpenClawPairingNeeded");
9790
+ function _autoFixOpenClawPairing() {
9791
+ if (typeof openclawTool.checkInstalled !== "function" || !openclawTool.checkInstalled()) return;
9792
+ if (typeof openclawTool.isConfigured !== "function" || !openclawTool.isConfigured()) return;
9793
+ const result = typeof openclawTool.disableGatewayAuthDirect === "function" ? openclawTool.disableGatewayAuthDirect() : { changed: false, reason: "helper-missing" };
9794
+ if (result.changed) {
9795
+ log(`OpenClaw gateway.auth.mode patched: ${result.previousMode || "?"} \u2192 none`);
9796
+ try {
9797
+ const port = typeof openclawTool.getGatewayPort === "function" ? openclawTool.getGatewayPort() : null;
9798
+ if (port && typeof openclawTool.killGatewayOnPort === "function") {
9799
+ const killed = openclawTool.killGatewayOnPort(port);
9800
+ if (killed) log(`OpenClaw gateway on :${port} stopped \u2014 will restart with new auth config on next AionUi connection`);
9801
+ }
9802
+ } catch (e) {
9803
+ log(`warn: could not stop running OpenClaw gateway: ${e && e.message ? e.message : e}`);
9804
+ }
9805
+ return;
9806
+ }
9807
+ if (result.reason === "already-none") {
9808
+ return;
9809
+ }
9810
+ if (result.reason === "no-config") {
9811
+ _startupWarnings.openclawNeedsPairing = true;
9812
+ log("warn: ~/.openclaw/openclaw.json missing \u2014 banner will prompt for `hs openclaw`");
9813
+ } else if (result.reason === "error") {
9814
+ _startupWarnings.openclawNeedsPairing = true;
9815
+ log(`warn: OpenClaw config patch failed (${result.error}) \u2014 banner will surface manual fix`);
9816
+ }
9817
+ }
9818
+ __name(_autoFixOpenClawPairing, "_autoFixOpenClawPairing");
9728
9819
  var VERSION_CACHE_FILE = path.join(os.homedir(), ".holysheep", "last-version-check.json");
9729
9820
  var UPGRADE_LOG_FILE = path.join(os.homedir(), ".holysheep", "auto-update.log");
9730
9821
  var PACKAGE_NAME = "@simonyea/holysheep-cli";
@@ -9964,12 +10055,13 @@ var require_aionui_wrapper = __commonJS({
9964
10055
  log("warn: CLI auto-config error (continuing): " + (e && e.message ? e.message : e));
9965
10056
  }
9966
10057
  try {
9967
- _startupWarnings.openclawNeedsPairing = _checkOpenClawPairingNeeded();
9968
- if (_startupWarnings.openclawNeedsPairing) {
9969
- log('warn: OpenClaw gateway auth.mode is not "none" \u2014 users will see "pairing required" errors. Run `hs openclaw` to fix.');
9970
- }
10058
+ _autoFixOpenClawPairing();
9971
10059
  } catch (e) {
9972
- log("warn: OpenClaw pairing check failed (continuing): " + (e && e.message ? e.message : e));
10060
+ log("warn: OpenClaw pairing auto-fix failed (continuing): " + (e && e.message ? e.message : e));
10061
+ try {
10062
+ _startupWarnings.openclawNeedsPairing = _checkOpenClawPairingNeeded();
10063
+ } catch {
10064
+ }
9973
10065
  }
9974
10066
  const claudeProxyHandle = await ensureClaudeProcessProxyRunning();
9975
10067
  ensureOpenClawBridgeRunning();
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.54",
3
+ "version": "2.1.56",
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/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/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": [