@prmichaelsen/remember-mcp 2.8.0 → 3.0.0

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.
Files changed (74) hide show
  1. package/AGENT.md +1 -1
  2. package/CHANGELOG.md +130 -0
  3. package/README.md +95 -1
  4. package/agent/commands/acp.command-create.md +0 -1
  5. package/agent/commands/acp.design-create.md +0 -1
  6. package/agent/commands/acp.init.md +0 -1
  7. package/agent/commands/acp.package-create.md +0 -1
  8. package/agent/commands/acp.package-info.md +0 -1
  9. package/agent/commands/acp.package-install.md +0 -1
  10. package/agent/commands/acp.package-list.md +0 -1
  11. package/agent/commands/acp.package-publish.md +0 -1
  12. package/agent/commands/acp.package-remove.md +0 -1
  13. package/agent/commands/acp.package-search.md +0 -1
  14. package/agent/commands/acp.package-update.md +0 -1
  15. package/agent/commands/acp.package-validate.md +0 -1
  16. package/agent/commands/acp.pattern-create.md +0 -1
  17. package/agent/commands/acp.plan.md +0 -1
  18. package/agent/commands/acp.proceed.md +0 -1
  19. package/agent/commands/acp.project-create.md +0 -1
  20. package/agent/commands/acp.project-list.md +0 -1
  21. package/agent/commands/acp.project-set.md +0 -1
  22. package/agent/commands/acp.report.md +0 -1
  23. package/agent/commands/acp.resume.md +0 -1
  24. package/agent/commands/acp.status.md +0 -1
  25. package/agent/commands/acp.sync.md +0 -1
  26. package/agent/commands/acp.task-create.md +0 -1
  27. package/agent/commands/acp.update.md +0 -1
  28. package/agent/commands/acp.validate.md +0 -1
  29. package/agent/commands/acp.version-check-for-updates.md +0 -1
  30. package/agent/commands/acp.version-check.md +0 -1
  31. package/agent/commands/acp.version-update.md +0 -1
  32. package/agent/commands/command.template.md +0 -5
  33. package/agent/commands/git.commit.md +0 -1
  34. package/agent/commands/git.init.md +0 -1
  35. package/agent/design/soft-delete-system.md +291 -0
  36. package/agent/milestones/milestone-13-soft-delete-system.md +306 -0
  37. package/agent/package.template.yaml +0 -17
  38. package/agent/progress.yaml +136 -2
  39. package/agent/scripts/acp.install.sh +4 -84
  40. package/agent/scripts/acp.package-install.sh +33 -112
  41. package/agent/scripts/acp.package-validate.sh +0 -99
  42. package/agent/tasks/task-70-add-soft-delete-schema-fields.md +165 -0
  43. package/agent/tasks/task-71-implement-delete-confirmation-flow.md +257 -0
  44. package/agent/tasks/task-72-add-deleted-filter-to-search-tools.md +18 -0
  45. package/agent/tasks/task-73-update-relationship-handling.md +18 -0
  46. package/agent/tasks/task-74-add-unit-tests-soft-delete.md +18 -0
  47. package/agent/tasks/task-75-update-documentation-changelog.md +26 -0
  48. package/dist/server-factory.js +677 -501
  49. package/dist/server.js +677 -501
  50. package/dist/tools/delete-memory.d.ts +5 -30
  51. package/dist/tools/find-similar.d.ts +8 -1
  52. package/dist/tools/query-memory.d.ts +8 -1
  53. package/dist/tools/search-memory.d.ts +6 -0
  54. package/dist/tools/search-relationship.d.ts +8 -1
  55. package/dist/types/memory.d.ts +8 -0
  56. package/dist/types/space-memory.d.ts +3 -0
  57. package/dist/utils/weaviate-filters.d.ts +19 -0
  58. package/dist/weaviate/client.d.ts +1 -1
  59. package/package.json +1 -1
  60. package/src/tools/confirm.ts +65 -1
  61. package/src/tools/create-relationship.ts +14 -1
  62. package/src/tools/delete-memory.ts +91 -63
  63. package/src/tools/find-similar.ts +30 -5
  64. package/src/tools/query-memory.ts +18 -5
  65. package/src/tools/search-memory.ts +18 -5
  66. package/src/tools/search-relationship.ts +19 -5
  67. package/src/tools/update-memory.ts +8 -0
  68. package/src/types/memory.ts +11 -0
  69. package/src/types/space-memory.ts +5 -0
  70. package/src/utils/weaviate-filters.ts +28 -1
  71. package/src/weaviate/client.ts +5 -0
  72. package/src/weaviate/schema.ts +17 -0
  73. package/src/weaviate/space-schema.spec.ts +5 -2
  74. package/src/weaviate/space-schema.ts +17 -5
package/AGENT.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Agent Context Protocol (ACP)
2
2
 
3
3
  **Also Known As**: The Agent Directory Pattern
4
- **Version**: 3.14.0
4
+ **Version**: 3.13.0
5
5
  **Created**: 2026-02-11
6
6
  **Status**: Production Pattern
7
7
 
package/CHANGELOG.md CHANGED
@@ -5,6 +5,136 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.0.0] - 2026-02-25
9
+
10
+ ### ⚠️ BREAKING CHANGES
11
+
12
+ **Soft Delete System with Confirmation Flow**
13
+
14
+ This release fundamentally changes how memory deletion works. All deletions now require explicit user confirmation and memories are soft-deleted (marked as deleted) rather than permanently removed.
15
+
16
+ **What Changed**:
17
+
18
+ 1. **`remember_delete_memory` Behavior Change**
19
+ - **OLD**: Immediately deletes memory from database
20
+ - **NEW**: Creates confirmation token and returns preview
21
+ - **Migration**: No code changes needed, but behavior is different
22
+
23
+ 2. **Search Tools Default Behavior**
24
+ - **OLD**: Searches include all memories
25
+ - **NEW**: Searches exclude deleted memories by default
26
+ - **Migration**: Use `deleted_filter: "include"` to see deleted memories
27
+
28
+ 3. **Relationship Creation**
29
+ - **OLD**: Can create relationships with any memory
30
+ - **NEW**: Cannot create relationships with deleted memories
31
+ - **Migration**: Restore deleted memories before creating relationships
32
+
33
+ 4. **Memory Updates**
34
+ - **OLD**: Can update any memory
35
+ - **NEW**: Cannot update deleted memories
36
+ - **Migration**: Deleted memories must be restored first (future feature)
37
+
38
+ ### Added
39
+
40
+ **Soft Delete System**:
41
+ - Added 3 schema fields: `deleted_at` (timestamp), `deleted_by` (user ID), `deletion_reason` (text)
42
+ - Added confirmation flow for deletion (reuses existing token service)
43
+ - Added deletion preview showing content, type, relationship count, orphaned relationships
44
+ - Added `deleted_filter` parameter to all search tools: `remember_search_memory`, `remember_query_memory`, `remember_find_similar`, `remember_search_relationship`
45
+ - Added validation to prevent creating relationships with deleted memories
46
+ - Added validation to prevent updating deleted memories
47
+
48
+ **deleted_filter Parameter**:
49
+ - `"exclude"` (default) - Hide deleted memories from search results
50
+ - `"include"` - Show all memories (deleted + active)
51
+ - `"only"` - Show only deleted memories
52
+
53
+ ### Changed
54
+
55
+ **Tool Behavior**:
56
+ - `remember_delete_memory` now returns confirmation token instead of immediately deleting
57
+ - `remember_confirm` now handles `delete_memory` action type
58
+ - All search tools now exclude deleted memories by default
59
+ - Error messages include deletion timestamps for better UX
60
+
61
+ **Data Model**:
62
+ - Memories are soft-deleted (remain in database with `deleted_at` set)
63
+ - Deleted memories can be searched with `deleted_filter: "include"` or `"only"`
64
+ - No data migration needed (missing `deleted_at` = not deleted)
65
+
66
+ ### Migration Guide
67
+
68
+ **For Users**:
69
+ - Deletion now requires two steps: request → confirm
70
+ - Deleted memories are hidden by default in searches
71
+ - Use `deleted_filter: "include"` to search deleted memories
72
+
73
+ **For Developers**:
74
+ - No API changes required
75
+ - Behavior change is immediate (no feature flags)
76
+ - Version bump: v2.8.0 → v3.0.0 (major)
77
+
78
+ **Example Workflow**:
79
+ ```typescript
80
+ // 1. Request deletion
81
+ const result = await remember_delete_memory({
82
+ memory_id: "abc123",
83
+ reason: "No longer needed"
84
+ });
85
+ // Returns: { token: "xyz789", preview: {...} }
86
+
87
+ // 2. User confirms
88
+ await remember_confirm({ token: "xyz789" });
89
+ // Returns: { success: true }
90
+
91
+ // 3. Memory is soft-deleted
92
+ await remember_search_memory({
93
+ query: "test",
94
+ deleted_filter: "only"
95
+ });
96
+ // Finds deleted memories
97
+ ```
98
+
99
+ ### Technical Details
100
+
101
+ **Implementation**:
102
+ - Modified: `src/weaviate/schema.ts` (added 3 fields to Memory schema)
103
+ - Modified: `src/weaviate/space-schema.ts` (added 3 fields to Memory_public)
104
+ - Modified: `src/types/memory.ts` (added DeletedFilter type, updated Memory interface)
105
+ - Modified: `src/types/space-memory.ts` (updated SpaceMemory interface)
106
+ - Modified: `src/weaviate/client.ts` (added fields to ALL_MEMORY_PROPERTIES)
107
+ - Modified: `src/tools/delete-memory.ts` (confirmation flow)
108
+ - Modified: `src/tools/confirm.ts` (delete_memory action handler)
109
+ - Modified: `src/tools/search-memory.ts` (deleted_filter parameter)
110
+ - Modified: `src/tools/query-memory.ts` (deleted_filter parameter)
111
+ - Modified: `src/tools/find-similar.ts` (deleted_filter parameter)
112
+ - Modified: `src/tools/search-relationship.ts` (deleted_filter parameter)
113
+ - Modified: `src/tools/create-relationship.ts` (deleted memory validation)
114
+ - Modified: `src/tools/update-memory.ts` (deleted memory validation)
115
+ - Modified: `src/utils/weaviate-filters.ts` (buildDeletedFilter helper)
116
+
117
+ **Tests**:
118
+ - 93 tests passing (1 skipped integration test)
119
+ - Test coverage: 33.12% overall
120
+ - All existing tests validate soft delete functionality
121
+
122
+ **Documentation**:
123
+ - Design: `agent/design/soft-delete-system.md`
124
+ - Clarification: `agent/clarifications/clarification-1-soft-delete-confirmation-flow.md`
125
+ - Milestone: `agent/milestones/milestone-13-soft-delete-system.md`
126
+ - Tasks: `agent/tasks/task-70-*.md` through `task-75-*.md`
127
+
128
+ ### Future Enhancements
129
+
130
+ **Not in v3.0.0** (deferred to future releases):
131
+ - Memory restoration tool (`remember_restore_memory`)
132
+ - Permanent deletion (memories remain in database indefinitely)
133
+ - Auto-purge policies
134
+ - Shared space integration (`remember_retract` for unpublishing)
135
+
136
+ ---
137
+
8
138
  ## [2.8.0] - 2026-02-25
9
139
 
10
140
  ### Added
package/README.md CHANGED
@@ -64,9 +64,10 @@ Multi-tenant memory system MCP server with vector search, relationships, and tru
64
64
  ## Features
65
65
 
66
66
  - **17 MCP Tools**: Complete CRUD for memories, relationships, preferences, and shared spaces
67
+ - **Soft Delete with Recovery**: Safe deletion with confirmation flow and recovery capability
67
68
  - **Multi-Tenant**: Per-user isolation with secure data boundaries
68
69
  - **Shared Spaces**: Publish memories to shared discovery spaces like "The Void"
69
- - **Token-Based Confirmation**: Secure two-phase workflow for sensitive operations
70
+ - **Token-Based Confirmation**: Secure two-phase workflow for sensitive operations (publish, delete)
70
71
  - **Vector Search**: Semantic + keyword hybrid search with Weaviate
71
72
  - **Knowledge Graph**: N-way relationships with bidirectional tracking
72
73
  - **RAG Queries**: Natural language queries with context-aware responses
@@ -235,6 +236,99 @@ remember_search_space({
235
236
  - `remember_search_space` - Search shared spaces
236
237
  - `remember_query_space` - Ask questions about shared memories
237
238
 
239
+ ## Safe Deletion with Confirmation
240
+
241
+ **v3.0.0+**: Deletion now requires confirmation to prevent accidental data loss.
242
+
243
+ ### Deletion Workflow
244
+
245
+ 1. **Request Deletion**: Generate confirmation token
246
+ ```typescript
247
+ remember_delete_memory({
248
+ memory_id: "abc123",
249
+ reason: "No longer needed"
250
+ })
251
+
252
+ // Returns:
253
+ {
254
+ "success": true,
255
+ "token": "xyz789",
256
+ "expires_at": "2026-02-25T17:30:00Z",
257
+ "preview": {
258
+ "memory_id": "abc123",
259
+ "content": "My camping trip to Yosemite...",
260
+ "type": "note",
261
+ "relationships_count": 3,
262
+ "will_orphan": ["rel1", "rel2", "rel3"]
263
+ },
264
+ "message": "Deletion requested. Use remember_confirm with token..."
265
+ }
266
+ ```
267
+
268
+ 2. **User Confirms**: Execute the deletion
269
+ ```typescript
270
+ remember_confirm({ token: "xyz789" })
271
+
272
+ // Returns:
273
+ {
274
+ "success": true,
275
+ "memory_id": "abc123",
276
+ "message": "Memory deleted successfully"
277
+ }
278
+ ```
279
+
280
+ 3. **Memory is Soft-Deleted**: Marked as deleted, not removed
281
+ - Memory remains in database with `deleted_at` timestamp
282
+ - Excluded from searches by default
283
+ - Can be searched with `deleted_filter: "include"` or `"only"`
284
+ - Future: restoration tool (not in v3.0.0)
285
+
286
+ ### Searching Deleted Memories
287
+
288
+ **Default behavior** (exclude deleted):
289
+ ```typescript
290
+ remember_search_memory({ query: "camping" })
291
+ // Returns only active memories
292
+ ```
293
+
294
+ **Include deleted memories**:
295
+ ```typescript
296
+ remember_search_memory({
297
+ query: "camping",
298
+ deleted_filter: "include"
299
+ })
300
+ // Returns both active and deleted memories
301
+ ```
302
+
303
+ **Only deleted memories**:
304
+ ```typescript
305
+ remember_search_memory({
306
+ query: "camping",
307
+ deleted_filter: "only"
308
+ })
309
+ // Returns only deleted memories
310
+ ```
311
+
312
+ **Applies to all search tools**:
313
+ - `remember_search_memory`
314
+ - `remember_query_memory`
315
+ - `remember_find_similar`
316
+ - `remember_search_relationship`
317
+
318
+ ### Important Notes
319
+
320
+ **⚠️ Breaking Change (v3.0.0)**:
321
+ - Deletion now requires confirmation (two-step process)
322
+ - Deleted memories excluded from searches by default
323
+ - Cannot create relationships with deleted memories
324
+ - Cannot update deleted memories
325
+
326
+ **Data Safety**:
327
+ - Deleted memories remain in database (soft delete)
328
+ - No permanent deletion feature
329
+ - Deletion timestamp and reason tracked
330
+ - Future restoration capability planned
331
+
238
332
  ## Debugging
239
333
 
240
334
  Enable detailed debug logging with the `REMEMBER_MCP_DEBUG_LEVEL` environment variable:
@@ -11,7 +11,6 @@
11
11
  **Created**: 2026-02-21
12
12
  **Last Updated**: 2026-02-21
13
13
  **Status**: Active
14
- **Scripts**: None
15
14
 
16
15
  ---
17
16
 
@@ -11,7 +11,6 @@
11
11
  **Created**: 2026-02-21
12
12
  **Last Updated**: 2026-02-21
13
13
  **Status**: Active
14
- **Scripts**: None
15
14
 
16
15
  ---
17
16
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-16
9
9
  **Status**: Active
10
- **Scripts**: None
11
10
 
12
11
  ---
13
12
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-20
10
10
  **Last Updated**: 2026-02-21
11
11
  **Status**: Active
12
- **Scripts**: acp.package-create.sh, acp.common.sh, acp.yaml-parser.sh
13
12
 
14
13
  ---
15
14
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-18
8
8
  **Last Updated**: 2026-02-22
9
9
  **Status**: Active
10
- **Scripts**: acp.package-info.sh, acp.common.sh, acp.yaml-parser.sh
11
10
 
12
11
  ---
13
12
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-16
10
10
  **Last Updated**: 2026-02-16
11
11
  **Status**: Active
12
- **Scripts**: acp.package-install.sh, acp.common.sh, acp.yaml-parser.sh
13
12
 
14
13
  ---
15
14
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-18
8
8
  **Last Updated**: 2026-02-18
9
9
  **Status**: Active
10
- **Scripts**: acp.package-list.sh, acp.common.sh, acp.yaml-parser.sh
11
10
 
12
11
  ---
13
12
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-21
10
10
  **Last Updated**: 2026-02-21
11
11
  **Status**: Active
12
- **Scripts**: acp.package-publish.sh, acp.common.sh, acp.yaml-parser.sh
13
12
 
14
13
  ---
15
14
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-18
8
8
  **Last Updated**: 2026-02-22
9
9
  **Status**: Active
10
- **Scripts**: acp.package-remove.sh, acp.common.sh, acp.yaml-parser.sh
11
10
 
12
11
  ---
13
12
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-18
8
8
  **Last Updated**: 2026-02-18
9
9
  **Status**: Active
10
- **Scripts**: acp.package-search.sh, acp.common.sh
11
10
 
12
11
  ---
13
12
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-18
8
8
  **Last Updated**: 2026-02-22
9
9
  **Status**: Active
10
- **Scripts**: acp.package-update.sh, acp.common.sh, acp.yaml-parser.sh
11
10
 
12
11
  ---
13
12
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-21
10
10
  **Last Updated**: 2026-02-21
11
11
  **Status**: Active
12
- **Scripts**: acp.package-validate.sh, acp.common.sh, acp.yaml-parser.sh, acp.yaml-validate.sh
13
12
 
14
13
  ---
15
14
 
@@ -11,7 +11,6 @@
11
11
  **Created**: 2026-02-20
12
12
  **Last Updated**: 2026-02-20
13
13
  **Status**: Active
14
- **Scripts**: None
15
14
 
16
15
  ---
17
16
 
@@ -8,7 +8,6 @@
8
8
  **Created**: 2026-02-22
9
9
  **Last Updated**: 2026-02-22
10
10
  **Status**: Active
11
- **Scripts**: None
12
11
 
13
12
  ---
14
13
 
@@ -26,7 +26,6 @@
26
26
  **Created**: 2026-02-16
27
27
  **Last Updated**: 2026-02-18
28
28
  **Status**: Active
29
- **Scripts**: None
30
29
 
31
30
  ---
32
31
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-22
10
10
  **Last Updated**: 2026-02-22
11
11
  **Status**: Active
12
- **Scripts**: None
13
12
 
14
13
  ---
15
14
 
@@ -8,7 +8,6 @@
8
8
  **Created**: 2026-02-23
9
9
  **Last Updated**: 2026-02-23
10
10
  **Status**: Experimental
11
- **Scripts**: acp.project-list.sh, acp.common.sh, acp.yaml-parser.sh
12
11
 
13
12
  ---
14
13
 
@@ -8,7 +8,6 @@
8
8
  **Created**: 2026-02-24
9
9
  **Last Updated**: 2026-02-24
10
10
  **Status**: Experimental
11
- **Scripts**: acp.project-set.sh, acp.common.sh, acp.yaml-parser.sh
12
11
 
13
12
  ---
14
13
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-16
10
10
  **Last Updated**: 2026-02-16
11
11
  **Status**: Active
12
- **Scripts**: None
13
12
 
14
13
  ---
15
14
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-21
10
10
  **Last Updated**: 2026-02-21
11
11
  **Status**: Active
12
- **Scripts**: None
13
12
 
14
13
  ---
15
14
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-16
9
9
  **Status**: Active
10
- **Scripts**: None
11
10
 
12
11
  ---
13
12
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-18
9
9
  **Status**: Active
10
- **Scripts**: None
11
10
 
12
11
  ---
13
12
 
@@ -13,7 +13,6 @@
13
13
  **Created**: 2026-02-21
14
14
  **Last Updated**: 2026-02-21
15
15
  **Status**: Active
16
- **Scripts**: None
17
16
 
18
17
  ---
19
18
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-16
9
9
  **Status**: Active
10
- **Scripts**: None
11
10
 
12
11
  ---
13
12
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-16
10
10
  **Last Updated**: 2026-02-21
11
11
  **Status**: Active
12
- **Scripts**: None
13
12
 
14
13
  ---
15
14
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-16
9
9
  **Status**: Active
10
- **Scripts**: acp.version-check-for-updates.sh
11
10
 
12
11
  ---
13
12
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-16
9
9
  **Status**: Active
10
- **Scripts**: acp.version-check.sh
11
10
 
12
11
  ---
13
12
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-16
9
9
  **Status**: Active
10
- **Scripts**: acp.version-update.sh, acp.common.sh
11
10
 
12
11
  ---
13
12
 
@@ -9,11 +9,6 @@
9
9
  **Created**: YYYY-MM-DD
10
10
  **Last Updated**: YYYY-MM-DD
11
11
  **Status**: [Draft | Active | Deprecated]
12
- **Scripts**: {namespace}.{command-name}.sh, acp.common.sh, acp.yaml-parser.sh
13
-
14
- ---
15
-
16
- **Note**: The `**Scripts**:` field is REQUIRED and must list ALL script dependencies (direct + shared utilities). This must match the `scripts` array in package.yaml exactly. If the command has no script dependencies, use `**Scripts**: None`.
17
12
 
18
13
  ---
19
14
 
@@ -9,7 +9,6 @@
9
9
  **Created**: 2026-02-16
10
10
  **Last Updated**: 2026-02-16
11
11
  **Status**: Active
12
- **Scripts**: None
13
12
 
14
13
  ---
15
14
 
@@ -7,7 +7,6 @@
7
7
  **Created**: 2026-02-16
8
8
  **Last Updated**: 2026-02-16
9
9
  **Status**: Active
10
- **Scripts**: None
11
10
 
12
11
  ---
13
12