gitmem-mcp 1.0.6 → 1.0.8

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/bin/gitmem.js CHANGED
@@ -489,8 +489,22 @@ function cmdInstallHooks() {
489
489
  }
490
490
  }
491
491
 
492
- // Build hook entries using node_modules path (resolved from CWD)
493
- const relScripts = "node_modules/gitmem-mcp/hooks/scripts";
492
+ // Copy hook scripts to .gitmem/hooks/ (works regardless of npx vs local install)
493
+ const gitmemDir = join(process.cwd(), ".gitmem");
494
+ const destHooksDir = join(gitmemDir, "hooks");
495
+ if (!existsSync(destHooksDir)) {
496
+ mkdirSync(destHooksDir, { recursive: true });
497
+ }
498
+ for (const file of readdirSync(scriptsDir)) {
499
+ if (file.endsWith(".sh")) {
500
+ const src = join(scriptsDir, file);
501
+ const dest = join(destHooksDir, file);
502
+ writeFileSync(dest, readFileSync(src));
503
+ chmodSync(dest, 0o755);
504
+ }
505
+ }
506
+
507
+ const relScripts = ".gitmem/hooks";
494
508
  const gitmemHooks = {
495
509
  SessionStart: [
496
510
  {
@@ -86,7 +86,7 @@ function buildMcpConfig() {
86
86
  }
87
87
 
88
88
  function buildHooks() {
89
- const relScripts = "node_modules/gitmem-mcp/hooks/scripts";
89
+ const relScripts = ".gitmem/hooks";
90
90
  return {
91
91
  SessionStart: [
92
92
  {
@@ -457,12 +457,19 @@ async function stepHooks() {
457
457
  return;
458
458
  }
459
459
 
460
- // Make hook scripts executable
460
+ // Copy hook scripts to .gitmem/hooks/ (works regardless of npx vs local install)
461
+ const destHooksDir = join(gitmemDir, "hooks");
462
+ if (!existsSync(destHooksDir)) {
463
+ mkdirSync(destHooksDir, { recursive: true });
464
+ }
461
465
  if (existsSync(hooksScriptsDir)) {
462
466
  try {
463
467
  for (const file of readdirSync(hooksScriptsDir)) {
464
468
  if (file.endsWith(".sh")) {
465
- chmodSync(join(hooksScriptsDir, file), 0o755);
469
+ const src = join(hooksScriptsDir, file);
470
+ const dest = join(destHooksDir, file);
471
+ writeFileSync(dest, readFileSync(src));
472
+ chmodSync(dest, 0o755);
466
473
  }
467
474
  }
468
475
  } catch {
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "gitmem-mcp",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Institutional memory for AI coding agents. Memory that compounds.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
8
  "bin": {
9
9
  "gitmem": "bin/gitmem.js",
10
- "gitmem-mcp": "dist/index.js"
10
+ "gitmem-mcp": "bin/gitmem.js"
11
11
  },
12
12
  "scripts": {
13
13
  "build": "tsc && npm run test:unit",