@prmichaelsen/remember-mcp 2.7.10 → 2.7.11

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/CHANGELOG.md CHANGED
@@ -5,6 +5,31 @@ 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
+ ## [2.7.10] - 2026-02-17
9
+
10
+ ### Added
11
+
12
+ - **Prevent Duplicate Publishing**
13
+ - Added validation to prevent re-publishing already published memories
14
+ - Checks for existing `space_memory_id` before allowing publish
15
+ - Returns clear error message with existing space memory ID
16
+ - Prevents data duplication and maintains data integrity
17
+
18
+ ### Security
19
+
20
+ - Users cannot accidentally publish the same memory multiple times
21
+ - Prevents duplicate entries in Memory_public collection
22
+ - Clear error messaging guides users to existing published memory
23
+
24
+ ### Technical Details
25
+
26
+ - Modified: `src/tools/confirm.ts` (lines 191-209)
27
+ - Added check for `originalMemory.properties.space_memory_id`
28
+ - Returns error with `space_memory_id` if already published
29
+ - Validation occurs before any database operations
30
+
31
+ ---
32
+
8
33
  ## [2.7.9] - 2026-02-17
9
34
 
10
35
  ### Added
@@ -4288,6 +4288,26 @@ async function executePublishMemory(request, userId) {
4288
4288
  2
4289
4289
  );
4290
4290
  }
4291
+ if (originalMemory.properties.space_memory_id) {
4292
+ const requestedSpaces = request.payload.spaces?.join(", ") || "unknown";
4293
+ logger.warn("Memory already published", {
4294
+ function: "executePublishMemory",
4295
+ memoryId: request.payload.memory_id,
4296
+ existingSpaceMemoryId: originalMemory.properties.space_memory_id,
4297
+ requestedSpaces: request.payload.spaces
4298
+ });
4299
+ return JSON.stringify(
4300
+ {
4301
+ success: false,
4302
+ error: "Already published",
4303
+ message: `This memory has already been published to this space. Space memory ID: ${originalMemory.properties.space_memory_id}`,
4304
+ space_memory_id: originalMemory.properties.space_memory_id,
4305
+ requested_spaces: request.payload.spaces
4306
+ },
4307
+ null,
4308
+ 2
4309
+ );
4310
+ }
4291
4311
  if (originalMemory.properties.user_id !== userId) {
4292
4312
  logger.warn("Permission denied - wrong owner", {
4293
4313
  function: "executePublishMemory",
package/dist/server.js CHANGED
@@ -4356,6 +4356,26 @@ async function executePublishMemory(request, userId) {
4356
4356
  2
4357
4357
  );
4358
4358
  }
4359
+ if (originalMemory.properties.space_memory_id) {
4360
+ const requestedSpaces = request.payload.spaces?.join(", ") || "unknown";
4361
+ logger.warn("Memory already published", {
4362
+ function: "executePublishMemory",
4363
+ memoryId: request.payload.memory_id,
4364
+ existingSpaceMemoryId: originalMemory.properties.space_memory_id,
4365
+ requestedSpaces: request.payload.spaces
4366
+ });
4367
+ return JSON.stringify(
4368
+ {
4369
+ success: false,
4370
+ error: "Already published",
4371
+ message: `This memory has already been published to this space. Space memory ID: ${originalMemory.properties.space_memory_id}`,
4372
+ space_memory_id: originalMemory.properties.space_memory_id,
4373
+ requested_spaces: request.payload.spaces
4374
+ },
4375
+ null,
4376
+ 2
4377
+ );
4378
+ }
4359
4379
  if (originalMemory.properties.user_id !== userId) {
4360
4380
  logger.warn("Permission denied - wrong owner", {
4361
4381
  function: "executePublishMemory",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prmichaelsen/remember-mcp",
3
- "version": "2.7.10",
3
+ "version": "2.7.11",
4
4
  "description": "Multi-tenant memory system MCP server with vector search and relationships",
5
5
  "main": "dist/server.js",
6
6
  "type": "module",
@@ -188,6 +188,28 @@ async function executePublishMemory(
188
188
  );
189
189
  }
190
190
 
191
+ // Check if memory has already been published
192
+ if (originalMemory.properties.space_memory_id) {
193
+ const requestedSpaces = request.payload.spaces?.join(', ') || 'unknown';
194
+ logger.warn('Memory already published', {
195
+ function: 'executePublishMemory',
196
+ memoryId: request.payload.memory_id,
197
+ existingSpaceMemoryId: originalMemory.properties.space_memory_id,
198
+ requestedSpaces: request.payload.spaces,
199
+ });
200
+ return JSON.stringify(
201
+ {
202
+ success: false,
203
+ error: 'Already published',
204
+ message: `This memory has already been published to this space. Space memory ID: ${originalMemory.properties.space_memory_id}`,
205
+ space_memory_id: originalMemory.properties.space_memory_id,
206
+ requested_spaces: request.payload.spaces,
207
+ },
208
+ null,
209
+ 2
210
+ );
211
+ }
212
+
191
213
  // Verify ownership again
192
214
  if (originalMemory.properties.user_id !== userId) {
193
215
  logger.warn('Permission denied - wrong owner', {