@simonyea/holysheep-cli 1.7.86 → 1.7.87

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.87",
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 常见安装路径(桌面应用,无 CLI)
39
+ function findWindowsApp() {
40
+ const localAppData = process.env.LOCALAPPDATA || ''
41
+ const programFiles = process.env.ProgramFiles || 'C:\\Program Files'
42
+ const candidates = [
43
+ path.join(localAppData, 'Antigravity'),
44
+ path.join(localAppData, 'Google', 'Antigravity'),
45
+ path.join(localAppData, 'Programs', 'Antigravity'),
46
+ path.join(localAppData, 'Programs', 'Google Antigravity'),
47
+ path.join(programFiles, 'Antigravity'),
48
+ path.join(programFiles, 'Google', 'Antigravity'),
49
+ ]
50
+ return candidates.find(p => fs.existsSync(p)) || null
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 !!findWindowsApp()
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',