@cg3/equip 0.2.6 → 0.2.8

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/lib/cli.js CHANGED
@@ -50,13 +50,17 @@ function promptEnterOrEsc(question) {
50
50
  process.stdin.resume();
51
51
  process.stdin.setEncoding("utf-8");
52
52
  const onData = (key) => {
53
- process.stdin.setRawMode(false);
54
- process.stdin.pause();
55
- process.stdin.removeListener("data", onData);
56
- if (key === "\x1b") { process.stderr.write("\n"); resolve(false); }
57
- else if (key === "\r" || key === "\n") { process.stderr.write("\n"); resolve(true); }
58
- else if (key === "\x03") { process.stderr.write("\n"); process.exit(0); }
59
- else { process.stderr.write("\n"); resolve(true); }
53
+ if (key === "\x1b") {
54
+ process.stdin.setRawMode(false); process.stdin.pause(); process.stdin.removeListener("data", onData);
55
+ process.stderr.write("\n"); resolve(false);
56
+ } else if (key === "\r" || key === "\n") {
57
+ process.stdin.setRawMode(false); process.stdin.pause(); process.stdin.removeListener("data", onData);
58
+ process.stderr.write("\n"); resolve(true);
59
+ } else if (key === "\x03") {
60
+ process.stdin.setRawMode(false); process.stdin.pause(); process.stdin.removeListener("data", onData);
61
+ process.stderr.write("\n"); process.exit(0);
62
+ }
63
+ // else: ignore unrecognized keys, keep listening
60
64
  };
61
65
  process.stdin.on("data", onData);
62
66
  });
package/lib/detect.js CHANGED
@@ -7,7 +7,7 @@ const fs = require("fs");
7
7
  const path = require("path");
8
8
  const os = require("os");
9
9
  const { execSync } = require("child_process");
10
- const { getVsCodeMcpPath, getVsCodeUserDir, getClineConfigPath, getRooConfigPath, getCodexConfigPath, getGeminiSettingsPath, getJunieMcpPath } = require("./platforms");
10
+ const { getVsCodeMcpPath, getVsCodeUserDir, getClineConfigPath, getRooConfigPath, getCodexConfigPath, getGeminiSettingsPath, getJunieMcpPath, getCopilotJetBrainsMcpPath, getCopilotCliMcpPath } = require("./platforms");
11
11
  const { readMcpEntry } = require("./mcp");
12
12
 
13
13
  // ─── Helpers ─────────────────────────────────────────────────
@@ -190,7 +190,7 @@ function detectPlatforms(serverName) {
190
190
  platform: "junie",
191
191
  version: cliVersion("junie") || "unknown",
192
192
  configPath: junieMcpPath,
193
- rulesPath: null, // Junie guidelines are project-scoped only
193
+ rulesPath: null,
194
194
  existingMcp: serverName ? readMcpEntry(junieMcpPath, "mcpServers", serverName) : null,
195
195
  hasCli: !!whichSync("junie"),
196
196
  rootKey: "mcpServers",
@@ -198,6 +198,38 @@ function detectPlatforms(serverName) {
198
198
  });
199
199
  }
200
200
 
201
+ // GitHub Copilot in JetBrains IDEs
202
+ const copilotJbPath = getCopilotJetBrainsMcpPath();
203
+ const copilotJbDir = path.dirname(path.dirname(copilotJbPath)); // github-copilot dir
204
+ if (dirExists(copilotJbDir)) {
205
+ platforms.push({
206
+ platform: "copilot-jetbrains",
207
+ version: "unknown",
208
+ configPath: copilotJbPath,
209
+ rulesPath: null,
210
+ existingMcp: serverName ? readMcpEntry(copilotJbPath, "mcpServers", serverName) : null,
211
+ hasCli: false,
212
+ rootKey: "mcpServers",
213
+ configFormat: "json",
214
+ });
215
+ }
216
+
217
+ // GitHub Copilot CLI
218
+ const copilotCliDir = path.join(home, ".copilot");
219
+ const copilotCliMcpPath = getCopilotCliMcpPath();
220
+ if (whichSync("copilot") || dirExists(copilotCliDir)) {
221
+ platforms.push({
222
+ platform: "copilot-cli",
223
+ version: cliVersion("copilot") || "unknown",
224
+ configPath: copilotCliMcpPath,
225
+ rulesPath: null,
226
+ existingMcp: serverName ? readMcpEntry(copilotCliMcpPath, "mcpServers", serverName) : null,
227
+ hasCli: !!whichSync("copilot"),
228
+ rootKey: "mcpServers",
229
+ configFormat: "json",
230
+ });
231
+ }
232
+
201
233
  return platforms;
202
234
  }
203
235
 
package/lib/platforms.js CHANGED
@@ -44,6 +44,19 @@ function getJunieMcpPath() {
44
44
  return path.join(home, ".junie", "mcp", "mcp.json");
45
45
  }
46
46
 
47
+ function getCopilotJetBrainsMcpPath() {
48
+ const home = os.homedir();
49
+ if (process.platform === "win32") {
50
+ return path.join(process.env.APPDATA || path.join(home, "AppData", "Roaming"), "github-copilot", "intellij", "mcp.json");
51
+ }
52
+ return path.join(home, ".config", "github-copilot", "intellij", "mcp.json");
53
+ }
54
+
55
+ function getCopilotCliMcpPath() {
56
+ const home = os.homedir();
57
+ return path.join(home, ".copilot", "mcp-config.json");
58
+ }
59
+
47
60
  // ─── Platform Registry ──────────────────────────────────────
48
61
 
49
62
  /**
@@ -104,7 +117,19 @@ function createManualPlatform(platformId) {
104
117
  },
105
118
  junie: {
106
119
  configPath: getJunieMcpPath(),
107
- rulesPath: null, // Junie: .junie/guidelines.md is project-scoped only, no global rules file
120
+ rulesPath: null,
121
+ rootKey: "mcpServers",
122
+ configFormat: "json",
123
+ },
124
+ "copilot-jetbrains": {
125
+ configPath: getCopilotJetBrainsMcpPath(),
126
+ rulesPath: null,
127
+ rootKey: "mcpServers",
128
+ configFormat: "json",
129
+ },
130
+ "copilot-cli": {
131
+ configPath: getCopilotCliMcpPath(),
132
+ rulesPath: null,
108
133
  rootKey: "mcpServers",
109
134
  configFormat: "json",
110
135
  },
@@ -132,6 +157,8 @@ function platformName(id) {
132
157
  codex: "Codex",
133
158
  "gemini-cli": "Gemini CLI",
134
159
  junie: "Junie",
160
+ "copilot-jetbrains": "Copilot (JetBrains)",
161
+ "copilot-cli": "Copilot CLI",
135
162
  };
136
163
  return names[id] || id;
137
164
  }
@@ -139,7 +166,7 @@ function platformName(id) {
139
166
  /**
140
167
  * All known platform IDs.
141
168
  */
142
- const KNOWN_PLATFORMS = ["claude-code", "cursor", "windsurf", "vscode", "cline", "roo-code", "codex", "gemini-cli", "junie"];
169
+ const KNOWN_PLATFORMS = ["claude-code", "cursor", "windsurf", "vscode", "cline", "roo-code", "codex", "gemini-cli", "junie", "copilot-jetbrains", "copilot-cli"];
143
170
 
144
171
  module.exports = {
145
172
  getVsCodeUserDir,
@@ -149,6 +176,8 @@ module.exports = {
149
176
  getCodexConfigPath,
150
177
  getGeminiSettingsPath,
151
178
  getJunieMcpPath,
179
+ getCopilotJetBrainsMcpPath,
180
+ getCopilotCliMcpPath,
152
181
  createManualPlatform,
153
182
  platformName,
154
183
  KNOWN_PLATFORMS,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cg3/equip",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Universal MCP + behavioral rules installer for AI coding agents",
5
5
  "main": "index.js",
6
6
  "bin": {