@prmichaelsen/remember-mcp 2.6.10 → 2.6.12

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,43 @@ 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.12] - 2026-02-17
9
+
10
+ ### Fixed
11
+
12
+ - **CRITICAL: Memory_public Schema Mismatch**: Fixed property names to match user memory schema
13
+ - Changed `location_gps_latitude` → `location_gps_lat`
14
+ - Changed `location_gps_longitude` → `location_gps_lng`
15
+ - Changed `location_address_formatted` → `location_address`
16
+ - Changed `location_address_city` → `location_city`
17
+ - Changed `location_address_country` → `location_country`
18
+ - Added missing `location_source` field
19
+ - Changed `context_platform` → `context_summary` and `context_timestamp`
20
+ - Added missing `locale_language` and `locale_timezone` fields
21
+ - Changed `related_memory_ids` → `relationships`
22
+ - Added missing fields: `references`, `template_id`, `access_count`, `last_accessed_at`
23
+ - Added relationship fields: `memory_ids`, `relationship_type`, `observation`, `strength`
24
+ - Added computed fields: `base_weight`, `computed_weight`
25
+ - Added `user_id` field for backwards compatibility
26
+ - Schema now matches user memory schema exactly, allowing spread operator to work
27
+ - Fixes issue where Weaviate rejected all properties due to name mismatches
28
+ - Published memories now store all content correctly
29
+
30
+ ---
31
+
32
+ ## [2.6.11] - 2026-02-17
33
+
34
+ ### Changed
35
+
36
+ - **Enhanced Logging for `executePublishMemory()`**: Added detailed property logging
37
+ - Logs all property keys fetched from original memory
38
+ - Logs property keys being inserted into public collection
39
+ - Logs content length, title, and other key fields
40
+ - Changed fetch result log from debug to info level
41
+ - Helps diagnose if memory content is being fetched and copied correctly
42
+
43
+ ---
44
+
8
45
  ## [2.6.10] - 2026-02-17
9
46
 
10
47
  ### Fixed
@@ -3774,53 +3774,134 @@ async function createSpaceCollection(client2, spaceId) {
3774
3774
  dataType: "number",
3775
3775
  description: "System confidence in accuracy (0-1)"
3776
3776
  },
3777
- // Location fields (flattened)
3777
+ // Location fields (flattened) - MUST match user memory schema exactly
3778
3778
  {
3779
- name: "location_gps_latitude",
3779
+ name: "location_gps_lat",
3780
3780
  dataType: "number",
3781
3781
  description: "GPS latitude"
3782
3782
  },
3783
3783
  {
3784
- name: "location_gps_longitude",
3784
+ name: "location_gps_lng",
3785
3785
  dataType: "number",
3786
3786
  description: "GPS longitude"
3787
3787
  },
3788
3788
  {
3789
- name: "location_address_formatted",
3789
+ name: "location_address",
3790
3790
  dataType: "text",
3791
3791
  description: "Formatted address"
3792
3792
  },
3793
3793
  {
3794
- name: "location_address_city",
3794
+ name: "location_city",
3795
3795
  dataType: "text",
3796
- description: "City"
3796
+ description: "City name"
3797
3797
  },
3798
3798
  {
3799
- name: "location_address_country",
3799
+ name: "location_country",
3800
+ dataType: "text",
3801
+ description: "Country name"
3802
+ },
3803
+ {
3804
+ name: "location_source",
3800
3805
  dataType: "text",
3801
- description: "Country"
3806
+ description: "Location source (gps, ip, manual, etc.)"
3802
3807
  },
3803
- // Context fields (flattened)
3808
+ // Context fields (flattened) - MUST match user memory schema exactly
3804
3809
  {
3805
3810
  name: "context_conversation_id",
3806
3811
  dataType: "text",
3807
3812
  description: "Conversation ID"
3808
3813
  },
3809
3814
  {
3810
- name: "context_platform",
3815
+ name: "context_summary",
3816
+ dataType: "text",
3817
+ description: "Brief context summary"
3818
+ },
3819
+ {
3820
+ name: "context_timestamp",
3821
+ dataType: "date",
3822
+ description: "Context timestamp"
3823
+ },
3824
+ // Locale fields - MUST match user memory schema exactly
3825
+ {
3826
+ name: "locale_language",
3827
+ dataType: "text",
3828
+ description: "Language code (e.g., en, es, fr)"
3829
+ },
3830
+ {
3831
+ name: "locale_timezone",
3811
3832
  dataType: "text",
3812
- description: "Platform where created"
3833
+ description: "Timezone (e.g., America/Los_Angeles)"
3834
+ },
3835
+ // Relationships - MUST match user memory schema exactly
3836
+ {
3837
+ name: "relationships",
3838
+ dataType: "text[]",
3839
+ description: "Array of relationship IDs"
3840
+ },
3841
+ // Access tracking - MUST match user memory schema exactly
3842
+ {
3843
+ name: "access_count",
3844
+ dataType: "number",
3845
+ description: "Total times accessed"
3846
+ },
3847
+ {
3848
+ name: "last_accessed_at",
3849
+ dataType: "date",
3850
+ description: "Most recent access timestamp"
3813
3851
  },
3814
- // Tags and relationships
3852
+ // Metadata - MUST match user memory schema exactly
3815
3853
  {
3816
3854
  name: "tags",
3817
3855
  dataType: "text[]",
3818
- description: "Tags for categorization"
3856
+ description: "Tags for organization"
3857
+ },
3858
+ {
3859
+ name: "references",
3860
+ dataType: "text[]",
3861
+ description: "Source URLs"
3862
+ },
3863
+ {
3864
+ name: "template_id",
3865
+ dataType: "text",
3866
+ description: "Template ID if using template"
3819
3867
  },
3868
+ // Relationship-specific fields (for relationships in public space)
3820
3869
  {
3821
- name: "related_memory_ids",
3870
+ name: "memory_ids",
3822
3871
  dataType: "text[]",
3823
- description: "IDs of related memories"
3872
+ description: "Connected memory IDs (for relationships)"
3873
+ },
3874
+ {
3875
+ name: "relationship_type",
3876
+ dataType: "text",
3877
+ description: "Relationship type (for relationships)"
3878
+ },
3879
+ {
3880
+ name: "observation",
3881
+ dataType: "text",
3882
+ description: "Relationship observation (vectorized)"
3883
+ },
3884
+ {
3885
+ name: "strength",
3886
+ dataType: "number",
3887
+ description: "Relationship strength (0-1)"
3888
+ },
3889
+ // Computed fields - MUST match user memory schema exactly
3890
+ {
3891
+ name: "base_weight",
3892
+ dataType: "number",
3893
+ description: "User-specified weight"
3894
+ },
3895
+ {
3896
+ name: "computed_weight",
3897
+ dataType: "number",
3898
+ description: "Calculated effective weight"
3899
+ },
3900
+ // User ID field (for backwards compatibility with spread operator)
3901
+ {
3902
+ name: "user_id",
3903
+ dataType: "text",
3904
+ description: "User ID (copied from original memory, same as author_id)"
3824
3905
  },
3825
3906
  // Timestamps
3826
3907
  {
@@ -4158,14 +4239,20 @@ async function executePublishMemory(request, userId) {
4158
4239
  userCollection,
4159
4240
  request.payload.memory_id
4160
4241
  );
4161
- logger.debug("Original memory fetch result", {
4242
+ logger.info("Original memory fetch result", {
4162
4243
  function: "executePublishMemory",
4163
4244
  found: !!originalMemory,
4164
4245
  memoryId: request.payload.memory_id,
4165
4246
  hasProperties: !!originalMemory?.properties,
4166
4247
  propertyCount: originalMemory?.properties ? Object.keys(originalMemory.properties).length : 0,
4248
+ propertyKeys: originalMemory?.properties ? Object.keys(originalMemory.properties) : [],
4167
4249
  hasTitle: !!originalMemory?.properties?.title,
4168
- hasContent: !!originalMemory?.properties?.content
4250
+ hasContent: !!originalMemory?.properties?.content,
4251
+ hasUserId: !!originalMemory?.properties?.user_id,
4252
+ hasTags: !!originalMemory?.properties?.tags,
4253
+ hasWeight: !!originalMemory?.properties?.weight,
4254
+ contentLength: originalMemory?.properties?.content?.length || 0,
4255
+ titleValue: originalMemory?.properties?.title || "NO_TITLE"
4169
4256
  });
4170
4257
  if (!originalMemory) {
4171
4258
  logger.info("Original memory not found", {
@@ -4209,23 +4296,23 @@ async function executePublishMemory(request, userId) {
4209
4296
  });
4210
4297
  const originalTags = Array.isArray(originalMemory.properties.tags) ? originalMemory.properties.tags : [];
4211
4298
  const additionalTags = Array.isArray(request.payload.additional_tags) ? request.payload.additional_tags : [];
4299
+ if (!request.payload.spaces || !Array.isArray(request.payload.spaces) || request.payload.spaces.length === 0) {
4300
+ throw new Error("Payload missing required field: spaces");
4301
+ }
4212
4302
  const publishedMemory = {
4213
4303
  ...originalMemory.properties,
4214
- // Add space-specific fields
4215
- spaces: request.payload.spaces || ["the_void"],
4216
- // Array of spaces!
4304
+ // Add space-specific fields (don't overwrite existing properties)
4305
+ spaces: request.payload.spaces,
4306
+ // Required field (validated above)
4217
4307
  author_id: userId,
4218
4308
  // Track original author
4219
4309
  published_at: (/* @__PURE__ */ new Date()).toISOString(),
4220
4310
  discovery_count: 0,
4221
- doc_type: "space_memory",
4222
4311
  attribution: "user",
4223
- // Merge additional tags
4224
- tags: [...originalTags, ...additionalTags],
4225
- // Update timestamps
4226
- created_at: (/* @__PURE__ */ new Date()).toISOString(),
4227
- updated_at: (/* @__PURE__ */ new Date()).toISOString(),
4228
- version: 1
4312
+ // Merge additional tags with original tags
4313
+ tags: [...originalTags, ...additionalTags]
4314
+ // Keep doc_type as 'memory' (don't change to 'space_memory')
4315
+ // Keep original created_at, updated_at, version (don't overwrite)
4229
4316
  };
4230
4317
  logger.info("Inserting memory into Memory_public", {
4231
4318
  function: "executePublishMemory",
@@ -4233,7 +4320,13 @@ async function executePublishMemory(request, userId) {
4233
4320
  spaceCount: request.payload.spaces?.length || 0,
4234
4321
  memoryId: request.payload.memory_id,
4235
4322
  hasUserId: !!publishedMemory.user_id,
4236
- hasAuthorId: !!publishedMemory.author_id
4323
+ hasAuthorId: !!publishedMemory.author_id,
4324
+ publishedMemoryKeys: Object.keys(publishedMemory),
4325
+ publishedMemoryKeyCount: Object.keys(publishedMemory).length,
4326
+ hasContent: !!publishedMemory.content,
4327
+ hasTitle: !!publishedMemory.title,
4328
+ contentLength: publishedMemory.content?.length || 0,
4329
+ titleValue: publishedMemory.title || "NO_TITLE"
4237
4330
  });
4238
4331
  const result = await publicCollection.data.insert(publishedMemory);
4239
4332
  logger.info("Memory published successfully", {
package/dist/server.js CHANGED
@@ -3842,53 +3842,134 @@ async function createSpaceCollection(client2, spaceId) {
3842
3842
  dataType: "number",
3843
3843
  description: "System confidence in accuracy (0-1)"
3844
3844
  },
3845
- // Location fields (flattened)
3845
+ // Location fields (flattened) - MUST match user memory schema exactly
3846
3846
  {
3847
- name: "location_gps_latitude",
3847
+ name: "location_gps_lat",
3848
3848
  dataType: "number",
3849
3849
  description: "GPS latitude"
3850
3850
  },
3851
3851
  {
3852
- name: "location_gps_longitude",
3852
+ name: "location_gps_lng",
3853
3853
  dataType: "number",
3854
3854
  description: "GPS longitude"
3855
3855
  },
3856
3856
  {
3857
- name: "location_address_formatted",
3857
+ name: "location_address",
3858
3858
  dataType: "text",
3859
3859
  description: "Formatted address"
3860
3860
  },
3861
3861
  {
3862
- name: "location_address_city",
3862
+ name: "location_city",
3863
3863
  dataType: "text",
3864
- description: "City"
3864
+ description: "City name"
3865
3865
  },
3866
3866
  {
3867
- name: "location_address_country",
3867
+ name: "location_country",
3868
+ dataType: "text",
3869
+ description: "Country name"
3870
+ },
3871
+ {
3872
+ name: "location_source",
3868
3873
  dataType: "text",
3869
- description: "Country"
3874
+ description: "Location source (gps, ip, manual, etc.)"
3870
3875
  },
3871
- // Context fields (flattened)
3876
+ // Context fields (flattened) - MUST match user memory schema exactly
3872
3877
  {
3873
3878
  name: "context_conversation_id",
3874
3879
  dataType: "text",
3875
3880
  description: "Conversation ID"
3876
3881
  },
3877
3882
  {
3878
- name: "context_platform",
3883
+ name: "context_summary",
3884
+ dataType: "text",
3885
+ description: "Brief context summary"
3886
+ },
3887
+ {
3888
+ name: "context_timestamp",
3889
+ dataType: "date",
3890
+ description: "Context timestamp"
3891
+ },
3892
+ // Locale fields - MUST match user memory schema exactly
3893
+ {
3894
+ name: "locale_language",
3895
+ dataType: "text",
3896
+ description: "Language code (e.g., en, es, fr)"
3897
+ },
3898
+ {
3899
+ name: "locale_timezone",
3879
3900
  dataType: "text",
3880
- description: "Platform where created"
3901
+ description: "Timezone (e.g., America/Los_Angeles)"
3902
+ },
3903
+ // Relationships - MUST match user memory schema exactly
3904
+ {
3905
+ name: "relationships",
3906
+ dataType: "text[]",
3907
+ description: "Array of relationship IDs"
3908
+ },
3909
+ // Access tracking - MUST match user memory schema exactly
3910
+ {
3911
+ name: "access_count",
3912
+ dataType: "number",
3913
+ description: "Total times accessed"
3914
+ },
3915
+ {
3916
+ name: "last_accessed_at",
3917
+ dataType: "date",
3918
+ description: "Most recent access timestamp"
3881
3919
  },
3882
- // Tags and relationships
3920
+ // Metadata - MUST match user memory schema exactly
3883
3921
  {
3884
3922
  name: "tags",
3885
3923
  dataType: "text[]",
3886
- description: "Tags for categorization"
3924
+ description: "Tags for organization"
3925
+ },
3926
+ {
3927
+ name: "references",
3928
+ dataType: "text[]",
3929
+ description: "Source URLs"
3930
+ },
3931
+ {
3932
+ name: "template_id",
3933
+ dataType: "text",
3934
+ description: "Template ID if using template"
3887
3935
  },
3936
+ // Relationship-specific fields (for relationships in public space)
3888
3937
  {
3889
- name: "related_memory_ids",
3938
+ name: "memory_ids",
3890
3939
  dataType: "text[]",
3891
- description: "IDs of related memories"
3940
+ description: "Connected memory IDs (for relationships)"
3941
+ },
3942
+ {
3943
+ name: "relationship_type",
3944
+ dataType: "text",
3945
+ description: "Relationship type (for relationships)"
3946
+ },
3947
+ {
3948
+ name: "observation",
3949
+ dataType: "text",
3950
+ description: "Relationship observation (vectorized)"
3951
+ },
3952
+ {
3953
+ name: "strength",
3954
+ dataType: "number",
3955
+ description: "Relationship strength (0-1)"
3956
+ },
3957
+ // Computed fields - MUST match user memory schema exactly
3958
+ {
3959
+ name: "base_weight",
3960
+ dataType: "number",
3961
+ description: "User-specified weight"
3962
+ },
3963
+ {
3964
+ name: "computed_weight",
3965
+ dataType: "number",
3966
+ description: "Calculated effective weight"
3967
+ },
3968
+ // User ID field (for backwards compatibility with spread operator)
3969
+ {
3970
+ name: "user_id",
3971
+ dataType: "text",
3972
+ description: "User ID (copied from original memory, same as author_id)"
3892
3973
  },
3893
3974
  // Timestamps
3894
3975
  {
@@ -4226,14 +4307,20 @@ async function executePublishMemory(request, userId) {
4226
4307
  userCollection,
4227
4308
  request.payload.memory_id
4228
4309
  );
4229
- logger.debug("Original memory fetch result", {
4310
+ logger.info("Original memory fetch result", {
4230
4311
  function: "executePublishMemory",
4231
4312
  found: !!originalMemory,
4232
4313
  memoryId: request.payload.memory_id,
4233
4314
  hasProperties: !!originalMemory?.properties,
4234
4315
  propertyCount: originalMemory?.properties ? Object.keys(originalMemory.properties).length : 0,
4316
+ propertyKeys: originalMemory?.properties ? Object.keys(originalMemory.properties) : [],
4235
4317
  hasTitle: !!originalMemory?.properties?.title,
4236
- hasContent: !!originalMemory?.properties?.content
4318
+ hasContent: !!originalMemory?.properties?.content,
4319
+ hasUserId: !!originalMemory?.properties?.user_id,
4320
+ hasTags: !!originalMemory?.properties?.tags,
4321
+ hasWeight: !!originalMemory?.properties?.weight,
4322
+ contentLength: originalMemory?.properties?.content?.length || 0,
4323
+ titleValue: originalMemory?.properties?.title || "NO_TITLE"
4237
4324
  });
4238
4325
  if (!originalMemory) {
4239
4326
  logger.info("Original memory not found", {
@@ -4277,23 +4364,23 @@ async function executePublishMemory(request, userId) {
4277
4364
  });
4278
4365
  const originalTags = Array.isArray(originalMemory.properties.tags) ? originalMemory.properties.tags : [];
4279
4366
  const additionalTags = Array.isArray(request.payload.additional_tags) ? request.payload.additional_tags : [];
4367
+ if (!request.payload.spaces || !Array.isArray(request.payload.spaces) || request.payload.spaces.length === 0) {
4368
+ throw new Error("Payload missing required field: spaces");
4369
+ }
4280
4370
  const publishedMemory = {
4281
4371
  ...originalMemory.properties,
4282
- // Add space-specific fields
4283
- spaces: request.payload.spaces || ["the_void"],
4284
- // Array of spaces!
4372
+ // Add space-specific fields (don't overwrite existing properties)
4373
+ spaces: request.payload.spaces,
4374
+ // Required field (validated above)
4285
4375
  author_id: userId,
4286
4376
  // Track original author
4287
4377
  published_at: (/* @__PURE__ */ new Date()).toISOString(),
4288
4378
  discovery_count: 0,
4289
- doc_type: "space_memory",
4290
4379
  attribution: "user",
4291
- // Merge additional tags
4292
- tags: [...originalTags, ...additionalTags],
4293
- // Update timestamps
4294
- created_at: (/* @__PURE__ */ new Date()).toISOString(),
4295
- updated_at: (/* @__PURE__ */ new Date()).toISOString(),
4296
- version: 1
4380
+ // Merge additional tags with original tags
4381
+ tags: [...originalTags, ...additionalTags]
4382
+ // Keep doc_type as 'memory' (don't change to 'space_memory')
4383
+ // Keep original created_at, updated_at, version (don't overwrite)
4297
4384
  };
4298
4385
  logger.info("Inserting memory into Memory_public", {
4299
4386
  function: "executePublishMemory",
@@ -4301,7 +4388,13 @@ async function executePublishMemory(request, userId) {
4301
4388
  spaceCount: request.payload.spaces?.length || 0,
4302
4389
  memoryId: request.payload.memory_id,
4303
4390
  hasUserId: !!publishedMemory.user_id,
4304
- hasAuthorId: !!publishedMemory.author_id
4391
+ hasAuthorId: !!publishedMemory.author_id,
4392
+ publishedMemoryKeys: Object.keys(publishedMemory),
4393
+ publishedMemoryKeyCount: Object.keys(publishedMemory).length,
4394
+ hasContent: !!publishedMemory.content,
4395
+ hasTitle: !!publishedMemory.title,
4396
+ contentLength: publishedMemory.content?.length || 0,
4397
+ titleValue: publishedMemory.title || "NO_TITLE"
4305
4398
  });
4306
4399
  const result = await publicCollection.data.insert(publishedMemory);
4307
4400
  logger.info("Memory published successfully", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prmichaelsen/remember-mcp",
3
- "version": "2.6.10",
3
+ "version": "2.6.12",
4
4
  "description": "Multi-tenant memory system MCP server with vector search and relationships",
5
5
  "main": "dist/server.js",
6
6
  "type": "module",
@@ -156,14 +156,20 @@ async function executePublishMemory(
156
156
  request.payload.memory_id
157
157
  );
158
158
 
159
- logger.debug('Original memory fetch result', {
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) {
@@ -221,22 +227,24 @@ async function executePublishMemory(
221
227
  ? request.payload.additional_tags
222
228
  : [];
223
229
 
224
- // Create published memory with space-specific fields
230
+ // Validate payload has required fields
231
+ if (!request.payload.spaces || !Array.isArray(request.payload.spaces) || request.payload.spaces.length === 0) {
232
+ throw new Error('Payload missing required field: spaces');
233
+ }
234
+
235
+ // Create published memory - preserve ALL original properties
225
236
  const publishedMemory = {
226
237
  ...originalMemory.properties,
227
- // Add space-specific fields
228
- spaces: request.payload.spaces || ['the_void'], // Array of spaces!
238
+ // Add space-specific fields (don't overwrite existing properties)
239
+ spaces: request.payload.spaces, // Required field (validated above)
229
240
  author_id: userId, // Track original author
230
241
  published_at: new Date().toISOString(),
231
242
  discovery_count: 0,
232
- doc_type: 'space_memory',
233
243
  attribution: 'user' as const,
234
- // Merge additional tags
244
+ // Merge additional tags with original tags
235
245
  tags: [...originalTags, ...additionalTags],
236
- // Update timestamps
237
- created_at: new Date().toISOString(),
238
- updated_at: new Date().toISOString(),
239
- version: 1,
246
+ // Keep doc_type as 'memory' (don't change to 'space_memory')
247
+ // Keep original created_at, updated_at, version (don't overwrite)
240
248
  };
241
249
 
242
250
  logger.info('Inserting memory into Memory_public', {
@@ -246,6 +254,12 @@ async function executePublishMemory(
246
254
  memoryId: request.payload.memory_id,
247
255
  hasUserId: !!(publishedMemory as any).user_id,
248
256
  hasAuthorId: !!publishedMemory.author_id,
257
+ publishedMemoryKeys: Object.keys(publishedMemory),
258
+ publishedMemoryKeyCount: Object.keys(publishedMemory).length,
259
+ hasContent: !!publishedMemory.content,
260
+ hasTitle: !!publishedMemory.title,
261
+ contentLength: publishedMemory.content?.length || 0,
262
+ titleValue: publishedMemory.title || 'NO_TITLE',
249
263
  });
250
264
 
251
265
  // Insert directly into unified public collection
@@ -187,55 +187,142 @@ async function createSpaceCollection(
187
187
  description: 'System confidence in accuracy (0-1)',
188
188
  },
189
189
 
190
- // Location fields (flattened)
190
+ // Location fields (flattened) - MUST match user memory schema exactly
191
191
  {
192
- name: 'location_gps_latitude',
192
+ name: 'location_gps_lat',
193
193
  dataType: 'number' as any,
194
194
  description: 'GPS latitude',
195
195
  },
196
196
  {
197
- name: 'location_gps_longitude',
197
+ name: 'location_gps_lng',
198
198
  dataType: 'number' as any,
199
199
  description: 'GPS longitude',
200
200
  },
201
201
  {
202
- name: 'location_address_formatted',
202
+ name: 'location_address',
203
203
  dataType: 'text' as any,
204
204
  description: 'Formatted address',
205
205
  },
206
206
  {
207
- name: 'location_address_city',
207
+ name: 'location_city',
208
208
  dataType: 'text' as any,
209
- description: 'City',
209
+ description: 'City name',
210
210
  },
211
211
  {
212
- name: 'location_address_country',
212
+ name: 'location_country',
213
213
  dataType: 'text' as any,
214
- description: 'Country',
214
+ description: 'Country name',
215
+ },
216
+ {
217
+ name: 'location_source',
218
+ dataType: 'text' as any,
219
+ description: 'Location source (gps, ip, manual, etc.)',
215
220
  },
216
221
 
217
- // Context fields (flattened)
222
+ // Context fields (flattened) - MUST match user memory schema exactly
218
223
  {
219
224
  name: 'context_conversation_id',
220
225
  dataType: 'text' as any,
221
226
  description: 'Conversation ID',
222
227
  },
223
228
  {
224
- name: 'context_platform',
229
+ name: 'context_summary',
225
230
  dataType: 'text' as any,
226
- description: 'Platform where created',
231
+ description: 'Brief context summary',
232
+ },
233
+ {
234
+ name: 'context_timestamp',
235
+ dataType: 'date' as any,
236
+ description: 'Context timestamp',
227
237
  },
228
238
 
229
- // Tags and relationships
239
+ // Locale fields - MUST match user memory schema exactly
240
+ {
241
+ name: 'locale_language',
242
+ dataType: 'text' as any,
243
+ description: 'Language code (e.g., en, es, fr)',
244
+ },
245
+ {
246
+ name: 'locale_timezone',
247
+ dataType: 'text' as any,
248
+ description: 'Timezone (e.g., America/Los_Angeles)',
249
+ },
250
+
251
+ // Relationships - MUST match user memory schema exactly
252
+ {
253
+ name: 'relationships',
254
+ dataType: 'text[]' as any,
255
+ description: 'Array of relationship IDs',
256
+ },
257
+
258
+ // Access tracking - MUST match user memory schema exactly
259
+ {
260
+ name: 'access_count',
261
+ dataType: 'number' as any,
262
+ description: 'Total times accessed',
263
+ },
264
+ {
265
+ name: 'last_accessed_at',
266
+ dataType: 'date' as any,
267
+ description: 'Most recent access timestamp',
268
+ },
269
+
270
+ // Metadata - MUST match user memory schema exactly
230
271
  {
231
272
  name: 'tags',
232
273
  dataType: 'text[]' as any,
233
- description: 'Tags for categorization',
274
+ description: 'Tags for organization',
234
275
  },
235
276
  {
236
- name: 'related_memory_ids',
277
+ name: 'references',
237
278
  dataType: 'text[]' as any,
238
- description: 'IDs of related memories',
279
+ description: 'Source URLs',
280
+ },
281
+ {
282
+ name: 'template_id',
283
+ dataType: 'text' as any,
284
+ description: 'Template ID if using template',
285
+ },
286
+
287
+ // Relationship-specific fields (for relationships in public space)
288
+ {
289
+ name: 'memory_ids',
290
+ dataType: 'text[]' as any,
291
+ description: 'Connected memory IDs (for relationships)',
292
+ },
293
+ {
294
+ name: 'relationship_type',
295
+ dataType: 'text' as any,
296
+ description: 'Relationship type (for relationships)',
297
+ },
298
+ {
299
+ name: 'observation',
300
+ dataType: 'text' as any,
301
+ description: 'Relationship observation (vectorized)',
302
+ },
303
+ {
304
+ name: 'strength',
305
+ dataType: 'number' as any,
306
+ description: 'Relationship strength (0-1)',
307
+ },
308
+
309
+ // Computed fields - MUST match user memory schema exactly
310
+ {
311
+ name: 'base_weight',
312
+ dataType: 'number' as any,
313
+ description: 'User-specified weight',
314
+ },
315
+ {
316
+ name: 'computed_weight',
317
+ dataType: 'number' as any,
318
+ description: 'Calculated effective weight',
319
+ },
320
+
321
+ // User ID field (for backwards compatibility with spread operator)
322
+ {
323
+ name: 'user_id',
324
+ dataType: 'text' as any,
325
+ description: 'User ID (copied from original memory, same as author_id)',
239
326
  },
240
327
 
241
328
  // Timestamps