genjo-mcp-server 1.0.9 → 1.0.11

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.
Files changed (2) hide show
  1. package/index.js +21 -18
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -30642,37 +30642,40 @@ Checking Cursor MCP configuration at: ${cursorMcpPath}`);
30642
30642
  if (!fs.existsSync(sourceSkillsDir)) {
30643
30643
  sourceSkillsDir = path.join(process.cwd(), "src", "mcp", "skills");
30644
30644
  }
30645
- const targetRulesDir = path.join(process.cwd(), ".cursor", "rules");
30646
- const targetRuleFile = path.join(targetRulesDir, "genjo-ai-news.mdc");
30647
- console.log(`
30648
- Installing Cursor Rule (Skill) to: ${targetRuleFile}`);
30649
30645
  if (fs.existsSync(sourceSkillsDir)) {
30650
30646
  try {
30651
- if (!fs.existsSync(targetRulesDir)) {
30652
- fs.mkdirSync(targetRulesDir, { recursive: true });
30653
- }
30654
- const sourceFile = path.join(sourceSkillsDir, "genjo-ai-news.mdc");
30647
+ const sourceFile = path.join(sourceSkillsDir, "SKILL.md");
30655
30648
  if (fs.existsSync(sourceFile)) {
30656
30649
  let content = fs.readFileSync(sourceFile, "utf-8");
30657
- if (!content.startsWith("---")) {
30650
+ if (!content.includes("name: genjo-ai-news")) {
30658
30651
  const frontmatter = `---
30659
- description: Expert AI News Agent for Asian markets. Use this rule when the user asks for AI news, needs fact-checking, or market analysis.
30660
- globs:
30661
- alwaysApply: false
30652
+ name: genjo-ai-news
30653
+ description: Expert AI News Agent for Asian markets. Use this skill when the user asks for AI news, needs fact-checking, or market analysis.
30662
30654
  ---
30663
30655
  `;
30664
- content = frontmatter + content;
30656
+ content = frontmatter + content.replace(/---[\s\S]*?---/, "").trim();
30657
+ }
30658
+ const skillFolderName = "genjo-ai-news";
30659
+ const cursorSkillDir = path.join(process.cwd(), ".cursor", "skills", skillFolderName);
30660
+ fs.mkdirSync(cursorSkillDir, { recursive: true });
30661
+ fs.writeFileSync(path.join(cursorSkillDir, "SKILL.md"), content);
30662
+ console.log(`
30663
+ \u2705 Installed Cursor Skill to .cursor/skills/${skillFolderName}/SKILL.md`);
30664
+ const claudeSkillDir = path.join(process.cwd(), ".claude", "skills", skillFolderName);
30665
+ fs.mkdirSync(claudeSkillDir, { recursive: true });
30666
+ fs.writeFileSync(path.join(claudeSkillDir, "SKILL.md"), content);
30667
+ console.log(`\u2705 Installed Claude Skill to .claude/skills/${skillFolderName}/SKILL.md`);
30668
+ const oldRuleFile = path.join(process.cwd(), ".cursor", "rules", "genjo-ai-news.mdc");
30669
+ if (fs.existsSync(oldRuleFile)) {
30670
+ fs.unlinkSync(oldRuleFile);
30671
+ console.log(`\u{1F9F9} Removed legacy Cursor Rule (.mdc)`);
30665
30672
  }
30666
- fs.writeFileSync(targetRuleFile, content);
30667
- console.log(" \u2705 Successfully installed Cursor Rule (Skill).");
30668
- console.log(" AI will now fetch this skill only when relevant.");
30669
30673
  }
30670
30674
  } catch (error48) {
30671
- console.error(` \u274C Failed to copy rule: ${error48.message}`);
30675
+ console.error(` \u274C Failed to copy skills: ${error48.message}`);
30672
30676
  }
30673
30677
  } else {
30674
30678
  console.warn(" \u26A0\uFE0F Could not locate source skills directory.");
30675
- console.warn(` Checked: ${sourceSkillsDir}`);
30676
30679
  }
30677
30680
  console.log("\n--------------------------------");
30678
30681
  console.log("\u{1F389} Setup complete!");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genjo-mcp-server",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "description": "MCP Server for Genjo AI News System - Asian Market Intelligence",
5
5
  "type": "module",
6
6
  "main": "index.js",