engram-mcp-server 1.4.0 → 1.4.1
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/README.md +86 -84
- package/dist/installer/ide-configs.d.ts.map +1 -1
- package/dist/installer/ide-configs.js +61 -10
- package/dist/installer/ide-configs.js.map +1 -1
- package/dist/installer/ide-detector.d.ts +18 -0
- package/dist/installer/ide-detector.d.ts.map +1 -1
- package/dist/installer/ide-detector.js +55 -8
- package/dist/installer/ide-detector.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +120 -52
- package/dist/installer/index.js.map +1 -1
- package/package.json +2 -2
- package/scripts/inject-release-notes.js +2 -1
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
- [Overview](#overview)
|
|
20
20
|
- [Why Engram?](#why-engram)
|
|
21
21
|
- [Installation (Auto & Manual)](#installation)
|
|
22
|
-
- [✨ What's New in v1.4.
|
|
22
|
+
- [✨ What's New in v1.4.1](#-whats-new-in-v141)
|
|
23
23
|
- [Features](#features)
|
|
24
24
|
- [Architecture](#architecture)
|
|
25
25
|
- [Tools Reference](#tools-reference)
|
|
@@ -50,16 +50,21 @@ Engram solves this by providing a **persistent brain** using a native SQLite (WA
|
|
|
50
50
|
|
|
51
51
|
---
|
|
52
52
|
|
|
53
|
-
## ✨ What's New in v1.4.
|
|
53
|
+
## ✨ What's New in v1.4.1
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
- **
|
|
58
|
-
- **
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
55
|
+
**v1.4.1** is a targeted hotfix that resolves a series of critical and high-severity bugs discovered during a full audit of the installer infrastructure — verified against official documentation for every supported IDE.
|
|
56
|
+
|
|
57
|
+
- **macOS Install Path Fixed (Critical):** `process.env.APPDATA` is Windows-only. On macOS, the fallback resolved to `~/.config` instead of `~/Library/Application Support`, causing VS Code, Cline, and Claude Desktop installs to silently write to the wrong directory. The IDE never read from it, yet re-runs reported "Already installed." The `APPDATA` constant is now OS-aware across all three platforms.
|
|
58
|
+
- **Visual Studio Config Key Fixed (Critical):** Visual Studio reads the `"servers"` JSON key, not `"mcpServers"`. Every install wrote to a key VS never reads — Engram was permanently invisible in Visual Studio. Fixed and confirmed against official Microsoft docs.
|
|
59
|
+
- **Wrong Secondary Paths Removed (High):** VS Code's `~/.vscode/mcp.json` (the extensions dir), Cursor's `APPDATA/Cursor/mcp.json`, and Windsurf's `APPDATA/Windsurf/mcp.json` were all wrong paths that don't exist on any real machine. Removed in favour of the single correct path for each IDE.
|
|
60
|
+
- **Multi-IDE Awareness:** Most developers have multiple IDEs installed simultaneously. The installer now scans all installed IDEs via filesystem and installs to all of them in one pass — without the user needing to run it multiple times with different `--ide` flags.
|
|
61
|
+
- **Better IDE Detection:** Cursor detection now checks `CURSOR_TRACE_ID` and `process.execPath` before falling back to fragile PATH matching. Visual Studio is now detected via `VSINSTALLDIR`/`VisualStudioVersion` env vars.
|
|
62
|
+
- **`--check` Reference Fixed (High):** `--check` was comparing IDE config versions against the running binary, not npm latest — producing backwards results when running from local source. npm latest is now fetched first and used as the sole reference.
|
|
63
|
+
- **CWD Source Conflict Warning:** When `npx` resolves to the local Engram source directory, a clear warning is printed before any output so users understand why the version reported may not match npm.
|
|
64
|
+
- **JetBrains Install Warning:** JetBrains MCP config is managed via the IDE Settings UI, not a config file. A warning is now shown during install directing users to `Settings › Tools › AI Assistant › Model Context Protocol`.
|
|
65
|
+
- **Claude Code CLI Hint Fixed:** The `claude mcp add-json` hint displayed arguments in the wrong order. Fixed to `claude mcp add-json engram '{...}' --scope user`.
|
|
66
|
+
|
|
67
|
+
> Previous release: **v1.4.0** — Versioned installs, background auto-update check, `--check` CLI flag, `engram_stats` version info, `engram_config` update keys. [Full notes →](https://github.com/keggan-std/Engram/releases/tag/v1.4.0)
|
|
63
68
|
|
|
64
69
|
---
|
|
65
70
|
|
|
@@ -328,106 +333,103 @@ Engram exposes 30+ tools. Here are the core highlights of what an agent can do f
|
|
|
328
333
|
Add the following to your agent's system prompt or custom instructions (Cursor Rules, `.github/copilot-instructions.md`, `CLAUDE.md`, etc.). The goal is to ensure the agent consults Engram *before* doing work — not just after — which is where most of the token and time savings come from.
|
|
329
334
|
|
|
330
335
|
```text
|
|
331
|
-
You have access to Engram, a persistent memory MCP server. It stores everything
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
Update → instruct them to run: npx -y engram-mcp-server install
|
|
352
|
-
Skip → engram_config action=set key=auto_update_skip_version value={version}
|
|
353
|
-
Postpone 7d → engram_config action=set key=auto_update_remind_after value=7d
|
|
354
|
-
Disable → engram_config action=set key=auto_update_check value=false
|
|
355
|
-
|
|
356
|
-
━━━ BEFORE READING OR REVIEWING ANY FILE ━━━━━━━━━━━━━━━━━━━
|
|
336
|
+
You have access to Engram, a persistent memory MCP server. It stores everything learned about this project across all sessions: file notes, architectural decisions, conventions, tasks, and change history. Use it to avoid re-reading files you have already analysed, re-debating settled decisions, and re-discovering known context.
|
|
337
|
+
|
|
338
|
+
## ━━━ SESSION START ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
339
|
+
|
|
340
|
+
ALWAYS call `engram_start_session` first — before reading any file or taking any action. Act on everything it returns:
|
|
341
|
+
|
|
342
|
+
* **`previous_session.summary`**: Read this immediately. Do not re-explore what is already known.
|
|
343
|
+
* **`active_decisions`**: These are binding. Follow them; do not re-debate them. To change one, supersede it with a new `engram_record_decision` call.
|
|
344
|
+
* **`active_conventions`**: Enforce these in every file you touch this session.
|
|
345
|
+
* **`open_tasks`**: These are pending work items. Ask the user which to focus on if unclear.
|
|
346
|
+
* **`update_available` (if set)**: Immediately tell the user:
|
|
347
|
+
> "Engram v{available_version} is available (you have {installed_version}). Changes: {changelog}. Would you like to update, skip this version, or postpone?"
|
|
348
|
+
|
|
349
|
+
Then act on their choice:
|
|
350
|
+
* **Update**: instruct them to run: `npx -y engram-mcp-server install`
|
|
351
|
+
* **Skip**: `engram_config action=set key=auto_update_skip_version value={version}`
|
|
352
|
+
* **Postpone 7d**: `engram_config action=set key=auto_update_remind_after value=7d`
|
|
353
|
+
* **Disable**: `engram_config action=set key=auto_update_check value=false`
|
|
354
|
+
|
|
355
|
+
## ━━━ BEFORE READING OR REVIEWING ANY FILE ━━━━━━━━━━━━━━━━━━━
|
|
357
356
|
|
|
358
357
|
ALWAYS check Engram before opening a file:
|
|
359
358
|
|
|
360
|
-
|
|
359
|
+
```javascript
|
|
360
|
+
engram_get_file_notes({ file_paths: ["path/to/file.ts"] })
|
|
361
|
+
```
|
|
361
362
|
|
|
362
|
-
|
|
363
|
-
Use the stored purpose, dependencies, layer, and complexity to answer
|
|
364
|
-
questions or orient yourself WITHOUT reading the file.
|
|
365
|
-
Only open the file when you need the actual source code for editing or
|
|
366
|
-
a detailed line-by-line analysis.
|
|
363
|
+
* **If notes EXIST**:
|
|
364
|
+
Use the stored purpose, dependencies, layer, and complexity to answer questions or orient yourself WITHOUT reading the file. Only open the file when you need the actual source code for editing or a detailed line-by-line analysis.
|
|
367
365
|
|
|
368
|
-
|
|
369
|
-
1.
|
|
370
|
-
2.
|
|
371
|
-
|
|
372
|
-
3. For multiple files reviewed in one pass, batch them in a single call.
|
|
366
|
+
* **If notes DO NOT EXIST**:
|
|
367
|
+
1. Read the file.
|
|
368
|
+
2. Immediately call `engram_set_file_notes` with: `file_path`, `purpose`, `dependencies`, `dependents`, `layer`, `complexity`, `notes`.
|
|
369
|
+
3. For multiple files reviewed in one pass, batch them in a single call.
|
|
373
370
|
|
|
374
|
-
|
|
375
|
-
the notes were last recorded — e.g., from git log or change history):
|
|
371
|
+
* **If notes are STALE** (you see evidence the file changed significantly since the notes were last recorded — e.g., from git log or change history):
|
|
376
372
|
Re-read the file and update the notes.
|
|
377
373
|
|
|
378
|
-
Rule
|
|
379
|
-
without first checking whether Engram already knows it.
|
|
374
|
+
**Rule:** Never read a file you have already analysed in a previous session without first checking whether Engram already knows it.
|
|
380
375
|
|
|
381
|
-
━━━ BEFORE MAKING ANY DESIGN DECISION ━━━━━━━━━━━━━━━━━━━━━━
|
|
376
|
+
## ━━━ BEFORE MAKING ANY DESIGN DECISION ━━━━━━━━━━━━━━━━━━━━━━
|
|
382
377
|
|
|
383
378
|
Before choosing an implementation approach, search for an existing decision:
|
|
384
379
|
|
|
385
|
-
|
|
380
|
+
```javascript
|
|
381
|
+
engram_search({ query: "relevant keywords", scope: "decisions" })
|
|
382
|
+
```
|
|
386
383
|
|
|
387
|
-
|
|
388
|
-
|
|
384
|
+
* **If a matching decision EXISTS**: follow it.
|
|
385
|
+
* **If you believe it should change**: explain why, then supersede it:
|
|
386
|
+
```javascript
|
|
389
387
|
engram_record_decision({ decision: "...", supersedes: <id> })
|
|
390
|
-
|
|
391
|
-
|
|
388
|
+
```
|
|
389
|
+
* **If NO decision exists**: make the call and record it:
|
|
390
|
+
```javascript
|
|
392
391
|
engram_record_decision({ decision, rationale, affected_files, tags })
|
|
392
|
+
```
|
|
393
393
|
|
|
394
|
-
━━━ WHEN MODIFYING FILES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
394
|
+
## ━━━ WHEN MODIFYING FILES ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
395
395
|
|
|
396
396
|
After every meaningful change, record it. Batch where possible:
|
|
397
397
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
398
|
+
```javascript
|
|
399
|
+
engram_record_change({ changes: [{
|
|
400
|
+
file_path,
|
|
401
|
+
change_type, // created | modified | refactored | deleted | renamed | moved | config_changed
|
|
402
|
+
description, // What changed AND why — not just the action. Future sessions read this.
|
|
403
|
+
impact_scope // local | module | cross_module | global
|
|
404
|
+
}]})
|
|
405
|
+
```
|
|
404
406
|
|
|
405
|
-
━━━ WHEN YOU DON'T KNOW SOMETHING ━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
407
|
+
## ━━━ WHEN YOU DON'T KNOW SOMETHING ━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
406
408
|
|
|
407
|
-
Before asking the user, search Engram first. The user may have already explained
|
|
408
|
-
this to a previous session:
|
|
409
|
+
Before asking the user, search Engram first. The user may have already explained this to a previous session:
|
|
409
410
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
411
|
+
* `engram_search({ query: "keywords" })` ← general search
|
|
412
|
+
* `engram_scan_project()` ← project structure questions
|
|
413
|
+
* `engram_get_decisions()` ← architecture / approach questions
|
|
414
|
+
* `engram_get_conventions()` ← style / pattern questions
|
|
415
|
+
* `engram_get_file_notes({ file_paths: [] })` ← what is known about specific files
|
|
415
416
|
|
|
416
|
-
━━━ SESSION END ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
417
|
+
## ━━━ SESSION END ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
417
418
|
|
|
418
419
|
Before ending every session:
|
|
419
420
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
421
|
+
1. Record all file changes not yet recorded (`engram_record_change`).
|
|
422
|
+
2. Create tasks for anything incomplete or blocked:
|
|
423
|
+
```javascript
|
|
424
|
+
engram_create_task({ title, description, priority })
|
|
425
|
+
```
|
|
426
|
+
3. Call `engram_end_session` with a summary that includes:
|
|
427
|
+
* Exactly what was done — file names, function names, specific changes made
|
|
428
|
+
* What is pending or blocked, and why
|
|
429
|
+
* Any new patterns, gotchas, or constraints discovered this session
|
|
430
|
+
* Which tasks were completed or partially done
|
|
431
|
+
|
|
432
|
+
A precise summary is what allows the next session to start immediately without re-reading files or re-asking the user for context.
|
|
431
433
|
```
|
|
432
434
|
|
|
433
435
|
---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ide-configs.d.ts","sourceRoot":"","sources":["../../src/installer/ide-configs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ide-configs.d.ts","sourceRoot":"","sources":["../../src/installer/ide-configs.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,UAAU,SAA+B,CAAC;AAqBhD,MAAM,WAAW,aAAa;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,SAAS,EAAE,YAAY,GAAG,SAAS,CAAC;IACpC,yDAAyD;IACzD,YAAY,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,kBAAkB,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE;QACJ,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,yEAAyE;QACzE,GAAG,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACL;AAED,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CA6JrD,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -4,21 +4,43 @@
|
|
|
4
4
|
import path from "path";
|
|
5
5
|
import os from "os";
|
|
6
6
|
const HOME = os.homedir();
|
|
7
|
-
const APPDATA = process.env.APPDATA || path.join(HOME, ".config");
|
|
8
7
|
const IS_WINDOWS = process.platform === "win32";
|
|
9
8
|
const IS_MAC = process.platform === "darwin";
|
|
9
|
+
/**
|
|
10
|
+
* OS-aware application data directory.
|
|
11
|
+
*
|
|
12
|
+
* - Windows : %APPDATA% (e.g. C:\Users\User\AppData\Roaming)
|
|
13
|
+
* - macOS : ~/Library/Application Support
|
|
14
|
+
* - Linux : ~/.config (XDG Base Directory spec)
|
|
15
|
+
*
|
|
16
|
+
* The old code used `process.env.APPDATA || path.join(HOME, ".config")` which
|
|
17
|
+
* accidentally gave the correct value on Linux but the WRONG value on macOS
|
|
18
|
+
* (~/.config instead of ~/Library/Application Support). This broke VS Code,
|
|
19
|
+
* Cline, and any other path that hangs off the AppData root on Mac.
|
|
20
|
+
*/
|
|
21
|
+
const APPDATA = IS_WINDOWS
|
|
22
|
+
? (process.env.APPDATA ?? path.join(HOME, "AppData", "Roaming"))
|
|
23
|
+
: IS_MAC
|
|
24
|
+
? path.join(HOME, "Library", "Application Support")
|
|
25
|
+
: path.join(HOME, ".config"); // Linux / other POSIX
|
|
10
26
|
export const IDE_CONFIGS = {
|
|
11
27
|
// ─── VS Code forks ──────────────────────────────────────────────
|
|
12
28
|
vscode: {
|
|
13
29
|
name: "VS Code (Copilot)",
|
|
30
|
+
// Confirmed: VS Code uses "servers" key, not "mcpServers".
|
|
31
|
+
// Source: https://code.visualstudio.com/docs/copilot/customization/mcp-servers
|
|
14
32
|
configKey: "servers",
|
|
15
33
|
requiresType: true,
|
|
16
34
|
requiresCmdWrapper: false,
|
|
17
35
|
scopes: {
|
|
36
|
+
// Global user config. APPDATA now resolves correctly on all OSes:
|
|
37
|
+
// Windows : %APPDATA%\Code\User\mcp.json
|
|
38
|
+
// macOS : ~/Library/Application Support/Code/User/mcp.json
|
|
39
|
+
// Linux : ~/.config/Code/User/mcp.json
|
|
18
40
|
global: [
|
|
19
41
|
path.join(APPDATA, "Code", "User", "mcp.json"),
|
|
20
|
-
path.join(HOME, ".vscode", "mcp.json"),
|
|
21
42
|
],
|
|
43
|
+
// Workspace-level: .vscode/mcp.json in project root.
|
|
22
44
|
localDirs: [".vscode"],
|
|
23
45
|
},
|
|
24
46
|
},
|
|
@@ -28,10 +50,13 @@ export const IDE_CONFIGS = {
|
|
|
28
50
|
requiresType: false,
|
|
29
51
|
requiresCmdWrapper: false,
|
|
30
52
|
scopes: {
|
|
53
|
+
// Confirmed: ~/.cursor/mcp.json is the cross-platform global path.
|
|
54
|
+
// Source: https://cursor.com/docs/context/mcp
|
|
55
|
+
// The old APPDATA/Cursor/mcp.json fallback was wrong on every OS.
|
|
31
56
|
global: [
|
|
32
57
|
path.join(HOME, ".cursor", "mcp.json"),
|
|
33
|
-
path.join(APPDATA, "Cursor", "mcp.json"),
|
|
34
58
|
],
|
|
59
|
+
// Project-level: .cursor/mcp.json in project root.
|
|
35
60
|
localDirs: [".cursor"],
|
|
36
61
|
},
|
|
37
62
|
},
|
|
@@ -41,9 +66,11 @@ export const IDE_CONFIGS = {
|
|
|
41
66
|
requiresType: false,
|
|
42
67
|
requiresCmdWrapper: false,
|
|
43
68
|
scopes: {
|
|
69
|
+
// Confirmed: ~/.codeium/windsurf/mcp_config.json on all platforms.
|
|
70
|
+
// Source: https://docs.windsurf.com/windsurf/cascade/mcp
|
|
71
|
+
// Old fallback APPDATA/Windsurf/mcp.json was wrong: wrong dir + wrong filename.
|
|
44
72
|
global: [
|
|
45
73
|
path.join(HOME, ".codeium", "windsurf", "mcp_config.json"),
|
|
46
|
-
path.join(APPDATA, "Windsurf", "mcp.json"),
|
|
47
74
|
],
|
|
48
75
|
},
|
|
49
76
|
},
|
|
@@ -53,17 +80,21 @@ export const IDE_CONFIGS = {
|
|
|
53
80
|
requiresType: false,
|
|
54
81
|
requiresCmdWrapper: false,
|
|
55
82
|
scopes: {
|
|
83
|
+
// NOTE: Antigravity (Google) is newly announced; this path is unconfirmed.
|
|
84
|
+
// Marked best-effort until official docs are published.
|
|
56
85
|
global: [path.join(HOME, ".gemini", "antigravity", "mcp_config.json")],
|
|
57
86
|
},
|
|
58
87
|
},
|
|
59
88
|
// ─── Anthropic ──────────────────────────────────────────────────
|
|
60
89
|
claudecode: {
|
|
61
90
|
name: "Claude Code (CLI)",
|
|
91
|
+
// Confirmed: uses "mcpServers" key.
|
|
92
|
+
// Source: https://code.claude.com/docs/en/mcp
|
|
62
93
|
configKey: "mcpServers",
|
|
63
94
|
requiresType: true,
|
|
64
95
|
requiresCmdWrapper: IS_WINDOWS,
|
|
65
96
|
scopes: {
|
|
66
|
-
// User-level: ~/.claude.json
|
|
97
|
+
// User-level: ~/.claude.json (cross-platform, same path everywhere)
|
|
67
98
|
global: [path.join(HOME, ".claude.json")],
|
|
68
99
|
// Project-level: .mcp.json in workspace root
|
|
69
100
|
localDirs: [""],
|
|
@@ -73,23 +104,35 @@ export const IDE_CONFIGS = {
|
|
|
73
104
|
},
|
|
74
105
|
claudedesktop: {
|
|
75
106
|
name: "Claude Desktop",
|
|
107
|
+
// Confirmed: uses "mcpServers" key.
|
|
108
|
+
// Source: https://modelcontextprotocol.io/docs/develop/connect-local-servers
|
|
76
109
|
configKey: "mcpServers",
|
|
77
110
|
requiresType: false,
|
|
78
111
|
requiresCmdWrapper: IS_WINDOWS,
|
|
79
112
|
scopes: {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
113
|
+
// With the corrected APPDATA constant, all three OS paths are now right:
|
|
114
|
+
// Windows : %APPDATA%\Claude\claude_desktop_config.json
|
|
115
|
+
// macOS : ~/Library/Application Support/Claude/claude_desktop_config.json
|
|
116
|
+
// Linux : ~/.config/Claude/claude_desktop_config.json
|
|
117
|
+
global: [path.join(APPDATA, "Claude", "claude_desktop_config.json")],
|
|
83
118
|
},
|
|
84
119
|
},
|
|
85
120
|
// ─── Microsoft ──────────────────────────────────────────────────
|
|
86
121
|
visualstudio: {
|
|
87
122
|
name: "Visual Studio 2022/2026",
|
|
88
|
-
|
|
123
|
+
// FIXED: Visual Studio uses "servers" key, not "mcpServers".
|
|
124
|
+
// Source: https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers
|
|
125
|
+
// Every official example uses { "servers": { ... } }.
|
|
126
|
+
configKey: "servers",
|
|
89
127
|
requiresType: false,
|
|
90
128
|
requiresCmdWrapper: false,
|
|
91
129
|
scopes: {
|
|
130
|
+
// Global: %USERPROFILE%\.mcp.json (confirmed in MS docs)
|
|
92
131
|
global: [path.join(HOME, ".mcp.json")],
|
|
132
|
+
// Local options (VS checks in order):
|
|
133
|
+
// <SOLUTIONDIR>\.mcp.json ← primary (source-controlled)
|
|
134
|
+
// <SOLUTIONDIR>\.vs\mcp.json ← VS-specific (user-local)
|
|
135
|
+
// localDirs[0] drives the interactive menu; "" → .mcp.json in cwd.
|
|
93
136
|
localDirs: ["", ".vs"],
|
|
94
137
|
},
|
|
95
138
|
},
|
|
@@ -100,9 +143,14 @@ export const IDE_CONFIGS = {
|
|
|
100
143
|
requiresType: false,
|
|
101
144
|
requiresCmdWrapper: false,
|
|
102
145
|
scopes: {
|
|
146
|
+
// With corrected APPDATA:
|
|
147
|
+
// Windows : %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
|
|
148
|
+
// macOS : ~/Library/Application Support/Code/User/globalStorage/.../cline_mcp_settings.json
|
|
149
|
+
// Linux : ~/.config/Code/User/globalStorage/.../cline_mcp_settings.json
|
|
103
150
|
global: [
|
|
104
151
|
path.join(APPDATA, "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
|
|
105
|
-
|
|
152
|
+
// Roo Code uses a different extension ID
|
|
153
|
+
path.join(APPDATA, "Code", "User", "globalStorage", "rooveterinaryinc.roo-cline", "settings", "cline_mcp_settings.json"),
|
|
106
154
|
],
|
|
107
155
|
},
|
|
108
156
|
},
|
|
@@ -121,6 +169,9 @@ export const IDE_CONFIGS = {
|
|
|
121
169
|
requiresType: false,
|
|
122
170
|
requiresCmdWrapper: false,
|
|
123
171
|
scopes: {
|
|
172
|
+
// ~/.config/github-copilot/intellij/mcp.json on Mac/Linux.
|
|
173
|
+
// On Windows the GitHub Copilot JetBrains plugin uses the same
|
|
174
|
+
// ~/.config path (it does NOT use %APPDATA%).
|
|
124
175
|
global: [
|
|
125
176
|
path.join(HOME, ".config", "github-copilot", "intellij", "mcp.json"),
|
|
126
177
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ide-configs.js","sourceRoot":"","sources":["../../src/installer/ide-configs.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oDAAoD;AACpD,+EAA+E;AAE/E,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAC1B,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"ide-configs.js","sourceRoot":"","sources":["../../src/installer/ide-configs.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,oDAAoD;AACpD,+EAA+E;AAE/E,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAC1B,MAAM,UAAU,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC;AAChD,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,KAAK,QAAQ,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,GAAW,UAAU;IAC9B,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IAChE,CAAC,CAAC,MAAM;QACJ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,qBAAqB,CAAC;QACnD,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,sBAAsB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C;SACzB;KACJ;IAED,mEAAmE;IACnE,KAAK,EAAE;QACH,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE,YAAY;QACvB,YAAY,EAAE,KAAK;QACnB,kBAAkB,EAAE,KAAK;QACzB,MAAM,EAAE;YACJ,0BAA0B;YAC1B,wGAAwG;YACxG,gGAAgG;YAChG,4EAA4E;YAC5E,MAAM,EAAE;gBACJ,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,wBAAwB,EAAE,UAAU,EAAE,yBAAyB,CAAC;gBACpH,yCAAyC;gBACzC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAE,4BAA4B,EAAE,UAAU,EAAE,yBAAyB,CAAC;aAC3H;SACJ;KACJ;IACD,IAAI,EAAE;QACF,IAAI,EAAE,UAAU;QAChB,SAAS,EAAE,YAAY;QACvB,YAAY,EAAE,IAAI;QAClB,kBAAkB,EAAE,KAAK;QACzB,MAAM,EAAE;YACJ,SAAS,EAAE,CAAC,OAAO,CAAC;SACvB;KACJ;IACD,SAAS,EAAE;QACP,IAAI,EAAE,4BAA4B;QAClC,SAAS,EAAE,YAAY;QACvB,YAAY,EAAE,KAAK;QACnB,kBAAkB,EAAE,KAAK;QACzB,MAAM,EAAE;YACJ,2DAA2D;YAC3D,+DAA+D;YAC/D,8CAA8C;YAC9C,MAAM,EAAE;gBACJ,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,UAAU,EAAE,UAAU,CAAC;aACvE;SACJ;KACJ;CACJ,CAAC;AAEF,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Detect the current IDE from environment variables.
|
|
3
3
|
* Returns the IDE key (e.g., "vscode", "cursor") or null if unknown.
|
|
4
|
+
*
|
|
5
|
+
* Detection strategy (in priority order):
|
|
6
|
+
* 1. Explicit env vars set only by a specific IDE (most reliable)
|
|
7
|
+
* 2. process.execPath / argv[0] inspection for VS Code forks
|
|
8
|
+
* 3. PATH / VSCODE_CWD string matching (fallback, fragile)
|
|
4
9
|
*/
|
|
5
10
|
export declare function detectCurrentIde(): string | null;
|
|
11
|
+
/**
|
|
12
|
+
* Scan all IDE_CONFIGS to find which IDEs appear to be installed on this machine.
|
|
13
|
+
*
|
|
14
|
+
* An IDE is considered present if:
|
|
15
|
+
* - Its global config file already exists (previously configured), OR
|
|
16
|
+
* - The parent directory of its global config file exists (IDE installed, not yet configured)
|
|
17
|
+
*
|
|
18
|
+
* This is filesystem-based — it works regardless of which IDE launched the terminal.
|
|
19
|
+
* Most developers have several IDEs installed simultaneously; this function finds them all.
|
|
20
|
+
*
|
|
21
|
+
* Returns IDE keys in IDE_CONFIGS definition order.
|
|
22
|
+
*/
|
|
23
|
+
export declare function detectInstalledIdes(): string[];
|
|
6
24
|
//# sourceMappingURL=ide-detector.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ide-detector.d.ts","sourceRoot":"","sources":["../../src/installer/ide-detector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ide-detector.d.ts","sourceRoot":"","sources":["../../src/installer/ide-detector.ts"],"names":[],"mappings":"AAQA;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAkDhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAU9C"}
|
|
@@ -1,25 +1,52 @@
|
|
|
1
1
|
// ============================================================================
|
|
2
2
|
// Engram MCP Server — IDE Environment Detection
|
|
3
3
|
// ============================================================================
|
|
4
|
+
import fs from "fs";
|
|
5
|
+
import path from "path";
|
|
6
|
+
import { IDE_CONFIGS } from "./ide-configs.js";
|
|
4
7
|
/**
|
|
5
8
|
* Detect the current IDE from environment variables.
|
|
6
9
|
* Returns the IDE key (e.g., "vscode", "cursor") or null if unknown.
|
|
10
|
+
*
|
|
11
|
+
* Detection strategy (in priority order):
|
|
12
|
+
* 1. Explicit env vars set only by a specific IDE (most reliable)
|
|
13
|
+
* 2. process.execPath / argv[0] inspection for VS Code forks
|
|
14
|
+
* 3. PATH / VSCODE_CWD string matching (fallback, fragile)
|
|
7
15
|
*/
|
|
8
16
|
export function detectCurrentIde() {
|
|
9
17
|
const env = process.env;
|
|
10
18
|
// ─── Claude Code (checked first — sets explicit env vars) ────────
|
|
11
19
|
if (env.CLAUDE_CODE || env.CLAUDE_CLI)
|
|
12
20
|
return "claudecode";
|
|
21
|
+
// ─── Visual Studio (Developer Command Prompt / PowerShell) ───────
|
|
22
|
+
// VS Developer environments always set VSINSTALLDIR and VisualStudioVersion.
|
|
23
|
+
if (env.VSINSTALLDIR || env.VisualStudioVersion)
|
|
24
|
+
return "visualstudio";
|
|
25
|
+
// ─── JetBrains detection ─────────────────────────────────────────
|
|
26
|
+
if (env.JETBRAINS_IDE || env.TERMINAL_EMULATOR?.includes("JetBrains"))
|
|
27
|
+
return "jetbrains";
|
|
13
28
|
// ─── VS Code family detection ────────────────────────────────────
|
|
14
|
-
// Antigravity and Windsurf are VS Code forks, so their signals
|
|
15
|
-
//
|
|
29
|
+
// Antigravity and Windsurf are VS Code forks, so their signals only
|
|
30
|
+
// appear inside a VS Code family environment.
|
|
16
31
|
if (env.TERM_PROGRAM === "vscode" || env.VSCODE_IPC_HOOK || env.VSCODE_CWD) {
|
|
17
|
-
//
|
|
32
|
+
// ── Cursor ──────────────────────────────────────────────────
|
|
33
|
+
// Cursor sets CURSOR_TRACE_ID in its integrated terminal sessions.
|
|
34
|
+
// Also check process.execPath for the word "cursor" as a reliable
|
|
35
|
+
// secondary signal (covers cases where env var may not be set).
|
|
36
|
+
if (env.CURSOR_TRACE_ID)
|
|
37
|
+
return "cursor";
|
|
38
|
+
const execPathLower = (process.execPath || "").toLowerCase();
|
|
39
|
+
if (execPathLower.includes("cursor"))
|
|
40
|
+
return "cursor";
|
|
41
|
+
// ── Antigravity (Google) ─────────────────────────────────────
|
|
42
|
+
// ANTIGRAVITY_EDITOR_APP_ROOT is the expected env var; unconfirmed
|
|
43
|
+
// until official docs are published — treated as best-effort.
|
|
18
44
|
if (env.ANTIGRAVITY_EDITOR_APP_ROOT)
|
|
19
45
|
return "antigravity";
|
|
46
|
+
// ── Windsurf ─────────────────────────────────────────────────
|
|
20
47
|
if (env.WINDSURF_PROFILE)
|
|
21
48
|
return "windsurf";
|
|
22
|
-
//
|
|
49
|
+
// ── Fork disambiguation via install path in VSCODE_CWD ───────
|
|
23
50
|
const cwdLower = (env.VSCODE_CWD || "").toLowerCase();
|
|
24
51
|
if (cwdLower.includes("antigravity"))
|
|
25
52
|
return "antigravity";
|
|
@@ -27,7 +54,7 @@ export function detectCurrentIde() {
|
|
|
27
54
|
return "cursor";
|
|
28
55
|
if (cwdLower.includes("windsurf"))
|
|
29
56
|
return "windsurf";
|
|
30
|
-
//
|
|
57
|
+
// ── Fork disambiguation via PATH ─────────────────────────────
|
|
31
58
|
const pathLower = (env.PATH || "").toLowerCase();
|
|
32
59
|
if (pathLower.includes("antigravity"))
|
|
33
60
|
return "antigravity";
|
|
@@ -37,9 +64,29 @@ export function detectCurrentIde() {
|
|
|
37
64
|
return "windsurf";
|
|
38
65
|
return "vscode";
|
|
39
66
|
}
|
|
40
|
-
// ─── JetBrains detection ─────────────────────────────────────────
|
|
41
|
-
if (env.JETBRAINS_IDE || env.TERMINAL_EMULATOR?.includes("JetBrains"))
|
|
42
|
-
return "jetbrains";
|
|
43
67
|
return null;
|
|
44
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Scan all IDE_CONFIGS to find which IDEs appear to be installed on this machine.
|
|
71
|
+
*
|
|
72
|
+
* An IDE is considered present if:
|
|
73
|
+
* - Its global config file already exists (previously configured), OR
|
|
74
|
+
* - The parent directory of its global config file exists (IDE installed, not yet configured)
|
|
75
|
+
*
|
|
76
|
+
* This is filesystem-based — it works regardless of which IDE launched the terminal.
|
|
77
|
+
* Most developers have several IDEs installed simultaneously; this function finds them all.
|
|
78
|
+
*
|
|
79
|
+
* Returns IDE keys in IDE_CONFIGS definition order.
|
|
80
|
+
*/
|
|
81
|
+
export function detectInstalledIdes() {
|
|
82
|
+
const found = [];
|
|
83
|
+
for (const [id, ide] of Object.entries(IDE_CONFIGS)) {
|
|
84
|
+
if (!ide.scopes.global)
|
|
85
|
+
continue;
|
|
86
|
+
const isPresent = ide.scopes.global.some(p => fs.existsSync(p) || fs.existsSync(path.dirname(p)));
|
|
87
|
+
if (isPresent)
|
|
88
|
+
found.push(id);
|
|
89
|
+
}
|
|
90
|
+
return found;
|
|
91
|
+
}
|
|
45
92
|
//# sourceMappingURL=ide-detector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ide-detector.js","sourceRoot":"","sources":["../../src/installer/ide-detector.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,gDAAgD;AAChD,+EAA+E;AAE/E
|
|
1
|
+
{"version":3,"file":"ide-detector.js","sourceRoot":"","sources":["../../src/installer/ide-detector.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,gDAAgD;AAChD,+EAA+E;AAE/E,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB;IAC5B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAExB,oEAAoE;IACpE,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,UAAU;QAAE,OAAO,YAAY,CAAC;IAE3D,oEAAoE;IACpE,6EAA6E;IAC7E,IAAI,GAAG,CAAC,YAAY,IAAI,GAAG,CAAC,mBAAmB;QAAE,OAAO,cAAc,CAAC;IAEvE,oEAAoE;IACpE,IAAI,GAAG,CAAC,aAAa,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,CAAC,QAAQ,CAAC;YAAE,OAAO,QAAQ,CAAC;QAClD,IAAI,SAAS,CAAC,QAAQ,CAAC,UAAU,CAAC;YAAE,OAAO,UAAU,CAAC;QAEtD,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO,IAAI,CAAC;AAChB,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB;IAC/B,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAClD,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM;YAAE,SAAS;QACjC,MAAM,SAAS,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CACpC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAC1D,CAAC;QACF,IAAI,SAAS;YAAE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAClC,CAAC;IACD,OAAO,KAAK,CAAC;AACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAuCA,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,iBAqUhD"}
|
package/dist/installer/index.js
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
import fs from "fs";
|
|
5
5
|
import path from "path";
|
|
6
6
|
import readline from "readline";
|
|
7
|
+
import { fileURLToPath } from "url";
|
|
7
8
|
import { IDE_CONFIGS } from "./ide-configs.js";
|
|
8
9
|
import { addToConfig, removeFromConfig, makeEngramEntry, readJson, getInstallerVersion } from "./config-writer.js";
|
|
9
|
-
import { detectCurrentIde } from "./ide-detector.js";
|
|
10
|
+
import { detectCurrentIde, detectInstalledIdes } from "./ide-detector.js";
|
|
10
11
|
// ─── Helpers ─────────────────────────────────────────────────────────
|
|
11
12
|
function isTTY() {
|
|
12
13
|
return !!(process.stdin.isTTY && process.stdout.isTTY);
|
|
@@ -28,6 +29,22 @@ async function askQuestion(query) {
|
|
|
28
29
|
}
|
|
29
30
|
// ─── Main Entry Point ────────────────────────────────────────────────
|
|
30
31
|
export async function runInstaller(args) {
|
|
32
|
+
// Detect if npx resolved to the local source directory instead of the npm package.
|
|
33
|
+
// When the CWD's package.json name matches "engram-mcp-server" and the running
|
|
34
|
+
// binary is inside that same directory, the version shown reflects the local build.
|
|
35
|
+
try {
|
|
36
|
+
const __dir = path.dirname(fileURLToPath(import.meta.url));
|
|
37
|
+
const runningRoot = path.resolve(__dir, "../..");
|
|
38
|
+
if (path.resolve(process.cwd()) === runningRoot) {
|
|
39
|
+
const cwdPkg = readJson(path.join(process.cwd(), "package.json"));
|
|
40
|
+
if (cwdPkg?.name === "engram-mcp-server") {
|
|
41
|
+
console.warn("\n⚠️ Running from the engram source directory.");
|
|
42
|
+
console.warn(" Version shown reflects the local build — not the published npm package.");
|
|
43
|
+
console.warn(" For an accurate check: npm install -g engram-mcp-server@latest && engram --check\n");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
catch { /* ignore — detection is best-effort */ }
|
|
31
48
|
const nonInteractive = args.includes("--yes") || args.includes("-y") || !isTTY();
|
|
32
49
|
// ─── --version ───────────────────────────────────────────────────
|
|
33
50
|
if (args.includes("--version") || args.includes("-v")) {
|
|
@@ -98,35 +115,18 @@ Examples:
|
|
|
98
115
|
// ─── --check ─────────────────────────────────────────────────────
|
|
99
116
|
if (args.includes("--check")) {
|
|
100
117
|
const currentVersion = getInstallerVersion();
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
const foundPath = ide.scopes.global.find(p => fs.existsSync(p));
|
|
108
|
-
if (!foundPath) {
|
|
109
|
-
console.log(` ${id.padEnd(14)} (not detected)`);
|
|
110
|
-
continue;
|
|
118
|
+
const semverCmp = (a, b) => {
|
|
119
|
+
const pa = a.split(".").map(Number), pb = b.split(".").map(Number);
|
|
120
|
+
for (let i = 0; i < 3; i++) {
|
|
121
|
+
const d = (pa[i] ?? 0) - (pb[i] ?? 0);
|
|
122
|
+
if (d !== 0)
|
|
123
|
+
return d;
|
|
111
124
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
const installedVersion = entry._engram_version || "unknown (pre-tracking)";
|
|
120
|
-
const isMatch = installedVersion === currentVersion;
|
|
121
|
-
const statusIcon = isMatch ? "✅" : "⬆";
|
|
122
|
-
const statusLabel = isMatch ? "up to date" : `update available (v${currentVersion})`;
|
|
123
|
-
console.log(` ${id.padEnd(14)} ${foundPath}`);
|
|
124
|
-
console.log(` ${"".padEnd(14)} Installed: v${installedVersion} ${statusIcon} ${statusLabel}`);
|
|
125
|
-
}
|
|
126
|
-
console.log();
|
|
127
|
-
}
|
|
128
|
-
// Fetch npm latest for comparison
|
|
129
|
-
process.stdout.write(" npm latest : checking...");
|
|
125
|
+
return 0;
|
|
126
|
+
};
|
|
127
|
+
// Fetch npm latest FIRST — it is the authoritative reference for all comparisons.
|
|
128
|
+
process.stdout.write(`\nEngram Version Check\n\n npm latest : checking...`);
|
|
129
|
+
let npmLatest = null;
|
|
130
130
|
try {
|
|
131
131
|
const controller = new AbortController();
|
|
132
132
|
const timer = setTimeout(() => controller.abort(), 5_000);
|
|
@@ -137,32 +137,58 @@ Examples:
|
|
|
137
137
|
clearTimeout(timer);
|
|
138
138
|
if (res.ok) {
|
|
139
139
|
const data = await res.json();
|
|
140
|
-
|
|
141
|
-
const semverCmp = (a, b) => {
|
|
142
|
-
const pa = a.split(".").map(Number), pb = b.split(".").map(Number);
|
|
143
|
-
for (let i = 0; i < 3; i++) {
|
|
144
|
-
const d = (pa[i] ?? 0) - (pb[i] ?? 0);
|
|
145
|
-
if (d !== 0)
|
|
146
|
-
return d;
|
|
147
|
-
}
|
|
148
|
-
return 0;
|
|
149
|
-
};
|
|
140
|
+
npmLatest = data["version"];
|
|
150
141
|
const cmp = semverCmp(currentVersion, npmLatest);
|
|
151
|
-
const
|
|
142
|
+
const runningLabel = cmp === 0
|
|
152
143
|
? "✅ up to date"
|
|
153
144
|
: cmp > 0
|
|
154
145
|
? `⚡ running pre-release (v${currentVersion} > npm v${npmLatest})`
|
|
155
|
-
: `⬆
|
|
156
|
-
process.stdout.write(`\r npm latest : v${npmLatest}
|
|
146
|
+
: `⬆ update available`;
|
|
147
|
+
process.stdout.write(`\r npm latest : v${npmLatest}\n`);
|
|
148
|
+
console.log(` Running version : v${currentVersion} ${runningLabel}`);
|
|
157
149
|
}
|
|
158
150
|
else {
|
|
159
151
|
process.stdout.write(`\r npm latest : (registry unreachable)\n`);
|
|
152
|
+
console.log(` Running version : v${currentVersion}`);
|
|
160
153
|
}
|
|
161
154
|
}
|
|
162
155
|
catch {
|
|
163
156
|
process.stdout.write(`\r npm latest : (network error — check manually)\n`);
|
|
157
|
+
console.log(` Running version : v${currentVersion}`);
|
|
164
158
|
}
|
|
165
|
-
console.log(`\n
|
|
159
|
+
console.log(`\n IDE Configurations:\n`);
|
|
160
|
+
for (const [id, ide] of Object.entries(IDE_CONFIGS)) {
|
|
161
|
+
if (!ide.scopes.global)
|
|
162
|
+
continue;
|
|
163
|
+
const foundPath = ide.scopes.global.find(p => fs.existsSync(p));
|
|
164
|
+
if (!foundPath) {
|
|
165
|
+
console.log(` ${id.padEnd(14)} (not detected)`);
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
const config = readJson(foundPath);
|
|
169
|
+
const entry = config?.[ide.configKey]?.engram;
|
|
170
|
+
if (!entry) {
|
|
171
|
+
console.log(` ${id.padEnd(14)} ${foundPath}`);
|
|
172
|
+
console.log(` ${"".padEnd(14)} Not installed`);
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
const installedVersion = entry._engram_version || "unknown (pre-tracking)";
|
|
176
|
+
// Compare the IDE config version against npm latest (the authoritative reference).
|
|
177
|
+
// Fall back to the running version only when the registry was unreachable.
|
|
178
|
+
const reference = npmLatest ?? currentVersion;
|
|
179
|
+
const cmp = installedVersion === "unknown (pre-tracking)" ? -1 : semverCmp(installedVersion, reference);
|
|
180
|
+
const statusIcon = cmp >= 0 ? "✅" : "⬆";
|
|
181
|
+
const statusLabel = cmp >= 0
|
|
182
|
+
? "up to date"
|
|
183
|
+
: npmLatest
|
|
184
|
+
? `update available — run: npx -y engram-mcp-server install`
|
|
185
|
+
: `behind running version (v${currentVersion})`;
|
|
186
|
+
console.log(` ${id.padEnd(14)} ${foundPath}`);
|
|
187
|
+
console.log(` ${"".padEnd(14)} Installed: v${installedVersion} ${statusIcon} ${statusLabel}`);
|
|
188
|
+
}
|
|
189
|
+
console.log();
|
|
190
|
+
}
|
|
191
|
+
console.log(` To update: npx -y engram-mcp-server install`);
|
|
166
192
|
console.log(` Releases : https://github.com/keggan-std/Engram/releases\n`);
|
|
167
193
|
process.exit(0);
|
|
168
194
|
}
|
|
@@ -206,23 +232,49 @@ Examples:
|
|
|
206
232
|
// ─── Auto-detect + interactive menu ──────────────────────────────
|
|
207
233
|
console.log("\n🧠 Engram MCP Installer\n");
|
|
208
234
|
const currentIde = detectCurrentIde();
|
|
235
|
+
// Filesystem scan — finds all IDEs installed on this machine regardless of
|
|
236
|
+
// which one launched the terminal. Most devs run VS Code, Cursor, Claude Code
|
|
237
|
+
// and others side-by-side; we should install to all of them in one pass.
|
|
238
|
+
const allDetected = detectInstalledIdes();
|
|
239
|
+
const otherDetected = allDetected.filter(id => id !== currentIde);
|
|
209
240
|
if (currentIde && IDE_CONFIGS[currentIde]) {
|
|
210
241
|
console.log(`🔍 Detected environment: ${IDE_CONFIGS[currentIde].name}`);
|
|
242
|
+
if (otherDetected.length > 0) {
|
|
243
|
+
console.log(` Also found : ${otherDetected.map(id => IDE_CONFIGS[id].name).join(", ")}`);
|
|
244
|
+
}
|
|
211
245
|
if (nonInteractive) {
|
|
212
|
-
//
|
|
246
|
+
// Install to current IDE first, then all other detected IDEs automatically.
|
|
213
247
|
await performInstallationForIde(currentIde, IDE_CONFIGS[currentIde], true);
|
|
248
|
+
for (const id of otherDetected) {
|
|
249
|
+
await performInstallationForIde(id, IDE_CONFIGS[id], true);
|
|
250
|
+
}
|
|
214
251
|
return;
|
|
215
252
|
}
|
|
216
|
-
const
|
|
253
|
+
const targetIds = [currentIde, ...otherDetected];
|
|
254
|
+
const targetNames = targetIds.map(id => IDE_CONFIGS[id].name).join(", ");
|
|
255
|
+
const prompt = otherDetected.length > 0
|
|
256
|
+
? ` Install Engram for all ${targetIds.length} IDEs (${targetNames})? [Y/n]: `
|
|
257
|
+
: ` Install Engram for this IDE? [Y/n]: `;
|
|
258
|
+
const ans = await askQuestion(prompt);
|
|
217
259
|
if (ans.trim().toLowerCase() !== 'n') {
|
|
218
|
-
|
|
260
|
+
for (const id of targetIds) {
|
|
261
|
+
await performInstallationForIde(id, IDE_CONFIGS[id], false);
|
|
262
|
+
}
|
|
219
263
|
return;
|
|
220
264
|
}
|
|
221
265
|
console.log("");
|
|
222
266
|
}
|
|
223
267
|
else if (nonInteractive) {
|
|
224
|
-
|
|
225
|
-
|
|
268
|
+
// No terminal env var match — fall back to filesystem scan.
|
|
269
|
+
if (allDetected.length > 0) {
|
|
270
|
+
console.log(`🔍 Found ${allDetected.length} installed IDE(s): ${allDetected.map(id => IDE_CONFIGS[id].name).join(", ")}`);
|
|
271
|
+
for (const id of allDetected) {
|
|
272
|
+
await performInstallationForIde(id, IDE_CONFIGS[id], true);
|
|
273
|
+
}
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
console.error("❌ No IDEs detected on this machine.");
|
|
277
|
+
console.error("\n Specify your IDE manually with --ide <name>. Examples:");
|
|
226
278
|
for (const key of Object.keys(IDE_CONFIGS)) {
|
|
227
279
|
console.error(` engram install --ide ${key}`);
|
|
228
280
|
}
|
|
@@ -237,7 +289,12 @@ Examples:
|
|
|
237
289
|
});
|
|
238
290
|
const allOpt = ideKeys.length + 1;
|
|
239
291
|
const customOpt = ideKeys.length + 2;
|
|
240
|
-
|
|
292
|
+
// Show which IDEs were actually found on this machine so the user knows
|
|
293
|
+
// what "ALL detected" will cover before they pick that option.
|
|
294
|
+
const allOptLabel = allDetected.length > 0
|
|
295
|
+
? `Install to ALL detected IDEs (${allDetected.map(id => IDE_CONFIGS[id].name).join(", ")})`
|
|
296
|
+
: `Install to ALL IDEs (none detected — will attempt all)`;
|
|
297
|
+
console.log(` ${allOpt}. ${allOptLabel}`);
|
|
241
298
|
console.log(` ${customOpt}. Custom config path...`);
|
|
242
299
|
console.log(` 0. Cancel`);
|
|
243
300
|
const answer = await askQuestion(`\nSelect an option [0-${customOpt}]: `);
|
|
@@ -247,8 +304,10 @@ Examples:
|
|
|
247
304
|
process.exit(0);
|
|
248
305
|
}
|
|
249
306
|
if (choice === allOpt) {
|
|
250
|
-
|
|
251
|
-
|
|
307
|
+
// Prefer detected IDEs; fall back to all if none found.
|
|
308
|
+
const targets = allDetected.length > 0 ? allDetected : Object.keys(IDE_CONFIGS);
|
|
309
|
+
for (const id of targets) {
|
|
310
|
+
await performInstallationForIde(id, IDE_CONFIGS[id], true);
|
|
252
311
|
}
|
|
253
312
|
}
|
|
254
313
|
else if (choice === customOpt) {
|
|
@@ -280,6 +339,15 @@ Examples:
|
|
|
280
339
|
async function performInstallationForIde(id, ide, nonInteractive) {
|
|
281
340
|
const supportsLocal = ide.scopes?.localDirs && ide.scopes.localDirs.length > 0;
|
|
282
341
|
const supportsGlobal = ide.scopes?.global && ide.scopes.global.length > 0;
|
|
342
|
+
// JetBrains: the global config path is community-sourced and not confirmed by official docs.
|
|
343
|
+
// Official JetBrains MCP config is managed via Settings | Tools | AI Assistant | Model Context Protocol.
|
|
344
|
+
// We attempt the file path as a best-effort fallback; a warning ensures users know to verify.
|
|
345
|
+
if (id === "jetbrains") {
|
|
346
|
+
console.log(`\n⚠️ ${ide.name} — Note: The global config path used here is community-sourced and`);
|
|
347
|
+
console.log(` not confirmed in official JetBrains documentation.`);
|
|
348
|
+
console.log(` Recommended: configure MCP via Settings › Tools › AI Assistant › Model Context Protocol.`);
|
|
349
|
+
console.log(` The file-based install below is attempted as a best-effort fallback.\n`);
|
|
350
|
+
}
|
|
283
351
|
// Show CLI hint for IDEs that support native CLI install
|
|
284
352
|
if (ide.scopes.cli) {
|
|
285
353
|
const entryJson = JSON.stringify(makeEngramEntry(ide));
|
|
@@ -287,7 +355,7 @@ async function performInstallationForIde(id, ide, nonInteractive) {
|
|
|
287
355
|
? `"${entryJson.replace(/"/g, '\\"')}"`
|
|
288
356
|
: `'${entryJson}'`;
|
|
289
357
|
console.log(`\n💡 ${ide.name} also supports native CLI install:`);
|
|
290
|
-
console.log(` ${ide.scopes.cli}
|
|
358
|
+
console.log(` ${ide.scopes.cli} engram ${quotedEntry} --scope user`);
|
|
291
359
|
}
|
|
292
360
|
let targetScope = "global";
|
|
293
361
|
if (supportsLocal && supportsGlobal && !nonInteractive) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/installer/index.ts"],"names":[],"mappings":"AAAA,+EAA+E;AAC/E,6CAA6C;AAC7C,+EAA+E;AAE/E,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,QAAQ,EAAE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UAAU,EAAE,CAAC,CAAC;QACvD,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,sEAAsE,CAAC,CAAC;QACpF,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;IACjF,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "engram-mcp-server",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Engram — Persistent Memory Cortex for AI coding agents. Gives agents session continuity, change tracking, decision logging, and project intelligence across sessions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"type": "git",
|
|
17
17
|
"url": "https://github.com/keggan-std/Engram"
|
|
18
18
|
},
|
|
19
|
-
"releaseNotes": "# v1.4.
|
|
19
|
+
"releaseNotes": "# v1.4.1 — Installer Infrastructure Audit: Path Fixes, Multi-IDE & Detection Improvements\n\n**Engram v1.4.1 is a targeted hotfix release.** A thorough audit of the entire installer infrastructure — verified against official documentation for every supported IDE — uncovered a series of critical and high-severity bugs that caused silent wrong-directory installs on macOS, invisible installs in Visual Studio, and unreliable IDE detection. All are fixed in this release, along with multi-IDE awareness and several UX improvements.\n\n---\n\n## Breaking Changes\n\nNone. v1.4.1 is fully backwards-compatible. Existing IDE config entries are unaffected.\n\n---\n\n## Fixes\n\n### Critical — macOS Install Path Wrong for All APPDATA-Based IDEs\n\n**Root cause:** `process.env.APPDATA` is Windows-only. The fallback `|| path.join(HOME, '.config')` accidentally produced the right path on Linux but the **wrong path on macOS** — `~/.config` instead of `~/Library/Application Support`.\n\n**Impact:** On every Mac, installs for VS Code, Cline/Roo Code, and Claude Desktop were written to `~/.config/...` instead of `~/Library/Application Support/...`. The IDE never read from that path. Re-running the installer returned \"Already installed — nothing to do\" on every subsequent run because the wrong file now existed.\n\n**Fix:** The `APPDATA` constant is now OS-aware:\n- **Windows:** `%APPDATA%` (e.g. `C:\\Users\\User\\AppData\\Roaming`)\n- **macOS:** `~/Library/Application Support`\n- **Linux:** `~/.config` (XDG Base Directory spec)\n\nThis resolves the correct global config path for VS Code, Cline/Roo Code, Claude Desktop, and JetBrains on all three platforms in a single change.\n\n### Critical — Visual Studio Received Wrong Config Key\n\n**Root cause:** Visual Studio uses the `\"servers\"` JSON key — not `\"mcpServers\"`. The installer was writing `{ \"mcpServers\": { \"engram\": {...} } }` to `~/.mcp.json`.\n\n**Impact:** Every Visual Studio install silently wrote to a key VS never reads. Engram was permanently invisible in Visual Studio on all platforms.\n\n**Fix:** `configKey` for Visual Studio is now `\"servers\"`, confirmed against [official Microsoft docs](https://learn.microsoft.com/en-us/visualstudio/ide/mcp-servers).\n\n### High — VS Code, Cursor, and Windsurf Had Wrong Secondary Global Paths\n\nThree IDEs had incorrect fallback paths that would never exist on any real machine:\n\n| IDE | Wrong path (removed) | Correct path (kept) |\n|-----|----------------------|---------------------|\n| **VS Code** | `~/.vscode/mcp.json` (extensions dir) | `APPDATA/Code/User/mcp.json` |\n| **Cursor** | `APPDATA/Cursor/mcp.json` | `~/.cursor/mcp.json` |\n| **Windsurf** | `APPDATA/Windsurf/mcp.json` (wrong dir + wrong filename) | `~/.codeium/windsurf/mcp_config.json` |\n\nAll three wrong paths have been removed. Sources: [VS Code docs](https://code.visualstudio.com/docs/copilot/customization/mcp-servers), [Cursor docs](https://cursor.com/docs/context/mcp), [Windsurf docs](https://docs.windsurf.com/windsurf/cascade/mcp).\n\n### High — `--check` Compared Against Wrong Reference Version\n\n**Root cause:** `--check` compared IDE config versions against the running binary version, not npm latest. If the installer ran from local source (e.g. `v1.2.5`), an IDE config stamped `v1.4.0` would show \"update available (v1.2.5)\" — completely backwards.\n\n**Fix:** `--check` now fetches npm latest **first**, before entering the IDE loop. All comparisons use `npmLatest ?? currentVersion` as the reference. Pre-release scenarios (running ahead of npm) are correctly labelled `⚡ running pre-release`.\n\n---\n\n## Improvements\n\n### Multi-IDE Awareness\n\nThe installer now understands that most developers have multiple IDEs installed simultaneously. Behavior change summary:\n\n- **`--yes` without `--ide`:** Scans all installed IDEs via filesystem and installs to **all of them** in one pass (previously errored if no IDE was detected in the terminal env).\n- **Auto-detect:** When a terminal IDE is detected, a filesystem scan runs in parallel. Additional IDEs are displayed (\"Also found: Cursor, Claude Code (CLI)\") and included in the default install.\n- **Interactive menu:** The \"Install to ALL\" option now shows exactly which IDEs were found on the machine before the user confirms.\n- **New `detectInstalledIdes()`:** Filesystem-based scan independent of terminal env vars — finds all IDEs whose config file or parent directory exists.\n\n### Improved IDE Detection Reliability\n\n- **Cursor:** Now checks `CURSOR_TRACE_ID` env var and `process.execPath` for the word `\"cursor\"` before falling back to fragile `PATH`/`VSCODE_CWD` string matching. Handles custom install directories on Windows.\n- **Visual Studio:** Added detection via `VSINSTALLDIR` and `VisualStudioVersion` env vars (set by the VS Developer Command Prompt / PowerShell).\n\n### CWD Source Conflict Warning\n\nWhen `npx` resolves to the **local Engram source directory** (because the `CWD`'s `package.json` name matches `engram-mcp-server`), the installer now prints a clear warning before doing anything:\n\n```\n⚠️ Running from the engram source directory.\n Version shown reflects the local build — not the published npm package.\n For an accurate check: npm install -g engram-mcp-server@latest && engram --check\n```\n\n### JetBrains Install Warning\n\nThe official JetBrains documentation does not publish a file-based global config path for MCP. Configuration is managed through **Settings › Tools › AI Assistant › Model Context Protocol** in the IDE. When installing for JetBrains, the installer now prints a warning and directs users to the Settings UI. The file-based path is retained as a best-effort fallback for configurations where it may work.\n\n### Claude Code CLI Hint — Argument Order Fixed\n\nThe native CLI install hint for Claude Code displayed the wrong argument order. Positional arguments (`name`, `json`) must come before optional flags (`--scope`):\n\n```bash\n# Before (broken — flag before positional args)\nclaude mcp add-json --scope=user engram '{...}'\n\n# After (correct)\nclaude mcp add-json engram '{...}' --scope user\n```\n\n---\n\n## Fixes & Internal\n\n- Added `Roo Code` (`rooveterinaryinc.roo-cline`) as a second Cline config path alongside `saoudrizwan.claude-dev`\n- Inline source URL comments added to every IDE config path for future maintainability\n- Fixed test asserting `InstallResult` value `\"updated\"` (invalid) — corrected to `\"legacy-upgraded\"`; added new test for `\"upgraded\"` scenario\n- Fixed `IDE_CONFIGS.visualstudio` test asserting `configKey === \"mcpServers\"` — corrected to `\"servers\"`\n\n---\n\n**Full Changelog**: https://github.com/keggan-std/Engram/compare/v1.4.0...v1.4.1\n\n---",
|
|
20
20
|
"scripts": {
|
|
21
21
|
"build": "tsc",
|
|
22
22
|
"prepack": "node scripts/inject-release-notes.js && npm run clean && npm run build",
|
|
@@ -23,7 +23,8 @@ const PACKAGE_JSON_PATH = path.join(ROOT, "package.json");
|
|
|
23
23
|
// ─── Read files ──────────────────────────────────────────────────────
|
|
24
24
|
|
|
25
25
|
const pkg = JSON.parse(fs.readFileSync(PACKAGE_JSON_PATH, "utf-8"));
|
|
26
|
-
|
|
26
|
+
// Normalize CRLF → LF so the injected string is clean regardless of OS
|
|
27
|
+
const notes = fs.readFileSync(RELEASE_NOTES_PATH, "utf-8").replace(/\r\n/g, "\n");
|
|
27
28
|
|
|
28
29
|
// ─── Extract the latest version section ──────────────────────────────
|
|
29
30
|
// The file starts with the latest version heading (# vX.Y.Z — ...).
|