@simonyea/holysheep-cli 2.1.48 → 2.1.50

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.
@@ -3993,11 +3993,11 @@ var require_package = __commonJS({
3993
3993
  "package.json"(exports2, module2) {
3994
3994
  module2.exports = {
3995
3995
  name: "@simonyea/holysheep-cli",
3996
- version: "2.1.48",
3996
+ version: "2.1.50",
3997
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.",
3998
3998
  scripts: {
3999
3999
  build: "node scripts/build.mjs",
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 && node tests/version-check.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 && node tests/version-check.test.js && node tests/runclaude-missing-binary.test.js",
4001
4001
  prepublishOnly: "npm run build && npm test && node scripts/check-tarball-size.js"
4002
4002
  },
4003
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.48",
15
+ version: "2.1.50",
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 && node tests/aionui-wrapper-env-signal.test.js && node tests/version-check.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 && 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: [
@@ -7021,12 +7021,23 @@ var require_claude = __commonJS({
7021
7021
  } catch {
7022
7022
  }
7023
7023
  ensureClaudeProxyConfig(apiKey);
7024
+ const runtime = typeof claudeCodeTool.detectClaudeRuntime === "function" ? claudeCodeTool.detectClaudeRuntime() : { kind: "unknown", launchMode: "env-proxy" };
7025
+ if (runtime.kind === "missing") {
7026
+ const installCmd = process.platform === "win32" ? "irm https://claude.ai/install.ps1 | iex" : "curl -fsSL https://claude.ai/install.sh | bash";
7027
+ const err = new Error(
7028
+ `\u672A\u627E\u5230 claude \u547D\u4EE4 \u2014 Claude Code \u5C1A\u672A\u5B89\u88C5\u3002
7029
+ \u8BF7\u5148\u8FD0\u884C: ${installCmd}
7030
+ \u5B89\u88C5\u540E\u91CD\u5F00\u7EC8\u7AEF\u518D\u6267\u884C hs claude\u3002`
7031
+ );
7032
+ err.code = "CLAUDE_NOT_INSTALLED";
7033
+ err.exitCode = 127;
7034
+ throw err;
7035
+ }
7024
7036
  const settings = claudeCodeTool.readSettings();
7025
7037
  if ((_a = settings.env) == null ? void 0 : _a.ANTHROPIC_BASE_URL) {
7026
7038
  delete settings.env.ANTHROPIC_BASE_URL;
7027
7039
  claudeCodeTool.writeSettings(settings);
7028
7040
  }
7029
- const runtime = typeof claudeCodeTool.detectClaudeRuntime === "function" ? claudeCodeTool.detectClaudeRuntime() : { kind: "unknown", launchMode: "env-proxy" };
7030
7041
  const { server, port, sessionId } = await startProcessProxy({});
7031
7042
  const proxyUrl = getLocalProxyUrl(port);
7032
7043
  const launchMode = runtime.launchMode === "node-inject" ? "local-api + connect-fallback + node-inject" : "whole-process-proxy + local-api";
@@ -10113,8 +10124,20 @@ program.command("web").alias("webui").description("\u542F\u52A8 HolySheep WebUI
10113
10124
  });
10114
10125
  program.command("claude [args...]").allowUnknownOption(true).passThroughOptions().description("\u901A\u8FC7 HolySheep \u6574\u8FDB\u7A0B\u4EE3\u7406\u542F\u52A8 Claude Code").action(async (args = []) => {
10115
10126
  const runClaude = require_claude();
10116
- const code = await runClaude(args);
10117
- process.exit(code);
10127
+ try {
10128
+ const code = await runClaude(args);
10129
+ process.exit(code);
10130
+ } catch (err) {
10131
+ const knownCodes = /* @__PURE__ */ new Set(["CLAUDE_NOT_INSTALLED"]);
10132
+ if (err && knownCodes.has(err.code)) {
10133
+ process.stderr.write(`
10134
+ ${err.message}
10135
+
10136
+ `);
10137
+ process.exit(typeof err.exitCode === "number" ? err.exitCode : 1);
10138
+ }
10139
+ throw err;
10140
+ }
10118
10141
  });
10119
10142
  program.command("claude-proxy [args...]").allowUnknownOption(true).description("\u542F\u52A8 Claude \u4EE3\u7406\u670D\u52A1\uFF08\u8BA9 VS Code Claude \u6269\u5C55\u4E5F\u80FD\u7528 HolySheep\uFF09").action(async (args = []) => {
10120
10143
  const claudeProxy = require_claude_proxy();
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "2.1.48",
3
+ "version": "2.1.50",
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 && node tests/aionui-wrapper-env-signal.test.js && node tests/version-check.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 && 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": [