claude-memory-hub 0.9.0 → 0.9.2

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/CHANGELOG.md CHANGED
@@ -5,6 +5,37 @@ Format follows [Keep a Changelog](https://keepachangelog.com/).
5
5
 
6
6
  ---
7
7
 
8
+ ## [0.9.2] - 2026-04-02
9
+
10
+ Cross-platform hook reliability — Windows/WSL no longer fails with "bun: command not found".
11
+
12
+ ### Bug Fixes
13
+
14
+ - **dist/hooks missing from npm package** — `.npmignore` pattern `hooks/` was matching `dist/hooks/` too, causing "Module not found" on Windows. Fixed to `/hooks/` (root-only match)
15
+
16
+ ### Upgrade Note
17
+
18
+ After updating, run `bunx claude-memory-hub@latest install` to re-register hooks with the resolved bun path.
19
+
20
+
21
+ ---
22
+
23
+ ## [0.9.1] - 2026-04-02
24
+
25
+ Cross-platform hook reliability — Windows/WSL no longer fails with "bun: command not found".
26
+
27
+ ### Bug Fixes
28
+
29
+ - **Full bun path resolution** — `install` now resolves absolute path to `bun` binary via `which` (macOS/Linux) or `where` (Windows), with fallback to `~/.bun/bin/bun`. All hooks and MCP server commands are registered with the full path instead of relying on PATH inheritance
30
+ - **Windows/WSL compatibility** — fixes "bun: command not found" error caused by non-interactive shells (used by Claude Code to spawn hooks) not inheriting user's PATH where `bun` is installed
31
+ - **dist/hooks missing from npm package** — `.npmignore` pattern `hooks/` was matching `dist/hooks/` too, causing "Module not found" on Windows. Fixed to `/hooks/` (root-only match)
32
+
33
+ ### Upgrade Note
34
+
35
+ After updating, run `bunx claude-memory-hub@latest install` to re-register hooks with the resolved bun path.
36
+
37
+ ---
38
+
8
39
  ## [0.9.0] - 2026-04-02
9
40
 
10
41
  Smart context budget allocation — memory never gets pushed out by lower-priority content.
@@ -29,6 +60,10 @@ Smart context budget allocation — memory never gets pushed out by lower-priori
29
60
  - **Proactive summary slice increased** — per-result summary increased from 200 to 400 chars for richer mid-session context
30
61
  - **Memory result summary increased** — session-start per-result summary increased from 300 to 400 chars
31
62
 
63
+ ### Bug Fixes
64
+
65
+ - **Windows/WSL hook failure fixed** — `install` now resolves full path to `bun` binary via `which`/`where` + fallback to `~/.bun/bin/bun`. Fixes "bun: command not found" error on Windows/WSL where non-interactive shells don't inherit PATH
66
+
32
67
  ---
33
68
 
34
69
  ## [0.8.1] - 2026-04-02
package/dist/cli.js CHANGED
@@ -1954,6 +1954,24 @@ import { spawnSync } from "child_process";
1954
1954
  var CLAUDE_DIR = join5(homedir5(), ".claude");
1955
1955
  var SETTINGS_PATH = join5(CLAUDE_DIR, "settings.json");
1956
1956
  var PKG_DIR = resolve(dirname(import.meta.dir));
1957
+ function getBunPath() {
1958
+ const result = spawnSync(process.platform === "win32" ? "where" : "which", ["bun"], {
1959
+ encoding: "utf-8"
1960
+ });
1961
+ const resolved = result.stdout?.trim().split(`
1962
+ `)[0]?.trim();
1963
+ if (resolved && existsSync5(resolved))
1964
+ return resolved;
1965
+ const candidates = [
1966
+ join5(homedir5(), ".bun", "bin", "bun"),
1967
+ join5(homedir5(), ".bun", "bin", "bun.exe")
1968
+ ];
1969
+ for (const c of candidates) {
1970
+ if (existsSync5(c))
1971
+ return c;
1972
+ }
1973
+ return "bun";
1974
+ }
1957
1975
  function getHookPath(hookName) {
1958
1976
  return join5(PKG_DIR, "dist", "hooks", `${hookName}.js`);
1959
1977
  }
@@ -1980,7 +1998,8 @@ function install() {
1980
1998
  `);
1981
1999
  console.log("1. Registering MCP server...");
1982
2000
  const mcpPath = getMcpServerPath();
1983
- const result = spawnSync("claude", ["mcp", "add", "claude-memory-hub", "-s", "user", "--", "bun", "run", mcpPath], {
2001
+ const bunBin = getBunPath();
2002
+ const result = spawnSync("claude", ["mcp", "add", "claude-memory-hub", "-s", "user", "--", bunBin, "run", mcpPath], {
1984
2003
  stdio: "inherit"
1985
2004
  });
1986
2005
  if (result.status !== 0) {
@@ -1988,7 +2007,7 @@ function install() {
1988
2007
  const settings2 = loadSettings();
1989
2008
  settings2.mcpServers ??= {};
1990
2009
  settings2.mcpServers["claude-memory-hub"] = {
1991
- command: "bun",
2010
+ command: bunBin,
1992
2011
  args: ["run", mcpPath]
1993
2012
  };
1994
2013
  saveSettings(settings2);
@@ -2013,7 +2032,7 @@ function install() {
2013
2032
  if (!exists) {
2014
2033
  hooks[event].push({
2015
2034
  matcher: "",
2016
- hooks: [{ type: "command", command: `bun run ${scriptPath}` }]
2035
+ hooks: [{ type: "command", command: `${bunBin} run ${scriptPath}` }]
2017
2036
  });
2018
2037
  registered++;
2019
2038
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-memory-hub",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Persistent memory system for Claude Code. Zero API key. Zero Python. 5 hooks + MCP server + SQLite FTS5 + semantic search.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",