@hybridlabor-api/bdb-antigravity-skills 1.1.5 → 1.1.7

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.
Files changed (2) hide show
  1. package/installer.js +96 -6
  2. package/package.json +1 -1
package/installer.js CHANGED
@@ -44,16 +44,69 @@ const backupDir = path.join(geminiDir, `skills_backup_${timestamp}`);
44
44
  // Auto-accept flags for CI/CD or autonomous agents
45
45
  const isAutoYes = process.argv.includes('-y') || process.argv.includes('--yes');
46
46
 
47
+ function detectPlatforms() {
48
+ const detections = [];
49
+
50
+ // Antigravity
51
+ if (fs.existsSync(geminiDir)) {
52
+ detections.push("Google Antigravity (detected at " + geminiDir + ")");
53
+ }
54
+
55
+ // Claude Desktop
56
+ const claudePath = process.platform === 'win32'
57
+ ? path.join(process.env.APPDATA || homeDir, 'Claude')
58
+ : path.join(homeDir, 'Library', 'Application Support', 'Claude');
59
+ if (fs.existsSync(claudePath)) {
60
+ detections.push("Claude Desktop (detected at " + claudePath + ")");
61
+ }
62
+
63
+ // Cursor
64
+ const cursorPath = process.platform === 'win32'
65
+ ? path.join(process.env.APPDATA || homeDir, 'Cursor')
66
+ : path.join(homeDir, 'Library', 'Application Support', 'Cursor');
67
+ if (fs.existsSync(cursorPath)) {
68
+ detections.push("Cursor IDE (detected at " + cursorPath + ")");
69
+ }
70
+
71
+ // VS Code (for Cline/Roo Code)
72
+ const vscodePath = process.platform === 'win32'
73
+ ? path.join(process.env.APPDATA || homeDir, 'Code')
74
+ : path.join(homeDir, 'Library', 'Application Support', 'Code');
75
+ if (fs.existsSync(vscodePath)) {
76
+ detections.push("VS Code / Cline / Roo Code (detected at " + vscodePath + ")");
77
+ }
78
+
79
+ // Windsurf
80
+ const windsurfPath = process.platform === 'win32'
81
+ ? path.join(process.env.APPDATA || homeDir, 'Windsurf')
82
+ : path.join(homeDir, 'Library', 'Application Support', 'Windsurf');
83
+ if (fs.existsSync(windsurfPath)) {
84
+ detections.push("Windsurf IDE (detected at " + windsurfPath + ")");
85
+ }
86
+
87
+ return detections;
88
+ }
89
+
47
90
  function promptMode(callback) {
48
91
  if (isAutoYes) {
49
92
  return callback({ mode: '1', platform: '1' });
50
93
  }
94
+
95
+ const detections = detectPlatforms();
96
+ if (detections.length > 0) {
97
+ console.log("\nDetected Agent Environments on this system:");
98
+ detections.forEach(d => console.log(" * " + d));
99
+ } else {
100
+ console.log("\nNo active agent config directories auto-detected in standard locations.");
101
+ }
102
+
51
103
  console.log("\nTarget AI Platform:");
52
104
  console.log(" (1) Google Antigravity (Default)");
53
105
  console.log(" (2) Claude Desktop / Claude Code");
54
- console.log(" (3) Cursor / Generic IDE");
106
+ console.log(" (3) Cursor / Generic IDE (Project-local)");
107
+ console.log(" (4) Custom Installation (Specify custom paths manually)");
55
108
 
56
- rl.question("\nSelect platform [1/2/3]: ", (platformAns) => {
109
+ rl.question("\nSelect platform [1/2/3/4]: ", (platformAns) => {
57
110
  const platform = platformAns.trim() || '1';
58
111
 
59
112
  console.log("\nInstallation Mode:");
@@ -61,7 +114,36 @@ function promptMode(callback) {
61
114
  console.log(" (2) Replace: Backup and wipe your existing skills/MCPs, installing ONLY BDB tools.");
62
115
  rl.question("\nSelect mode [1/2]: ", (modeAns) => {
63
116
  const mode = modeAns.trim() === '2' ? '2' : '1';
64
- callback({ mode, platform });
117
+
118
+ if (platform === '4') {
119
+ // Prompt for custom paths
120
+ console.log("\n--- Custom Path Configuration ---");
121
+ rl.question("Target directory for global skills [default: " + path.join(homeDir, '.bdb-skills') + "]: ", (skillDir) => {
122
+ const customSkillDir = skillDir.trim() || path.join(homeDir, '.bdb-skills');
123
+ rl.question("Target directory for legacy skills [default: " + path.join(customSkillDir, 'legacy') + "]: ", (legacyDir) => {
124
+ const customLegacyDir = legacyDir.trim() || path.join(customSkillDir, 'legacy');
125
+ rl.question("Target directory for workspace skills [default: " + workspaceDir + "]: ", (workDir) => {
126
+ const customWorkspaceDir = workDir.trim() || workspaceDir;
127
+ rl.question("Target path for MCP Config JSON file [default: " + path.join(homeDir, 'mcp_config.json') + "]: ", (mcpConf) => {
128
+ const customMcpConfigPath = mcpConf.trim() || path.join(homeDir, 'mcp_config.json');
129
+ callback({
130
+ mode,
131
+ platform,
132
+ customPaths: {
133
+ skillDir: customSkillDir,
134
+ legacyDir: customLegacyDir,
135
+ workspaceDir: customWorkspaceDir,
136
+ mcpConfigPath: customMcpConfigPath,
137
+ mcpDir: path.dirname(customMcpConfigPath)
138
+ }
139
+ });
140
+ });
141
+ });
142
+ });
143
+ });
144
+ } else {
145
+ callback({ mode, platform });
146
+ }
65
147
  });
66
148
  });
67
149
  }
@@ -71,7 +153,7 @@ function promptMCP(callback) {
71
153
  return callback('y');
72
154
  }
73
155
  console.log("");
74
- rl.question("Do you also want to install the MCP Pack (Unreal, Rhino, Resolve, Grandma3, Resolume, Github, etc)? (y/n): ", (answer) => {
156
+ rl.question("Do you also want to install the MCP Pack (Unreal, Adobe, Resolve, Grandma3, Resolume, Github, etc)? (y/n): ", (answer) => {
75
157
  callback(answer);
76
158
  });
77
159
  }
@@ -99,7 +181,7 @@ function copyDirRecursiveSync(source, target) {
99
181
  });
100
182
  }
101
183
 
102
- promptMode(({ mode, platform }) => {
184
+ promptMode(({ mode, platform, customPaths }) => {
103
185
  fs.mkdirSync(backupDir, { recursive: true });
104
186
 
105
187
  let targetSkillDir = globalConfigDir;
@@ -128,6 +210,14 @@ promptMode(({ mode, platform }) => {
128
210
  targetWorkspaceDir = path.join(currentDir, '.cursor', 'workspace_skills');
129
211
  targetMcpDir = path.join(currentDir, '.cursor');
130
212
  mcpConfigPath = path.join(targetMcpDir, 'mcp.json');
213
+ } else if (platform === '4' && customPaths) {
214
+ // Custom paths
215
+ console.log("\n[Platform: Custom Path] Applying custom paths...");
216
+ targetSkillDir = customPaths.skillDir;
217
+ targetLegacyDir = customPaths.legacyDir;
218
+ targetWorkspaceDir = customPaths.workspaceDir;
219
+ targetMcpDir = customPaths.mcpDir;
220
+ mcpConfigPath = customPaths.mcpConfigPath;
131
221
  }
132
222
 
133
223
  if (mode === '2') {
@@ -188,7 +278,7 @@ promptMode(({ mode, platform }) => {
188
278
  fs.writeFileSync(mcpConfigPath, mcpConfigStr);
189
279
  }
190
280
  } else {
191
- if (platform === '2' && !fs.existsSync(mcpConfigPath)) {
281
+ if ((platform === '2' || platform === '4') && !fs.existsSync(mcpConfigPath)) {
192
282
  const wrapper = { mcpServers: JSON.parse(mcpConfigStr).mcpServers };
193
283
  fs.writeFileSync(mcpConfigPath, JSON.stringify(wrapper, null, 2));
194
284
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybridlabor-api/bdb-antigravity-skills",
3
- "version": "1.1.5",
3
+ "version": "1.1.7",
4
4
  "description": "Optimized Antigravity skills and MCP pack for BDB DEV",
5
5
  "main": "installer.js",
6
6
  "bin": {