@prmichaelsen/remember-mcp 2.6.9 → 2.6.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 +27 -0
- package/dist/server-factory.js +27 -6
- package/dist/server.js +27 -6
- package/dist/weaviate/client.d.ts +6 -1
- package/package.json +1 -1
- package/src/tools/confirm.ts +13 -1
- package/src/weaviate/client.ts +23 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ 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.6.11] - 2026-02-17
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Enhanced Logging for `executePublishMemory()`**: Added detailed property logging
|
|
13
|
+
- Logs all property keys fetched from original memory
|
|
14
|
+
- Logs property keys being inserted into public collection
|
|
15
|
+
- Logs content length, title, and other key fields
|
|
16
|
+
- Changed fetch result log from debug to info level
|
|
17
|
+
- Helps diagnose if memory content is being fetched and copied correctly
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## [2.6.10] - 2026-02-17
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- **CRITICAL: `fetchMemoryWithAllProperties()` Graceful Fallback**: Fixed memory content not being copied during publish
|
|
26
|
+
- Added try-catch wrapper around property fetch with fallback
|
|
27
|
+
- If fetching with ALL_MEMORY_PROPERTIES fails, falls back to fetching without property specification
|
|
28
|
+
- Weaviate returns all properties that actually exist on the record when no returnProperties specified
|
|
29
|
+
- Fixes issue where `remember_confirm` → `executePublishMemory()` only copied comment fields
|
|
30
|
+
- Published memories now include all content (title, content, tags, etc.)
|
|
31
|
+
- Prevents data loss during memory publication to shared spaces
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
8
35
|
## [2.6.9] - 2026-02-17
|
|
9
36
|
|
|
10
37
|
### Fixed
|
package/dist/server-factory.js
CHANGED
|
@@ -617,9 +617,18 @@ var ALL_MEMORY_PROPERTIES = [
|
|
|
617
617
|
"moderation_flags"
|
|
618
618
|
];
|
|
619
619
|
async function fetchMemoryWithAllProperties(collection, memoryId) {
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
620
|
+
try {
|
|
621
|
+
return await collection.query.fetchObjectById(memoryId, {
|
|
622
|
+
returnProperties: ALL_MEMORY_PROPERTIES
|
|
623
|
+
});
|
|
624
|
+
} catch (error) {
|
|
625
|
+
logger.warn("Failed to fetch with all properties, falling back to unspecified fetch", {
|
|
626
|
+
module: "weaviate-client",
|
|
627
|
+
memoryId,
|
|
628
|
+
error: error instanceof Error ? error.message : String(error)
|
|
629
|
+
});
|
|
630
|
+
return await collection.query.fetchObjectById(memoryId);
|
|
631
|
+
}
|
|
623
632
|
}
|
|
624
633
|
|
|
625
634
|
// src/firestore/init.ts
|
|
@@ -4149,14 +4158,20 @@ async function executePublishMemory(request, userId) {
|
|
|
4149
4158
|
userCollection,
|
|
4150
4159
|
request.payload.memory_id
|
|
4151
4160
|
);
|
|
4152
|
-
logger.
|
|
4161
|
+
logger.info("Original memory fetch result", {
|
|
4153
4162
|
function: "executePublishMemory",
|
|
4154
4163
|
found: !!originalMemory,
|
|
4155
4164
|
memoryId: request.payload.memory_id,
|
|
4156
4165
|
hasProperties: !!originalMemory?.properties,
|
|
4157
4166
|
propertyCount: originalMemory?.properties ? Object.keys(originalMemory.properties).length : 0,
|
|
4167
|
+
propertyKeys: originalMemory?.properties ? Object.keys(originalMemory.properties) : [],
|
|
4158
4168
|
hasTitle: !!originalMemory?.properties?.title,
|
|
4159
|
-
hasContent: !!originalMemory?.properties?.content
|
|
4169
|
+
hasContent: !!originalMemory?.properties?.content,
|
|
4170
|
+
hasUserId: !!originalMemory?.properties?.user_id,
|
|
4171
|
+
hasTags: !!originalMemory?.properties?.tags,
|
|
4172
|
+
hasWeight: !!originalMemory?.properties?.weight,
|
|
4173
|
+
contentLength: originalMemory?.properties?.content?.length || 0,
|
|
4174
|
+
titleValue: originalMemory?.properties?.title || "NO_TITLE"
|
|
4160
4175
|
});
|
|
4161
4176
|
if (!originalMemory) {
|
|
4162
4177
|
logger.info("Original memory not found", {
|
|
@@ -4224,7 +4239,13 @@ async function executePublishMemory(request, userId) {
|
|
|
4224
4239
|
spaceCount: request.payload.spaces?.length || 0,
|
|
4225
4240
|
memoryId: request.payload.memory_id,
|
|
4226
4241
|
hasUserId: !!publishedMemory.user_id,
|
|
4227
|
-
hasAuthorId: !!publishedMemory.author_id
|
|
4242
|
+
hasAuthorId: !!publishedMemory.author_id,
|
|
4243
|
+
publishedMemoryKeys: Object.keys(publishedMemory),
|
|
4244
|
+
publishedMemoryKeyCount: Object.keys(publishedMemory).length,
|
|
4245
|
+
hasContent: !!publishedMemory.content,
|
|
4246
|
+
hasTitle: !!publishedMemory.title,
|
|
4247
|
+
contentLength: publishedMemory.content?.length || 0,
|
|
4248
|
+
titleValue: publishedMemory.title || "NO_TITLE"
|
|
4228
4249
|
});
|
|
4229
4250
|
const result = await publicCollection.data.insert(publishedMemory);
|
|
4230
4251
|
logger.info("Memory published successfully", {
|
package/dist/server.js
CHANGED
|
@@ -663,9 +663,18 @@ var ALL_MEMORY_PROPERTIES = [
|
|
|
663
663
|
"moderation_flags"
|
|
664
664
|
];
|
|
665
665
|
async function fetchMemoryWithAllProperties(collection, memoryId) {
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
666
|
+
try {
|
|
667
|
+
return await collection.query.fetchObjectById(memoryId, {
|
|
668
|
+
returnProperties: ALL_MEMORY_PROPERTIES
|
|
669
|
+
});
|
|
670
|
+
} catch (error) {
|
|
671
|
+
logger.warn("Failed to fetch with all properties, falling back to unspecified fetch", {
|
|
672
|
+
module: "weaviate-client",
|
|
673
|
+
memoryId,
|
|
674
|
+
error: error instanceof Error ? error.message : String(error)
|
|
675
|
+
});
|
|
676
|
+
return await collection.query.fetchObjectById(memoryId);
|
|
677
|
+
}
|
|
669
678
|
}
|
|
670
679
|
|
|
671
680
|
// src/firestore/init.ts
|
|
@@ -4217,14 +4226,20 @@ async function executePublishMemory(request, userId) {
|
|
|
4217
4226
|
userCollection,
|
|
4218
4227
|
request.payload.memory_id
|
|
4219
4228
|
);
|
|
4220
|
-
logger.
|
|
4229
|
+
logger.info("Original memory fetch result", {
|
|
4221
4230
|
function: "executePublishMemory",
|
|
4222
4231
|
found: !!originalMemory,
|
|
4223
4232
|
memoryId: request.payload.memory_id,
|
|
4224
4233
|
hasProperties: !!originalMemory?.properties,
|
|
4225
4234
|
propertyCount: originalMemory?.properties ? Object.keys(originalMemory.properties).length : 0,
|
|
4235
|
+
propertyKeys: originalMemory?.properties ? Object.keys(originalMemory.properties) : [],
|
|
4226
4236
|
hasTitle: !!originalMemory?.properties?.title,
|
|
4227
|
-
hasContent: !!originalMemory?.properties?.content
|
|
4237
|
+
hasContent: !!originalMemory?.properties?.content,
|
|
4238
|
+
hasUserId: !!originalMemory?.properties?.user_id,
|
|
4239
|
+
hasTags: !!originalMemory?.properties?.tags,
|
|
4240
|
+
hasWeight: !!originalMemory?.properties?.weight,
|
|
4241
|
+
contentLength: originalMemory?.properties?.content?.length || 0,
|
|
4242
|
+
titleValue: originalMemory?.properties?.title || "NO_TITLE"
|
|
4228
4243
|
});
|
|
4229
4244
|
if (!originalMemory) {
|
|
4230
4245
|
logger.info("Original memory not found", {
|
|
@@ -4292,7 +4307,13 @@ async function executePublishMemory(request, userId) {
|
|
|
4292
4307
|
spaceCount: request.payload.spaces?.length || 0,
|
|
4293
4308
|
memoryId: request.payload.memory_id,
|
|
4294
4309
|
hasUserId: !!publishedMemory.user_id,
|
|
4295
|
-
hasAuthorId: !!publishedMemory.author_id
|
|
4310
|
+
hasAuthorId: !!publishedMemory.author_id,
|
|
4311
|
+
publishedMemoryKeys: Object.keys(publishedMemory),
|
|
4312
|
+
publishedMemoryKeyCount: Object.keys(publishedMemory).length,
|
|
4313
|
+
hasContent: !!publishedMemory.content,
|
|
4314
|
+
hasTitle: !!publishedMemory.title,
|
|
4315
|
+
contentLength: publishedMemory.content?.length || 0,
|
|
4316
|
+
titleValue: publishedMemory.title || "NO_TITLE"
|
|
4296
4317
|
});
|
|
4297
4318
|
const result = await publicCollection.data.insert(publishedMemory);
|
|
4298
4319
|
logger.info("Memory published successfully", {
|
|
@@ -48,9 +48,14 @@ export declare const ALL_MEMORY_PROPERTIES: readonly ["user_id", "doc_type", "co
|
|
|
48
48
|
* This utility ensures all memory properties are fetched consistently
|
|
49
49
|
* across all tools, preventing bugs where properties are missing.
|
|
50
50
|
*
|
|
51
|
+
* NOTE: Some properties may not exist on all records (e.g., old records
|
|
52
|
+
* created before schema updates). This function handles that gracefully
|
|
53
|
+
* by falling back to fetching without property specification if the
|
|
54
|
+
* full property query fails.
|
|
55
|
+
*
|
|
51
56
|
* @param collection - Weaviate collection
|
|
52
57
|
* @param memoryId - Memory ID to fetch
|
|
53
|
-
* @returns Memory object with all properties
|
|
58
|
+
* @returns Memory object with all properties that exist on the record
|
|
54
59
|
*/
|
|
55
60
|
export declare function fetchMemoryWithAllProperties(collection: any, memoryId: string): Promise<any>;
|
|
56
61
|
/**
|
package/package.json
CHANGED
package/src/tools/confirm.ts
CHANGED
|
@@ -156,14 +156,20 @@ async function executePublishMemory(
|
|
|
156
156
|
request.payload.memory_id
|
|
157
157
|
);
|
|
158
158
|
|
|
159
|
-
logger.
|
|
159
|
+
logger.info('Original memory fetch result', {
|
|
160
160
|
function: 'executePublishMemory',
|
|
161
161
|
found: !!originalMemory,
|
|
162
162
|
memoryId: request.payload.memory_id,
|
|
163
163
|
hasProperties: !!originalMemory?.properties,
|
|
164
164
|
propertyCount: originalMemory?.properties ? Object.keys(originalMemory.properties).length : 0,
|
|
165
|
+
propertyKeys: originalMemory?.properties ? Object.keys(originalMemory.properties) : [],
|
|
165
166
|
hasTitle: !!originalMemory?.properties?.title,
|
|
166
167
|
hasContent: !!originalMemory?.properties?.content,
|
|
168
|
+
hasUserId: !!originalMemory?.properties?.user_id,
|
|
169
|
+
hasTags: !!originalMemory?.properties?.tags,
|
|
170
|
+
hasWeight: !!originalMemory?.properties?.weight,
|
|
171
|
+
contentLength: originalMemory?.properties?.content?.length || 0,
|
|
172
|
+
titleValue: originalMemory?.properties?.title || 'NO_TITLE',
|
|
167
173
|
});
|
|
168
174
|
|
|
169
175
|
if (!originalMemory) {
|
|
@@ -246,6 +252,12 @@ async function executePublishMemory(
|
|
|
246
252
|
memoryId: request.payload.memory_id,
|
|
247
253
|
hasUserId: !!(publishedMemory as any).user_id,
|
|
248
254
|
hasAuthorId: !!publishedMemory.author_id,
|
|
255
|
+
publishedMemoryKeys: Object.keys(publishedMemory),
|
|
256
|
+
publishedMemoryKeyCount: Object.keys(publishedMemory).length,
|
|
257
|
+
hasContent: !!publishedMemory.content,
|
|
258
|
+
hasTitle: !!publishedMemory.title,
|
|
259
|
+
contentLength: publishedMemory.content?.length || 0,
|
|
260
|
+
titleValue: publishedMemory.title || 'NO_TITLE',
|
|
249
261
|
});
|
|
250
262
|
|
|
251
263
|
// Insert directly into unified public collection
|
package/src/weaviate/client.ts
CHANGED
|
@@ -215,17 +215,36 @@ export const ALL_MEMORY_PROPERTIES = [
|
|
|
215
215
|
* This utility ensures all memory properties are fetched consistently
|
|
216
216
|
* across all tools, preventing bugs where properties are missing.
|
|
217
217
|
*
|
|
218
|
+
* NOTE: Some properties may not exist on all records (e.g., old records
|
|
219
|
+
* created before schema updates). This function handles that gracefully
|
|
220
|
+
* by falling back to fetching without property specification if the
|
|
221
|
+
* full property query fails.
|
|
222
|
+
*
|
|
218
223
|
* @param collection - Weaviate collection
|
|
219
224
|
* @param memoryId - Memory ID to fetch
|
|
220
|
-
* @returns Memory object with all properties
|
|
225
|
+
* @returns Memory object with all properties that exist on the record
|
|
221
226
|
*/
|
|
222
227
|
export async function fetchMemoryWithAllProperties(
|
|
223
228
|
collection: any,
|
|
224
229
|
memoryId: string
|
|
225
230
|
) {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
231
|
+
try {
|
|
232
|
+
// Try to fetch with all properties specified
|
|
233
|
+
return await collection.query.fetchObjectById(memoryId, {
|
|
234
|
+
returnProperties: ALL_MEMORY_PROPERTIES,
|
|
235
|
+
});
|
|
236
|
+
} catch (error) {
|
|
237
|
+
// If that fails (e.g., property doesn't exist on this record),
|
|
238
|
+
// fetch without specifying properties - Weaviate will return
|
|
239
|
+
// all properties that actually exist on the record
|
|
240
|
+
logger.warn('Failed to fetch with all properties, falling back to unspecified fetch', {
|
|
241
|
+
module: 'weaviate-client',
|
|
242
|
+
memoryId,
|
|
243
|
+
error: error instanceof Error ? error.message : String(error),
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
return await collection.query.fetchObjectById(memoryId);
|
|
247
|
+
}
|
|
229
248
|
}
|
|
230
249
|
|
|
231
250
|
/**
|