@simonyea/holysheep-cli 2.1.46 → 2.1.47
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.
- package/dist/configure-worker.js +21 -2
- package/dist/index.js +48 -6
- package/package.json +2 -2
package/dist/configure-worker.js
CHANGED
|
@@ -292,6 +292,15 @@ var require_claude_process_proxy = __commonJS({
|
|
|
292
292
|
host: target.host,
|
|
293
293
|
connection: "close"
|
|
294
294
|
};
|
|
295
|
+
if (process.env.HS_CLAUDE_DEBUG_HEADERS === "1") {
|
|
296
|
+
console.error(
|
|
297
|
+
`[DEBUG-HDRS forwardDirectHttps] ${JSON.stringify({
|
|
298
|
+
target: String(target),
|
|
299
|
+
ALL_outbound_headers: headers,
|
|
300
|
+
clientReqHeaders: clientReq.headers
|
|
301
|
+
})}`
|
|
302
|
+
);
|
|
303
|
+
}
|
|
295
304
|
const upReq = https2.request({
|
|
296
305
|
hostname: target.hostname,
|
|
297
306
|
port: target.port || 443,
|
|
@@ -427,6 +436,16 @@ var require_claude_process_proxy = __commonJS({
|
|
|
427
436
|
})}`
|
|
428
437
|
);
|
|
429
438
|
}
|
|
439
|
+
if (process.env.HS_CLAUDE_DEBUG_HEADERS === "1") {
|
|
440
|
+
console.error(
|
|
441
|
+
`[DEBUG-HDRS forwardViaNodeProxy] ${JSON.stringify({
|
|
442
|
+
target: String(targetUrl),
|
|
443
|
+
node: String(nodeProxyUrl),
|
|
444
|
+
ALL_outbound_headers: finalHeaders,
|
|
445
|
+
clientReqHeaders: clientReq.headers
|
|
446
|
+
})}`
|
|
447
|
+
);
|
|
448
|
+
}
|
|
430
449
|
forwardReq = http.request({
|
|
431
450
|
host: upstream.hostname,
|
|
432
451
|
port: Number(upstream.port || 80),
|
|
@@ -3974,11 +3993,11 @@ var require_package = __commonJS({
|
|
|
3974
3993
|
"package.json"(exports2, module2) {
|
|
3975
3994
|
module2.exports = {
|
|
3976
3995
|
name: "@simonyea/holysheep-cli",
|
|
3977
|
-
version: "2.1.
|
|
3996
|
+
version: "2.1.47",
|
|
3978
3997
|
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.",
|
|
3979
3998
|
scripts: {
|
|
3980
3999
|
build: "node scripts/build.mjs",
|
|
3981
|
-
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-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",
|
|
4000
|
+
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-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",
|
|
3982
4001
|
prepublishOnly: "npm run build && npm test && node scripts/check-tarball-size.js"
|
|
3983
4002
|
},
|
|
3984
4003
|
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.
|
|
15
|
+
version: "2.1.47",
|
|
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-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",
|
|
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-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",
|
|
20
20
|
prepublishOnly: "npm run build && npm test && node scripts/check-tarball-size.js"
|
|
21
21
|
},
|
|
22
22
|
keywords: [
|
|
@@ -968,6 +968,15 @@ var require_claude_process_proxy = __commonJS({
|
|
|
968
968
|
host: target.host,
|
|
969
969
|
connection: "close"
|
|
970
970
|
};
|
|
971
|
+
if (process.env.HS_CLAUDE_DEBUG_HEADERS === "1") {
|
|
972
|
+
console.error(
|
|
973
|
+
`[DEBUG-HDRS forwardDirectHttps] ${JSON.stringify({
|
|
974
|
+
target: String(target),
|
|
975
|
+
ALL_outbound_headers: headers,
|
|
976
|
+
clientReqHeaders: clientReq.headers
|
|
977
|
+
})}`
|
|
978
|
+
);
|
|
979
|
+
}
|
|
971
980
|
const upReq = https2.request({
|
|
972
981
|
hostname: target.hostname,
|
|
973
982
|
port: target.port || 443,
|
|
@@ -1103,6 +1112,16 @@ var require_claude_process_proxy = __commonJS({
|
|
|
1103
1112
|
})}`
|
|
1104
1113
|
);
|
|
1105
1114
|
}
|
|
1115
|
+
if (process.env.HS_CLAUDE_DEBUG_HEADERS === "1") {
|
|
1116
|
+
console.error(
|
|
1117
|
+
`[DEBUG-HDRS forwardViaNodeProxy] ${JSON.stringify({
|
|
1118
|
+
target: String(targetUrl),
|
|
1119
|
+
node: String(nodeProxyUrl),
|
|
1120
|
+
ALL_outbound_headers: finalHeaders,
|
|
1121
|
+
clientReqHeaders: clientReq.headers
|
|
1122
|
+
})}`
|
|
1123
|
+
);
|
|
1124
|
+
}
|
|
1106
1125
|
forwardReq = http.request({
|
|
1107
1126
|
host: upstream.hostname,
|
|
1108
1127
|
port: Number(upstream.port || 80),
|
|
@@ -5871,9 +5890,9 @@ var require_aionui_runtime_fetcher = __commonJS({
|
|
|
5871
5890
|
var http = require("http");
|
|
5872
5891
|
var USER_CACHE_DIR = path.join(os.homedir(), ".holysheep", "aionui-runtime");
|
|
5873
5892
|
var VENDOR_DIR = path.join(__dirname, "vendor", "aionui");
|
|
5874
|
-
var DEFAULT_RUNTIME_URL = "https://mail.holysheep.ai/app/cli/aionui-runtime-v1.9.18-holysheep-
|
|
5875
|
-
var DEFAULT_RUNTIME_SHA256 = "
|
|
5876
|
-
var DEFAULT_RUNTIME_VERSION = "1.9.18-holysheep-
|
|
5893
|
+
var DEFAULT_RUNTIME_URL = "https://mail.holysheep.ai/app/cli/aionui-runtime-v1.9.18-holysheep-hs34.tar.gz";
|
|
5894
|
+
var DEFAULT_RUNTIME_SHA256 = "5f656f6c049c935a26b76a70539147e7af17325817fe539a65ca46315590ecb1";
|
|
5895
|
+
var DEFAULT_RUNTIME_VERSION = "1.9.18-holysheep-hs34";
|
|
5877
5896
|
function isValidRuntimeDir(dir) {
|
|
5878
5897
|
if (!dir) return false;
|
|
5879
5898
|
try {
|
|
@@ -9336,6 +9355,28 @@ var require_aionui_wrapper = __commonJS({
|
|
|
9336
9355
|
}
|
|
9337
9356
|
const sanitizedParentEnv = { ...process.env };
|
|
9338
9357
|
delete sanitizedParentEnv.HOLYSHEEP_API_KEY;
|
|
9358
|
+
delete sanitizedParentEnv.HOLYSHEEP_CLAUDE_PROXY_PORT;
|
|
9359
|
+
let signalledProxyPort = "";
|
|
9360
|
+
try {
|
|
9361
|
+
if (claudeProxyHandle && !claudeProxyHandle.skipped) {
|
|
9362
|
+
if (claudeProxyHandle.reused && claudeProxyHandle.port) {
|
|
9363
|
+
signalledProxyPort = String(claudeProxyHandle.port);
|
|
9364
|
+
} else if (!claudeProxyHandle.reused && claudeProxyHandle.server) {
|
|
9365
|
+
const addr = claudeProxyHandle.server.address && claudeProxyHandle.server.address();
|
|
9366
|
+
if (addr && typeof addr === "object" && addr.port) {
|
|
9367
|
+
signalledProxyPort = String(addr.port);
|
|
9368
|
+
}
|
|
9369
|
+
}
|
|
9370
|
+
}
|
|
9371
|
+
if (!signalledProxyPort) {
|
|
9372
|
+
const cfg = claudeProcessProxy.readConfig();
|
|
9373
|
+
if (cfg && cfg.processProxyPort) signalledProxyPort = String(cfg.processProxyPort);
|
|
9374
|
+
}
|
|
9375
|
+
} catch {
|
|
9376
|
+
}
|
|
9377
|
+
if (signalledProxyPort) {
|
|
9378
|
+
log(`exporting HOLYSHEEP_CLAUDE_PROXY_PORT=${signalledProxyPort} to aionui (authoritative proxy port \u2014 fork will skip HTTP probe)`);
|
|
9379
|
+
}
|
|
9339
9380
|
const aionui = spawn(bunPath, ["dist-server/server.mjs"], {
|
|
9340
9381
|
cwd: runtimeDir,
|
|
9341
9382
|
env: {
|
|
@@ -9347,7 +9388,8 @@ var require_aionui_wrapper = __commonJS({
|
|
|
9347
9388
|
HOLYSHEEP_CLI_ROOT: cliRoot,
|
|
9348
9389
|
HOLYSHEEP_CLI_VERSION: wrapperVersion,
|
|
9349
9390
|
HOLYSHEEP_CONFIG_PATH: credPath,
|
|
9350
|
-
HOLYSHEEP_PTY_HERMES_WRAPPER: ptyWrapperAbs
|
|
9391
|
+
HOLYSHEEP_PTY_HERMES_WRAPPER: ptyWrapperAbs,
|
|
9392
|
+
...signalledProxyPort ? { HOLYSHEEP_CLAUDE_PROXY_PORT: signalledProxyPort } : {}
|
|
9351
9393
|
},
|
|
9352
9394
|
stdio: ["ignore", "pipe", "pipe"]
|
|
9353
9395
|
});
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simonyea/holysheep-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.47",
|
|
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-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",
|
|
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-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",
|
|
8
8
|
"prepublishOnly": "npm run build && npm test && node scripts/check-tarball-size.js"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|