@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.
Files changed (314) hide show
  1. package/bin/codegraph.cmd +1 -1
  2. package/lib/dist/bin/codegraph.js +206 -44
  3. package/lib/dist/bin/codegraph.js.map +1 -1
  4. package/lib/dist/context/formatter.d.ts +7 -1
  5. package/lib/dist/context/formatter.d.ts.map +1 -1
  6. package/lib/dist/context/formatter.js +12 -6
  7. package/lib/dist/context/formatter.js.map +1 -1
  8. package/lib/dist/context/index.d.ts +12 -0
  9. package/lib/dist/context/index.d.ts.map +1 -1
  10. package/lib/dist/context/index.js +101 -25
  11. package/lib/dist/context/index.js.map +1 -1
  12. package/lib/dist/db/index.d.ts +179 -0
  13. package/lib/dist/db/index.d.ts.map +1 -1
  14. package/lib/dist/db/index.js +368 -7
  15. package/lib/dist/db/index.js.map +1 -1
  16. package/lib/dist/db/migrations.d.ts +1 -1
  17. package/lib/dist/db/migrations.d.ts.map +1 -1
  18. package/lib/dist/db/migrations.js +25 -1
  19. package/lib/dist/db/migrations.js.map +1 -1
  20. package/lib/dist/db/queries.d.ts +234 -5
  21. package/lib/dist/db/queries.d.ts.map +1 -1
  22. package/lib/dist/db/queries.js +687 -53
  23. package/lib/dist/db/queries.js.map +1 -1
  24. package/lib/dist/db/schema.sql +16 -3
  25. package/lib/dist/db/sqlite-adapter.d.ts +3 -1
  26. package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
  27. package/lib/dist/db/sqlite-adapter.js +22 -4
  28. package/lib/dist/db/sqlite-adapter.js.map +1 -1
  29. package/lib/dist/db/wal-valve.d.ts +15 -2
  30. package/lib/dist/db/wal-valve.d.ts.map +1 -1
  31. package/lib/dist/db/wal-valve.js +88 -6
  32. package/lib/dist/db/wal-valve.js.map +1 -1
  33. package/lib/dist/directory.d.ts +29 -0
  34. package/lib/dist/directory.d.ts.map +1 -1
  35. package/lib/dist/directory.js +52 -0
  36. package/lib/dist/directory.js.map +1 -1
  37. package/lib/dist/extraction/extraction-version.d.ts +1 -1
  38. package/lib/dist/extraction/extraction-version.js +1 -1
  39. package/lib/dist/extraction/function-ref.d.ts.map +1 -1
  40. package/lib/dist/extraction/function-ref.js +6 -0
  41. package/lib/dist/extraction/function-ref.js.map +1 -1
  42. package/lib/dist/extraction/generated-detection.d.ts +48 -12
  43. package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
  44. package/lib/dist/extraction/generated-detection.js +176 -11
  45. package/lib/dist/extraction/generated-detection.js.map +1 -1
  46. package/lib/dist/extraction/grammars.d.ts.map +1 -1
  47. package/lib/dist/extraction/grammars.js +101 -2
  48. package/lib/dist/extraction/grammars.js.map +1 -1
  49. package/lib/dist/extraction/index.d.ts +138 -3
  50. package/lib/dist/extraction/index.d.ts.map +1 -1
  51. package/lib/dist/extraction/index.js +518 -94
  52. package/lib/dist/extraction/index.js.map +1 -1
  53. package/lib/dist/extraction/kernel/decode.d.ts +9 -0
  54. package/lib/dist/extraction/kernel/decode.d.ts.map +1 -0
  55. package/lib/dist/extraction/kernel/decode.js +162 -0
  56. package/lib/dist/extraction/kernel/decode.js.map +1 -0
  57. package/lib/dist/extraction/kernel/index.d.ts +64 -0
  58. package/lib/dist/extraction/kernel/index.d.ts.map +1 -0
  59. package/lib/dist/extraction/kernel/index.js +279 -0
  60. package/lib/dist/extraction/kernel/index.js.map +1 -0
  61. package/lib/dist/extraction/kernel/layout.d.ts +101 -0
  62. package/lib/dist/extraction/kernel/layout.d.ts.map +1 -0
  63. package/lib/dist/extraction/kernel/layout.js +104 -0
  64. package/lib/dist/extraction/kernel/layout.js.map +1 -0
  65. package/lib/dist/extraction/kernel/loader.d.ts +103 -0
  66. package/lib/dist/extraction/kernel/loader.d.ts.map +1 -0
  67. package/lib/dist/extraction/kernel/loader.js +146 -0
  68. package/lib/dist/extraction/kernel/loader.js.map +1 -0
  69. package/lib/dist/extraction/languages/c-cpp.d.ts +14 -0
  70. package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
  71. package/lib/dist/extraction/languages/c-cpp.js +868 -16
  72. package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
  73. package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
  74. package/lib/dist/extraction/languages/erlang.js +58 -22
  75. package/lib/dist/extraction/languages/erlang.js.map +1 -1
  76. package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
  77. package/lib/dist/extraction/languages/objc.js +4 -0
  78. package/lib/dist/extraction/languages/objc.js.map +1 -1
  79. package/lib/dist/extraction/languages/rust.d.ts +20 -0
  80. package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
  81. package/lib/dist/extraction/languages/rust.js +47 -20
  82. package/lib/dist/extraction/languages/rust.js.map +1 -1
  83. package/lib/dist/extraction/parse-pool.d.ts +15 -0
  84. package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
  85. package/lib/dist/extraction/parse-pool.js +35 -1
  86. package/lib/dist/extraction/parse-pool.js.map +1 -1
  87. package/lib/dist/extraction/parse-worker.js +35 -1
  88. package/lib/dist/extraction/parse-worker.js.map +1 -1
  89. package/lib/dist/extraction/store-worker.d.ts +24 -0
  90. package/lib/dist/extraction/store-worker.d.ts.map +1 -0
  91. package/lib/dist/extraction/store-worker.js +139 -0
  92. package/lib/dist/extraction/store-worker.js.map +1 -0
  93. package/lib/dist/extraction/store-writer.d.ts +63 -0
  94. package/lib/dist/extraction/store-writer.d.ts.map +1 -0
  95. package/lib/dist/extraction/store-writer.js +174 -0
  96. package/lib/dist/extraction/store-writer.js.map +1 -0
  97. package/lib/dist/extraction/tree-sitter-types.d.ts +2 -0
  98. package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
  99. package/lib/dist/extraction/tree-sitter.d.ts +27 -5
  100. package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
  101. package/lib/dist/extraction/tree-sitter.js +257 -56
  102. package/lib/dist/extraction/tree-sitter.js.map +1 -1
  103. package/lib/dist/extraction/wasm/tree-sitter-c.wasm +0 -0
  104. package/lib/dist/extraction/wasm/tree-sitter-cpp.wasm +0 -0
  105. package/lib/dist/extraction/wasm/tree-sitter-dart.wasm +0 -0
  106. package/lib/dist/extraction/wasm/tree-sitter-go.wasm +0 -0
  107. package/lib/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
  108. package/lib/dist/extraction/wasm/tree-sitter-javascript.wasm +0 -0
  109. package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
  110. package/lib/dist/extraction/wasm/tree-sitter-php.wasm +0 -0
  111. package/lib/dist/extraction/wasm/tree-sitter-python.wasm +0 -0
  112. package/lib/dist/extraction/wasm/tree-sitter-ruby.wasm +0 -0
  113. package/lib/dist/extraction/wasm/tree-sitter-rust.wasm +0 -0
  114. package/lib/dist/extraction/wasm/tree-sitter-swift.wasm +0 -0
  115. package/lib/dist/extraction/wasm/tree-sitter-tsx.wasm +0 -0
  116. package/lib/dist/extraction/wasm/tree-sitter-typescript.wasm +0 -0
  117. package/lib/dist/extraction/wasm-runtime-flags.d.ts +15 -0
  118. package/lib/dist/extraction/wasm-runtime-flags.d.ts.map +1 -1
  119. package/lib/dist/extraction/wasm-runtime-flags.js +27 -3
  120. package/lib/dist/extraction/wasm-runtime-flags.js.map +1 -1
  121. package/lib/dist/graph/queries.d.ts.map +1 -1
  122. package/lib/dist/graph/queries.js +2 -0
  123. package/lib/dist/graph/queries.js.map +1 -1
  124. package/lib/dist/graph/traversal.js +1 -1
  125. package/lib/dist/graph/traversal.js.map +1 -1
  126. package/lib/dist/index.d.ts +36 -2
  127. package/lib/dist/index.d.ts.map +1 -1
  128. package/lib/dist/index.js +305 -11
  129. package/lib/dist/index.js.map +1 -1
  130. package/lib/dist/installer/beta-signup.d.ts +54 -0
  131. package/lib/dist/installer/beta-signup.d.ts.map +1 -0
  132. package/lib/dist/installer/beta-signup.js +178 -0
  133. package/lib/dist/installer/beta-signup.js.map +1 -0
  134. package/lib/dist/installer/index.d.ts +4 -3
  135. package/lib/dist/installer/index.d.ts.map +1 -1
  136. package/lib/dist/installer/index.js +19 -6
  137. package/lib/dist/installer/index.js.map +1 -1
  138. package/lib/dist/installer/targets/claude.d.ts.map +1 -1
  139. package/lib/dist/installer/targets/claude.js +37 -5
  140. package/lib/dist/installer/targets/claude.js.map +1 -1
  141. package/lib/dist/installer/targets/codex.d.ts +22 -8
  142. package/lib/dist/installer/targets/codex.d.ts.map +1 -1
  143. package/lib/dist/installer/targets/codex.js +65 -48
  144. package/lib/dist/installer/targets/codex.js.map +1 -1
  145. package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
  146. package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
  147. package/lib/dist/installer/targets/copilot-cli.js +209 -0
  148. package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
  149. package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
  150. package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
  151. package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
  152. package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
  153. package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
  154. package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
  155. package/lib/dist/installer/targets/copilot-vscode.js +219 -0
  156. package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
  157. package/lib/dist/installer/targets/registry.d.ts.map +1 -1
  158. package/lib/dist/installer/targets/registry.js +6 -0
  159. package/lib/dist/installer/targets/registry.js.map +1 -1
  160. package/lib/dist/installer/targets/toml.d.ts +6 -5
  161. package/lib/dist/installer/targets/toml.d.ts.map +1 -1
  162. package/lib/dist/installer/targets/toml.js +99 -20
  163. package/lib/dist/installer/targets/toml.js.map +1 -1
  164. package/lib/dist/installer/targets/types.d.ts +5 -5
  165. package/lib/dist/installer/targets/types.d.ts.map +1 -1
  166. package/lib/dist/mcp/daemon-manager.d.ts +1 -1
  167. package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
  168. package/lib/dist/mcp/daemon-manager.js +1 -1
  169. package/lib/dist/mcp/daemon-manager.js.map +1 -1
  170. package/lib/dist/mcp/daemon-paths.d.ts +6 -0
  171. package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
  172. package/lib/dist/mcp/daemon-paths.js +54 -0
  173. package/lib/dist/mcp/daemon-paths.js.map +1 -1
  174. package/lib/dist/mcp/daemon-registry.d.ts +10 -0
  175. package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
  176. package/lib/dist/mcp/daemon-registry.js +51 -3
  177. package/lib/dist/mcp/daemon-registry.js.map +1 -1
  178. package/lib/dist/mcp/daemon.d.ts +9 -6
  179. package/lib/dist/mcp/daemon.d.ts.map +1 -1
  180. package/lib/dist/mcp/daemon.js +10 -8
  181. package/lib/dist/mcp/daemon.js.map +1 -1
  182. package/lib/dist/mcp/engine.d.ts +3 -0
  183. package/lib/dist/mcp/engine.d.ts.map +1 -1
  184. package/lib/dist/mcp/engine.js +45 -3
  185. package/lib/dist/mcp/engine.js.map +1 -1
  186. package/lib/dist/mcp/explore-dedup.d.ts +137 -0
  187. package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
  188. package/lib/dist/mcp/explore-dedup.js +236 -0
  189. package/lib/dist/mcp/explore-dedup.js.map +1 -0
  190. package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
  191. package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
  192. package/lib/dist/mcp/explore-diagnostics.js +558 -0
  193. package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
  194. package/lib/dist/mcp/explore-session-state.d.ts +217 -0
  195. package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
  196. package/lib/dist/mcp/explore-session-state.js +322 -0
  197. package/lib/dist/mcp/explore-session-state.js.map +1 -0
  198. package/lib/dist/mcp/index.d.ts +24 -0
  199. package/lib/dist/mcp/index.d.ts.map +1 -1
  200. package/lib/dist/mcp/index.js +67 -6
  201. package/lib/dist/mcp/index.js.map +1 -1
  202. package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
  203. package/lib/dist/mcp/liveness-watchdog.js +3 -1
  204. package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
  205. package/lib/dist/mcp/proxy.d.ts.map +1 -1
  206. package/lib/dist/mcp/proxy.js +6 -1
  207. package/lib/dist/mcp/proxy.js.map +1 -1
  208. package/lib/dist/mcp/server-instructions.d.ts +2 -2
  209. package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
  210. package/lib/dist/mcp/server-instructions.js +8 -3
  211. package/lib/dist/mcp/server-instructions.js.map +1 -1
  212. package/lib/dist/mcp/session.d.ts +16 -0
  213. package/lib/dist/mcp/session.d.ts.map +1 -1
  214. package/lib/dist/mcp/session.js +36 -13
  215. package/lib/dist/mcp/session.js.map +1 -1
  216. package/lib/dist/mcp/tools.d.ts +276 -10
  217. package/lib/dist/mcp/tools.d.ts.map +1 -1
  218. package/lib/dist/mcp/tools.js +2425 -237
  219. package/lib/dist/mcp/tools.js.map +1 -1
  220. package/lib/dist/project-config.d.ts +23 -0
  221. package/lib/dist/project-config.d.ts.map +1 -1
  222. package/lib/dist/project-config.js +39 -2
  223. package/lib/dist/project-config.js.map +1 -1
  224. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts +1 -1
  225. package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
  226. package/lib/dist/resolution/c-fnptr-synthesizer.js +582 -138
  227. package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
  228. package/lib/dist/resolution/callback-synthesizer.d.ts +54 -10
  229. package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
  230. package/lib/dist/resolution/callback-synthesizer.js +287 -167
  231. package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
  232. package/lib/dist/resolution/cooperative-yield.d.ts +10 -2
  233. package/lib/dist/resolution/cooperative-yield.d.ts.map +1 -1
  234. package/lib/dist/resolution/cooperative-yield.js +6 -4
  235. package/lib/dist/resolution/cooperative-yield.js.map +1 -1
  236. package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
  237. package/lib/dist/resolution/frameworks/go.js +29 -6
  238. package/lib/dist/resolution/frameworks/go.js.map +1 -1
  239. package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
  240. package/lib/dist/resolution/frameworks/swift.js +11 -1
  241. package/lib/dist/resolution/frameworks/swift.js.map +1 -1
  242. package/lib/dist/resolution/import-resolver.d.ts +2 -3
  243. package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
  244. package/lib/dist/resolution/import-resolver.js +184 -9
  245. package/lib/dist/resolution/import-resolver.js.map +1 -1
  246. package/lib/dist/resolution/index.d.ts +87 -2
  247. package/lib/dist/resolution/index.d.ts.map +1 -1
  248. package/lib/dist/resolution/index.js +731 -134
  249. package/lib/dist/resolution/index.js.map +1 -1
  250. package/lib/dist/resolution/memory-budget.d.ts +48 -0
  251. package/lib/dist/resolution/memory-budget.d.ts.map +1 -0
  252. package/lib/dist/resolution/memory-budget.js +162 -0
  253. package/lib/dist/resolution/memory-budget.js.map +1 -0
  254. package/lib/dist/resolution/name-matcher.d.ts +42 -1
  255. package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
  256. package/lib/dist/resolution/name-matcher.js +681 -99
  257. package/lib/dist/resolution/name-matcher.js.map +1 -1
  258. package/lib/dist/resolution/path-aliases.d.ts +6 -4
  259. package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
  260. package/lib/dist/resolution/path-aliases.js +125 -17
  261. package/lib/dist/resolution/path-aliases.js.map +1 -1
  262. package/lib/dist/resolution/resolver-pool.d.ts +106 -0
  263. package/lib/dist/resolution/resolver-pool.d.ts.map +1 -0
  264. package/lib/dist/resolution/resolver-pool.js +344 -0
  265. package/lib/dist/resolution/resolver-pool.js.map +1 -0
  266. package/lib/dist/resolution/resolver-worker.d.ts +17 -0
  267. package/lib/dist/resolution/resolver-worker.d.ts.map +1 -0
  268. package/lib/dist/resolution/resolver-worker.js +141 -0
  269. package/lib/dist/resolution/resolver-worker.js.map +1 -0
  270. package/lib/dist/resolution/types.d.ts +3 -0
  271. package/lib/dist/resolution/types.d.ts.map +1 -1
  272. package/lib/dist/search/identifier-segments.d.ts +10 -0
  273. package/lib/dist/search/identifier-segments.d.ts.map +1 -1
  274. package/lib/dist/search/identifier-segments.js +29 -0
  275. package/lib/dist/search/identifier-segments.js.map +1 -1
  276. package/lib/dist/search/query-paths.d.ts +57 -0
  277. package/lib/dist/search/query-paths.d.ts.map +1 -0
  278. package/lib/dist/search/query-paths.js +298 -0
  279. package/lib/dist/search/query-paths.js.map +1 -0
  280. package/lib/dist/search/query-utils.d.ts +1 -1
  281. package/lib/dist/search/query-utils.d.ts.map +1 -1
  282. package/lib/dist/search/query-utils.js +13 -3
  283. package/lib/dist/search/query-utils.js.map +1 -1
  284. package/lib/dist/sync/watcher.d.ts +47 -1
  285. package/lib/dist/sync/watcher.d.ts.map +1 -1
  286. package/lib/dist/sync/watcher.js +127 -8
  287. package/lib/dist/sync/watcher.js.map +1 -1
  288. package/lib/dist/types.d.ts +61 -3
  289. package/lib/dist/types.d.ts.map +1 -1
  290. package/lib/dist/types.js +27 -1
  291. package/lib/dist/types.js.map +1 -1
  292. package/lib/dist/ui/color.d.ts +21 -0
  293. package/lib/dist/ui/color.d.ts.map +1 -0
  294. package/lib/dist/ui/color.js +42 -0
  295. package/lib/dist/ui/color.js.map +1 -0
  296. package/lib/dist/ui/glyphs.d.ts +35 -10
  297. package/lib/dist/ui/glyphs.d.ts.map +1 -1
  298. package/lib/dist/ui/glyphs.js +59 -12
  299. package/lib/dist/ui/glyphs.js.map +1 -1
  300. package/lib/dist/ui/shimmer-progress.d.ts.map +1 -1
  301. package/lib/dist/ui/shimmer-progress.js +78 -4
  302. package/lib/dist/ui/shimmer-progress.js.map +1 -1
  303. package/lib/dist/ui/shimmer-worker.js +25 -17
  304. package/lib/dist/ui/shimmer-worker.js.map +1 -1
  305. package/lib/dist/ui/types.d.ts +0 -2
  306. package/lib/dist/ui/types.d.ts.map +1 -1
  307. package/lib/dist/upgrade/index.d.ts +7 -0
  308. package/lib/dist/upgrade/index.d.ts.map +1 -1
  309. package/lib/dist/upgrade/index.js +18 -5
  310. package/lib/dist/upgrade/index.js.map +1 -1
  311. package/lib/kernel/codegraph-kernel.node +0 -0
  312. package/lib/node_modules/.package-lock.json +1 -1
  313. package/lib/package.json +6 -1
  314. package/package.json +6 -2
@@ -2,15 +2,29 @@
2
2
  /**
3
3
  * OpenAI Codex CLI target.
4
4
  *
5
- * - MCP server entry to `~/.codex/config.toml` as the dotted-key
6
- * table `[mcp_servers.codegraph]`. TOML — not JSON — handled by
7
- * the narrow serializer in `./toml.ts`.
8
- * - Instructions to `~/.codex/AGENTS.md`.
5
+ * - MCP server entry to `config.toml` as the dotted-key table
6
+ * `[mcp_servers.codegraph]`. TOML — not JSON — handled by the
7
+ * narrow serializer in `./toml.ts`.
8
+ * - Instructions to `AGENTS.md`.
9
9
  *
10
- * Codex CLI as of 2026-05 has no project-local config concept —
11
- * everything lives under `~/.codex/`. `supportsLocation('local')`
12
- * returns false; the orchestrator skips Codex when the user picks
13
- * the local install location.
10
+ * Both locations are supported (#1531):
11
+ * - global: `~/.codex/config.toml` + `~/.codex/AGENTS.md`
12
+ * - local: `<cwd>/.codex/config.toml` + `<cwd>/AGENTS.md`
13
+ *
14
+ * Codex has a first-class project config layer: `.codex/config.toml`
15
+ * is layer 4 of the loader's stack, above the user config (layer 6),
16
+ * merged recursively top-over-bottom
17
+ * (`codex-rs/config/src/loader/README.md` in openai/codex). It landed
18
+ * in openai/codex#8354 (2025-12-22), so the "Codex has no
19
+ * project-local config" note this file used to carry was never
20
+ * accurate. The project layer strips a denylist of settings that
21
+ * repo contents shouldn't get to choose (base URLs, model providers,
22
+ * `notify`, profiles, otel — `loader/mod.rs`), and `mcp_servers` is
23
+ * NOT on it, so a project-scoped `[mcp_servers.codegraph]` is honored.
24
+ *
25
+ * Caveat surfaced as an install note: project layers are "loaded but
26
+ * disabled when untrusted," so a local install only takes effect in a
27
+ * project the user has marked trusted.
14
28
  *
15
29
  * No permissions concept.
16
30
  */
@@ -56,27 +70,40 @@ const shared_1 = require("./shared");
56
70
  const instructions_template_1 = require("../instructions-template");
57
71
  const toml_1 = require("./toml");
58
72
  const TOML_HEADER = 'mcp_servers.codegraph';
59
- function configDir() {
60
- return path.join(os.homedir(), '.codex');
73
+ function configDir(loc) {
74
+ return loc === 'global'
75
+ ? path.join(os.homedir(), '.codex')
76
+ : path.join(process.cwd(), '.codex');
77
+ }
78
+ function tomlConfigPath(loc) {
79
+ return path.join(configDir(loc), 'config.toml');
61
80
  }
62
- function tomlConfigPath() {
63
- return path.join(configDir(), 'config.toml');
81
+ function instructionsPath(loc) {
82
+ // Global AGENTS.md lives under ~/.codex/; project-local AGENTS.md
83
+ // lives at the project root (NOT under .codex/) — that's the file
84
+ // Codex reads for repo instructions, and it matches the local
85
+ // layout the opencode and gemini targets already use.
86
+ return loc === 'global'
87
+ ? path.join(configDir('global'), 'AGENTS.md')
88
+ : path.join(process.cwd(), 'AGENTS.md');
64
89
  }
65
- function instructionsPath() {
66
- return path.join(configDir(), 'AGENTS.md');
90
+ /**
91
+ * Project layers are "loaded but disabled when untrusted" (openai/codex
92
+ * `loader/mod.rs`), so a local install can be written correctly and
93
+ * still do nothing. Say so rather than reporting silent success.
94
+ */
95
+ function trustNote() {
96
+ return `Codex applies ${tomlConfigPath('local')} only in a project marked trusted — otherwise the layer is loaded but disabled. Trust this project in Codex to activate it.`;
67
97
  }
68
98
  class CodexTarget {
69
99
  id = 'codex';
70
100
  displayName = 'Codex CLI';
71
101
  docsUrl = 'https://github.com/openai/codex';
72
- supportsLocation(loc) {
73
- return loc === 'global';
102
+ supportsLocation(_loc) {
103
+ return true;
74
104
  }
75
105
  detect(loc) {
76
- if (loc !== 'global') {
77
- return { installed: false, alreadyConfigured: false };
78
- }
79
- const tomlPath = tomlConfigPath();
106
+ const tomlPath = tomlConfigPath(loc);
80
107
  let alreadyConfigured = false;
81
108
  if (fs.existsSync(tomlPath)) {
82
109
  try {
@@ -85,29 +112,24 @@ class CodexTarget {
85
112
  }
86
113
  catch { /* ignore */ }
87
114
  }
88
- const installed = fs.existsSync(configDir());
115
+ // Global: ~/.codex/ existing means Codex has run here. Local: the
116
+ // project only counts as "Codex-enabled" once it actually has a
117
+ // .codex/ dir or config file of its own.
118
+ const installed = fs.existsSync(configDir(loc)) || fs.existsSync(tomlPath);
89
119
  return { installed, alreadyConfigured, configPath: tomlPath };
90
120
  }
91
121
  install(loc, _opts) {
92
- if (loc !== 'global') {
93
- return {
94
- files: [],
95
- notes: ['Codex CLI has no project-local config — re-run with --location=global to install.'],
96
- };
97
- }
98
122
  const files = [];
99
- files.push(writeMcpEntry());
123
+ files.push(writeMcpEntry(loc));
100
124
  // AGENTS.md gets the short marker-fenced CodeGraph block (#704):
101
125
  // subagents and non-MCP harnesses read AGENTS.md but never the MCP
102
126
  // initialize instructions. Upsert self-heals a stale pre-#529 block.
103
- files.push((0, shared_1.upsertInstructionsEntry)(instructionsPath()));
104
- return { files };
127
+ files.push((0, shared_1.upsertInstructionsEntry)(instructionsPath(loc)));
128
+ return loc === 'local' ? { files, notes: [trustNote()] } : { files };
105
129
  }
106
130
  uninstall(loc) {
107
- if (loc !== 'global')
108
- return { files: [] };
109
131
  const files = [];
110
- const tomlPath = tomlConfigPath();
132
+ const tomlPath = tomlConfigPath(loc);
111
133
  if (fs.existsSync(tomlPath)) {
112
134
  const content = fs.readFileSync(tomlPath, 'utf-8');
113
135
  const { content: nextContent, action } = (0, toml_1.removeTomlTable)(content, TOML_HEADER);
@@ -130,20 +152,15 @@ class CodexTarget {
130
152
  else {
131
153
  files.push({ path: tomlPath, action: 'not-found' });
132
154
  }
133
- files.push(removeInstructionsEntry());
155
+ files.push(removeInstructionsEntry(loc));
134
156
  return { files };
135
157
  }
136
158
  printConfig(loc) {
137
- if (loc !== 'global') {
138
- return '# Codex CLI has no project-local config — use --location=global.\n';
139
- }
140
159
  const block = buildCodegraphBlock();
141
- return `# Add to ${tomlConfigPath()}\n\n${block}\n`;
160
+ return `# Add to ${tomlConfigPath(loc)}\n\n${block}\n`;
142
161
  }
143
162
  describePaths(loc) {
144
- if (loc !== 'global')
145
- return [];
146
- return [tomlConfigPath(), instructionsPath()];
163
+ return [tomlConfigPath(loc), instructionsPath(loc)];
147
164
  }
148
165
  }
149
166
  function buildCodegraphBlock() {
@@ -153,8 +170,8 @@ function buildCodegraphBlock() {
153
170
  args: mcp.args,
154
171
  });
155
172
  }
156
- function writeMcpEntry() {
157
- const file = tomlConfigPath();
173
+ function writeMcpEntry(loc) {
174
+ const file = tomlConfigPath(loc);
158
175
  const dir = path.dirname(file);
159
176
  if (!fs.existsSync(dir))
160
177
  fs.mkdirSync(dir, { recursive: true });
@@ -172,12 +189,12 @@ function writeMcpEntry() {
172
189
  return { path: file, action: created ? 'created' : 'updated' };
173
190
  }
174
191
  /**
175
- * Strip the marker-delimited CodeGraph block from `~/.codex/AGENTS.md`
176
- * if a prior install wrote one. Used by both install (self-heal on
177
- * upgrade) and uninstall — see issue #529.
192
+ * Strip the marker-delimited CodeGraph block from this location's
193
+ * AGENTS.md if a prior install wrote one. Used by both install
194
+ * (self-heal on upgrade) and uninstall — see issue #529.
178
195
  */
179
- function removeInstructionsEntry() {
180
- const file = instructionsPath();
196
+ function removeInstructionsEntry(loc) {
197
+ const file = instructionsPath(loc);
181
198
  const action = (0, shared_1.removeMarkedSection)(file, instructions_template_1.CODEGRAPH_SECTION_START, instructions_template_1.CODEGRAPH_SECTION_END);
182
199
  return { path: file, action };
183
200
  }
@@ -1 +1 @@
1
- {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../../src/installer/targets/codex.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAQz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C,IAAI,EAAE,WAAW,CAAC,CAAC;IACvC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AACjE,CAAC;AAED;;;;GAIG;AACH,SAAS,uBAAuB,CAAC,GAAa;IAC5C,MAAM,IAAI,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,IAAA,4BAAmB,EAAC,IAAI,EAAE,+CAAuB,EAAE,6CAAqB,CAAC,CAAC;IACzF,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAChC,CAAC;AAEY,QAAA,WAAW,GAAgB,IAAI,WAAW,EAAE,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * GitHub Copilot CLI target.
3
+ *
4
+ * - MCP server entry to `~/.copilot/mcp-config.json` under the
5
+ * `mcpServers` key (same wrapper as Claude/Cursor). Entry shape per
6
+ * the GitHub docs: `{ "type": "stdio", "command", "args", "tools" }`
7
+ * — `type` accepts `"local"` or `"stdio"`; we write `"stdio"` (the
8
+ * standard MCP name, recommended by the docs for cross-client
9
+ * compatibility). `"tools": ["*"]` mirrors the docs' example and is
10
+ * the documented default.
11
+ * - The config dir is `~/.copilot` unless the user moved it via
12
+ * `COPILOT_HOME` (documented override) — we honor it so install and
13
+ * detect follow the CLI's own resolution.
14
+ *
15
+ * Copilot CLI as of 2026-07 has no project-local MCP config — per-repo
16
+ * config (`.github/mcp.json`) is an open feature request
17
+ * (github/copilot-cli#2528). `supportsLocation('local')` returns false;
18
+ * the orchestrator skips this target for local installs with a clear
19
+ * message (same pattern as Codex).
20
+ *
21
+ * The file is machine-written by the CLI's own `/mcp add` flow, so it's
22
+ * plain JSON — no JSONC handling needed; surgical edits go through the
23
+ * shared read/mutate/write helpers (Cursor pattern), preserving sibling
24
+ * servers.
25
+ *
26
+ * No instructions file (MCP `initialize` instructions are the single
27
+ * source of truth, #529) and no permissions concept — `autoAllow` is
28
+ * silently ignored.
29
+ */
30
+ import { AgentTarget } from './types';
31
+ export declare const copilotCliTarget: AgentTarget;
32
+ //# sourceMappingURL=copilot-cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/copilot-cli.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAKH,OAAO,EACL,WAAW,EAKZ,MAAM,SAAS,CAAC;AAwJjB,eAAO,MAAM,gBAAgB,EAAE,WAAoC,CAAC"}
@@ -0,0 +1,209 @@
1
+ "use strict";
2
+ /**
3
+ * GitHub Copilot CLI target.
4
+ *
5
+ * - MCP server entry to `~/.copilot/mcp-config.json` under the
6
+ * `mcpServers` key (same wrapper as Claude/Cursor). Entry shape per
7
+ * the GitHub docs: `{ "type": "stdio", "command", "args", "tools" }`
8
+ * — `type` accepts `"local"` or `"stdio"`; we write `"stdio"` (the
9
+ * standard MCP name, recommended by the docs for cross-client
10
+ * compatibility). `"tools": ["*"]` mirrors the docs' example and is
11
+ * the documented default.
12
+ * - The config dir is `~/.copilot` unless the user moved it via
13
+ * `COPILOT_HOME` (documented override) — we honor it so install and
14
+ * detect follow the CLI's own resolution.
15
+ *
16
+ * Copilot CLI as of 2026-07 has no project-local MCP config — per-repo
17
+ * config (`.github/mcp.json`) is an open feature request
18
+ * (github/copilot-cli#2528). `supportsLocation('local')` returns false;
19
+ * the orchestrator skips this target for local installs with a clear
20
+ * message (same pattern as Codex).
21
+ *
22
+ * The file is machine-written by the CLI's own `/mcp add` flow, so it's
23
+ * plain JSON — no JSONC handling needed; surgical edits go through the
24
+ * shared read/mutate/write helpers (Cursor pattern), preserving sibling
25
+ * servers.
26
+ *
27
+ * No instructions file (MCP `initialize` instructions are the single
28
+ * source of truth, #529) and no permissions concept — `autoAllow` is
29
+ * silently ignored.
30
+ */
31
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
32
+ if (k2 === undefined) k2 = k;
33
+ var desc = Object.getOwnPropertyDescriptor(m, k);
34
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
35
+ desc = { enumerable: true, get: function() { return m[k]; } };
36
+ }
37
+ Object.defineProperty(o, k2, desc);
38
+ }) : (function(o, m, k, k2) {
39
+ if (k2 === undefined) k2 = k;
40
+ o[k2] = m[k];
41
+ }));
42
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
43
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
44
+ }) : function(o, v) {
45
+ o["default"] = v;
46
+ });
47
+ var __importStar = (this && this.__importStar) || (function () {
48
+ var ownKeys = function(o) {
49
+ ownKeys = Object.getOwnPropertyNames || function (o) {
50
+ var ar = [];
51
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
52
+ return ar;
53
+ };
54
+ return ownKeys(o);
55
+ };
56
+ return function (mod) {
57
+ if (mod && mod.__esModule) return mod;
58
+ var result = {};
59
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
60
+ __setModuleDefault(result, mod);
61
+ return result;
62
+ };
63
+ })();
64
+ Object.defineProperty(exports, "__esModule", { value: true });
65
+ exports.copilotCliTarget = void 0;
66
+ const fs = __importStar(require("fs"));
67
+ const path = __importStar(require("path"));
68
+ const os = __importStar(require("os"));
69
+ const shared_1 = require("./shared");
70
+ function configDir() {
71
+ const override = process.env.COPILOT_HOME;
72
+ if (override && override.trim().length > 0)
73
+ return override;
74
+ return path.join(os.homedir(), '.copilot');
75
+ }
76
+ function mcpConfigPath() {
77
+ return path.join(configDir(), 'mcp-config.json');
78
+ }
79
+ /**
80
+ * `~/.copilot` existing is NOT proof the CLI is installed: the VS Code
81
+ * Copilot Chat extension drops MCP socket-handoff lock files into
82
+ * `~/.copilot/ide/` on launch, so a machine with only the VS Code
83
+ * extension still has the dir (with a lone `ide` entry). Count the dir
84
+ * as a CLI footprint only when it holds anything besides `ide` — the
85
+ * CLI writes `config.json` (and later `mcp-config.json`, history state)
86
+ * on first run.
87
+ */
88
+ function cliConfigDirPresent() {
89
+ let entries;
90
+ try {
91
+ entries = fs.readdirSync(configDir());
92
+ }
93
+ catch {
94
+ return false;
95
+ }
96
+ return entries.some((e) => e !== 'ide');
97
+ }
98
+ /**
99
+ * Best-effort check that the `copilot` binary is reachable on PATH.
100
+ * A plain fs scan (no shell-out) — cheap enough to run inside
101
+ * `detectAll()` for the multiselect prompt.
102
+ */
103
+ function copilotOnPath() {
104
+ const pathVar = process.env.PATH || '';
105
+ const exts = process.platform === 'win32'
106
+ ? ['.exe', '.cmd', '.bat', '.ps1']
107
+ : [''];
108
+ for (const dir of pathVar.split(path.delimiter)) {
109
+ if (!dir)
110
+ continue;
111
+ for (const ext of exts) {
112
+ try {
113
+ if (fs.existsSync(path.join(dir, 'copilot' + ext)))
114
+ return true;
115
+ }
116
+ catch { /* ignore unreadable PATH entries */ }
117
+ }
118
+ }
119
+ return false;
120
+ }
121
+ function buildCopilotMcpConfig() {
122
+ const base = (0, shared_1.getMcpServerConfig)();
123
+ return { ...base, tools: ['*'] };
124
+ }
125
+ class CopilotCliTarget {
126
+ id = 'copilot-cli';
127
+ displayName = 'GitHub Copilot CLI';
128
+ docsUrl = 'https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/add-mcp-servers';
129
+ supportsLocation(loc) {
130
+ return loc === 'global';
131
+ }
132
+ detect(loc) {
133
+ if (loc !== 'global') {
134
+ return { installed: false, alreadyConfigured: false };
135
+ }
136
+ const file = mcpConfigPath();
137
+ const config = (0, shared_1.readJsonFile)(file);
138
+ const alreadyConfigured = !!config.mcpServers?.codegraph;
139
+ const installed = cliConfigDirPresent() || copilotOnPath();
140
+ return { installed, alreadyConfigured, configPath: file };
141
+ }
142
+ install(loc, _opts) {
143
+ if (loc !== 'global') {
144
+ return {
145
+ files: [],
146
+ notes: ['Copilot CLI has no project-local config — re-run with --location=global to install.'],
147
+ };
148
+ }
149
+ return {
150
+ files: [writeMcpEntry()],
151
+ notes: ['Restart any running Copilot CLI session to pick up the MCP server.'],
152
+ };
153
+ }
154
+ uninstall(loc) {
155
+ if (loc !== 'global')
156
+ return { files: [] };
157
+ const file = mcpConfigPath();
158
+ if (!fs.existsSync(file)) {
159
+ return { files: [{ path: file, action: 'not-found' }] };
160
+ }
161
+ const config = (0, shared_1.readJsonFile)(file);
162
+ if (!config.mcpServers?.codegraph) {
163
+ return { files: [{ path: file, action: 'not-found' }] };
164
+ }
165
+ delete config.mcpServers.codegraph;
166
+ if (Object.keys(config.mcpServers).length === 0) {
167
+ delete config.mcpServers;
168
+ }
169
+ if (Object.keys(config).length === 0) {
170
+ // Nothing left but the `{}` we'd write back — delete the file so
171
+ // uninstall fully reverses a from-scratch install. A leftover
172
+ // empty file would keep detect() reporting the CLI as installed.
173
+ fs.unlinkSync(file);
174
+ }
175
+ else {
176
+ (0, shared_1.writeJsonFile)(file, config);
177
+ }
178
+ return { files: [{ path: file, action: 'removed' }] };
179
+ }
180
+ printConfig(loc) {
181
+ if (loc !== 'global') {
182
+ return '# Copilot CLI has no project-local config — use --location=global.\n';
183
+ }
184
+ const snippet = JSON.stringify({ mcpServers: { codegraph: buildCopilotMcpConfig() } }, null, 2);
185
+ return `# Add to ${mcpConfigPath()}\n\n${snippet}\n`;
186
+ }
187
+ describePaths(loc) {
188
+ if (loc !== 'global')
189
+ return [];
190
+ return [mcpConfigPath()];
191
+ }
192
+ }
193
+ function writeMcpEntry() {
194
+ const file = mcpConfigPath();
195
+ const existing = (0, shared_1.readJsonFile)(file);
196
+ const before = existing.mcpServers?.codegraph;
197
+ const after = buildCopilotMcpConfig();
198
+ if ((0, shared_1.jsonDeepEqual)(before, after)) {
199
+ return { path: file, action: 'unchanged' };
200
+ }
201
+ const existed = fs.existsSync(file);
202
+ if (!existing.mcpServers)
203
+ existing.mcpServers = {};
204
+ existing.mcpServers.codegraph = after;
205
+ (0, shared_1.writeJsonFile)(file, existing);
206
+ return { path: file, action: existed ? 'updated' : 'created' };
207
+ }
208
+ exports.copilotCliTarget = new CopilotCliTarget();
209
+ //# sourceMappingURL=copilot-cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-cli.js","sourceRoot":"","sources":["../../../src/installer/targets/copilot-cli.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AAQzB,qCAKkB;AAElB,SAAS,SAAS;IAChB,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;IAC1C,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,iBAAiB,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,mBAAmB;IAC1B,IAAI,OAAiB,CAAC;IACtB,IAAI,CAAC;QACH,OAAO,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC,CAAC;IACxC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACH,SAAS,aAAa;IACpB,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,CAAC;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E,WAAW,EAAE,CAAC;IAC7C,CAAC;IACD,MAAM,OAAO,GAAG,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACpC,IAAI,CAAC,QAAQ,CAAC,UAAU;QAAE,QAAQ,CAAC,UAAU,GAAG,EAAE,CAAC;IACnD,QAAQ,CAAC,UAAU,CAAC,SAAS,GAAG,KAAK,CAAC;IACtC,IAAA,sBAAa,EAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;AACjE,CAAC;AAEY,QAAA,gBAAgB,GAAgB,IAAI,gBAAgB,EAAE,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * JetBrains IDEs (GitHub Copilot plugin) target.
3
+ *
4
+ * - MCP server entry to the plugin's user-level `mcp.json`, which
5
+ * lives under the shared `github-copilot` config dir (the same dir
6
+ * the Copilot ecosystem uses for `hosts.json`):
7
+ *
8
+ * macOS/Linux: $XDG_CONFIG_HOME|~/.config/github-copilot/intellij/mcp.json
9
+ * Windows: %LOCALAPPDATA%\github-copilot\intellij\mcp.json
10
+ *
11
+ * `$XDG_CONFIG_HOME` is honored on every platform when set —
12
+ * matching the plugin family's own resolution (copilot.vim /
13
+ * copilot-language-server check it before the OS default).
14
+ * - Shape is VS Code-compatible: `{ "servers": { "<name>": { "type":
15
+ * "stdio", "command", "args" } } }` — the plugin documents mcp.json
16
+ * parity with `.vscode/mcp.json`.
17
+ * - **Global-only.** The plugin reads exactly one user-level file; a
18
+ * project-level mcp.json is an open feature request
19
+ * (microsoft/copilot-intellij-feedback#701, still open 2026-07).
20
+ * `supportsLocation('local')` returns false so the orchestrator
21
+ * skips local installs with a clear message (Codex pattern).
22
+ * - No `--path` injection: the config is user-global and the plugin
23
+ * documents no `${workspaceFolder}`-style variable expansion for
24
+ * this file, so we ship the plain entry and let the MCP server
25
+ * resolve the project from the client's roots/cwd as with other
26
+ * global installs.
27
+ * - No instructions file (MCP `initialize` instructions are the
28
+ * single source of truth, #529) and no permissions concept —
29
+ * `autoAllow` is silently ignored.
30
+ *
31
+ * The IDE opens this file in a JSON editor for hand-editing (Settings →
32
+ * Tools → GitHub Copilot → MCP → Configure), so reads + writes go
33
+ * through `jsonc-parser` — surgical edits that preserve sibling
34
+ * servers, user comments, and formatting (same approach as the
35
+ * copilot-vscode target).
36
+ *
37
+ * The plugin only re-reads mcp.json on IDE restart
38
+ * (microsoft/copilot-intellij-feedback#1139) — hence the restart note.
39
+ */
40
+ import { AgentTarget } from './types';
41
+ export declare const copilotJetbrainsTarget: AgentTarget;
42
+ //# sourceMappingURL=copilot-jetbrains.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"copilot-jetbrains.d.ts","sourceRoot":"","sources":["../../../src/installer/targets/copilot-jetbrains.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAMH,OAAO,EACL,WAAW,EAKZ,MAAM,SAAS,CAAC;AAmLjB,eAAO,MAAM,sBAAsB,EAAE,WAA0C,CAAC"}