@prmichaelsen/remember-mcp 3.14.2 → 3.14.3

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.
@@ -2878,6 +2878,51 @@ function createSpaceCollectionSchema() {
2878
2878
  })
2879
2879
  };
2880
2880
  }
2881
+ function createGroupCollectionSchema(groupId) {
2882
+ const collectionName = `Memory_groups_${groupId}`;
2883
+ return {
2884
+ name: collectionName,
2885
+ description: `Group memory collection for group: ${groupId}`,
2886
+ vectorizers: configure.vectorizer.text2VecOpenAI({
2887
+ model: "text-embedding-3-small",
2888
+ dimensions: 1536,
2889
+ vectorizeCollectionName: false
2890
+ }),
2891
+ properties: [
2892
+ ...COMMON_MEMORY_PROPERTIES,
2893
+ ...PUBLISHED_MEMORY_PROPERTIES
2894
+ ],
2895
+ invertedIndex: configure.invertedIndex({
2896
+ indexNullState: true,
2897
+ indexPropertyLength: true,
2898
+ indexTimestamps: true
2899
+ })
2900
+ };
2901
+ }
2902
+ async function reconcileCollectionProperties(client2, collectionName, expectedProperties) {
2903
+ const collection = client2.collections.get(collectionName);
2904
+ const config2 = await collection.config.get();
2905
+ const existingNames = new Set(config2.properties.map((p) => p.name));
2906
+ let added = 0;
2907
+ for (const prop of expectedProperties) {
2908
+ if (!existingNames.has(prop.name)) {
2909
+ await collection.config.addProperty(prop);
2910
+ added++;
2911
+ }
2912
+ }
2913
+ return added;
2914
+ }
2915
+ async function ensureGroupCollection(client2, groupId) {
2916
+ const collectionName = `Memory_groups_${groupId}`;
2917
+ const exists = await client2.collections.exists(collectionName);
2918
+ if (exists) {
2919
+ await reconcileCollectionProperties(client2, collectionName, [...COMMON_MEMORY_PROPERTIES, ...PUBLISHED_MEMORY_PROPERTIES]);
2920
+ return false;
2921
+ }
2922
+ const schema = createGroupCollectionSchema(groupId);
2923
+ await client2.collections.create(schema);
2924
+ return true;
2925
+ }
2881
2926
 
2882
2927
  // node_modules/@prmichaelsen/remember-core/dist/database/weaviate/space-schema.js
2883
2928
  var PUBLIC_COLLECTION_NAME = "Memory_spaces_public";
@@ -3328,6 +3373,7 @@ var SpaceService = class {
3328
3373
  for (const groupId of groups) {
3329
3374
  const groupCollectionName = getCollectionName(CollectionType.GROUPS, groupId);
3330
3375
  try {
3376
+ await ensureGroupCollection(this.weaviateClient, groupId);
3331
3377
  const groupCollection = this.weaviateClient.collections.get(groupCollectionName);
3332
3378
  let existingGroupMemory = null;
3333
3379
  try {
package/dist/server.js CHANGED
@@ -2562,6 +2562,51 @@ function createSpaceCollectionSchema() {
2562
2562
  })
2563
2563
  };
2564
2564
  }
2565
+ function createGroupCollectionSchema(groupId) {
2566
+ const collectionName = `Memory_groups_${groupId}`;
2567
+ return {
2568
+ name: collectionName,
2569
+ description: `Group memory collection for group: ${groupId}`,
2570
+ vectorizers: configure.vectorizer.text2VecOpenAI({
2571
+ model: "text-embedding-3-small",
2572
+ dimensions: 1536,
2573
+ vectorizeCollectionName: false
2574
+ }),
2575
+ properties: [
2576
+ ...COMMON_MEMORY_PROPERTIES,
2577
+ ...PUBLISHED_MEMORY_PROPERTIES
2578
+ ],
2579
+ invertedIndex: configure.invertedIndex({
2580
+ indexNullState: true,
2581
+ indexPropertyLength: true,
2582
+ indexTimestamps: true
2583
+ })
2584
+ };
2585
+ }
2586
+ async function reconcileCollectionProperties(client2, collectionName, expectedProperties) {
2587
+ const collection = client2.collections.get(collectionName);
2588
+ const config3 = await collection.config.get();
2589
+ const existingNames = new Set(config3.properties.map((p) => p.name));
2590
+ let added = 0;
2591
+ for (const prop of expectedProperties) {
2592
+ if (!existingNames.has(prop.name)) {
2593
+ await collection.config.addProperty(prop);
2594
+ added++;
2595
+ }
2596
+ }
2597
+ return added;
2598
+ }
2599
+ async function ensureGroupCollection(client2, groupId) {
2600
+ const collectionName = `Memory_groups_${groupId}`;
2601
+ const exists = await client2.collections.exists(collectionName);
2602
+ if (exists) {
2603
+ await reconcileCollectionProperties(client2, collectionName, [...COMMON_MEMORY_PROPERTIES, ...PUBLISHED_MEMORY_PROPERTIES]);
2604
+ return false;
2605
+ }
2606
+ const schema = createGroupCollectionSchema(groupId);
2607
+ await client2.collections.create(schema);
2608
+ return true;
2609
+ }
2565
2610
 
2566
2611
  // node_modules/@prmichaelsen/remember-core/dist/database/weaviate/space-schema.js
2567
2612
  var PUBLIC_COLLECTION_NAME = "Memory_spaces_public";
@@ -3012,6 +3057,7 @@ var SpaceService = class {
3012
3057
  for (const groupId of groups) {
3013
3058
  const groupCollectionName = getCollectionName(CollectionType.GROUPS, groupId);
3014
3059
  try {
3060
+ await ensureGroupCollection(this.weaviateClient, groupId);
3015
3061
  const groupCollection = this.weaviateClient.collections.get(groupCollectionName);
3016
3062
  let existingGroupMemory = null;
3017
3063
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prmichaelsen/remember-mcp",
3
- "version": "3.14.2",
3
+ "version": "3.14.3",
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.0",
53
+ "@prmichaelsen/remember-core": "^0.16.6",
54
54
  "@prmichaelsen/remember-mcp": "^2.7.3",
55
55
  "dotenv": "^16.4.5",
56
56
  "uuid": "^13.0.0",