@rigstate/mcp 0.7.11 → 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 CHANGED
@@ -1913,7 +1913,7 @@ async function buildProjectSummary(project, techStack, activeTask, nextTask, age
1913
1913
  summaryParts.push(` Role: ${activeTask.role || "Developer"}`);
1914
1914
  const detailedInstructions = activeTask.prompt_content || activeTask.instruction_set;
1915
1915
  if (detailedInstructions) {
1916
- summaryParts.push(` Instructions: ${detailedInstructions.substring(0, 1e3)}...`);
1916
+ summaryParts.push(` Instructions: ${detailedInstructions}`);
1917
1917
  }
1918
1918
  if (activeTask.architectural_brief) {
1919
1919
  summaryParts.push(`
@@ -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: project, error: projectError } = await supabase.from("projects").select("*").eq("id", projectId).single();
2768
- if (projectError || !project) {
2769
- throw new Error(`Project ${projectId} details not found.`);
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),
@@ -2896,8 +2912,27 @@ async function listRoadmapTasks(supabase, userId, projectId) {
2896
2912
  });
2897
2913
  const formatted = activeTasks.length > 0 ? activeTasks.map((t) => {
2898
2914
  const statusEmoji = t.status === "ACTIVE" ? "\u{1F535}" : "\u{1F512}";
2899
- return `${statusEmoji} Step ${t.step_number}: ${t.title} (ID: ${t.id})`;
2900
- }).join("\n") : "No active or locked tasks found in the roadmap.";
2915
+ const priorityBadge = t.priority ? `[${t.priority}]` : "";
2916
+ const tags = t.tags && t.tags.length > 0 ? `Tags: ${t.tags.join(", ")}` : "";
2917
+ let details = `${statusEmoji} Step ${t.step_number}: ${t.title} ${priorityBadge} (ID: ${t.id})`;
2918
+ if (t.description) {
2919
+ details += `
2920
+ Description: ${t.description.substring(0, 150)}${t.description.length > 150 ? "..." : ""}`;
2921
+ }
2922
+ if (tags) {
2923
+ details += `
2924
+ ${tags}`;
2925
+ }
2926
+ if (t.prompt_content) {
2927
+ details += `
2928
+ Instruction Preview: ${t.prompt_content.substring(0, 100).replace(/\n/g, " ")}...`;
2929
+ }
2930
+ if (t.architectural_brief) {
2931
+ details += `
2932
+ Arch Brief: ${t.architectural_brief.substring(0, 100).replace(/\n/g, " ")}...`;
2933
+ }
2934
+ return details;
2935
+ }).join("\n\n") : "No active or locked tasks found in the roadmap.";
2901
2936
  return {
2902
2937
  tasks: activeTasks.map((t) => ({
2903
2938
  id: t.id,