claude-session-continuity-mcp 1.4.1 → 1.4.3
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 +17 -11
- package/dist/hooks/install.js +10 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# claude-session-continuity-mcp (v1.4.
|
|
1
|
+
# claude-session-continuity-mcp (v1.4.3)
|
|
2
2
|
|
|
3
3
|
> **Zero Re-explanation Session Continuity for Claude Code** — Automatic context capture + semantic search
|
|
4
4
|
|
|
@@ -64,6 +64,8 @@ npm install claude-session-continuity-mcp
|
|
|
64
64
|
1. Registers MCP server in `~/.claude.json`
|
|
65
65
|
2. Installs Claude Hooks in `~/.claude/settings.local.json`
|
|
66
66
|
|
|
67
|
+
> **v1.4.3+:** Works with both local and global installation. Hooks use `npm exec --` which finds local bin scripts first, then global.
|
|
68
|
+
|
|
67
69
|
### What Gets Installed
|
|
68
70
|
|
|
69
71
|
**MCP Server** (in `~/.claude.json`):
|
|
@@ -82,20 +84,20 @@ npm install claude-session-continuity-mcp
|
|
|
82
84
|
```json
|
|
83
85
|
{
|
|
84
86
|
"hooks": {
|
|
85
|
-
"SessionStart": [{ "hooks": [{ "type": "command", "command": "
|
|
86
|
-
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "
|
|
87
|
+
"SessionStart": [{ "hooks": [{ "type": "command", "command": "npm exec -- claude-hook-session-start" }] }],
|
|
88
|
+
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "npm exec -- claude-hook-user-prompt" }] }]
|
|
87
89
|
}
|
|
88
90
|
}
|
|
89
91
|
```
|
|
90
92
|
|
|
91
|
-
**Note (v1.4.
|
|
93
|
+
**Note (v1.4.3+):** Hooks use `npm exec --` which finds local `node_modules/.bin` first, then falls back to global. Works with both local and global installation.
|
|
92
94
|
|
|
93
95
|
### Installed Hooks
|
|
94
96
|
|
|
95
97
|
| Hook | Command | Function |
|
|
96
98
|
|------|---------|----------|
|
|
97
|
-
| `SessionStart` | `
|
|
98
|
-
| `UserPromptSubmit` | `
|
|
99
|
+
| `SessionStart` | `npm exec -- claude-hook-session-start` | Auto-loads project context on session start |
|
|
100
|
+
| `UserPromptSubmit` | `npm exec -- claude-hook-user-prompt` | Auto-injects relevant memories per prompt |
|
|
99
101
|
|
|
100
102
|
### Manual Hook Management
|
|
101
103
|
|
|
@@ -183,19 +185,23 @@ npx claude-session-hooks uninstall
|
|
|
183
185
|
export MCP_HOOKS_DISABLED=true
|
|
184
186
|
```
|
|
185
187
|
|
|
186
|
-
### Why
|
|
188
|
+
### Why npm exec? (v1.4.3+)
|
|
187
189
|
|
|
188
|
-
Previous versions used absolute paths
|
|
190
|
+
Previous versions used absolute paths or `npx`:
|
|
189
191
|
```json
|
|
192
|
+
// v1.3.x - absolute paths (broke on multi-project)
|
|
190
193
|
"command": "node \"/path/to/project-a/node_modules/.../session-start.js\""
|
|
194
|
+
|
|
195
|
+
// v1.4.0-1.4.2 - npx (required global install or hit npm registry)
|
|
196
|
+
"command": "npx claude-hook-session-start"
|
|
191
197
|
```
|
|
192
198
|
|
|
193
|
-
|
|
199
|
+
Now we use `npm exec --`:
|
|
194
200
|
```json
|
|
195
|
-
"command": "
|
|
201
|
+
"command": "npm exec -- claude-hook-session-start"
|
|
196
202
|
```
|
|
197
203
|
|
|
198
|
-
|
|
204
|
+
**`npm exec --` finds local `node_modules/.bin` first**, then falls back to global. Works with both local and global installation without hitting npm registry.
|
|
199
205
|
|
|
200
206
|
---
|
|
201
207
|
|
package/dist/hooks/install.js
CHANGED
|
@@ -105,38 +105,39 @@ function install() {
|
|
|
105
105
|
console.log('║ Claude Session Continuity MCP - Installation ║');
|
|
106
106
|
console.log('╚════════════════════════════════════════════════════════════╝');
|
|
107
107
|
console.log('');
|
|
108
|
-
// ===== 1. Hooks 설치 (
|
|
109
|
-
console.log('📌 Step 1: Installing Hooks (
|
|
108
|
+
// ===== 1. Hooks 설치 (npm exec 방식 - 경로 독립적) =====
|
|
109
|
+
console.log('📌 Step 1: Installing Hooks (npm exec mode)...');
|
|
110
110
|
const settings = loadSettings();
|
|
111
111
|
// 기존 hooks 유지하면서 추가
|
|
112
112
|
const hooks = settings.hooks || {};
|
|
113
|
-
// SessionStart Hook -
|
|
113
|
+
// SessionStart Hook - npm exec로 실행 (로컬 + 글로벌 모두 지원)
|
|
114
|
+
// npm exec는 로컬 node_modules/.bin을 먼저 찾고, 없으면 글로벌에서 찾음
|
|
114
115
|
hooks.SessionStart = [
|
|
115
116
|
{
|
|
116
117
|
hooks: [
|
|
117
118
|
{
|
|
118
119
|
type: 'command',
|
|
119
|
-
command: '
|
|
120
|
+
command: 'npm exec -- claude-hook-session-start'
|
|
120
121
|
}
|
|
121
122
|
]
|
|
122
123
|
}
|
|
123
124
|
];
|
|
124
|
-
// UserPromptSubmit Hook -
|
|
125
|
+
// UserPromptSubmit Hook - npm exec로 실행
|
|
125
126
|
hooks.UserPromptSubmit = [
|
|
126
127
|
{
|
|
127
128
|
hooks: [
|
|
128
129
|
{
|
|
129
130
|
type: 'command',
|
|
130
|
-
command: '
|
|
131
|
+
command: 'npm exec -- claude-hook-user-prompt'
|
|
131
132
|
}
|
|
132
133
|
]
|
|
133
134
|
}
|
|
134
135
|
];
|
|
135
136
|
settings.hooks = hooks;
|
|
136
137
|
saveSettings(settings);
|
|
137
|
-
console.log('✅ Hooks installed (
|
|
138
|
-
console.log(' SessionStart:
|
|
139
|
-
console.log(' UserPromptSubmit:
|
|
138
|
+
console.log('✅ Hooks installed (npm exec mode - works with local or global install!)');
|
|
139
|
+
console.log(' SessionStart: npm exec -- claude-hook-session-start');
|
|
140
|
+
console.log(' UserPromptSubmit: npm exec -- claude-hook-user-prompt');
|
|
140
141
|
console.log('');
|
|
141
142
|
// ===== 2. MCP 서버 등록 =====
|
|
142
143
|
console.log('📌 Step 2: Registering MCP Server...');
|