@prmichaelsen/remember-mcp 3.14.5 → 3.14.7

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.
@@ -1168,7 +1168,32 @@ var DEFAULT_PREFERENCES = {
1168
1168
  };
1169
1169
 
1170
1170
  // node_modules/@prmichaelsen/remember-core/dist/types/space.types.js
1171
- var SUPPORTED_SPACES = ["the_void", "profiles", "spaces"];
1171
+ var SUPPORTED_SPACES = [
1172
+ "the_void",
1173
+ "profiles",
1174
+ "spaces",
1175
+ "ghosts",
1176
+ "poems",
1177
+ "recipes",
1178
+ "quotes",
1179
+ "dreams",
1180
+ "travel",
1181
+ "music",
1182
+ "pets",
1183
+ "books",
1184
+ "funny",
1185
+ "ideas",
1186
+ "art",
1187
+ "fitness",
1188
+ "how_to",
1189
+ "movies",
1190
+ "nature",
1191
+ "journal"
1192
+ ];
1193
+ var SPACE_CONTENT_TYPE_RESTRICTIONS = {
1194
+ profiles: "profile",
1195
+ ghosts: "ghost"
1196
+ };
1172
1197
 
1173
1198
  // node_modules/@prmichaelsen/remember-core/dist/constants/content-types.js
1174
1199
  var CONTENT_TYPES = [
@@ -1224,7 +1249,9 @@ var CONTENT_TYPES = [
1224
1249
  "history",
1225
1250
  // Cross-user & Threading
1226
1251
  "ghost",
1227
- "comment"
1252
+ "comment",
1253
+ // Profile
1254
+ "profile"
1228
1255
  ];
1229
1256
  var CONTENT_TYPE_METADATA = {
1230
1257
  // Core Types
@@ -1533,6 +1560,13 @@ var CONTENT_TYPE_METADATA = {
1533
1560
  description: "Threaded comments on shared memories in spaces and groups",
1534
1561
  examples: ["Comments on shared memories", "Discussion replies", "Feedback"],
1535
1562
  common_fields: ["parent_id", "thread_root_id"]
1563
+ },
1564
+ // Profile
1565
+ profile: {
1566
+ name: "profile",
1567
+ category: "cross_user",
1568
+ description: "User profile published to the profiles space for people discovery",
1569
+ examples: ["User bio", "About me", "Profile introduction"]
1536
1570
  }
1537
1571
  };
1538
1572
  function isValidContentType(type) {
@@ -1914,6 +1948,9 @@ var BASE = getBasePrefix();
1914
1948
  function getUserPreferencesPath(userId) {
1915
1949
  return `${BASE}.users/${userId}/preferences`;
1916
1950
  }
1951
+ function getCollectionRegistryPath() {
1952
+ return `${BASE}.collection_registry`;
1953
+ }
1917
1954
 
1918
1955
  // node_modules/@prmichaelsen/remember-core/dist/services/preferences.service.js
1919
1956
  var PreferencesDatabaseService = class {
@@ -2202,6 +2239,7 @@ var ALL_MEMORY_PROPERTIES = [
2202
2239
  "relationship_type",
2203
2240
  "observation",
2204
2241
  "strength",
2242
+ "source",
2205
2243
  "access_count",
2206
2244
  "last_accessed_at",
2207
2245
  "tags",
@@ -2613,6 +2651,7 @@ var RelationshipService = class {
2613
2651
  observation: input.observation,
2614
2652
  strength: input.strength ?? 0.5,
2615
2653
  confidence: input.confidence ?? 0.8,
2654
+ source: input.source ?? "user",
2616
2655
  created_at: now,
2617
2656
  updated_at: now,
2618
2657
  version: 1,
@@ -2723,6 +2762,45 @@ var RelationshipService = class {
2723
2762
  }));
2724
2763
  return { relationships, total: results.objects.length, offset, limit };
2725
2764
  }
2765
+ // ── Find by Memory IDs ──────────────────────────────────────────────
2766
+ async findByMemoryIds(input) {
2767
+ if (input.memory_ids.length === 0) {
2768
+ return { relationships: [], total: 0 };
2769
+ }
2770
+ const limit = input.limit ?? 100;
2771
+ const filterList = [
2772
+ this.collection.filter.byProperty("doc_type").equal("relationship"),
2773
+ this.collection.filter.byProperty("related_memory_ids").containsAny(input.memory_ids)
2774
+ ];
2775
+ if (input.source_filter) {
2776
+ filterList.push(this.collection.filter.byProperty("source").equal(input.source_filter));
2777
+ }
2778
+ const combinedFilters = combineFiltersWithAnd(filterList);
2779
+ const results = await this.collection.query.fetchObjects({
2780
+ filters: combinedFilters,
2781
+ limit,
2782
+ returnProperties: [
2783
+ "user_id",
2784
+ "doc_type",
2785
+ "related_memory_ids",
2786
+ "memory_ids",
2787
+ "relationship_type",
2788
+ "observation",
2789
+ "strength",
2790
+ "confidence",
2791
+ "source",
2792
+ "tags",
2793
+ "created_at",
2794
+ "updated_at",
2795
+ "version"
2796
+ ]
2797
+ });
2798
+ const relationships = results.objects.map((obj) => ({
2799
+ id: obj.uuid,
2800
+ ...obj.properties
2801
+ }));
2802
+ return { relationships, total: relationships.length };
2803
+ }
2726
2804
  // ── Delete ──────────────────────────────────────────────────────────
2727
2805
  async delete(input) {
2728
2806
  const existing = await this.collection.query.fetchObjectById(input.relationship_id, {
@@ -2767,6 +2845,14 @@ import { Filters as Filters4 } from "weaviate-client";
2767
2845
 
2768
2846
  // node_modules/@prmichaelsen/remember-core/dist/database/weaviate/v2-collections.js
2769
2847
  import { configure } from "weaviate-client";
2848
+
2849
+ // node_modules/@prmichaelsen/remember-core/dist/database/collection-registry.js
2850
+ async function registerCollection(entry) {
2851
+ const path = getCollectionRegistryPath();
2852
+ await setDocument2(path, entry.collection_name, entry);
2853
+ }
2854
+
2855
+ // node_modules/@prmichaelsen/remember-core/dist/database/weaviate/v2-collections.js
2770
2856
  var COMMON_MEMORY_PROPERTIES = [
2771
2857
  // Core content
2772
2858
  { name: "content", dataType: configure.dataType.TEXT },
@@ -2821,6 +2907,7 @@ var COMMON_MEMORY_PROPERTIES = [
2821
2907
  { name: "relationship_type", dataType: configure.dataType.TEXT },
2822
2908
  { name: "related_memory_ids", dataType: configure.dataType.TEXT_ARRAY },
2823
2909
  { name: "observation", dataType: configure.dataType.TEXT },
2910
+ { name: "source", dataType: configure.dataType.TEXT },
2824
2911
  // Relationships (v1 compat)
2825
2912
  { name: "relationships", dataType: configure.dataType.TEXT_ARRAY },
2826
2913
  { name: "memory_ids", dataType: configure.dataType.TEXT_ARRAY },
@@ -2930,6 +3017,12 @@ async function ensureGroupCollection(client2, groupId) {
2930
3017
  }
2931
3018
  const schema = createGroupCollectionSchema(groupId);
2932
3019
  await client2.collections.create(schema);
3020
+ await registerCollection({
3021
+ collection_name: collectionName,
3022
+ collection_type: "groups",
3023
+ owner_id: groupId,
3024
+ created_at: (/* @__PURE__ */ new Date()).toISOString()
3025
+ });
2933
3026
  return true;
2934
3027
  }
2935
3028
 
@@ -3018,6 +3111,13 @@ var SpaceService = class {
3018
3111
  throw new Error("Permission denied: not memory owner");
3019
3112
  if (memory.properties.doc_type !== "memory")
3020
3113
  throw new Error("Only memories can be published");
3114
+ const memoryContentType = memory.properties.content_type;
3115
+ for (const spaceId of spaces) {
3116
+ const requiredType = SPACE_CONTENT_TYPE_RESTRICTIONS[spaceId];
3117
+ if (requiredType && memoryContentType !== requiredType) {
3118
+ throw new Error(`Space '${spaceId}' only accepts content_type '${requiredType}', got '${memoryContentType ?? "undefined"}'`);
3119
+ }
3120
+ }
3021
3121
  const { token } = await this.confirmationTokenService.createRequest(this.userId, "publish_memory", {
3022
3122
  memory_id: input.memory_id,
3023
3123
  spaces,
@@ -3642,6 +3742,9 @@ var SpaceService = class {
3642
3742
  }
3643
3743
  };
3644
3744
 
3745
+ // node_modules/@prmichaelsen/remember-core/dist/services/rem.state.js
3746
+ var REM_STATE_COLLECTION = `${BASE}.rem_state`;
3747
+
3645
3748
  // src/weaviate/schema.ts
3646
3749
  init_logger();
3647
3750
 
package/dist/server.js CHANGED
@@ -852,7 +852,32 @@ var DEFAULT_PREFERENCES = {
852
852
  };
853
853
 
854
854
  // node_modules/@prmichaelsen/remember-core/dist/types/space.types.js
855
- var SUPPORTED_SPACES = ["the_void", "profiles", "spaces"];
855
+ var SUPPORTED_SPACES = [
856
+ "the_void",
857
+ "profiles",
858
+ "spaces",
859
+ "ghosts",
860
+ "poems",
861
+ "recipes",
862
+ "quotes",
863
+ "dreams",
864
+ "travel",
865
+ "music",
866
+ "pets",
867
+ "books",
868
+ "funny",
869
+ "ideas",
870
+ "art",
871
+ "fitness",
872
+ "how_to",
873
+ "movies",
874
+ "nature",
875
+ "journal"
876
+ ];
877
+ var SPACE_CONTENT_TYPE_RESTRICTIONS = {
878
+ profiles: "profile",
879
+ ghosts: "ghost"
880
+ };
856
881
 
857
882
  // node_modules/@prmichaelsen/remember-core/dist/constants/content-types.js
858
883
  var CONTENT_TYPES = [
@@ -908,7 +933,9 @@ var CONTENT_TYPES = [
908
933
  "history",
909
934
  // Cross-user & Threading
910
935
  "ghost",
911
- "comment"
936
+ "comment",
937
+ // Profile
938
+ "profile"
912
939
  ];
913
940
  var CONTENT_TYPE_METADATA = {
914
941
  // Core Types
@@ -1217,6 +1244,13 @@ var CONTENT_TYPE_METADATA = {
1217
1244
  description: "Threaded comments on shared memories in spaces and groups",
1218
1245
  examples: ["Comments on shared memories", "Discussion replies", "Feedback"],
1219
1246
  common_fields: ["parent_id", "thread_root_id"]
1247
+ },
1248
+ // Profile
1249
+ profile: {
1250
+ name: "profile",
1251
+ category: "cross_user",
1252
+ description: "User profile published to the profiles space for people discovery",
1253
+ examples: ["User bio", "About me", "Profile introduction"]
1220
1254
  }
1221
1255
  };
1222
1256
  function isValidContentType(type) {
@@ -1598,6 +1632,9 @@ var BASE = getBasePrefix();
1598
1632
  function getUserPreferencesPath(userId) {
1599
1633
  return `${BASE}.users/${userId}/preferences`;
1600
1634
  }
1635
+ function getCollectionRegistryPath() {
1636
+ return `${BASE}.collection_registry`;
1637
+ }
1601
1638
 
1602
1639
  // node_modules/@prmichaelsen/remember-core/dist/services/preferences.service.js
1603
1640
  var PreferencesDatabaseService = class {
@@ -1886,6 +1923,7 @@ var ALL_MEMORY_PROPERTIES = [
1886
1923
  "relationship_type",
1887
1924
  "observation",
1888
1925
  "strength",
1926
+ "source",
1889
1927
  "access_count",
1890
1928
  "last_accessed_at",
1891
1929
  "tags",
@@ -2297,6 +2335,7 @@ var RelationshipService = class {
2297
2335
  observation: input.observation,
2298
2336
  strength: input.strength ?? 0.5,
2299
2337
  confidence: input.confidence ?? 0.8,
2338
+ source: input.source ?? "user",
2300
2339
  created_at: now,
2301
2340
  updated_at: now,
2302
2341
  version: 1,
@@ -2407,6 +2446,45 @@ var RelationshipService = class {
2407
2446
  }));
2408
2447
  return { relationships, total: results.objects.length, offset, limit };
2409
2448
  }
2449
+ // ── Find by Memory IDs ──────────────────────────────────────────────
2450
+ async findByMemoryIds(input) {
2451
+ if (input.memory_ids.length === 0) {
2452
+ return { relationships: [], total: 0 };
2453
+ }
2454
+ const limit = input.limit ?? 100;
2455
+ const filterList = [
2456
+ this.collection.filter.byProperty("doc_type").equal("relationship"),
2457
+ this.collection.filter.byProperty("related_memory_ids").containsAny(input.memory_ids)
2458
+ ];
2459
+ if (input.source_filter) {
2460
+ filterList.push(this.collection.filter.byProperty("source").equal(input.source_filter));
2461
+ }
2462
+ const combinedFilters = combineFiltersWithAnd(filterList);
2463
+ const results = await this.collection.query.fetchObjects({
2464
+ filters: combinedFilters,
2465
+ limit,
2466
+ returnProperties: [
2467
+ "user_id",
2468
+ "doc_type",
2469
+ "related_memory_ids",
2470
+ "memory_ids",
2471
+ "relationship_type",
2472
+ "observation",
2473
+ "strength",
2474
+ "confidence",
2475
+ "source",
2476
+ "tags",
2477
+ "created_at",
2478
+ "updated_at",
2479
+ "version"
2480
+ ]
2481
+ });
2482
+ const relationships = results.objects.map((obj) => ({
2483
+ id: obj.uuid,
2484
+ ...obj.properties
2485
+ }));
2486
+ return { relationships, total: relationships.length };
2487
+ }
2410
2488
  // ── Delete ──────────────────────────────────────────────────────────
2411
2489
  async delete(input) {
2412
2490
  const existing = await this.collection.query.fetchObjectById(input.relationship_id, {
@@ -2451,6 +2529,14 @@ import { Filters as Filters4 } from "weaviate-client";
2451
2529
 
2452
2530
  // node_modules/@prmichaelsen/remember-core/dist/database/weaviate/v2-collections.js
2453
2531
  import { configure } from "weaviate-client";
2532
+
2533
+ // node_modules/@prmichaelsen/remember-core/dist/database/collection-registry.js
2534
+ async function registerCollection(entry) {
2535
+ const path = getCollectionRegistryPath();
2536
+ await setDocument2(path, entry.collection_name, entry);
2537
+ }
2538
+
2539
+ // node_modules/@prmichaelsen/remember-core/dist/database/weaviate/v2-collections.js
2454
2540
  var COMMON_MEMORY_PROPERTIES = [
2455
2541
  // Core content
2456
2542
  { name: "content", dataType: configure.dataType.TEXT },
@@ -2505,6 +2591,7 @@ var COMMON_MEMORY_PROPERTIES = [
2505
2591
  { name: "relationship_type", dataType: configure.dataType.TEXT },
2506
2592
  { name: "related_memory_ids", dataType: configure.dataType.TEXT_ARRAY },
2507
2593
  { name: "observation", dataType: configure.dataType.TEXT },
2594
+ { name: "source", dataType: configure.dataType.TEXT },
2508
2595
  // Relationships (v1 compat)
2509
2596
  { name: "relationships", dataType: configure.dataType.TEXT_ARRAY },
2510
2597
  { name: "memory_ids", dataType: configure.dataType.TEXT_ARRAY },
@@ -2614,6 +2701,12 @@ async function ensureGroupCollection(client2, groupId) {
2614
2701
  }
2615
2702
  const schema = createGroupCollectionSchema(groupId);
2616
2703
  await client2.collections.create(schema);
2704
+ await registerCollection({
2705
+ collection_name: collectionName,
2706
+ collection_type: "groups",
2707
+ owner_id: groupId,
2708
+ created_at: (/* @__PURE__ */ new Date()).toISOString()
2709
+ });
2617
2710
  return true;
2618
2711
  }
2619
2712
 
@@ -2702,6 +2795,13 @@ var SpaceService = class {
2702
2795
  throw new Error("Permission denied: not memory owner");
2703
2796
  if (memory.properties.doc_type !== "memory")
2704
2797
  throw new Error("Only memories can be published");
2798
+ const memoryContentType = memory.properties.content_type;
2799
+ for (const spaceId of spaces) {
2800
+ const requiredType = SPACE_CONTENT_TYPE_RESTRICTIONS[spaceId];
2801
+ if (requiredType && memoryContentType !== requiredType) {
2802
+ throw new Error(`Space '${spaceId}' only accepts content_type '${requiredType}', got '${memoryContentType ?? "undefined"}'`);
2803
+ }
2804
+ }
2705
2805
  const { token } = await this.confirmationTokenService.createRequest(this.userId, "publish_memory", {
2706
2806
  memory_id: input.memory_id,
2707
2807
  spaces,
@@ -3326,6 +3426,9 @@ var SpaceService = class {
3326
3426
  }
3327
3427
  };
3328
3428
 
3429
+ // node_modules/@prmichaelsen/remember-core/dist/services/rem.state.js
3430
+ var REM_STATE_COLLECTION = `${BASE}.rem_state`;
3431
+
3329
3432
  // src/weaviate/schema.ts
3330
3433
  init_logger();
3331
3434
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prmichaelsen/remember-mcp",
3
- "version": "3.14.5",
3
+ "version": "3.14.7",
4
4
  "description": "Multi-tenant memory system MCP server with vector search and relationships",
5
5
  "main": "dist/server.js",
6
6
  "type": "module",
@@ -50,7 +50,7 @@
50
50
  "@modelcontextprotocol/sdk": "^1.0.4",
51
51
  "@prmichaelsen/firebase-admin-sdk-v8": "^2.2.0",
52
52
  "@prmichaelsen/mcp-auth": "^7.0.4",
53
- "@prmichaelsen/remember-core": "^0.16.13",
53
+ "@prmichaelsen/remember-core": "^0.19.2",
54
54
  "@prmichaelsen/remember-mcp": "^2.7.3",
55
55
  "dotenv": "^16.4.5",
56
56
  "uuid": "^13.0.0",