@simonyea/holysheep-cli 2.1.44 → 2.1.45
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 +4 -2
- package/dist/index.js +29 -7
- package/package.json +1 -1
package/dist/configure-worker.js
CHANGED
|
@@ -595,7 +595,9 @@ var require_claude_process_proxy = __commonJS({
|
|
|
595
595
|
clientRes.writeHead(200, {
|
|
596
596
|
"content-type": "application/json",
|
|
597
597
|
[LOCAL_PING_HEADER]: LOCAL_PING_HEADER_VALUE,
|
|
598
|
-
"cache-control": "no-store"
|
|
598
|
+
"cache-control": "no-store",
|
|
599
|
+
"content-length": String(Buffer.byteLength(body)),
|
|
600
|
+
"connection": "close"
|
|
599
601
|
});
|
|
600
602
|
clientRes.end(body);
|
|
601
603
|
return;
|
|
@@ -3972,7 +3974,7 @@ var require_package = __commonJS({
|
|
|
3972
3974
|
"package.json"(exports2, module2) {
|
|
3973
3975
|
module2.exports = {
|
|
3974
3976
|
name: "@simonyea/holysheep-cli",
|
|
3975
|
-
version: "2.1.
|
|
3977
|
+
version: "2.1.45",
|
|
3976
3978
|
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.",
|
|
3977
3979
|
scripts: {
|
|
3978
3980
|
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.
|
|
15
|
+
version: "2.1.45",
|
|
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",
|
|
@@ -1271,7 +1271,9 @@ var require_claude_process_proxy = __commonJS({
|
|
|
1271
1271
|
clientRes.writeHead(200, {
|
|
1272
1272
|
"content-type": "application/json",
|
|
1273
1273
|
[LOCAL_PING_HEADER]: LOCAL_PING_HEADER_VALUE,
|
|
1274
|
-
"cache-control": "no-store"
|
|
1274
|
+
"cache-control": "no-store",
|
|
1275
|
+
"content-length": String(Buffer.byteLength(body)),
|
|
1276
|
+
"connection": "close"
|
|
1275
1277
|
});
|
|
1276
1278
|
clientRes.end(body);
|
|
1277
1279
|
return;
|
|
@@ -5869,9 +5871,9 @@ var require_aionui_runtime_fetcher = __commonJS({
|
|
|
5869
5871
|
var http = require("http");
|
|
5870
5872
|
var USER_CACHE_DIR = path.join(os.homedir(), ".holysheep", "aionui-runtime");
|
|
5871
5873
|
var VENDOR_DIR = path.join(__dirname, "vendor", "aionui");
|
|
5872
|
-
var DEFAULT_RUNTIME_URL = "https://mail.holysheep.ai/app/cli/aionui-runtime-v1.9.18-holysheep-
|
|
5873
|
-
var DEFAULT_RUNTIME_SHA256 = "
|
|
5874
|
-
var DEFAULT_RUNTIME_VERSION = "1.9.18-holysheep-
|
|
5874
|
+
var DEFAULT_RUNTIME_URL = "https://mail.holysheep.ai/app/cli/aionui-runtime-v1.9.18-holysheep-hs32.tar.gz";
|
|
5875
|
+
var DEFAULT_RUNTIME_SHA256 = "7efafb298109f75a7e804fa1425a52cabe0d46ee39760fc54be14e80938f27c2";
|
|
5876
|
+
var DEFAULT_RUNTIME_VERSION = "1.9.18-holysheep-hs32";
|
|
5875
5877
|
function isValidRuntimeDir(dir) {
|
|
5876
5878
|
if (!dir) return false;
|
|
5877
5879
|
try {
|
|
@@ -9101,11 +9103,31 @@ var require_aionui_wrapper = __commonJS({
|
|
|
9101
9103
|
...config,
|
|
9102
9104
|
relayUrl: config.relayUrl || BASE_URL_CLAUDE_RELAY
|
|
9103
9105
|
});
|
|
9106
|
+
let proxyConfigUpdated = false;
|
|
9104
9107
|
if (JSON.stringify(next) !== JSON.stringify(config)) {
|
|
9105
9108
|
claudeProcessProxy.writeConfig(next);
|
|
9106
|
-
|
|
9109
|
+
proxyConfigUpdated = true;
|
|
9107
9110
|
}
|
|
9108
|
-
|
|
9111
|
+
try {
|
|
9112
|
+
const existing = claudeCodeTool.readSettings();
|
|
9113
|
+
const hasToken = existing && existing.env && existing.env.ANTHROPIC_AUTH_TOKEN === apiKey;
|
|
9114
|
+
const hasLauncherMark = existing && existing.env && existing.env.HOLYSHEEP_CLAUDE_LAUNCHER === "hs";
|
|
9115
|
+
if (!hasToken || !hasLauncherMark) {
|
|
9116
|
+
const settings = existing || {};
|
|
9117
|
+
if (!settings.env) settings.env = {};
|
|
9118
|
+
settings.env.ANTHROPIC_AUTH_TOKEN = apiKey;
|
|
9119
|
+
delete settings.env.ANTHROPIC_BASE_URL;
|
|
9120
|
+
settings.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1";
|
|
9121
|
+
settings.env.HOLYSHEEP_CLAUDE_LAUNCHER = "hs";
|
|
9122
|
+
delete settings.env.ANTHROPIC_API_KEY;
|
|
9123
|
+
delete settings.env.HOLYSHEEP_CLAUDE_BRIDGE;
|
|
9124
|
+
claudeCodeTool.writeSettings(settings);
|
|
9125
|
+
log("auto-configured ~/.claude/settings.json with ANTHROPIC_AUTH_TOKEN (first-ever hs web for this user)");
|
|
9126
|
+
}
|
|
9127
|
+
} catch (e) {
|
|
9128
|
+
log("warn: failed to auto-configure ~/.claude/settings.json: " + (e && e.message ? e.message : e));
|
|
9129
|
+
}
|
|
9130
|
+
return proxyConfigUpdated ? next : config;
|
|
9109
9131
|
}
|
|
9110
9132
|
__name(_ensureClaudeProxyConfig, "_ensureClaudeProxyConfig");
|
|
9111
9133
|
async function ensureClaudeProcessProxyRunning(opts = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simonyea/holysheep-cli",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.45",
|
|
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",
|