@ppdocs/mcp 3.2.13 → 3.2.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.
Files changed (2) hide show
  1. package/dist/web/server.js +38 -1
  2. package/package.json +1 -1
@@ -563,7 +563,13 @@ export function startWebServer(webPort) {
563
563
  key: proj.remote.password,
564
564
  user: `Agent@${os.hostname()}`,
565
565
  }, null, 2));
566
- res.json({ ok: true, message: `✅ ${platform} MCP 已安装` });
566
+ let extra = '';
567
+ if (platform === 'antigravity') {
568
+ const cmdCount = installAntigravitySlashCommands();
569
+ if (cmdCount > 0)
570
+ extra = ` + ${cmdCount}个斜杠命令`;
571
+ }
572
+ res.json({ ok: true, message: `✅ ${platform} MCP 已安装${extra}` });
567
573
  }
568
574
  catch (e) {
569
575
  res.json({ ok: false, error: String(e) });
@@ -667,6 +673,37 @@ function removeMcpFromConfig(filePath, serverName) {
667
673
  }
668
674
  catch { /* ignore */ }
669
675
  }
676
+ /** 安装 Antigravity 斜杠命令到全局目录 ~/.gemini/antigravity/global_workflows/ */
677
+ function installAntigravitySlashCommands() {
678
+ const templatesDir = path.join(__dirname, '..', 'templates', 'commands', 'pp');
679
+ if (!fs.existsSync(templatesDir))
680
+ return 0;
681
+ const globalDir = path.join(os.homedir(), '.gemini', 'antigravity', 'global_workflows');
682
+ fs.mkdirSync(globalDir, { recursive: true });
683
+ const COMMAND_MAP = {
684
+ 'init.md': { name: 'pp-init', desc: '初始化项目知识图谱' },
685
+ 'sync.md': { name: 'pp-sync', desc: '同步代码与知识图谱' },
686
+ 'review.md': { name: 'pp-shencha', desc: '审查任务成果' },
687
+ 'DiagnosticProtocol.md': { name: 'pp-fenxi', desc: '深度分析错误' },
688
+ 'Execution_Task.md': { name: 'pp-task', desc: '执行开发任务' },
689
+ 'Sentinel_4.md': { name: 'pp-audit', desc: '多Agent代码审计' },
690
+ 'SynchronizationProtocol.md': { name: 'pp-syncpro', desc: '知识图谱同步协议' },
691
+ 'Zero_Defec_Genesis.md': { name: 'plan', desc: '零缺陷创生协议' },
692
+ };
693
+ let count = 0;
694
+ for (const [file, mapping] of Object.entries(COMMAND_MAP)) {
695
+ const dest = path.join(globalDir, `${mapping.name}.md`);
696
+ if (fs.existsSync(dest))
697
+ continue;
698
+ const src = path.join(templatesDir, file);
699
+ if (!fs.existsSync(src))
700
+ continue;
701
+ const content = fs.readFileSync(src, 'utf-8');
702
+ fs.writeFileSync(dest, `---\ndescription: ${mapping.desc}\n---\n\n${content}`);
703
+ count++;
704
+ }
705
+ return count;
706
+ }
670
707
  /** 获取 Claude Desktop 全局配置路径 */
671
708
  function getClaudeGlobalPath() {
672
709
  if (process.platform === 'win32')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ppdocs/mcp",
3
- "version": "3.2.13",
3
+ "version": "3.2.14",
4
4
  "description": "ppdocs MCP Server - Knowledge Graph for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",