@simonyea/holysheep-cli 2.1.56 → 2.1.57

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.
@@ -114,6 +114,7 @@ var require_claude_process_proxy = __commonJS({
114
114
  var MAX_PROXY_RETRIES = 3;
115
115
  var ENABLE_TIMING_LOG = process.env.HS_CLAUDE_TIMING_LOG === "1";
116
116
  var SLOW_PATH_LOG_MS = Number(process.env.HS_CLAUDE_SLOW_PATH_LOG_MS) || 5e3;
117
+ var ENABLE_LEASE_LOG = process.env.HS_CLAUDE_LEASE_LOG === "1";
117
118
  function sanitizeUrl(value) {
118
119
  if (!value) return "";
119
120
  try {
@@ -545,7 +546,7 @@ var require_claude_process_proxy = __commonJS({
545
546
  });
546
547
  }
547
548
  __name(createConnectTunnel, "createConnectTunnel");
548
- var RESPONSE_TIMEOUT_MS = Number(process.env.HS_CLAUDE_RESPONSE_TIMEOUT_MS) || 3e4;
549
+ var RESPONSE_TIMEOUT_MS = Number(process.env.HS_CLAUDE_RESPONSE_TIMEOUT_MS) || 9e4;
549
550
  var STALL_TIMEOUT_MS = Number(process.env.HS_CLAUDE_STALL_TIMEOUT_MS) || 12e4;
550
551
  function pipeWithCleanup(a, b) {
551
552
  for (const sock of [a, b]) {
@@ -738,20 +739,22 @@ var require_claude_process_proxy = __commonJS({
738
739
  })();
739
740
  const forceReassign = shouldRefreshLeaseAfterError(lastError);
740
741
  const retryReason = String((lastError == null ? void 0 : lastError.body) || (lastError == null ? void 0 : lastError.message) || "").slice(0, 120);
741
- if (forceReassign) {
742
- console.error(`[hs-claude-proxy] lease.force-reassign ${JSON.stringify({
743
- sessionId,
744
- nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
745
- attempt,
746
- reason: retryReason
747
- })}`);
748
- } else {
749
- console.error(`[hs-claude-proxy] lease.sticky-hit ${JSON.stringify({
750
- sessionId,
751
- nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
752
- attempt,
753
- retryReason
754
- })}`);
742
+ if (ENABLE_LEASE_LOG) {
743
+ if (forceReassign) {
744
+ console.error(`[hs-claude-proxy] lease.force-reassign ${JSON.stringify({
745
+ sessionId,
746
+ nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
747
+ attempt,
748
+ reason: retryReason
749
+ })}`);
750
+ } else {
751
+ console.error(`[hs-claude-proxy] lease.sticky-hit ${JSON.stringify({
752
+ sessionId,
753
+ nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
754
+ attempt,
755
+ retryReason
756
+ })}`);
757
+ }
755
758
  }
756
759
  leaseCache.delete(sessionId);
757
760
  if (forceReassign) {
@@ -870,22 +873,24 @@ var require_claude_process_proxy = __commonJS({
870
873
  })();
871
874
  const forceReassign = shouldRefreshLeaseAfterError(lastError);
872
875
  const retryReason = String((lastError == null ? void 0 : lastError.body) || (lastError == null ? void 0 : lastError.message) || "").slice(0, 120);
873
- if (forceReassign) {
874
- console.error(`[hs-claude-proxy] lease.force-reassign ${JSON.stringify({
875
- sessionId,
876
- nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
877
- attempt,
878
- reason: retryReason,
879
- path: "CONNECT"
880
- })}`);
881
- } else {
882
- console.error(`[hs-claude-proxy] lease.sticky-hit ${JSON.stringify({
883
- sessionId,
884
- nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
885
- attempt,
886
- retryReason,
887
- path: "CONNECT"
888
- })}`);
876
+ if (ENABLE_LEASE_LOG) {
877
+ if (forceReassign) {
878
+ console.error(`[hs-claude-proxy] lease.force-reassign ${JSON.stringify({
879
+ sessionId,
880
+ nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
881
+ attempt,
882
+ reason: retryReason,
883
+ path: "CONNECT"
884
+ })}`);
885
+ } else {
886
+ console.error(`[hs-claude-proxy] lease.sticky-hit ${JSON.stringify({
887
+ sessionId,
888
+ nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
889
+ attempt,
890
+ retryReason,
891
+ path: "CONNECT"
892
+ })}`);
893
+ }
889
894
  }
890
895
  leaseCache.delete(sessionId);
891
896
  if (forceReassign) {
@@ -4081,7 +4086,7 @@ var require_package = __commonJS({
4081
4086
  "package.json"(exports2, module2) {
4082
4087
  module2.exports = {
4083
4088
  name: "@simonyea/holysheep-cli",
4084
- version: "2.1.56",
4089
+ version: "2.1.57",
4085
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.",
4086
4091
  scripts: {
4087
4092
  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.56",
15
+ version: "2.1.57",
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",
@@ -791,6 +791,7 @@ var require_claude_process_proxy = __commonJS({
791
791
  var MAX_PROXY_RETRIES = 3;
792
792
  var ENABLE_TIMING_LOG = process.env.HS_CLAUDE_TIMING_LOG === "1";
793
793
  var SLOW_PATH_LOG_MS = Number(process.env.HS_CLAUDE_SLOW_PATH_LOG_MS) || 5e3;
794
+ var ENABLE_LEASE_LOG = process.env.HS_CLAUDE_LEASE_LOG === "1";
794
795
  function sanitizeUrl(value) {
795
796
  if (!value) return "";
796
797
  try {
@@ -1222,7 +1223,7 @@ var require_claude_process_proxy = __commonJS({
1222
1223
  });
1223
1224
  }
1224
1225
  __name(createConnectTunnel, "createConnectTunnel");
1225
- var RESPONSE_TIMEOUT_MS = Number(process.env.HS_CLAUDE_RESPONSE_TIMEOUT_MS) || 3e4;
1226
+ var RESPONSE_TIMEOUT_MS = Number(process.env.HS_CLAUDE_RESPONSE_TIMEOUT_MS) || 9e4;
1226
1227
  var STALL_TIMEOUT_MS = Number(process.env.HS_CLAUDE_STALL_TIMEOUT_MS) || 12e4;
1227
1228
  function pipeWithCleanup(a, b) {
1228
1229
  for (const sock of [a, b]) {
@@ -1415,20 +1416,22 @@ var require_claude_process_proxy = __commonJS({
1415
1416
  })();
1416
1417
  const forceReassign = shouldRefreshLeaseAfterError(lastError);
1417
1418
  const retryReason = String((lastError == null ? void 0 : lastError.body) || (lastError == null ? void 0 : lastError.message) || "").slice(0, 120);
1418
- if (forceReassign) {
1419
- console.error(`[hs-claude-proxy] lease.force-reassign ${JSON.stringify({
1420
- sessionId,
1421
- nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
1422
- attempt,
1423
- reason: retryReason
1424
- })}`);
1425
- } else {
1426
- console.error(`[hs-claude-proxy] lease.sticky-hit ${JSON.stringify({
1427
- sessionId,
1428
- nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
1429
- attempt,
1430
- retryReason
1431
- })}`);
1419
+ if (ENABLE_LEASE_LOG) {
1420
+ if (forceReassign) {
1421
+ console.error(`[hs-claude-proxy] lease.force-reassign ${JSON.stringify({
1422
+ sessionId,
1423
+ nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
1424
+ attempt,
1425
+ reason: retryReason
1426
+ })}`);
1427
+ } else {
1428
+ console.error(`[hs-claude-proxy] lease.sticky-hit ${JSON.stringify({
1429
+ sessionId,
1430
+ nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
1431
+ attempt,
1432
+ retryReason
1433
+ })}`);
1434
+ }
1432
1435
  }
1433
1436
  leaseCache.delete(sessionId);
1434
1437
  if (forceReassign) {
@@ -1547,22 +1550,24 @@ var require_claude_process_proxy = __commonJS({
1547
1550
  })();
1548
1551
  const forceReassign = shouldRefreshLeaseAfterError(lastError);
1549
1552
  const retryReason = String((lastError == null ? void 0 : lastError.body) || (lastError == null ? void 0 : lastError.message) || "").slice(0, 120);
1550
- if (forceReassign) {
1551
- console.error(`[hs-claude-proxy] lease.force-reassign ${JSON.stringify({
1552
- sessionId,
1553
- nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
1554
- attempt,
1555
- reason: retryReason,
1556
- path: "CONNECT"
1557
- })}`);
1558
- } else {
1559
- console.error(`[hs-claude-proxy] lease.sticky-hit ${JSON.stringify({
1560
- sessionId,
1561
- nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
1562
- attempt,
1563
- retryReason,
1564
- path: "CONNECT"
1565
- })}`);
1553
+ if (ENABLE_LEASE_LOG) {
1554
+ if (forceReassign) {
1555
+ console.error(`[hs-claude-proxy] lease.force-reassign ${JSON.stringify({
1556
+ sessionId,
1557
+ nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
1558
+ attempt,
1559
+ reason: retryReason,
1560
+ path: "CONNECT"
1561
+ })}`);
1562
+ } else {
1563
+ console.error(`[hs-claude-proxy] lease.sticky-hit ${JSON.stringify({
1564
+ sessionId,
1565
+ nodeId: (prevLease == null ? void 0 : prevLease.nodeId) || "",
1566
+ attempt,
1567
+ retryReason,
1568
+ path: "CONNECT"
1569
+ })}`);
1570
+ }
1566
1571
  }
1567
1572
  leaseCache.delete(sessionId);
1568
1573
  if (forceReassign) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.56",
3
+ "version": "2.1.57",
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",