codiedev 0.6.1 → 0.7.0

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/dist/connect.js CHANGED
@@ -142,7 +142,9 @@ async function runConnect() {
142
142
  const hasClaude = (0, utils_1.claudeCodeInstalled)();
143
143
  const hasCodex = (0, utils_1.codexInstalled)();
144
144
  const hasCursor = (0, utils_1.cursorInstalled)();
145
+ const hasVSCodeCopilot = (0, utils_1.vscodeCopilotInstalled)();
145
146
  const installed = [];
147
+ let vscodeMcpInstalled = false;
146
148
  if (hasClaude) {
147
149
  try {
148
150
  (0, utils_1.installHook)();
@@ -212,8 +214,18 @@ async function runConnect() {
212
214
  console.error(`\nWarning: Failed to install Cursor MCP server — ${err.message}`);
213
215
  }
214
216
  }
215
- if (!hasClaude && !hasCodex && !hasCursor) {
216
- console.warn("\nNo Claude Code (~/.claude), Codex (~/.codex), or Cursor (~/.cursor) install detected.");
217
+ if (hasVSCodeCopilot) {
218
+ try {
219
+ (0, utils_1.installVSCodeMcp)();
220
+ installed.push("VS Code Copilot MCP server (~/Library/Application Support/Code/User/mcp.json)");
221
+ vscodeMcpInstalled = true;
222
+ }
223
+ catch (err) {
224
+ console.error(`\nWarning: Failed to install VS Code Copilot MCP server — ${err.message}`);
225
+ }
226
+ }
227
+ if (!hasClaude && !hasCodex && !hasCursor && !hasVSCodeCopilot) {
228
+ console.warn("\nNo Claude Code (~/.claude), Codex (~/.codex), Cursor (~/.cursor), or VS Code Copilot install detected.");
217
229
  console.warn("Config saved. Install one, then re-run `npx codiedev connect` to wire up capture hooks.");
218
230
  }
219
231
  console.log(`\nConnected to ${companyName}`);
@@ -225,6 +237,13 @@ async function runConnect() {
225
237
  }
226
238
  console.log("Sessions will be captured automatically.");
227
239
  }
240
+ if (vscodeMcpInstalled) {
241
+ console.log();
242
+ console.log("VS Code: open Copilot Chat — it will prompt you to trust the codiedev MCP server.");
243
+ console.log("Click Allow once, then ask Copilot: \"create a reverse ticket from my current changes\".");
244
+ console.log("Note: Copilot doesn't expose chat transcripts to MCP, so on-demand tools (reverse_ticket,");
245
+ console.log("push, pull, ask, ping) work fully — auto-captured decisions need Claude Code or Codex.");
246
+ }
228
247
  console.log();
229
248
  console.log("Run `codiedev doctor` to verify everything's wired up.");
230
249
  console.log();
package/dist/utils.d.ts CHANGED
@@ -27,6 +27,12 @@ export declare function hashToken(token: string): string;
27
27
  export declare function claudeCodeInstalled(): boolean;
28
28
  export declare function codexInstalled(): boolean;
29
29
  export declare function cursorInstalled(): boolean;
30
+ /**
31
+ * VS Code with the GitHub Copilot Chat extension installed. The extension
32
+ * directory pattern is `~/.vscode/extensions/github.copilot-chat-*`. We treat
33
+ * the presence of any `github.copilot*` directory as the Copilot fingerprint.
34
+ */
35
+ export declare function vscodeCopilotInstalled(): boolean;
30
36
  export declare function installHook(): void;
31
37
  export declare function installClaudeCodeInstructions(): void;
32
38
  export declare function installCodexInstructions(): void;
@@ -43,6 +49,18 @@ export declare function installClaudeCodeMcp(): void;
43
49
  * <project>/.cursor/mcp.json — we only manage the user-scope one.
44
50
  */
45
51
  export declare function installCursorMcp(): void;
52
+ /**
53
+ * Install the CodieDev MCP server into VS Code's user-scope MCP config so
54
+ * GitHub Copilot Chat picks it up. VS Code uses a different schema than
55
+ * Claude / Cursor: top-level key is `servers` (not `mcpServers`). On first
56
+ * Copilot Chat run after install, VS Code prompts the user to trust the
57
+ * server — that's expected and documented in the connect success message.
58
+ *
59
+ * Reverse-ticket and the other on-demand verbs work in Copilot identically
60
+ * to Claude Code since the MCP server's reverse_ticket handler is already
61
+ * 100% diff-driven (no transcript dependency).
62
+ */
63
+ export declare function installVSCodeMcp(): void;
46
64
  /**
47
65
  * Best-effort append of the CodieDev MCP server block to ~/.codex/config.toml.
48
66
  *
package/dist/utils.js CHANGED
@@ -42,12 +42,14 @@ exports.hashToken = hashToken;
42
42
  exports.claudeCodeInstalled = claudeCodeInstalled;
43
43
  exports.codexInstalled = codexInstalled;
44
44
  exports.cursorInstalled = cursorInstalled;
45
+ exports.vscodeCopilotInstalled = vscodeCopilotInstalled;
45
46
  exports.installHook = installHook;
46
47
  exports.installClaudeCodeInstructions = installClaudeCodeInstructions;
47
48
  exports.installCodexInstructions = installCodexInstructions;
48
49
  exports.installCursorInstructions = installCursorInstructions;
49
50
  exports.installClaudeCodeMcp = installClaudeCodeMcp;
50
51
  exports.installCursorMcp = installCursorMcp;
52
+ exports.installVSCodeMcp = installVSCodeMcp;
51
53
  exports.installCodexMcp = installCodexMcp;
52
54
  exports.installCodexHook = installCodexHook;
53
55
  exports.installCursorHook = installCursorHook;
@@ -142,6 +144,22 @@ const CURSOR_HOOKS_PATH = path.join(CURSOR_DIR, "hooks.json");
142
144
  const CURSOR_MCP_PATH = path.join(CURSOR_DIR, "mcp.json");
143
145
  const CURSOR_RULES_DIR = path.join(CURSOR_DIR, "rules");
144
146
  const CURSOR_RULES_PATH = path.join(CURSOR_RULES_DIR, "codiedev.mdc");
147
+ // VS Code Copilot Chat: detected by the github.copilot* extension dir, then
148
+ // MCP wired via VS Code's user-scope mcp.json (top-level key is "servers",
149
+ // not "mcpServers" like Claude/Cursor).
150
+ const VSCODE_EXTENSIONS_DIR = path.join(os.homedir(), ".vscode", "extensions");
151
+ const VSCODE_USER_DIR = (() => {
152
+ const home = os.homedir();
153
+ if (process.platform === "darwin") {
154
+ return path.join(home, "Library", "Application Support", "Code", "User");
155
+ }
156
+ if (process.platform === "win32") {
157
+ const appData = process.env.APPDATA ?? path.join(home, "AppData", "Roaming");
158
+ return path.join(appData, "Code", "User");
159
+ }
160
+ return path.join(home, ".config", "Code", "User");
161
+ })();
162
+ const VSCODE_USER_MCP_PATH = path.join(VSCODE_USER_DIR, "mcp.json");
145
163
  // GUI-launched agents (Cursor.app, future JetBrains plugins) don't source the
146
164
  // user's shell rc, so nvm-managed `npx` and `node` aren't on PATH. Resolve the
147
165
  // absolute path to the current node binary and our hook.js at install time and
@@ -181,6 +199,23 @@ function codexInstalled() {
181
199
  function cursorInstalled() {
182
200
  return fs.existsSync(CURSOR_DIR);
183
201
  }
202
+ /**
203
+ * VS Code with the GitHub Copilot Chat extension installed. The extension
204
+ * directory pattern is `~/.vscode/extensions/github.copilot-chat-*`. We treat
205
+ * the presence of any `github.copilot*` directory as the Copilot fingerprint.
206
+ */
207
+ function vscodeCopilotInstalled() {
208
+ if (!fs.existsSync(VSCODE_EXTENSIONS_DIR))
209
+ return false;
210
+ try {
211
+ return fs
212
+ .readdirSync(VSCODE_EXTENSIONS_DIR)
213
+ .some((name) => name.startsWith("github.copilot"));
214
+ }
215
+ catch {
216
+ return false;
217
+ }
218
+ }
184
219
  function installHook() {
185
220
  let settings = {};
186
221
  try {
@@ -447,6 +482,33 @@ function installCursorMcp() {
447
482
  config.mcpServers = mcpServers;
448
483
  fs.writeFileSync(CURSOR_MCP_PATH, JSON.stringify(config, null, 2), "utf8");
449
484
  }
485
+ /**
486
+ * Install the CodieDev MCP server into VS Code's user-scope MCP config so
487
+ * GitHub Copilot Chat picks it up. VS Code uses a different schema than
488
+ * Claude / Cursor: top-level key is `servers` (not `mcpServers`). On first
489
+ * Copilot Chat run after install, VS Code prompts the user to trust the
490
+ * server — that's expected and documented in the connect success message.
491
+ *
492
+ * Reverse-ticket and the other on-demand verbs work in Copilot identically
493
+ * to Claude Code since the MCP server's reverse_ticket handler is already
494
+ * 100% diff-driven (no transcript dependency).
495
+ */
496
+ function installVSCodeMcp() {
497
+ if (!fs.existsSync(VSCODE_USER_DIR)) {
498
+ fs.mkdirSync(VSCODE_USER_DIR, { recursive: true });
499
+ }
500
+ const config = readMcpConfigSafely(VSCODE_USER_MCP_PATH);
501
+ const servers = config.servers ?? {};
502
+ if (servers.codiedev)
503
+ return;
504
+ servers.codiedev = {
505
+ type: "stdio",
506
+ command: "npx",
507
+ args: ["codiedev-mcp"],
508
+ };
509
+ config.servers = servers;
510
+ fs.writeFileSync(VSCODE_USER_MCP_PATH, JSON.stringify(config, null, 2), "utf8");
511
+ }
450
512
  /**
451
513
  * Best-effort append of the CodieDev MCP server block to ~/.codex/config.toml.
452
514
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "codiedev",
3
- "version": "0.6.1",
4
- "description": "Connect Claude Code, Codex, or Cursor to CodieDev for org-wide session capture and artifact collaboration",
3
+ "version": "0.7.0",
4
+ "description": "Connect Claude Code, Codex, Cursor, or VS Code Copilot to CodieDev for org-wide session capture and artifact collaboration",
5
5
  "bin": {
6
6
  "codiedev": "./dist/cli.js",
7
7
  "codiedev-hook": "./dist/hook.js"
@@ -22,6 +22,10 @@
22
22
  "codex",
23
23
  "openai",
24
24
  "cursor",
25
+ "copilot",
26
+ "github-copilot",
27
+ "vscode",
28
+ "mcp",
25
29
  "ai",
26
30
  "session-capture"
27
31
  ],