@episoda/mcp 0.1.12 → 0.1.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/cli.js CHANGED
@@ -725,11 +725,19 @@ ${notFoundUids.length > 0 ? `**Not found:** ${notFoundUids.join(", ")}` : ""}`
725
725
  }
726
726
  },
727
727
  async (args) => {
728
+ const MAX_INITIAL_PROMPT_CHARS = 2e3;
728
729
  const result = await apiRequest2("GET", `/api/modules/${args.module_uid}`);
729
- if (!result.success || !result.module) {
730
+ const mod = result.moduleRecord || result.module;
731
+ if (!result.success || !mod) {
730
732
  return { content: [{ type: "text", text: `Error: ${result.error || "Module not found"}` }], isError: true };
731
733
  }
732
- const mod = result.module;
734
+ const initialPrompt = mod.initial_prompt?.trim();
735
+ const initialPromptSection = initialPrompt ? `
736
+
737
+ ### Original Request
738
+ \`\`\`text
739
+ ${initialPrompt.slice(0, MAX_INITIAL_PROMPT_CHARS)}${initialPrompt.length > MAX_INITIAL_PROMPT_CHARS ? "\n\n[Truncated for output size]" : ""}
740
+ \`\`\`` : "";
733
741
  return {
734
742
  content: [{
735
743
  type: "text",
@@ -738,7 +746,7 @@ ${notFoundUids.length > 0 ? `**Not found:** ${notFoundUids.join(", ")}` : ""}`
738
746
  **State:** ${mod.state}
739
747
  **Branch:** ${mod.branch_name || "_Not set_"}
740
748
 
741
- ${mod.description_md || "_No description_"}`
749
+ ${mod.description_md || "_No description_"}${initialPromptSection}`
742
750
  }]
743
751
  };
744
752
  }