@simonyea/holysheep-cli 1.7.86 → 1.7.88

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simonyea/holysheep-cli",
3
- "version": "1.7.86",
3
+ "version": "1.7.88",
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
  "keywords": [
6
6
  "openai-china",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Antigravity 适配器 (Google Antigravity IDE)
3
3
  *
4
- * CLI 命令:agy
4
+ * CLI 命令:agy(macOS/Linux),Windows 为桌面应用无 CLI
5
5
  * 配置文件:~/.gemini/settings.json(与 Gemini CLI 共享,只 merge 不覆盖)
6
6
  * 通过 apiEndpoint + apiKeyHeader 字段配置 HolySheep 代理
7
7
  */
@@ -35,12 +35,33 @@ const INSTALL_CMD = process.platform === 'win32'
35
35
  ? 'brew install --cask antigravity'
36
36
  : 'flatpak install flathub com.google.Antigravity'
37
37
 
38
+ // Windows:通过注册表检测已安装的桌面应用(winget/MSI 安装均会注册)
39
+ function isWindowsAppInstalled() {
40
+ const { execSync } = require('child_process')
41
+ for (const hive of ['HKLM', 'HKCU']) {
42
+ try {
43
+ const out = execSync(
44
+ `reg query "${hive}\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall" /s /f "Antigravity" /d`,
45
+ { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'], timeout: 3000 }
46
+ )
47
+ if (out.includes('Antigravity')) return true
48
+ } catch {}
49
+ }
50
+ return false
51
+ }
52
+
38
53
  module.exports = {
39
54
  name: 'Antigravity',
40
55
  id: 'antigravity',
41
56
 
42
57
  checkInstalled() {
43
- return commandExists('agy')
58
+ // CLI in PATH
59
+ if (commandExists('agy')) return true
60
+ // Windows: 注册表检测桌面应用
61
+ if (process.platform === 'win32') return isWindowsAppInstalled()
62
+ // macOS: .app 检测
63
+ if (process.platform === 'darwin') return fs.existsSync('/Applications/Antigravity.app')
64
+ return false
44
65
  },
45
66
 
46
67
  isConfigured() {
@@ -68,7 +89,7 @@ module.exports = {
68
89
  },
69
90
 
70
91
  getConfigPath() { return SETTINGS_FILE },
71
- launchCmd: 'agy',
92
+ launchCmd: process.platform === 'win32' ? null : 'agy',
72
93
  installCmd: INSTALL_CMD,
73
94
  hint: '配置写入 ~/.gemini/settings.json',
74
95
  docsUrl: 'https://antigravity.google',