{
  "name": "engram-mcp-server",
  "version": "1.14.0",
  "description": "Engram — Persistent Memory Cortex for AI coding agents. Gives agents session continuity, change tracking, decision logging, and project intelligence across sessions.",
  "type": "module",
  "main": "dist/index.js",
  "bin": {
    "engram": "dist/index.js",
    "engram-mcp-server": "dist/index.js"
  },
  "files": [
    "dist/"
  ],
  "repository": {
    "type": "git",
    "url": "git+https://github.com/keggan-std/Engram.git"
  },
  "scripts": {
    "build": "tsc",
    "prepack": "node scripts/inject-release-notes.js && npm run clean && npm run build",
    "postpack": "node scripts/restore-package-json.js",
    "test": "vitest run",
    "test:coverage": "vitest run --coverage",
    "test:watch": "vitest",
    "start": "node dist/index.js",
    "dev": "tsc --watch",
    "clean": "node -e \"const {rmSync,existsSync}=require('fs');if(existsSync('dist'))rmSync('dist',{recursive:true,force:true})\"",
    "install-hooks": "node dist/scripts/install-hooks.js",
    "install-mcp": "node scripts/install-mcp.js",
    "install-mcp:list": "node scripts/install-mcp.js --list",
    "inspect": "npx @modelcontextprotocol/inspector node dist/index.js",
    "build:dashboard": "cd packages/engram-dashboard && npm install && npm run build",
    "dev:http": "node dist/index.js --mode=http",
    "surface": "node scripts/generate-capability-surface.mjs",
    "surface:check": "node scripts/generate-capability-surface.mjs --check",
    "http-surface": "node scripts/generate-http-surface.mjs",
    "http-surface:check": "node scripts/generate-http-surface.mjs --check",
    "dashboard": "npm run build && npm --prefix packages/engram-dashboard install --prefer-offline && concurrently -k --raw -n \"api,ui\" -c \"cyan,green\" \"node dist/index.js --mode=http --open-port=5173\" \"npm --prefix packages/engram-dashboard run dev\""
  },
  "keywords": [
    "mcp",
    "model-context-protocol",
    "mcp-server",
    "ai-memory",
    "coding-agent",
    "persistent-memory",
    "session-continuity",
    "session-memory",
    "agent-memory",
    "llm-memory",
    "ai-agent",
    "llm",
    "multi-agent",
    "agent-coordination",
    "task-tracking",
    "decision-logging",
    "change-tracking",
    "context-persistence",
    "claude",
    "cursor",
    "windsurf",
    "copilot",
    "vscode",
    "sqlite",
    "developer-tools"
  ],
  "author": "Renald Shao (aka Keggan Student) <https://github.com/keggan-std>",
  "homepage": "https://github.com/keggan-std/Engram#readme",
  "license": "MIT",
  "dependencies": {
    "@modelcontextprotocol/sdk": "^1.12.0",
    "better-sqlite3": "^12.11.1",
    "cors": "^2.8.6",
    "express": "^5.2.1",
    "open": "^11.0.0",
    "ws": "^8.19.0",
    "zod": "^3.24.0"
  },
  "devDependencies": {
    "@types/better-sqlite3": "^7.6.13",
    "@types/cors": "^2.8.19",
    "@types/express": "^5.0.6",
    "@types/node": "^22.10.0",
    "@types/supertest": "^7.2.0",
    "@types/ws": "^8.18.1",
    "@vitest/coverage-v8": "^4.0.18",
    "concurrently": "^9.2.1",
    "supertest": "^7.2.2",
    "typescript": "^5.7.0",
    "vitest": "^4.0.18"
  },
  "overrides": {
    "prebuild-install": "7.1.3"
  },
  "_engines_floor": "20, not 18. PROVEN 2026-08-13 by reading the installed trees: better-sqlite3@12.11.1 declares `20.x || 22.x || 23.x || 24.x || 25.x || 26.x` and open@11 declares `>=20`. v1.13.0 and earlier published `>=18.0.0`, so a user on Node 18 got EBADENGINE and then a native build failure on the dependency that IS the database. CI cannot catch this: the matrix is 20.x and 22.x. Note better-sqlite3 enumerates majors rather than using a floor, so it also excludes 19 and 21; >=20.0.0 is Engram's own supported floor, not a restatement of the transitive constraint.",
  "_better_sqlite3_floor": "^12.11.1 is a FLOOR WITH A REASON, not a routine bump. 12.6.2 bundled SQLite 3.51.2, which carries the WAL-reset database corruption bug fixed in 3.51.3 (sqlite.org/changes.html, 2026-03-13). Engram runs WAL mode and is explicitly a multi-agent, multi-IDE tool, so the trigger — two or more connections on one file writing or checkpointing at the same instant — is its normal operating mode, not a corner case. 12.11.1 bundles 3.53.2, PROVEN by querying sqlite_version(). Do not lower this bound.",
  "engines": {
    "node": ">=20.0.0"
  },
  "_releaseNotes_removed": "Generated at publish time by scripts/inject-release-notes.js (prepack) and restored by scripts/restore-package-json.js (postpack). NEVER COMMIT A VALUE HERE: the committed copy carried v1.13.0 notes into the v1.14.0 tree and nothing reported it, because prepack overwrites it silently at publish. Removed 2026-08-13.",
  "releaseNotes": "# v1.14.0 — The installer tells the truth about what is on your machine\n\n**Released:** v1.14.0 — August 13, 2026 · **Base:** v1.13.0\n\n## Overview\n\n`v1.13.0` shipped a working product with a broken **`--check`**. On Windows the\ncommand printed its entire report correctly and then **died with exit code 127**,\nand the report it printed described one install per IDE on machines that have\nseveral. This release fixes the command you run to find out whether the other\nfixes arrived.\n\nEverything here is installer-side. **No schema change, no MCP tool-contract\nchange, no migration.** Upgrading is safe from any 1.x.\n\n---\n\n## `install --check` crashed on Windows after printing its report\n\n```\nAssertion failed: !(handle->flags & UV_HANDLE_CLOSING), file src\\win\\async.c, line 76\n```\n\n**Cause.** `--check` fetches the npm registry to compare versions, then called\n`process.exit()`. Node's built-in `fetch` (undici) keeps the connection alive\nafter the body resolves, and `process.exit()` races its teardown — upstream\n[nodejs/node#58091](https://github.com/nodejs/node/issues/58091) and\n[#64322](https://github.com/nodejs/node/issues/64322). It reproduces only on\nWindows, and the upstream fix has been stalled in review since January 2025, so\nthere is no Node version to wait for.\n\n**Fix.** `--check` now sets `process.exitCode` and returns, letting Node drain\nits own handles. Rejected the common workaround of sleeping ~100 ms before\nexiting: it trades a crash for a race that is quieter and still wrong.\n\nExit codes are unchanged and still meaningful: `0` for success, `1` when a config\nexists but cannot be parsed. *\"Update available\"* stays `0` on purpose — a gate\nthat goes red on every release is one a developer switches off inside a week.\n\n## One IDE is not one install\n\nThe interactive installer asked for a single status per IDE and took the first\nconfig path that matched. On a machine with four Android Studio channels that is\nnot a summary, it is a coin toss: three real installs went unmentioned and the\none named was whichever path happened to be reached first.\n\nIt now reads the same discovery engine `--check` uses, and gained:\n\n- **Multi-select.** `--check` could offer *\"update all\"* or *\"pick one\"*. Faced\n  with ten outdated installs, picking one meant running the command ten times.\n- **A details view** — every instance with its scope, mode, config file, project\n  root and the database it will open.\n- **Shortened paths that stay distinguishable.** `$HOME` collapses to `~` and the\n  middle is elided, **never the tail** — sibling configs differ only in their\n  second-to-last segment, so a tail-truncating shortener would render four\n  channels identical.\n- **Deduplicated commands.** `--check` printed four *identical* update commands.\n  It now prints one and lists the paths it covers.\n\n## \"installed\" with no version\n\nAn entry written before Engram stamped versions displayed as `v?`. That is\nhonest and unreadable — it reads as a broken installer rather than as *\"older\nthan every stamped release\"*. It is now **`unversioned (pre-1.9)`** everywhere,\nin `--check` and in the install menus, which previously disagreed about the same\nstate.\n\n## `--help` printed a command the README warns against\n\nThe usage line said `npx -y engram-mcp-server install`. npx caches by package\nname, so the untagged form re-runs whatever version it downloaded first — the\ntrap `README.md` documents and every command in it avoids. The help text now\ncarries `@latest`.\n\n## `remove_hooks` never removed anything\n\n`engram_admin(action:\"remove_hooks\")` matched on a `\\n---\\n\\n` terminator that\nits own hook content never emits, so the regex matched nothing and the block\nsurvived every removal, while the call reported success. The CLI and MCP paths\nalso used **different markers** and each refused to recognise the other's hook.\nBoth now share one marker and one recogniser.\n\n## `engines` said Node 18, and Node 18 cannot run Engram\n\nv1.13.0 and earlier published `\"node\": \">=18.0.0\"`. **PROVEN** by reading the\ninstalled dependency trees: `better-sqlite3@12.11.1` declares\n`20.x || 22.x || 23.x || 24.x || 25.x || 26.x` and `open@11` declares `>=20`. A\nuser on Node 18 got an `EBADENGINE` warning and then a **native build failure on\nthe dependency that *is* the database** — an install that cannot possibly work,\nadvertised as supported. CI could not catch it: the matrix is 20.x and 22.x.\n\nNow `>=20.0.0`. Note that `better-sqlite3` enumerates majors rather than using a\nfloor, so 19 and 21 are excluded too.\n\n## `better-sqlite3` floor raised to `^12.11.1` — WAL corruption\n\nNot a routine bump. `12.6.2` bundled **SQLite 3.51.2**, which carries a\nWAL-reset database-corruption bug fixed in **3.51.3**\n([sqlite.org/changes.html](https://sqlite.org/changes.html), 2026-03-13).\n\nEngram runs in WAL mode and is explicitly a multi-agent, multi-IDE tool, so the\ntrigger — two or more connections writing or checkpointing the same file at the\nsame instant — **is its normal operating mode**, not a corner case. `12.11.1`\nbundles 3.53.2, verified by querying `sqlite_version()`.\n\n## The published `package.json` carried the wrong release notes\n\n`prepack` injects the changelog into `package.json` at publish time, and nothing\nput it back — there was no `postpack`. The consequence was that a **stale value\nsat committed in the file**: the v1.14.0 tree carried v1.13.0's notes, 6,320\ncharacters of them, and nothing reported it because `prepack` silently\noverwrites the field anyway. The injector now writes a backup, `postpack`\nrestores it, and the committed value is removed with a note saying never to\ncommit one.\n\n## Also\n\n- The two generated-surface gates are wired as npm scripts (`surface:check`,\n  `http-surface:check`). The generators shipped in v1.13.0; the scripts to run\n  them did not, so nothing invoked them on the published line.\n- Five type errors in the test suite are fixed, including one that was a real\n  defect: a task-status assertion used `\"in-progress\"` on both the write and the\n  read, so it passed by writing and reading the same wrong string and never\n  exercised the actual `in_progress` literal.\n\n## Not in this release\n\nThe larger work on the `v2-foundations` branch — memory attribution under\nconcurrency, session-start payload bounds, and the schema-honesty gates — is\n**not** here. It contains breaking changes and ships as `2.0.0` when its targets\nland. This release is deliberately narrow: the fixes a user needs in order to\nreceive the next one.\n\n---"
}
