@rigstate/mcp 0.5.0 → 0.5.2

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/dist/index.js CHANGED
@@ -676,7 +676,7 @@ var QueryBrainInputSchema = z4.object({
676
676
  projectId: z4.string().uuid("Invalid project ID"),
677
677
  query: z4.string().min(1, "Query is required"),
678
678
  limit: z4.number().min(1).max(20).optional().default(8),
679
- threshold: z4.number().min(0).max(1).optional().default(0.5)
679
+ threshold: z4.number().min(0).max(1).optional().default(0.1)
680
680
  });
681
681
  var GetProjectContextInputSchema = z4.object({
682
682
  projectId: z4.string().uuid("Invalid project ID")
@@ -999,12 +999,14 @@ async function queryBrain(supabase, userId, projectId, query, limit = 8, thresho
999
999
  }
1000
1000
  const embedding = await generateQueryEmbedding(query);
1001
1001
  let memories = [];
1002
+ console.log(`Searching brain for "${query}" (limit: ${limit}, threshold: ${threshold})`);
1003
+ console.log(`Embedding present: ${!!embedding}`);
1002
1004
  const { data: searchResults, error: searchError } = await supabase.rpc("hybrid_search_memories", {
1003
1005
  p_project_id: projectId,
1004
1006
  p_query: query,
1005
- p_embedding: embedding,
1007
+ p_embedding: embedding || null,
1006
1008
  p_limit: limit,
1007
- p_similarity_threshold: threshold || 0.2
1009
+ p_similarity_threshold: threshold || 0.1
1008
1010
  });
1009
1011
  if (searchError) {
1010
1012
  console.error("Hybrid search error:", searchError);
@@ -1020,6 +1022,7 @@ async function queryBrain(supabase, userId, projectId, query, limit = 8, thresho
1020
1022
  }));
1021
1023
  }
1022
1024
  } else if (searchResults) {
1025
+ console.log(`Found ${searchResults.length} results from RPC`);
1023
1026
  memories = searchResults.map((m) => ({
1024
1027
  id: m.id,
1025
1028
  content: m.content,