session-collab-mcp 0.9.0 → 2.0.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/README.md CHANGED
@@ -21,8 +21,9 @@ Session Collab MCP provides a **Work-in-Progress (WIP) Registry** that allows se
21
21
 
22
22
  1. **Declare** - Announce which files you're about to modify
23
23
  2. **Check** - Verify no other session is working on the same files
24
- 3. **Communicate** - Send messages between sessions
25
- 4. **Release** - Free files when done
24
+ 3. **Persist** - Save context that survives context compaction
25
+ 4. **Protect** - Guard critical files from accidental changes
26
+ 5. **Release** - Free files when done
26
27
 
27
28
  ## Installation
28
29
 
@@ -76,23 +77,24 @@ Once installed, Claude will:
76
77
  3. Warn you if another session is working on the same files
77
78
  4. Clean up when the conversation ends
78
79
 
79
- ### Symbol-Level Claims
80
+ ### Working Memory
80
81
 
81
- Fine-grained conflict detection at the function/class level:
82
+ Context persistence that survives context compaction:
82
83
 
83
- ```
84
- Session A claims: validateToken() in auth.ts
85
- Session B wants: refreshToken() in auth.ts
86
- Result: No conflict! Different symbols in same file.
87
- ```
84
+ - **Findings**: Bug root causes, investigation results
85
+ - **Decisions**: Architectural choices, design decisions
86
+ - **State**: Current implementation status
87
+ - **Todos**: Action items and tasks
88
+ - **Important**: Critical information to preserve
89
+ - **Context**: Background context for the session
88
90
 
89
- ### LSP Integration
91
+ ### File Protection
90
92
 
91
- Works with Claude Code's LSP tools for:
93
+ Guard critical files from accidental changes:
92
94
 
93
- - Accurate symbol validation (no typos in claims)
94
- - Impact analysis (know which files reference your changes)
95
- - Smart prioritization (focus on low-impact changes first)
95
+ - Register protected files with reasons and priorities
96
+ - Automatic conflict detection for protected files
97
+ - Configurable protection levels
96
98
 
97
99
  ### Conflict Handling Modes
98
100
 
@@ -115,92 +117,116 @@ Configure behavior with `collab_config`:
115
117
 
116
118
  ## MCP Tools Reference
117
119
 
118
- ### Session Management
120
+ ### Session Management (4 tools)
119
121
 
120
122
  | Tool | Purpose |
121
123
  |------|---------|
122
124
  | `collab_session_start` | Register a new session |
123
125
  | `collab_session_end` | End session and release all claims |
124
126
  | `collab_session_list` | List active sessions |
125
- | `collab_session_heartbeat` | Update session heartbeat |
126
- | `collab_status_update` | Share current work status |
127
- | `collab_config` | Configure conflict handling mode |
127
+ | `collab_config` | Configure session behavior |
128
128
 
129
- ### Claims (File/Symbol Locking)
129
+ ### Claims (1 unified tool)
130
130
 
131
- | Tool | Purpose |
131
+ | Tool | Actions |
132
132
  |------|---------|
133
- | `collab_claim` | Reserve files or symbols before modifying |
134
- | `collab_check` | Check if files/symbols are claimed by others |
135
- | `collab_release` | Release claimed files/symbols |
136
- | `collab_auto_release` | Auto-release claims after editing a file |
137
- | `collab_claims_list` | List all WIP claims |
133
+ | `collab_claim` | `create`, `check`, `release`, `list` |
138
134
 
139
- ### Inter-Session Communication
135
+ ### Working Memory (3 tools)
140
136
 
141
137
  | Tool | Purpose |
142
138
  |------|---------|
143
- | `collab_message_send` | Send message to other sessions |
144
- | `collab_message_list` | Read messages |
139
+ | `collab_memory_save` | Save context (upsert) |
140
+ | `collab_memory_recall` | Recall context |
141
+ | `collab_memory_clear` | Clear memories |
145
142
 
146
- ### Architectural Decisions
143
+ ### Protection (1 unified tool)
147
144
 
148
- | Tool | Purpose |
145
+ | Tool | Actions |
149
146
  |------|---------|
150
- | `collab_decision_add` | Record design decisions |
151
- | `collab_decision_list` | View recorded decisions |
147
+ | `collab_protect` | `register`, `check`, `list` |
152
148
 
153
- ### LSP Integration (Advanced)
149
+ ### Status Monitoring
154
150
 
155
151
  | Tool | Purpose |
156
152
  |------|---------|
157
- | `collab_analyze_symbols` | Analyze LSP symbols for conflict detection |
158
- | `collab_validate_symbols` | Validate symbol names before claiming |
159
- | `collab_store_references` | Store LSP reference data for impact tracking |
160
- | `collab_impact_analysis` | Analyze impact of modifying a symbol |
153
+ | `collab_status` | Unified session status |
161
154
 
162
155
  ## Usage Examples
163
156
 
164
157
  ### Basic Workflow
165
158
 
166
- ```
159
+ ```bash
167
160
  # Session A starts working
168
161
  collab_session_start(project_root="/my/project", name="feature-auth")
169
- collab_claim(files=["src/auth.ts"], intent="Adding JWT support")
162
+ collab_claim(action="create", files=["src/auth.ts"], intent="Adding JWT support")
170
163
 
171
164
  # Session B checks before editing
172
- collab_check(files=["src/auth.ts"])
173
- # Result: "src/auth.ts is being worked on by 'feature-auth' - Adding JWT support"
165
+ collab_claim(action="check", files=["src/auth.ts"])
166
+ # Result: "CONFLICT: src/auth.ts is claimed by 'feature-auth'"
174
167
 
175
168
  # Session A finishes
176
- collab_release(claim_id="...", status="completed", summary="Added JWT validation")
169
+ collab_claim(action="release", claim_id="...")
177
170
  ```
178
171
 
179
- ### Symbol-Level Claims
172
+ ### Working Memory
180
173
 
181
- ```
182
- # Claim specific functions only
183
- collab_claim(
184
- symbols=[{file: "src/auth.ts", symbols: ["validateToken", "refreshToken"]}],
185
- intent="Refactoring token validation"
174
+ ```bash
175
+ # Save a finding
176
+ collab_memory_save(
177
+ category="finding",
178
+ key="auth_bug_root_cause",
179
+ content="Missing token validation in refresh flow",
180
+ priority=80
186
181
  )
187
182
 
188
- # Other sessions can still work on other functions in the same file
183
+ # Recall active memories
184
+ collab_memory_recall(active=true, priority_threshold=70)
189
185
  ```
190
186
 
191
- ### Impact Analysis
187
+ ### File Protection
188
+
189
+ ```bash
190
+ # Protect critical file
191
+ collab_protect(
192
+ action="register",
193
+ file_path="src/core/auth.ts",
194
+ reason="Core authentication logic",
195
+ priority=95
196
+ )
192
197
 
198
+ # Check before editing
199
+ collab_protect(
200
+ action="check",
201
+ file_paths=["src/core/auth.ts"]
202
+ )
203
+ # Result: "BLOCKED: File is protected - Core authentication logic"
193
204
  ```
194
- # Before modifying a widely-used function
195
- collab_impact_analysis(file="src/utils.ts", symbol="formatDate")
205
+
206
+ ### Status Monitoring
207
+
208
+ ```bash
209
+ # Get session status
210
+ collab_status(session_id="abc123")
196
211
  # Result: {
197
- # risk_level: "high",
198
- # reference_count: 15,
199
- # affected_files: ["src/api/...", "src/components/..."],
200
- # message: "HIGH RISK: This symbol is referenced in 15 locations"
212
+ # session: { id: "abc123", name: "feature-auth", status: "active" },
213
+ # claims: [...],
214
+ # active_memories: 5,
215
+ # message: "Session active. 2 claim(s), 5 memories."
201
216
  # }
202
217
  ```
203
218
 
219
+ ## Migration from v1.x
220
+
221
+ Version 2.0 introduces breaking changes with a simplified API. See [MIGRATION.md](./MIGRATION.md) for detailed migration instructions.
222
+
223
+ ### Key Changes
224
+
225
+ - **Tool Consolidation**: 50+ tools → 9 core tools
226
+ - **Action-Based Interface**: Single tools with multiple actions
227
+ - **Simplified Responses**: Cleaner, flatter response formats
228
+ - **Removed Features**: LSP integration, messaging, notifications, queuing
229
+
204
230
  ## Data Storage
205
231
 
206
232
  All data is stored locally in `~/.claude/session-collab/collab.db` (SQLite).
@@ -241,55 +267,33 @@ npm run test # Run tests with Vitest
241
267
  session-collab-mcp/
242
268
  ├── bin/ # Executable entry point
243
269
  ├── migrations/ # SQLite migration files
244
- │ ├── 0001_init.sql # Core tables
245
- │ ├── 0002_session_status.sql # Session status
246
- │ ├── 0003_config.sql # Session config
247
- │ ├── 0004_symbols.sql # Symbol-level claims
248
- │ ├── 0005_references.sql # Reference tracking
249
- │ ├── 0006_composite_indexes.sql # Query optimization
250
- │ ├── 0007_priority.sql # Claim priority
251
- │ ├── 0008_history.sql # Audit history
252
- │ ├── 0009_queue.sql # Claim queue
253
- │ ├── 0010_notifications.sql # Notifications
254
- │ └── 0011_working_memory.sql # Working memory & plan protection
255
270
  ├── plugin/ # Claude Code Plugin
256
- │ ├── .claude-plugin/
257
- │ │ ├── plugin.json # Plugin manifest
258
- │ │ └── marketplace.json # Marketplace config
259
- │ ├── .mcp.json # MCP server config
260
- │ ├── hooks/
261
- │ │ └── hooks.json # Automated hooks
262
- │ ├── skills/
263
- │ │ └── collab-start/ # Session init skill
264
- │ │ └── SKILL.md
265
- │ ├── commands/
266
- │ │ ├── status.md # /session-collab:status
267
- │ │ └── end.md # /session-collab:end
268
- │ └── README.md
269
271
  ├── src/
270
272
  │ ├── cli.ts # CLI entry point
271
273
  │ ├── constants.ts # Version and server instructions
272
274
  │ ├── db/ # Database layer
273
- │ │ ├── queries.ts # SQL queries
274
- │ │ ├── sqlite-adapter.ts
275
- │ │ └── types.ts # Type definitions
276
275
  │ ├── mcp/ # MCP protocol implementation
277
- │ │ ├── protocol.ts # JSON-RPC handling
278
- │ │ ├── server.ts # Main MCP server
279
- │ │ └── tools/ # Tool implementations
280
- │ │ ├── session.ts # Session management
281
- │ │ ├── claim.ts # File/symbol claims
282
- │ │ ├── message.ts # Inter-session messaging
283
- │ │ ├── decision.ts# Decision logging
284
- │ │ └── lsp.ts # LSP integration
276
+ │ │ ├── tools/ # Tool implementations
277
+ │ │ ├── session.ts # Session management
278
+ │ │ │ ├── claim.ts # File/symbol claims
279
+ │ │├── memory.ts # Working memory
280
+ │ │ │ └── protection.ts # File protection
281
+ │ │ └── ...
285
282
  │ └── utils/
286
- │ ├── crypto.ts # Hash utilities
287
- │ └── response.ts # Shared response builders
288
283
  └── package.json
289
284
  ```
290
285
 
291
286
  ## Changelog
292
287
 
288
+ ### v2.0.0 (Breaking)
289
+
290
+ - **Major Simplification**: Reduced from 50+ tools to 9 core tools
291
+ - **Action-Based Design**: Unified tools with action parameters
292
+ - **Removed Features**: LSP integration, messaging, notifications, queuing, decision tracking
293
+ - **Improved Performance**: Faster startup and reduced complexity
294
+ - **Better Testing**: Comprehensive test coverage for all tool actions
295
+ - **Migration Guide**: Detailed upgrade path from v1.x
296
+
293
297
  ### v0.8.0
294
298
 
295
299
  - Add working memory system for context persistence (`collab_memory_*` tools)