@alex900530/claude-persistent-memory 1.0.0 → 1.0.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 CHANGED
@@ -95,7 +95,7 @@ export AZURE_OPENAI_ENDPOINT="https://your-resource.openai.azure.com"
95
95
  export AZURE_OPENAI_KEY="your-api-key"
96
96
 
97
97
  # Install in any project
98
- npm install @alex/claude-persistent-memory
98
+ npm install @alex900530/claude-persistent-memory
99
99
  ```
100
100
 
101
101
  That's it. The postinstall script automatically:
@@ -188,7 +188,7 @@ Then manually configure `.mcp.json` and `.claude/settings.json` — see [Configu
188
188
  npx claude-persistent-memory-uninstall
189
189
  ```
190
190
 
191
- Or manually: remove the `memory` entry from `.mcp.json`, remove memory hooks from `.claude/settings.json`, then `npm uninstall @alex/claude-persistent-memory`. The `.claude-memory/` data directory is preserved — delete it manually if no longer needed.
191
+ Or manually: remove the `memory` entry from `.mcp.json`, remove memory hooks from `.claude/settings.json`, then `npm uninstall @alex900530/claude-persistent-memory`. The `.claude-memory/` data directory is preserved — delete it manually if no longer needed.
192
192
 
193
193
  ## Configuration
194
194
 
package/bin/setup.js CHANGED
@@ -144,9 +144,14 @@ function setupHooks() {
144
144
  if (!existing.hooks[event]) existing.hooks[event] = [];
145
145
  const hooks = existing.hooks[event];
146
146
 
147
- // Find existing hook by script filename
148
- const idx = hooks.findIndex(h => h.command && h.command.includes(file));
149
- const entry = { type: 'command', command };
147
+ // New hook format with matcher: { matcher: {}, hooks: [{ type, command }] }
148
+ const hookCmd = { type: 'command', command };
149
+ const entry = { matcher: {}, hooks: [hookCmd] };
150
+
151
+ // Find existing hook group by script filename
152
+ const idx = hooks.findIndex(h =>
153
+ h.hooks && h.hooks.some(hh => hh.command && hh.command.includes(file))
154
+ );
150
155
 
151
156
  if (idx >= 0) {
152
157
  hooks[idx] = entry;
package/bin/uninstall.js CHANGED
@@ -80,7 +80,10 @@ function removeHooks() {
80
80
  for (const event of Object.keys(data.hooks)) {
81
81
  const before = data.hooks[event].length;
82
82
  data.hooks[event] = data.hooks[event].filter(
83
- h => !hookFiles.some(f => h.command && h.command.includes(f))
83
+ h => !hookFiles.some(f =>
84
+ (h.hooks && h.hooks.some(hh => hh.command && hh.command.includes(f))) ||
85
+ (h.command && h.command.includes(f))
86
+ )
84
87
  );
85
88
  removed += before - data.hooks[event].length;
86
89
  if (data.hooks[event].length === 0) delete data.hooks[event];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alex900530/claude-persistent-memory",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Persistent memory system for Claude Code — hybrid BM25 + vector search, LLM-driven structuring, automatic clustering",
5
5
  "main": "lib/memory-db.js",
6
6
  "bin": {