@rigstate/mcp 0.7.13 → 0.7.14
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 +20 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/tools/sync-ide-rules.ts +26 -6
package/dist/index.js
CHANGED
|
@@ -2764,10 +2764,26 @@ async function syncIdeRules(supabase, userId, projectId) {
|
|
|
2764
2764
|
if (accessError || !hasAccess) {
|
|
2765
2765
|
throw new Error("Project not found or access denied");
|
|
2766
2766
|
}
|
|
2767
|
-
const { data:
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
}
|
|
2767
|
+
const { data: projectData, error: rpcError } = await supabase.rpc("get_project_context_secure", {
|
|
2768
|
+
p_project_id: projectId,
|
|
2769
|
+
p_user_id: userId
|
|
2770
|
+
}).single();
|
|
2771
|
+
if (rpcError || !projectData) {
|
|
2772
|
+
throw new Error(`Project ${projectId} not found or access denied (Secure RPC failed).`);
|
|
2773
|
+
}
|
|
2774
|
+
const rawData = projectData;
|
|
2775
|
+
const project = {
|
|
2776
|
+
id: projectId,
|
|
2777
|
+
// Ensure ID is explicit
|
|
2778
|
+
name: rawData.name || "Unknown Project",
|
|
2779
|
+
description: rawData.description || "",
|
|
2780
|
+
project_type: rawData.project_type || "web_app",
|
|
2781
|
+
tech_stack: rawData.tech_stack || [],
|
|
2782
|
+
repository_url: rawData.repository_url,
|
|
2783
|
+
preferred_ide: rawData.preferred_ide || "cursor",
|
|
2784
|
+
// Pass through other fields that might be in the RPC response
|
|
2785
|
+
...rawData
|
|
2786
|
+
};
|
|
2771
2787
|
const ide = project.preferred_ide || "cursor";
|
|
2772
2788
|
const [stack, roadmapRes, legacyStats, activeAgents, dbMetadataRes] = await Promise.all([
|
|
2773
2789
|
(0, import_rules_engine.fetchProjectTechStack)(supabase, projectId),
|