@colbymchenry/codegraph-win32-arm64 1.4.1 → 1.6.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/bin/codegraph.cmd +1 -1
- package/lib/dist/bin/codegraph.js +206 -44
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/context/formatter.d.ts +7 -1
- package/lib/dist/context/formatter.d.ts.map +1 -1
- package/lib/dist/context/formatter.js +12 -6
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +12 -0
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +101 -25
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +179 -0
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +368 -7
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +25 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +234 -5
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +687 -53
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +16 -3
- package/lib/dist/db/sqlite-adapter.d.ts +3 -1
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +22 -4
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/wal-valve.d.ts +15 -2
- package/lib/dist/db/wal-valve.d.ts.map +1 -1
- package/lib/dist/db/wal-valve.js +88 -6
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/directory.d.ts +29 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +52 -0
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +6 -0
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +48 -12
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +176 -11
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +101 -2
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +138 -3
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +518 -94
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/decode.d.ts +9 -0
- package/lib/dist/extraction/kernel/decode.d.ts.map +1 -0
- package/lib/dist/extraction/kernel/decode.js +162 -0
- package/lib/dist/extraction/kernel/decode.js.map +1 -0
- package/lib/dist/extraction/kernel/index.d.ts +64 -0
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -0
- package/lib/dist/extraction/kernel/index.js +279 -0
- package/lib/dist/extraction/kernel/index.js.map +1 -0
- package/lib/dist/extraction/kernel/layout.d.ts +101 -0
- package/lib/dist/extraction/kernel/layout.d.ts.map +1 -0
- package/lib/dist/extraction/kernel/layout.js +104 -0
- package/lib/dist/extraction/kernel/layout.js.map +1 -0
- package/lib/dist/extraction/kernel/loader.d.ts +103 -0
- package/lib/dist/extraction/kernel/loader.d.ts.map +1 -0
- package/lib/dist/extraction/kernel/loader.js +146 -0
- package/lib/dist/extraction/kernel/loader.js.map +1 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts +14 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +868 -16
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +58 -22
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +4 -0
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +20 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +47 -20
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +15 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +35 -1
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.js +35 -1
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/store-worker.d.ts +24 -0
- package/lib/dist/extraction/store-worker.d.ts.map +1 -0
- package/lib/dist/extraction/store-worker.js +139 -0
- package/lib/dist/extraction/store-worker.js.map +1 -0
- package/lib/dist/extraction/store-writer.d.ts +63 -0
- package/lib/dist/extraction/store-writer.d.ts.map +1 -0
- package/lib/dist/extraction/store-writer.js +174 -0
- package/lib/dist/extraction/store-writer.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-types.d.ts +2 -0
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +27 -5
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +257 -56
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts +15 -0
- package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
- package/lib/dist/extraction/wasm-runtime-flags.js +27 -3
- package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -0
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/traversal.js +1 -1
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/index.d.ts +36 -2
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +305 -11
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/beta-signup.d.ts +54 -0
- package/lib/dist/installer/beta-signup.d.ts.map +1 -0
- package/lib/dist/installer/beta-signup.js +178 -0
- package/lib/dist/installer/beta-signup.js.map +1 -0
- package/lib/dist/installer/index.d.ts +4 -3
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +19 -6
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +37 -5
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +22 -8
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +65 -48
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-cli.js +209 -0
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.js +219 -0
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +6 -0
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +6 -5
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +99 -20
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +5 -5
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +1 -1
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +6 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +54 -0
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +10 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +51 -3
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +9 -6
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +10 -8
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +3 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +45 -3
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +137 -0
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/lib/dist/mcp/explore-dedup.js +236 -0
- package/lib/dist/mcp/explore-dedup.js.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.js +558 -0
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
- package/lib/dist/mcp/explore-session-state.d.ts +217 -0
- package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/lib/dist/mcp/explore-session-state.js +322 -0
- package/lib/dist/mcp/explore-session-state.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +24 -0
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +67 -6
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +3 -1
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +6 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +2 -2
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +8 -3
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +16 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +36 -13
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +276 -10
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +2425 -237
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/project-config.d.ts +23 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +39 -2
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +582 -138
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts +54 -10
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +287 -167
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cooperative-yield.d.ts +10 -2
- package/lib/dist/resolution/cooperative-yield.d.ts.map +1 -1
- package/lib/dist/resolution/cooperative-yield.js +6 -4
- package/lib/dist/resolution/cooperative-yield.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +29 -6
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +11 -1
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +2 -3
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +184 -9
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +87 -2
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +731 -134
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/memory-budget.d.ts +48 -0
- package/lib/dist/resolution/memory-budget.d.ts.map +1 -0
- package/lib/dist/resolution/memory-budget.js +162 -0
- package/lib/dist/resolution/memory-budget.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +42 -1
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +681 -99
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/path-aliases.d.ts +6 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +125 -17
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +106 -0
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -0
- package/lib/dist/resolution/resolver-pool.js +344 -0
- package/lib/dist/resolution/resolver-pool.js.map +1 -0
- package/lib/dist/resolution/resolver-worker.d.ts +17 -0
- package/lib/dist/resolution/resolver-worker.d.ts.map +1 -0
- package/lib/dist/resolution/resolver-worker.js +141 -0
- package/lib/dist/resolution/resolver-worker.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +3 -0
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/search/identifier-segments.d.ts +10 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -1
- package/lib/dist/search/identifier-segments.js +29 -0
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-paths.d.ts +57 -0
- package/lib/dist/search/query-paths.d.ts.map +1 -0
- package/lib/dist/search/query-paths.js +298 -0
- package/lib/dist/search/query-paths.js.map +1 -0
- package/lib/dist/search/query-utils.d.ts +1 -1
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +13 -3
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +47 -1
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +127 -8
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/types.d.ts +61 -3
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +27 -1
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui/color.d.ts +21 -0
- package/lib/dist/ui/color.d.ts.map +1 -0
- package/lib/dist/ui/color.js +42 -0
- package/lib/dist/ui/color.js.map +1 -0
- package/lib/dist/ui/glyphs.d.ts +35 -10
- package/lib/dist/ui/glyphs.d.ts.map +1 -1
- package/lib/dist/ui/glyphs.js +59 -12
- package/lib/dist/ui/glyphs.js.map +1 -1
- package/lib/dist/ui/shimmer-progress.d.ts.map +1 -1
- package/lib/dist/ui/shimmer-progress.js +78 -4
- package/lib/dist/ui/shimmer-progress.js.map +1 -1
- package/lib/dist/ui/shimmer-worker.js +25 -17
- package/lib/dist/ui/shimmer-worker.js.map +1 -1
- package/lib/dist/ui/types.d.ts +0 -2
- package/lib/dist/ui/types.d.ts.map +1 -1
- package/lib/dist/upgrade/index.d.ts +7 -0
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +18 -5
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/kernel/codegraph-kernel.node +0 -0
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +6 -1
- package/package.json +6 -2
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* JetBrains IDEs (GitHub Copilot plugin) target.
|
|
4
|
+
*
|
|
5
|
+
* - MCP server entry to the plugin's user-level `mcp.json`, which
|
|
6
|
+
* lives under the shared `github-copilot` config dir (the same dir
|
|
7
|
+
* the Copilot ecosystem uses for `hosts.json`):
|
|
8
|
+
*
|
|
9
|
+
* macOS/Linux: $XDG_CONFIG_HOME|~/.config/github-copilot/intellij/mcp.json
|
|
10
|
+
* Windows: %LOCALAPPDATA%\github-copilot\intellij\mcp.json
|
|
11
|
+
*
|
|
12
|
+
* `$XDG_CONFIG_HOME` is honored on every platform when set —
|
|
13
|
+
* matching the plugin family's own resolution (copilot.vim /
|
|
14
|
+
* copilot-language-server check it before the OS default).
|
|
15
|
+
* - Shape is VS Code-compatible: `{ "servers": { "<name>": { "type":
|
|
16
|
+
* "stdio", "command", "args" } } }` — the plugin documents mcp.json
|
|
17
|
+
* parity with `.vscode/mcp.json`.
|
|
18
|
+
* - **Global-only.** The plugin reads exactly one user-level file; a
|
|
19
|
+
* project-level mcp.json is an open feature request
|
|
20
|
+
* (microsoft/copilot-intellij-feedback#701, still open 2026-07).
|
|
21
|
+
* `supportsLocation('local')` returns false so the orchestrator
|
|
22
|
+
* skips local installs with a clear message (Codex pattern).
|
|
23
|
+
* - No `--path` injection: the config is user-global and the plugin
|
|
24
|
+
* documents no `${workspaceFolder}`-style variable expansion for
|
|
25
|
+
* this file, so we ship the plain entry and let the MCP server
|
|
26
|
+
* resolve the project from the client's roots/cwd as with other
|
|
27
|
+
* global installs.
|
|
28
|
+
* - No instructions file (MCP `initialize` instructions are the
|
|
29
|
+
* single source of truth, #529) and no permissions concept —
|
|
30
|
+
* `autoAllow` is silently ignored.
|
|
31
|
+
*
|
|
32
|
+
* The IDE opens this file in a JSON editor for hand-editing (Settings →
|
|
33
|
+
* Tools → GitHub Copilot → MCP → Configure), so reads + writes go
|
|
34
|
+
* through `jsonc-parser` — surgical edits that preserve sibling
|
|
35
|
+
* servers, user comments, and formatting (same approach as the
|
|
36
|
+
* copilot-vscode target).
|
|
37
|
+
*
|
|
38
|
+
* The plugin only re-reads mcp.json on IDE restart
|
|
39
|
+
* (microsoft/copilot-intellij-feedback#1139) — hence the restart note.
|
|
40
|
+
*/
|
|
41
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
42
|
+
if (k2 === undefined) k2 = k;
|
|
43
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
44
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
45
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
46
|
+
}
|
|
47
|
+
Object.defineProperty(o, k2, desc);
|
|
48
|
+
}) : (function(o, m, k, k2) {
|
|
49
|
+
if (k2 === undefined) k2 = k;
|
|
50
|
+
o[k2] = m[k];
|
|
51
|
+
}));
|
|
52
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
53
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
54
|
+
}) : function(o, v) {
|
|
55
|
+
o["default"] = v;
|
|
56
|
+
});
|
|
57
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
58
|
+
var ownKeys = function(o) {
|
|
59
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
60
|
+
var ar = [];
|
|
61
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
62
|
+
return ar;
|
|
63
|
+
};
|
|
64
|
+
return ownKeys(o);
|
|
65
|
+
};
|
|
66
|
+
return function (mod) {
|
|
67
|
+
if (mod && mod.__esModule) return mod;
|
|
68
|
+
var result = {};
|
|
69
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
70
|
+
__setModuleDefault(result, mod);
|
|
71
|
+
return result;
|
|
72
|
+
};
|
|
73
|
+
})();
|
|
74
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
75
|
+
exports.copilotJetbrainsTarget = void 0;
|
|
76
|
+
const fs = __importStar(require("fs"));
|
|
77
|
+
const path = __importStar(require("path"));
|
|
78
|
+
const os = __importStar(require("os"));
|
|
79
|
+
const jsonc_parser_1 = require("jsonc-parser");
|
|
80
|
+
const shared_1 = require("./shared");
|
|
81
|
+
/**
|
|
82
|
+
* The `github-copilot` config root, resolved the way the Copilot
|
|
83
|
+
* plugin family resolves it: `$XDG_CONFIG_HOME` first on every
|
|
84
|
+
* platform, then `%LOCALAPPDATA%` on Windows, then `~/.config`.
|
|
85
|
+
*/
|
|
86
|
+
function copilotConfigRoot() {
|
|
87
|
+
const xdg = process.env.XDG_CONFIG_HOME;
|
|
88
|
+
if (xdg && xdg.trim().length > 0) {
|
|
89
|
+
return path.join(xdg, 'github-copilot');
|
|
90
|
+
}
|
|
91
|
+
if (process.platform === 'win32') {
|
|
92
|
+
const localAppData = process.env.LOCALAPPDATA && process.env.LOCALAPPDATA.trim().length > 0
|
|
93
|
+
? process.env.LOCALAPPDATA
|
|
94
|
+
: path.join(os.homedir(), 'AppData', 'Local');
|
|
95
|
+
return path.join(localAppData, 'github-copilot');
|
|
96
|
+
}
|
|
97
|
+
return path.join(os.homedir(), '.config', 'github-copilot');
|
|
98
|
+
}
|
|
99
|
+
function intellijDir() {
|
|
100
|
+
return path.join(copilotConfigRoot(), 'intellij');
|
|
101
|
+
}
|
|
102
|
+
function mcpJsonPath() {
|
|
103
|
+
return path.join(intellijDir(), 'mcp.json');
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Best-effort "a JetBrains IDE exists here" heuristic for the
|
|
107
|
+
* multiselect default — the per-OS dir every JetBrains IDE creates on
|
|
108
|
+
* first launch. False positives (IDE without the Copilot plugin) are
|
|
109
|
+
* acceptable per the `DetectionResult` contract.
|
|
110
|
+
*/
|
|
111
|
+
function jetbrainsConfigDirExists() {
|
|
112
|
+
const home = os.homedir();
|
|
113
|
+
if (process.platform === 'darwin') {
|
|
114
|
+
return fs.existsSync(path.join(home, 'Library', 'Application Support', 'JetBrains'));
|
|
115
|
+
}
|
|
116
|
+
if (process.platform === 'win32') {
|
|
117
|
+
const appData = process.env.APPDATA && process.env.APPDATA.trim().length > 0
|
|
118
|
+
? process.env.APPDATA
|
|
119
|
+
: path.join(home, 'AppData', 'Roaming');
|
|
120
|
+
return fs.existsSync(path.join(appData, 'JetBrains'));
|
|
121
|
+
}
|
|
122
|
+
const xdg = process.env.XDG_CONFIG_HOME && process.env.XDG_CONFIG_HOME.trim().length > 0
|
|
123
|
+
? process.env.XDG_CONFIG_HOME
|
|
124
|
+
: path.join(home, '.config');
|
|
125
|
+
return fs.existsSync(path.join(xdg, 'JetBrains'));
|
|
126
|
+
}
|
|
127
|
+
function readConfigText(file) {
|
|
128
|
+
if (!fs.existsSync(file))
|
|
129
|
+
return '';
|
|
130
|
+
return fs.readFileSync(file, 'utf-8');
|
|
131
|
+
}
|
|
132
|
+
function parseConfig(text) {
|
|
133
|
+
if (!text.trim())
|
|
134
|
+
return {};
|
|
135
|
+
const errors = [];
|
|
136
|
+
const result = (0, jsonc_parser_1.parse)(text, errors, { allowTrailingComma: true });
|
|
137
|
+
if (result == null || typeof result !== 'object' || Array.isArray(result)) {
|
|
138
|
+
return {};
|
|
139
|
+
}
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
142
|
+
const FORMATTING = { tabSize: 2, insertSpaces: true, eol: '\n' };
|
|
143
|
+
class CopilotJetbrainsTarget {
|
|
144
|
+
id = 'copilot-jetbrains';
|
|
145
|
+
displayName = 'JetBrains IDEs (Copilot plugin)';
|
|
146
|
+
docsUrl = 'https://docs.github.com/en/copilot/how-tos/provide-context/use-mcp/extend-copilot-chat-with-mcp';
|
|
147
|
+
supportsLocation(loc) {
|
|
148
|
+
return loc === 'global';
|
|
149
|
+
}
|
|
150
|
+
detect(loc) {
|
|
151
|
+
if (loc !== 'global') {
|
|
152
|
+
return { installed: false, alreadyConfigured: false };
|
|
153
|
+
}
|
|
154
|
+
const file = mcpJsonPath();
|
|
155
|
+
const config = parseConfig(readConfigText(file));
|
|
156
|
+
const alreadyConfigured = !!config.servers?.codegraph;
|
|
157
|
+
// The `intellij/` subdir is created by the Copilot plugin itself;
|
|
158
|
+
// fall back to "some JetBrains IDE is installed" for first-time
|
|
159
|
+
// plugin users.
|
|
160
|
+
const installed = fs.existsSync(intellijDir()) || jetbrainsConfigDirExists();
|
|
161
|
+
return { installed, alreadyConfigured, configPath: file };
|
|
162
|
+
}
|
|
163
|
+
install(loc, _opts) {
|
|
164
|
+
if (loc !== 'global') {
|
|
165
|
+
return {
|
|
166
|
+
files: [],
|
|
167
|
+
notes: ['The JetBrains Copilot plugin has no project-local MCP config — re-run with --location=global to install.'],
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
return {
|
|
171
|
+
files: [writeMcpEntry()],
|
|
172
|
+
notes: ['Restart your JetBrains IDE — the Copilot plugin only reads mcp.json on startup.'],
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
uninstall(loc) {
|
|
176
|
+
if (loc !== 'global')
|
|
177
|
+
return { files: [] };
|
|
178
|
+
return { files: [removeMcpEntry()] };
|
|
179
|
+
}
|
|
180
|
+
printConfig(loc) {
|
|
181
|
+
if (loc !== 'global') {
|
|
182
|
+
return '# The JetBrains Copilot plugin has no project-local MCP config — use --location=global.\n';
|
|
183
|
+
}
|
|
184
|
+
const snippet = JSON.stringify({ servers: { codegraph: (0, shared_1.getMcpServerConfig)() } }, null, 2);
|
|
185
|
+
return `# Add to ${mcpJsonPath()}\n# (Settings → Tools → GitHub Copilot → Model Context Protocol → Configure)\n\n${snippet}\n`;
|
|
186
|
+
}
|
|
187
|
+
describePaths(loc) {
|
|
188
|
+
if (loc !== 'global')
|
|
189
|
+
return [];
|
|
190
|
+
return [mcpJsonPath()];
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
function writeMcpEntry() {
|
|
194
|
+
const file = mcpJsonPath();
|
|
195
|
+
const existed = fs.existsSync(file);
|
|
196
|
+
let text = readConfigText(file);
|
|
197
|
+
if (!text.trim())
|
|
198
|
+
text = '{}\n';
|
|
199
|
+
const config = parseConfig(text);
|
|
200
|
+
const before = config.servers?.codegraph;
|
|
201
|
+
const after = (0, shared_1.getMcpServerConfig)();
|
|
202
|
+
if ((0, shared_1.jsonDeepEqual)(before, after)) {
|
|
203
|
+
return { path: file, action: 'unchanged' };
|
|
204
|
+
}
|
|
205
|
+
// Surgical edit — preserves comments, formatting, and sibling
|
|
206
|
+
// servers ("servers" is created when missing).
|
|
207
|
+
const edits = (0, jsonc_parser_1.modify)(text, ['servers', 'codegraph'], after, {
|
|
208
|
+
formattingOptions: FORMATTING,
|
|
209
|
+
});
|
|
210
|
+
const updated = (0, jsonc_parser_1.applyEdits)(text, edits);
|
|
211
|
+
(0, shared_1.atomicWriteFileSync)(file, updated);
|
|
212
|
+
return { path: file, action: existed ? 'updated' : 'created' };
|
|
213
|
+
}
|
|
214
|
+
function removeMcpEntry() {
|
|
215
|
+
const file = mcpJsonPath();
|
|
216
|
+
if (!fs.existsSync(file))
|
|
217
|
+
return { path: file, action: 'not-found' };
|
|
218
|
+
const text = readConfigText(file);
|
|
219
|
+
const config = parseConfig(text);
|
|
220
|
+
if (!config.servers?.codegraph)
|
|
221
|
+
return { path: file, action: 'not-found' };
|
|
222
|
+
let edits = (0, jsonc_parser_1.modify)(text, ['servers', 'codegraph'], undefined, {
|
|
223
|
+
formattingOptions: FORMATTING,
|
|
224
|
+
});
|
|
225
|
+
let updated = (0, jsonc_parser_1.applyEdits)(text, edits);
|
|
226
|
+
// Drop an emptied `servers` wrapper; the file itself is left in
|
|
227
|
+
// place — the plugin owns it and siblings may remain.
|
|
228
|
+
const afterParsed = parseConfig(updated);
|
|
229
|
+
if (afterParsed.servers && typeof afterParsed.servers === 'object' &&
|
|
230
|
+
Object.keys(afterParsed.servers).length === 0) {
|
|
231
|
+
edits = (0, jsonc_parser_1.modify)(updated, ['servers'], undefined, { formattingOptions: FORMATTING });
|
|
232
|
+
updated = (0, jsonc_parser_1.applyEdits)(updated, edits);
|
|
233
|
+
}
|
|
234
|
+
(0, shared_1.atomicWriteFileSync)(file, updated);
|
|
235
|
+
return { path: file, action: 'removed' };
|
|
236
|
+
}
|
|
237
|
+
exports.copilotJetbrainsTarget = new CopilotJetbrainsTarget();
|
|
238
|
+
//# sourceMappingURL=copilot-jetbrains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-jetbrains.js","sourceRoot":"","sources":["../../../src/installer/targets/copilot-jetbrains.ts"],"names":[],"mappings":";AAAA;;;;;;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S,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE;QAC5D,iBAAiB,EAAE,UAAU;KAC9B,CAAC,CAAC;IACH,IAAI,OAAO,GAAG,IAAA,yBAAU,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAEtC,gEAAgE;IAChE,sDAAsD;IACtD,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,WAAW,CAAC,OAAO,IAAI,OAAO,WAAW,CAAC,OAAO,KAAK,QAAQ;QAC9D,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClD,KAAK,GAAG,IAAA,qBAAM,EAAC,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC,CAAC;QACnF,OAAO,GAAG,IAAA,yBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,IAAA,4BAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC3C,CAAC;AAEY,QAAA,sBAAsB,GAAgB,IAAI,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* VS Code (GitHub Copilot Chat) target.
|
|
3
|
+
*
|
|
4
|
+
* - MCP server entry to `.vscode/mcp.json` (local, workspace-scoped)
|
|
5
|
+
* or the user-level `mcp.json` in the VS Code User dir (global):
|
|
6
|
+
*
|
|
7
|
+
* macOS: ~/Library/Application Support/Code/User/mcp.json
|
|
8
|
+
* Windows: %APPDATA%\Code\User\mcp.json
|
|
9
|
+
* Linux: $XDG_CONFIG_HOME|~/.config/Code/User/mcp.json
|
|
10
|
+
*
|
|
11
|
+
* VS Code moved MCP config out of settings.json into this dedicated
|
|
12
|
+
* `mcp.json` (v1.102, "MCP: Open User Configuration"). Shape is
|
|
13
|
+
* `{ "servers": { "<name>": { "type": "stdio", "command", "args" } } }`
|
|
14
|
+
* — note `servers`, not the `mcpServers` wrapper Claude/Cursor use.
|
|
15
|
+
* - No instructions file: Copilot Chat consumes the MCP `initialize`
|
|
16
|
+
* instructions, the single source of truth (#529).
|
|
17
|
+
* - No permissions concept — `autoAllow` is silently ignored.
|
|
18
|
+
*
|
|
19
|
+
* ## Why `--path` only for local installs (NOT the Cursor pattern)
|
|
20
|
+
*
|
|
21
|
+
* Unlike Cursor, VS Code DOCUMENTS the launch cwd for stdio MCP
|
|
22
|
+
* servers: "Working directory for the server command. Defaults to the
|
|
23
|
+
* workspace folder when run in a workspace" (mcp-configuration
|
|
24
|
+
* reference). The codegraph server resolves its project via the MCP
|
|
25
|
+
* roots/list dance with a cwd fallback, so cwd alone is sufficient:
|
|
26
|
+
*
|
|
27
|
+
* - `local` install: absolute `--path` (known at install time) —
|
|
28
|
+
* deterministic, and free of variables.
|
|
29
|
+
* - `global` install: NO `--path`. Do not be tempted to pin it with
|
|
30
|
+
* `${workspaceFolder}`: VS Code refuses to start a user-level
|
|
31
|
+
* server whose entry uses that variable whenever a window has no
|
|
32
|
+
* folder open (loose files, welcome tab), surfacing an error toast
|
|
33
|
+
* "Variable workspaceFolder can not be resolved" in every such
|
|
34
|
+
* window — exactly the error-noise that teaches users to disable
|
|
35
|
+
* the server. With no `--path`, a folderless window still starts
|
|
36
|
+
* the server fine and it serves the "no project" guidance.
|
|
37
|
+
*
|
|
38
|
+
* ## JSONC
|
|
39
|
+
*
|
|
40
|
+
* VS Code parses its config files as JSONC (comments + trailing commas
|
|
41
|
+
* allowed), so reads + writes go through `jsonc-parser` — surgical
|
|
42
|
+
* edits that preserve sibling servers, user comments, and formatting
|
|
43
|
+
* across install / re-install / uninstall (same approach as opencode).
|
|
44
|
+
*/
|
|
45
|
+
import { AgentTarget } from './types';
|
|
46
|
+
export declare const copilotVscodeTarget: AgentTarget;
|
|
47
|
+
//# sourceMappingURL=copilot-vscode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-vscode.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/copilot-vscode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAMH,OAAO,EACL,WAAW,EAKZ,MAAM,SAAS,CAAC;AA4JjB,eAAO,MAAM,mBAAmB,EAAE,WAAuC,CAAC"}
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* VS Code (GitHub Copilot Chat) target.
|
|
4
|
+
*
|
|
5
|
+
* - MCP server entry to `.vscode/mcp.json` (local, workspace-scoped)
|
|
6
|
+
* or the user-level `mcp.json` in the VS Code User dir (global):
|
|
7
|
+
*
|
|
8
|
+
* macOS: ~/Library/Application Support/Code/User/mcp.json
|
|
9
|
+
* Windows: %APPDATA%\Code\User\mcp.json
|
|
10
|
+
* Linux: $XDG_CONFIG_HOME|~/.config/Code/User/mcp.json
|
|
11
|
+
*
|
|
12
|
+
* VS Code moved MCP config out of settings.json into this dedicated
|
|
13
|
+
* `mcp.json` (v1.102, "MCP: Open User Configuration"). Shape is
|
|
14
|
+
* `{ "servers": { "<name>": { "type": "stdio", "command", "args" } } }`
|
|
15
|
+
* — note `servers`, not the `mcpServers` wrapper Claude/Cursor use.
|
|
16
|
+
* - No instructions file: Copilot Chat consumes the MCP `initialize`
|
|
17
|
+
* instructions, the single source of truth (#529).
|
|
18
|
+
* - No permissions concept — `autoAllow` is silently ignored.
|
|
19
|
+
*
|
|
20
|
+
* ## Why `--path` only for local installs (NOT the Cursor pattern)
|
|
21
|
+
*
|
|
22
|
+
* Unlike Cursor, VS Code DOCUMENTS the launch cwd for stdio MCP
|
|
23
|
+
* servers: "Working directory for the server command. Defaults to the
|
|
24
|
+
* workspace folder when run in a workspace" (mcp-configuration
|
|
25
|
+
* reference). The codegraph server resolves its project via the MCP
|
|
26
|
+
* roots/list dance with a cwd fallback, so cwd alone is sufficient:
|
|
27
|
+
*
|
|
28
|
+
* - `local` install: absolute `--path` (known at install time) —
|
|
29
|
+
* deterministic, and free of variables.
|
|
30
|
+
* - `global` install: NO `--path`. Do not be tempted to pin it with
|
|
31
|
+
* `${workspaceFolder}`: VS Code refuses to start a user-level
|
|
32
|
+
* server whose entry uses that variable whenever a window has no
|
|
33
|
+
* folder open (loose files, welcome tab), surfacing an error toast
|
|
34
|
+
* "Variable workspaceFolder can not be resolved" in every such
|
|
35
|
+
* window — exactly the error-noise that teaches users to disable
|
|
36
|
+
* the server. With no `--path`, a folderless window still starts
|
|
37
|
+
* the server fine and it serves the "no project" guidance.
|
|
38
|
+
*
|
|
39
|
+
* ## JSONC
|
|
40
|
+
*
|
|
41
|
+
* VS Code parses its config files as JSONC (comments + trailing commas
|
|
42
|
+
* allowed), so reads + writes go through `jsonc-parser` — surgical
|
|
43
|
+
* edits that preserve sibling servers, user comments, and formatting
|
|
44
|
+
* across install / re-install / uninstall (same approach as opencode).
|
|
45
|
+
*/
|
|
46
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
47
|
+
if (k2 === undefined) k2 = k;
|
|
48
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
49
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
50
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
51
|
+
}
|
|
52
|
+
Object.defineProperty(o, k2, desc);
|
|
53
|
+
}) : (function(o, m, k, k2) {
|
|
54
|
+
if (k2 === undefined) k2 = k;
|
|
55
|
+
o[k2] = m[k];
|
|
56
|
+
}));
|
|
57
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
58
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
59
|
+
}) : function(o, v) {
|
|
60
|
+
o["default"] = v;
|
|
61
|
+
});
|
|
62
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
63
|
+
var ownKeys = function(o) {
|
|
64
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
65
|
+
var ar = [];
|
|
66
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
67
|
+
return ar;
|
|
68
|
+
};
|
|
69
|
+
return ownKeys(o);
|
|
70
|
+
};
|
|
71
|
+
return function (mod) {
|
|
72
|
+
if (mod && mod.__esModule) return mod;
|
|
73
|
+
var result = {};
|
|
74
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
75
|
+
__setModuleDefault(result, mod);
|
|
76
|
+
return result;
|
|
77
|
+
};
|
|
78
|
+
})();
|
|
79
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
80
|
+
exports.copilotVscodeTarget = void 0;
|
|
81
|
+
const fs = __importStar(require("fs"));
|
|
82
|
+
const path = __importStar(require("path"));
|
|
83
|
+
const os = __importStar(require("os"));
|
|
84
|
+
const jsonc_parser_1 = require("jsonc-parser");
|
|
85
|
+
const shared_1 = require("./shared");
|
|
86
|
+
function vscodeUserDir() {
|
|
87
|
+
const home = os.homedir();
|
|
88
|
+
if (process.platform === 'win32') {
|
|
89
|
+
const appData = process.env.APPDATA && process.env.APPDATA.trim().length > 0
|
|
90
|
+
? process.env.APPDATA
|
|
91
|
+
: path.join(home, 'AppData', 'Roaming');
|
|
92
|
+
return path.join(appData, 'Code', 'User');
|
|
93
|
+
}
|
|
94
|
+
if (process.platform === 'darwin') {
|
|
95
|
+
return path.join(home, 'Library', 'Application Support', 'Code', 'User');
|
|
96
|
+
}
|
|
97
|
+
const xdg = process.env.XDG_CONFIG_HOME && process.env.XDG_CONFIG_HOME.trim().length > 0
|
|
98
|
+
? process.env.XDG_CONFIG_HOME
|
|
99
|
+
: path.join(home, '.config');
|
|
100
|
+
return path.join(xdg, 'Code', 'User');
|
|
101
|
+
}
|
|
102
|
+
function mcpJsonPath(loc) {
|
|
103
|
+
return loc === 'global'
|
|
104
|
+
? path.join(vscodeUserDir(), 'mcp.json')
|
|
105
|
+
: path.join(process.cwd(), '.vscode', 'mcp.json');
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Build the codegraph server entry for VS Code at the given location.
|
|
109
|
+
* Local installs pin `--path`; global installs rely on VS Code's
|
|
110
|
+
* documented workspace-folder cwd — see file header for why the global
|
|
111
|
+
* entry must stay variable-free.
|
|
112
|
+
*/
|
|
113
|
+
function buildVscodeServerEntry(loc) {
|
|
114
|
+
const base = (0, shared_1.getMcpServerConfig)();
|
|
115
|
+
if (loc === 'local') {
|
|
116
|
+
return { ...base, args: [...base.args, '--path', process.cwd()] };
|
|
117
|
+
}
|
|
118
|
+
return { ...base, args: [...base.args] };
|
|
119
|
+
}
|
|
120
|
+
function readConfigText(file) {
|
|
121
|
+
if (!fs.existsSync(file))
|
|
122
|
+
return '';
|
|
123
|
+
return fs.readFileSync(file, 'utf-8');
|
|
124
|
+
}
|
|
125
|
+
function parseConfig(text) {
|
|
126
|
+
if (!text.trim())
|
|
127
|
+
return {};
|
|
128
|
+
const errors = [];
|
|
129
|
+
const result = (0, jsonc_parser_1.parse)(text, errors, { allowTrailingComma: true });
|
|
130
|
+
if (result == null || typeof result !== 'object' || Array.isArray(result)) {
|
|
131
|
+
return {};
|
|
132
|
+
}
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
const FORMATTING = { tabSize: 2, insertSpaces: true, eol: '\n' };
|
|
136
|
+
class CopilotVscodeTarget {
|
|
137
|
+
id = 'copilot-vscode';
|
|
138
|
+
displayName = 'VS Code (Copilot Chat)';
|
|
139
|
+
docsUrl = 'https://code.visualstudio.com/docs/copilot/customization/mcp-servers';
|
|
140
|
+
supportsLocation(_loc) {
|
|
141
|
+
return true;
|
|
142
|
+
}
|
|
143
|
+
detect(loc) {
|
|
144
|
+
const file = mcpJsonPath(loc);
|
|
145
|
+
const config = parseConfig(readConfigText(file));
|
|
146
|
+
const alreadyConfigured = !!config.servers?.codegraph;
|
|
147
|
+
// "Installed" heuristic: the VS Code User dir (created on first
|
|
148
|
+
// launch) or ~/.vscode (extensions dir) for global; an existing
|
|
149
|
+
// .vscode/ dir in the project for local.
|
|
150
|
+
const installed = loc === 'global'
|
|
151
|
+
? fs.existsSync(vscodeUserDir()) || fs.existsSync(path.join(os.homedir(), '.vscode'))
|
|
152
|
+
: fs.existsSync(path.join(process.cwd(), '.vscode'));
|
|
153
|
+
return { installed, alreadyConfigured, configPath: file };
|
|
154
|
+
}
|
|
155
|
+
install(loc, _opts) {
|
|
156
|
+
return {
|
|
157
|
+
files: [writeMcpEntry(loc)],
|
|
158
|
+
notes: ['Restart VS Code for MCP changes to take effect.'],
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
uninstall(loc) {
|
|
162
|
+
return { files: [removeMcpEntry(loc)] };
|
|
163
|
+
}
|
|
164
|
+
printConfig(loc) {
|
|
165
|
+
const target = mcpJsonPath(loc);
|
|
166
|
+
const snippet = JSON.stringify({ servers: { codegraph: buildVscodeServerEntry(loc) } }, null, 2);
|
|
167
|
+
return `# Add to ${target}\n\n${snippet}\n`;
|
|
168
|
+
}
|
|
169
|
+
describePaths(loc) {
|
|
170
|
+
return [mcpJsonPath(loc)];
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
function writeMcpEntry(loc) {
|
|
174
|
+
const file = mcpJsonPath(loc);
|
|
175
|
+
const existed = fs.existsSync(file);
|
|
176
|
+
let text = readConfigText(file);
|
|
177
|
+
if (!text.trim())
|
|
178
|
+
text = '{}\n';
|
|
179
|
+
const config = parseConfig(text);
|
|
180
|
+
const before = config.servers?.codegraph;
|
|
181
|
+
const after = buildVscodeServerEntry(loc);
|
|
182
|
+
if ((0, shared_1.jsonDeepEqual)(before, after)) {
|
|
183
|
+
return { path: file, action: 'unchanged' };
|
|
184
|
+
}
|
|
185
|
+
// Surgical edit — preserves comments, formatting, and sibling
|
|
186
|
+
// servers ("servers" is created when missing).
|
|
187
|
+
const edits = (0, jsonc_parser_1.modify)(text, ['servers', 'codegraph'], after, {
|
|
188
|
+
formattingOptions: FORMATTING,
|
|
189
|
+
});
|
|
190
|
+
const updated = (0, jsonc_parser_1.applyEdits)(text, edits);
|
|
191
|
+
(0, shared_1.atomicWriteFileSync)(file, updated);
|
|
192
|
+
return { path: file, action: existed ? 'updated' : 'created' };
|
|
193
|
+
}
|
|
194
|
+
function removeMcpEntry(loc) {
|
|
195
|
+
const file = mcpJsonPath(loc);
|
|
196
|
+
if (!fs.existsSync(file))
|
|
197
|
+
return { path: file, action: 'not-found' };
|
|
198
|
+
const text = readConfigText(file);
|
|
199
|
+
const config = parseConfig(text);
|
|
200
|
+
if (!config.servers?.codegraph)
|
|
201
|
+
return { path: file, action: 'not-found' };
|
|
202
|
+
let edits = (0, jsonc_parser_1.modify)(text, ['servers', 'codegraph'], undefined, {
|
|
203
|
+
formattingOptions: FORMATTING,
|
|
204
|
+
});
|
|
205
|
+
let updated = (0, jsonc_parser_1.applyEdits)(text, edits);
|
|
206
|
+
// Drop an emptied `servers` wrapper; the file itself is left in
|
|
207
|
+
// place — VS Code recreates/reads it and siblings like `inputs`
|
|
208
|
+
// may remain.
|
|
209
|
+
const afterParsed = parseConfig(updated);
|
|
210
|
+
if (afterParsed.servers && typeof afterParsed.servers === 'object' &&
|
|
211
|
+
Object.keys(afterParsed.servers).length === 0) {
|
|
212
|
+
edits = (0, jsonc_parser_1.modify)(updated, ['servers'], undefined, { formattingOptions: FORMATTING });
|
|
213
|
+
updated = (0, jsonc_parser_1.applyEdits)(updated, edits);
|
|
214
|
+
}
|
|
215
|
+
(0, shared_1.atomicWriteFileSync)(file, updated);
|
|
216
|
+
return { path: file, action: 'removed' };
|
|
217
|
+
}
|
|
218
|
+
exports.copilotVscodeTarget = new CopilotVscodeTarget();
|
|
219
|
+
//# sourceMappingURL=copilot-vscode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copilot-vscode.js","sourceRoot":"","sources":["../../../src/installer/targets/copilot-vscode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,+CAAuE;AAQvE,qCAIkB;AAElB,SAAS,aAAa;IACpB,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;IAC1B,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;QACjC,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;YAC1E,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO;YACrB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QAC1C,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IACD,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3E,CAAC;IACD,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QACtF,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe;QAC7B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,C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,CAAC,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClD,KAAK,GAAG,IAAA,qBAAM,EAAC,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,EAAE,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC,CAAC;QACnF,OAAO,GAAG,IAAA,yBAAU,EAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACvC,CAAC;IAED,IAAA,4BAAmB,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AAC3C,CAAC;AAEY,QAAA,mBAAmB,GAAgB,IAAI,mBAAmB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAa1D,eAAO,MAAM,WAAW,EAAE,SAAS,WAAW,EAY5C,CAAC;AAEH,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE7D;AAED,wBAAgB,aAAa,IAAI,QAAQ,EAAE,CAE1C;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC9C,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;CAC9C,CAAC,CAKD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,GAAG,WAAW,EAAE,CAyB7E"}
|
|
@@ -21,6 +21,9 @@ const hermes_1 = require("./hermes");
|
|
|
21
21
|
const gemini_1 = require("./gemini");
|
|
22
22
|
const antigravity_1 = require("./antigravity");
|
|
23
23
|
const kiro_1 = require("./kiro");
|
|
24
|
+
const copilot_vscode_1 = require("./copilot-vscode");
|
|
25
|
+
const copilot_cli_1 = require("./copilot-cli");
|
|
26
|
+
const copilot_jetbrains_1 = require("./copilot-jetbrains");
|
|
24
27
|
exports.ALL_TARGETS = Object.freeze([
|
|
25
28
|
claude_1.claudeTarget,
|
|
26
29
|
cursor_1.cursorTarget,
|
|
@@ -30,6 +33,9 @@ exports.ALL_TARGETS = Object.freeze([
|
|
|
30
33
|
gemini_1.geminiTarget,
|
|
31
34
|
antigravity_1.antigravityTarget,
|
|
32
35
|
kiro_1.kiroTarget,
|
|
36
|
+
copilot_vscode_1.copilotVscodeTarget,
|
|
37
|
+
copilot_cli_1.copilotCliTarget,
|
|
38
|
+
copilot_jetbrains_1.copilotJetbrainsTarget,
|
|
33
39
|
]);
|
|
34
40
|
function getTarget(id) {
|
|
35
41
|
return exports.ALL_TARGETS.find((t) => t.id === id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/installer/targets/registry.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../src/installer/targets/registry.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;AA6BH,8BAEC;AAED,sCAEC;AAQD,8BAQC;AAaD,8CAyBC;AAtFD,qCAAwC;AACxC,qCAAwC;AACxC,mCAAsC;AACtC,yCAA4C;AAC5C,qCAAwC;AACxC,qCAAwC;AACxC,+CAAkD;AAClD,iCAAoC;AACpC,qDAAuD;AACvD,+CAAi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,CAAC,MAAM,CAAC,CAAC;QACrE,MAAM,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;QACrC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACpC,CAAC;IAED,MAAM,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAClE,MAAM,QAAQ,GAAkB,EAAE,CAAC;IACnC,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC;QACrB,MAAM,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,CAAC;QACxB,IAAI,CAAC;YAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;;YACnB,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;IACD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,aAAa,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,IAAI,KAAK,CACb,2BAA2B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,KAAK,iCAAiC,CAChG,CAAC;IACJ,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -7,13 +7,14 @@
|
|
|
7
7
|
*
|
|
8
8
|
* Strategy: treat the file as text. Find the `[mcp_servers.codegraph]`
|
|
9
9
|
* header line, splice it (and the lines that follow it until the next
|
|
10
|
-
* `[...]` header or EOF) in or out.
|
|
11
|
-
*
|
|
10
|
+
* `[...]` / `[[...]]` header or EOF) in or out. A small lexical scan keeps
|
|
11
|
+
* header-shaped text inside multiline values out of the boundary search.
|
|
12
|
+
* Everything outside that block is preserved verbatim, byte-for-byte.
|
|
12
13
|
*
|
|
13
14
|
* Limitations (acceptable for our narrow use):
|
|
14
|
-
* - Only
|
|
15
|
-
* subtables
|
|
16
|
-
*
|
|
15
|
+
* - Only writes a top-level table header. Array-of-tables and sibling
|
|
16
|
+
* subtables are preserved as opaque blocks (we always write the full
|
|
17
|
+
* dotted key `[mcp_servers.codegraph]`).
|
|
17
18
|
* - Doesn't validate sibling TOML — if the file is malformed
|
|
18
19
|
* elsewhere, our injection won't fix it but won't make it worse.
|
|
19
20
|
* - Quotes string values with double quotes; escapes `\` and `"`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toml.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/toml.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"toml.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/toml.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAaxF;AAQD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,MAAM,CAEhG;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,WAAW,CAAA;CAAE,CAkCpE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,GACb;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,SAAS,GAAG,WAAW,CAAA;CAAE,CAUtD"}
|