project-brain 0.39.0 → 0.40.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 (2) hide show
  1. package/README.md +16 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -599,6 +599,22 @@ project-brain update
599
599
 
600
600
  Every other command already prints an `update available` notice (current → latest, with the exact command to run) once a day when a newer version is published — `update` runs that command for you instead of requiring a copy-paste.
601
601
 
602
+ #### Live updates
603
+
604
+ After installing, `update` re-applies your saved `setup` selection with the new binary — no prompts, only the units you chose (a unit you declined is never added, and one never offered is refreshed only if it is already installed). If brew or npm upgraded the binary for you, run `project-brain update --apply-only` to do just that step.
605
+
606
+ What reaches Claude Code sessions that are already open:
607
+
608
+ - **Hooks and skills** are live at once: Claude Code reloads `settings.json` and skill directories, and hooks re-run the binary on every event.
609
+ - **CLAUDE.md** is only read at launch, so the first prompt after an update shows a one-time notice (`project-brain updated X → Y`) with the current model-routing guidance.
610
+ - **The MCP server** is not reloaded by Claude Code. By default the same notice tells you to run `/mcp reconnect all` (or `/mcp`) to load the new tools.
611
+
612
+ #### Optional: automatic MCP hot swap
613
+
614
+ Set `BRAIN_MCP_HOT_SWAP=1` in the MCP server's environment and stdio `serve` runs a small supervisor that relays to a worker process. When the binary on disk is newer, it starts a new worker, waits until no request is in flight, switches over, sends `tools/list_changed`, then lets the old worker drain and exit. A failure at any point leaves the old worker serving, and the notice then says to run `/mcp reconnect all`; after two failed attempts at a version the supervisor stops trying for that session. It is off by default because the supervisor is a second process per session, about 76 MB of memory each. Servers started before the first release with this feature have no supervisor, so that first update still needs one `/mcp reconnect all`.
615
+
616
+ Limits to know about: a new worker is launched through the same command your tool used (for a brew or npm link, the link, so a retargeted link is picked up), never through the old versioned directory; and when running from source with `bun run`, only the entry script is watched, so a change that touches `package.json` alone is not noticed.
617
+
602
618
  ### `serve`
603
619
 
604
620
  Start the MCP server. Default mode uses stdio (for local AI tool connections).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-brain",
3
- "version": "0.39.0",
3
+ "version": "0.40.0",
4
4
  "type": "module",
5
5
  "description": "Local-first MCP server that gives AI tools semantic memory of your codebase.",
6
6
  "author": "jcsoftdev",
@@ -49,11 +49,11 @@
49
49
  "zod": "^4.4.3"
50
50
  },
51
51
  "optionalDependencies": {
52
- "project-brain-darwin-arm64": "0.39.0",
53
- "project-brain-linux-x64": "0.39.0",
54
- "project-brain-linux-arm64": "0.39.0",
55
- "project-brain-windows-x64": "0.39.0",
56
- "project-brain-windows-arm64": "0.39.0"
52
+ "project-brain-darwin-arm64": "0.40.0",
53
+ "project-brain-linux-x64": "0.40.0",
54
+ "project-brain-linux-arm64": "0.40.0",
55
+ "project-brain-windows-x64": "0.40.0",
56
+ "project-brain-windows-arm64": "0.40.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/bun": "latest",