claude-session-continuity-mcp 1.4.0 → 1.4.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 +85 -82
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# claude-session-continuity-mcp (
|
|
1
|
+
# claude-session-continuity-mcp (v1.4.0)
|
|
2
2
|
|
|
3
3
|
> **Zero Re-explanation Session Continuity for Claude Code** — Automatic context capture + semantic search
|
|
4
4
|
|
|
@@ -20,9 +20,9 @@ Every new Claude Code session:
|
|
|
20
20
|
|
|
21
21
|
**5 minutes of context-setting. Every. Single. Time.**
|
|
22
22
|
|
|
23
|
-
## The Solution
|
|
23
|
+
## The Solution
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
**Fully automatic.** Claude Hooks handle everything without manual calls:
|
|
26
26
|
|
|
27
27
|
```bash
|
|
28
28
|
# Session start → Auto-loads relevant context (Git-based semantic search)
|
|
@@ -54,47 +54,65 @@ v5 is **fully automatic**. Claude Hooks handle everything without manual calls:
|
|
|
54
54
|
|
|
55
55
|
## Quick Start
|
|
56
56
|
|
|
57
|
-
###
|
|
57
|
+
### One Command Installation
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
60
|
npm install claude-session-continuity-mcp
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
**That's it!** The postinstall script automatically:
|
|
64
|
+
1. Registers MCP server in `~/.claude.json`
|
|
65
|
+
2. Installs Claude Hooks in `~/.claude/settings.local.json`
|
|
64
66
|
|
|
67
|
+
### What Gets Installed
|
|
68
|
+
|
|
69
|
+
**MCP Server** (in `~/.claude.json`):
|
|
65
70
|
```json
|
|
66
71
|
{
|
|
67
72
|
"mcpServers": {
|
|
68
|
-
"
|
|
73
|
+
"project-manager": {
|
|
69
74
|
"command": "npx",
|
|
70
|
-
"args": ["claude-session-continuity-mcp"]
|
|
71
|
-
"env": {
|
|
72
|
-
"WORKSPACE_ROOT": "/path/to/your/workspace"
|
|
73
|
-
}
|
|
75
|
+
"args": ["claude-session-continuity-mcp"]
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
```
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
**Claude Hooks** (in `~/.claude/settings.local.json`):
|
|
82
|
+
```json
|
|
83
|
+
{
|
|
84
|
+
"hooks": {
|
|
85
|
+
"SessionStart": [{ "hooks": [{ "type": "command", "command": "npx claude-hook-session-start" }] }],
|
|
86
|
+
"UserPromptSubmit": [{ "hooks": [{ "type": "command", "command": "npx claude-hook-user-prompt" }] }]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Note (v1.4.0+):** Hooks use `npx` commands instead of absolute paths, so they work correctly regardless of which project installed the package.
|
|
92
|
+
|
|
93
|
+
### Installed Hooks
|
|
94
|
+
|
|
95
|
+
| Hook | Command | Function |
|
|
96
|
+
|------|---------|----------|
|
|
97
|
+
| `SessionStart` | `npx claude-hook-session-start` | Auto-loads project context on session start |
|
|
98
|
+
| `UserPromptSubmit` | `npx claude-hook-user-prompt` | Auto-injects relevant memories per prompt |
|
|
99
|
+
|
|
100
|
+
### Manual Hook Management
|
|
80
101
|
|
|
81
102
|
```bash
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
```
|
|
103
|
+
# Check hook status
|
|
104
|
+
npx claude-session-hooks status
|
|
85
105
|
|
|
86
|
-
|
|
106
|
+
# Reinstall hooks
|
|
107
|
+
npx claude-session-hooks install
|
|
87
108
|
|
|
88
|
-
|
|
109
|
+
# Remove hooks
|
|
110
|
+
npx claude-session-hooks uninstall
|
|
111
|
+
```
|
|
89
112
|
|
|
90
|
-
|
|
91
|
-
|------|------|----------|
|
|
92
|
-
| `SessionStart` | `session_start.py` | Auto-loads relevant context via semantic search on session start |
|
|
93
|
-
| `PrePromptSubmit` | `pre_prompt_submit.py` | Auto-injects memories/solutions related to your query |
|
|
94
|
-
| `PostPromptSubmit` | `post_prompt_submit.py` | Auto-captures important info (decision, error, learning, etc.) |
|
|
95
|
-
| `SessionEnd` | `session_end.py` | Auto-saves sessions/memories based on Git commits |
|
|
113
|
+
### 3. Restart Claude Code
|
|
96
114
|
|
|
97
|
-
|
|
115
|
+
After installation, restart Claude Code to activate the hooks.
|
|
98
116
|
|
|
99
117
|
---
|
|
100
118
|
|
|
@@ -115,85 +133,70 @@ This registers automatic context hooks in `~/.claude/settings.local.json`.
|
|
|
115
133
|
|
|
116
134
|
---
|
|
117
135
|
|
|
118
|
-
## Claude Hooks
|
|
136
|
+
## Claude Hooks - Auto Context System
|
|
119
137
|
|
|
120
|
-
###
|
|
138
|
+
### How It Works
|
|
121
139
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
├── post_prompt_submit.py # Post-prompt - Auto memory capture
|
|
127
|
-
├── session_end.py # Session end - Git-based save
|
|
128
|
-
└── install_hooks.py # Install script
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### session_start.py - Semantic Context Load
|
|
132
|
-
|
|
133
|
-
Auto-loads relevant memories via **4-phase multi-stage search** on session start:
|
|
134
|
-
|
|
135
|
-
```
|
|
136
|
-
Phase 0: Semantic search (embedding similarity based on Git keywords)
|
|
137
|
-
Phase 1: Git commit keyword FTS search
|
|
138
|
-
Phase 2: Recent 7-day memories
|
|
139
|
-
Phase 3: Important tags (decision, error)
|
|
140
|
-
Phase 4: Fallback (general context)
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
### pre_prompt_submit.py - Query-Based Injection
|
|
144
|
-
|
|
145
|
-
Auto-injects **only memories/solutions related** to user's query:
|
|
146
|
-
|
|
147
|
-
```python
|
|
148
|
-
# Example: When asking "How to fix OAuth error"
|
|
149
|
-
→ Search OAuth-related memories (FTS + keyword)
|
|
150
|
-
→ Search error-type solutions
|
|
151
|
-
→ Auto-add to context
|
|
152
|
-
```
|
|
140
|
+
**SessionStart Hook** (`npx claude-hook-session-start`):
|
|
141
|
+
- Detects current project from `apps/` directory or `package.json`
|
|
142
|
+
- Loads context from `~/.claude/sessions.db`
|
|
143
|
+
- Injects: Tech stack, current state, pending tasks, recent memories
|
|
153
144
|
|
|
154
|
-
|
|
145
|
+
**UserPromptSubmit Hook** (`npx claude-hook-user-prompt`):
|
|
146
|
+
- Runs on every prompt submission
|
|
147
|
+
- Injects relevant context based on current project
|
|
155
148
|
|
|
156
|
-
|
|
149
|
+
### Example Output (Session Start)
|
|
157
150
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
| `decision` | "decided", "chose", "결정", "選択" | Architecture decisions |
|
|
161
|
-
| `error` | "fixed", "solved", "에러", "解決" | Bug fixes |
|
|
162
|
-
| `learning` | "learned", "discovered", "배웠", "学んだ" | New knowledge |
|
|
163
|
-
| `implementation` | "implemented", "completed", "구현", "実装" | Feature implementation |
|
|
164
|
-
| `important` | "critical", "must", "중요", "重要" | Important notes |
|
|
165
|
-
| `code` | Code blocks (100+ chars) | Code snippets |
|
|
151
|
+
```markdown
|
|
152
|
+
# 🚀 my-app - Session Resumed
|
|
166
153
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
- `#skip` / `#무시` / `#スキップ` - Don't save
|
|
154
|
+
## Tech Stack
|
|
155
|
+
**framework**: Next.js, **language**: TypeScript
|
|
170
156
|
|
|
171
|
-
|
|
157
|
+
## Current State
|
|
158
|
+
📍 Implementing signup form
|
|
159
|
+
🚧 **Blocker**: OAuth callback URL issue
|
|
172
160
|
|
|
173
|
-
|
|
161
|
+
## 📋 Pending Tasks
|
|
162
|
+
- 🔄 [P8] Implement form validation
|
|
163
|
+
- ⏳ [P5] Add error handling
|
|
174
164
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
3. Track commit hash → Prevent duplicate saves
|
|
165
|
+
## 🧠 Key Memories
|
|
166
|
+
- 🎯 [decision] Decided on App Router, using Server Actions
|
|
167
|
+
- ⚠️ [error] OAuth redirect_uri mismatch → check env file
|
|
179
168
|
```
|
|
180
169
|
|
|
181
|
-
###
|
|
170
|
+
### Hook Management
|
|
182
171
|
|
|
183
172
|
```bash
|
|
184
|
-
#
|
|
185
|
-
|
|
173
|
+
# Check status
|
|
174
|
+
npx claude-session-hooks status
|
|
186
175
|
|
|
187
|
-
#
|
|
188
|
-
|
|
176
|
+
# Reinstall
|
|
177
|
+
npx claude-session-hooks install
|
|
189
178
|
|
|
190
|
-
#
|
|
191
|
-
|
|
179
|
+
# Remove
|
|
180
|
+
npx claude-session-hooks uninstall
|
|
192
181
|
|
|
193
182
|
# Temporarily disable
|
|
194
183
|
export MCP_HOOKS_DISABLED=true
|
|
195
184
|
```
|
|
196
185
|
|
|
186
|
+
### Why npx? (v1.4.0+)
|
|
187
|
+
|
|
188
|
+
Previous versions used absolute paths like:
|
|
189
|
+
```json
|
|
190
|
+
"command": "node \"/path/to/project-a/node_modules/.../session-start.js\""
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
This broke when installing in multiple projects. Now we use:
|
|
194
|
+
```json
|
|
195
|
+
"command": "npx claude-hook-session-start"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
**npx automatically finds the correct package**, regardless of which project installed it.
|
|
199
|
+
|
|
197
200
|
---
|
|
198
201
|
|
|
199
202
|
## Tools (v5 API) - 24 Focused Tools
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-session-continuity-mcp",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.1",
|
|
4
4
|
"description": "Session Continuity for Claude Code - Never re-explain your project again",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"bin": {
|
|
8
|
-
"claude-session-continuity-mcp": "
|
|
9
|
-
"claude-session-hooks": "
|
|
10
|
-
"claude-hook-session-start": "
|
|
11
|
-
"claude-hook-user-prompt": "
|
|
8
|
+
"claude-session-continuity-mcp": "dist/index.js",
|
|
9
|
+
"claude-session-hooks": "dist/hooks/install.js",
|
|
10
|
+
"claude-hook-session-start": "dist/hooks/session-start.js",
|
|
11
|
+
"claude-hook-user-prompt": "dist/hooks/user-prompt-submit.js"
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"build": "tsc",
|