momo-ai 1.0.20 → 1.0.21

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 (103) hide show
  1. package/.claude/skills/algorithmic-art/LICENSE.txt +202 -0
  2. package/.claude/skills/algorithmic-art/SKILL.md +405 -0
  3. package/.claude/skills/algorithmic-art/templates/generator_template.js +223 -0
  4. package/.claude/skills/algorithmic-art/templates/viewer.html +599 -0
  5. package/.claude/skills/r2mo-rad-lain/PROMPT.md +281 -0
  6. package/.claude/skills/r2mo-rad-lain/README.md +192 -0
  7. package/.claude/skills/r2mo-rad-lain/SKILL.md +412 -0
  8. package/.claude/skills/r2mo-rad-lain/examples/argument-parsing.js +154 -0
  9. package/.claude/skills/r2mo-rad-lain/examples/file-operations.js +182 -0
  10. package/.claude/skills/r2mo-rad-lain/file-utils-api.md +281 -0
  11. package/.claude/skills/r2mo-rad-lain/menu-api.md +187 -0
  12. package/.claude/skills/r2mo-rad-lain/scripts/file-utils.js +223 -0
  13. package/.claude/skills/r2mo-rad-lain/scripts/menu.js +289 -0
  14. package/.claude/skills/r2mo-rad-lain/scripts/yaml-parser.js +209 -0
  15. package/.claude/skills/r2mo-rad-lain/templates/command.json.template +13 -0
  16. package/.claude/skills/r2mo-rad-lain/templates/executor.js.template +32 -0
  17. package/.claude/skills/r2mo-rad-lain/templates/interactive-menu.js.template +221 -0
  18. package/.cursor/mcp.json +17 -0
  19. package/.obsidian/app.json +1 -0
  20. package/.obsidian/appearance.json +4 -0
  21. package/.obsidian/community-plugins.json +4 -0
  22. package/.obsidian/core-plugins.json +33 -0
  23. package/.obsidian/plugins/ai-agent/main.js +98495 -0
  24. package/.obsidian/plugins/ai-agent/manifest.json +11 -0
  25. package/.obsidian/plugins/ai-agent/styles.css +806 -0
  26. package/.obsidian/plugins/dataview/main.js +20876 -0
  27. package/.obsidian/plugins/dataview/manifest.json +11 -0
  28. package/.obsidian/plugins/dataview/styles.css +141 -0
  29. package/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +10 -0
  30. package/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
  31. package/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
  32. package/.obsidian/plugins/templater-obsidian/main.js +45 -0
  33. package/.obsidian/plugins/templater-obsidian/manifest.json +11 -0
  34. package/.obsidian/plugins/templater-obsidian/styles.css +226 -0
  35. package/.obsidian/plugins/terminal/main.js +200 -0
  36. package/.obsidian/plugins/terminal/manifest.json +14 -0
  37. package/.obsidian/plugins/terminal/styles.css +32 -0
  38. package/.obsidian/themes/AnuPpuccin/manifest.json +7 -0
  39. package/.obsidian/themes/AnuPpuccin/theme.css +9080 -0
  40. package/.obsidian/themes/Things/manifest.json +7 -0
  41. package/.obsidian/themes/Things/theme.css +1628 -0
  42. package/.obsidian/workspace.json +196 -0
  43. package/README.md +10 -123
  44. package/docs/images/logo.jpeg +0 -0
  45. package/install.sh +1 -0
  46. package/package.json +6 -2
  47. package/skills/r2mo-rad-lain/SKILL.md +101 -0
  48. package/src/_mcp/skills-server.mjs +70 -0
  49. package/src/_skill/repositories.json +16 -0
  50. package/src/commander/help.json +5 -0
  51. package/src/commander/mcp.json +13 -0
  52. package/src/commander/open.json +8 -2
  53. package/src/commander/skills.json +20 -0
  54. package/src/executor/executeEnv.js +48 -38
  55. package/src/executor/executeHelp.js +77 -16
  56. package/src/executor/executeInit.js +203 -149
  57. package/src/executor/executeMcp.js +290 -0
  58. package/src/executor/executeOpen.js +144 -125
  59. package/src/executor/executeSkills.js +747 -0
  60. package/src/executor/index.js +5 -39
  61. package/src/momo.js +2 -1
  62. package/src/utils/momo-args.js +39 -0
  63. package/src/utils/momo-file-utils.js +75 -0
  64. package/src/utils/momo-menu.js +54 -0
  65. package/src/commander/actor.json +0 -12
  66. package/src/commander/actors.json +0 -6
  67. package/src/commander/add.json +0 -12
  68. package/src/commander/agent.json +0 -12
  69. package/src/commander/agentcfg.json +0 -5
  70. package/src/commander/archive.json +0 -12
  71. package/src/commander/commit.json +0 -12
  72. package/src/commander/console.json +0 -7
  73. package/src/commander/lain.json +0 -7
  74. package/src/commander/list.json +0 -7
  75. package/src/commander/plan.json +0 -12
  76. package/src/commander/project.json +0 -12
  77. package/src/commander/pull.json +0 -6
  78. package/src/commander/push.json +0 -6
  79. package/src/commander/repo.json +0 -18
  80. package/src/commander/run.json +0 -18
  81. package/src/commander/show.json +0 -12
  82. package/src/commander/tasks.json +0 -18
  83. package/src/commander/unlock.json +0 -6
  84. package/src/commander/validate.json +0 -12
  85. package/src/executor/executeActor.js +0 -133
  86. package/src/executor/executeActors.js +0 -58
  87. package/src/executor/executeAdd.js +0 -307
  88. package/src/executor/executeAgent.js +0 -299
  89. package/src/executor/executeAgentCfg.js +0 -210
  90. package/src/executor/executeArchive.js +0 -124
  91. package/src/executor/executeCommit.js +0 -202
  92. package/src/executor/executeConsole.js +0 -142
  93. package/src/executor/executeList.js +0 -133
  94. package/src/executor/executePlan.js +0 -164
  95. package/src/executor/executeProject.js +0 -313
  96. package/src/executor/executePull.js +0 -127
  97. package/src/executor/executePush.js +0 -243
  98. package/src/executor/executeRepo.js +0 -238
  99. package/src/executor/executeRun.js +0 -644
  100. package/src/executor/executeShow.js +0 -164
  101. package/src/executor/executeTasks.js +0 -384
  102. package/src/executor/executeUnlock.js +0 -110
  103. package/src/executor/executeValidate.js +0 -210
@@ -80,67 +80,77 @@ module.exports = async () => {
80
80
 
81
81
  Ec.waiting('------------------------------------------------------------');
82
82
 
83
+ // 检查操作系统信息
84
+ try {
85
+ const os = require('os');
86
+ const osType = os.type();
87
+ const displayOs = osType === 'Darwin' ? 'macOS' : osType;
88
+ Ec.waiting(`🖥️ OS 版本 : ${displayOs} ${os.release()} ${os.arch()}`);
89
+ } catch (error) {
90
+ Ec.waiting('⚠️ 无法获取 OS 系统信息');
91
+ }
92
+
93
+ // 检查 JDK 版本
94
+ try {
95
+ // java -version 输出通常在 stderr
96
+ const { stderr } = await execAsync('java -version');
97
+ const versionLine = stderr.split('\n')[0]; // 取第一行
98
+ // 尝试提取引号中的版本号
99
+ const versionMatch = versionLine.match(/"([^"]+)"/);
100
+ const version = versionMatch ? versionMatch[1] : versionLine;
101
+ Ec.waiting(`♨️ JDK 版本 : ${version}`);
102
+ } catch (error) {
103
+ Ec.waiting('⚠️ JDK 未安装或无法获取版本信息');
104
+ }
105
+
83
106
  // 检查额外的环境信息
84
107
  try {
85
108
  const {stdout: nodeVersion} = await execAsync('node --version');
86
- Ec.waiting(`💻 Node.js 版本: ${nodeVersion.trim()}`);
109
+ Ec.waiting(`💻 Node.js 版本 : ${nodeVersion.trim()}`);
87
110
  } catch (error) {
88
111
  Ec.waiting('⚠️ 无法获取 Node.js 版本信息');
89
112
  }
90
113
 
91
114
  try {
92
115
  const {stdout: npmVersion} = await execAsync('npm --version');
93
- Ec.waiting(`📦 NPM 版本: ${npmVersion.trim()}`);
116
+ Ec.waiting(`📦 NPM 版本 : ${npmVersion.trim()}`);
94
117
  } catch (error) {
95
118
  Ec.waiting('⚠️ 无法获取 NPM 版本信息');
96
119
  }
97
120
 
98
121
  try {
99
122
  const {stdout: gitVersion} = await execAsync('git --version');
100
- Ec.waiting(`🌱 Git 版本: ${gitVersion.trim()}`);
123
+ Ec.waiting(`🌱 Git 版本 : ${gitVersion.trim()}`);
101
124
  } catch (error) {
102
125
  Ec.waiting('⚠️ 无法获取 Git 版本信息');
103
126
  }
104
127
 
105
- // 检查 trae 版本(可选命令)
106
- try {
107
- const {stdout: traeVersion} = await execAsync('trae --version');
108
- const traeItems = (traeVersion.split("\n"));
109
- Ec.waiting(`----> 🎯 Trae 版本: ${traeItems[0].trim()}`);
110
- } catch (error) {
111
- Ec.waiting('⚠️ Trae 未安装或无法获取版本信息(可选工具)');
112
- }
113
-
114
- // 检查 lingma 版本(可选命令)
115
- try {
116
- const {stdout: lingmaVersion} = await execAsync('lingma --version');
117
- const lingmaItems = (lingmaVersion.split("\n"));
118
- Ec.waiting(`----> 🧠 Lingma 版本: ${lingmaItems[0].trim()}`);
119
- } catch (error) {
120
- Ec.waiting('⚠️ Lingma 未安装或无法获取版本信息(可选工具)');
121
- }
122
-
123
- // 检查 cursor 版本(可选命令)
124
- try {
125
- const {stdout: cursorVersion} = await execAsync('cursor --version');
126
- const cursorItems = (cursorVersion.split("\n"));
127
- Ec.waiting(`----> 🖱️ Cursor 版本: ${cursorItems[0].trim()}`);
128
- } catch (error) {
129
- Ec.waiting('⚠️ Cursor 未安装或无法获取版本信息(可选工具)');
130
- }
131
-
132
- // 检查 kiro 版本(可选命令)
133
- try {
134
- const {stdout: kiroVersion} = await execAsync('kiro --version');
135
- const kiroItems = (kiroVersion.split("\n"));
136
- Ec.waiting(`----> ⚡ Kiro 版本: ${kiroItems[0].trim()}`);
137
- } catch (error) {
138
- Ec.waiting('⚠️ Kiro 未安装或无法获取版本信息(可选工具)');
128
+ // 定义可选工具列表
129
+ const optionalTools = [
130
+ { cmd: 'trae', label: 'Trae 版本 ', emoji: '🎯' },
131
+ { cmd: 'lingma', label: 'Lingma 版本 ', emoji: '🧠' },
132
+ { cmd: 'cursor', label: 'Cursor 版本 ', emoji: '👾' },
133
+ { cmd: 'kiro', label: 'Kiro 版本 ', emoji: '🔮' },
134
+ { cmd: 'claude', label: 'Claude 版本 ', emoji: '🤖' },
135
+ { cmd: 'gemini', label: 'Gemini 版本 ', emoji: '🌟' },
136
+ { cmd: 'codex', label: 'Codex 版本 ', emoji: '💬' }
137
+ ];
138
+
139
+ for (const tool of optionalTools) {
140
+ try {
141
+ const {stdout} = await execAsync(`${tool.cmd} --version`);
142
+ const versionLines = stdout.split("\n");
143
+ const currentVersion = versionLines[0].trim();
144
+ Ec.waiting(`----> ${tool.emoji} ${tool.label}: ${currentVersion.cyan}`);
145
+ } catch (error) {
146
+ const name = tool.label.trim().replace(' 版本', '');
147
+ Ec.waiting(`⚠️ ${name} 未安装或无法获取版本信息(可选工具)`);
148
+ }
139
149
  }
140
150
 
141
151
  // 显示 Momo 版本
142
152
  const momoVersion = _getVersion();
143
- Ec.waiting(`🤖 Momo 版本: ${momoVersion}`);
153
+ Ec.waiting(`🤖 Momo 版本: ${momoVersion.red}`);
144
154
 
145
155
  // 总结(只检查必需命令)
146
156
  if (allCommandsAvailable) {
@@ -1,27 +1,88 @@
1
1
  const Ec = require('../epic');
2
- const os = require('os');
2
+
3
3
  module.exports = (options) => {
4
+ const parsed = Ec.parseArgument(options);
4
5
  const metadata = Ec.parseMetadata();
5
- metadata.forEach(runner => {
6
- Ec.waiting(`命令:` + `momo ${runner.command} [-options]`.green);
7
- // 检查描述中是否包含"CV",如果包含则在(CV)和说明之间添加红色高亮emoji
6
+
7
+ // 优先读取 options 中的 command,如果没有则尝试读取位置参数
8
+ const commandName = parsed.command ? parsed.command : (process.argv[3] && !process.argv[3].startsWith('-') ? process.argv[3] : null);
9
+
10
+ if (commandName) {
11
+ // ---------------------------------------------------------
12
+ // 单命令详细模式
13
+ // ---------------------------------------------------------
14
+ const runner = metadata.find(runner => runner.command === commandName);
15
+ if (!runner) {
16
+ Ec.error(`未找到命令 [ ${commandName} ] 的定义信息!`);
17
+ process.exit(1);
18
+ }
19
+
20
+ // 处理描述文字
8
21
  let description = runner.description;
9
22
  if (description.includes("(CV)")) {
10
23
  description = description.replace("(CV)", "(CV)📋️ ");
11
24
  }
12
- Ec.waiting(`说明`.yellow + `:${description}`);
13
- const options = runner.options || [];
14
- options.forEach(option => {
15
- if (option.hasOwnProperty('default')) {
16
- const str = option.default + '';
17
- Ec.waiting(`\t-${option.alias},--${option.name}`.red + `\t${option.description}, 默认值:\uD83C\uDF37 ` + str.blue);
18
- } else {
19
- Ec.waiting(`\t-${option.alias},--${option.name}`.red + `\t${option.description}`);
25
+
26
+ console.log(``);
27
+ console.log(`${description}`);
28
+ console.log(``);
29
+
30
+ console.log(`Usage:`);
31
+ console.log(`momo ${runner.command} [options]`);
32
+ console.log(``);
33
+
34
+ const opts = runner.options || [];
35
+ if (opts.length > 0) {
36
+ console.log(`Options:`);
37
+ opts.forEach(option => {
38
+ const flags = `[-${option.alias}|--${option.name}]`;
39
+ let desc = option.description;
40
+ if (option.hasOwnProperty('default')) {
41
+ desc += ` (默认: ${option.default})`.blue;
42
+ }
43
+
44
+ // 对齐设置
45
+ const minPadding = 25;
46
+ let paddingSpace = minPadding - flags.length;
47
+ if (paddingSpace < 2) paddingSpace = 2;
48
+
49
+ console.log(`${flags.yellow}${' '.repeat(paddingSpace)}${desc}`);
50
+ });
51
+ console.log(``);
52
+ }
53
+
54
+ } else {
55
+ // ---------------------------------------------------------
56
+ // 所有命令列表模式
57
+ // ---------------------------------------------------------
58
+ console.log(``);
59
+ console.log(`Usage:`);
60
+ console.log(`momo <command>`);
61
+ console.log(``);
62
+ console.log(`All commands:`);
63
+ console.log(``);
64
+
65
+ // 计算最大长度以对齐
66
+ let maxCmdLen = 0;
67
+ metadata.forEach(r => {
68
+ if (r.command.length > maxCmdLen) maxCmdLen = r.command.length;
69
+ });
70
+ const alignLen = maxCmdLen + 6;
71
+
72
+ metadata.forEach(runner => {
73
+ let description = runner.description;
74
+ if (description.includes("(CV)")) {
75
+ description = description.replace("(CV)", "📋️");
20
76
  }
21
- })
22
- Ec.waiting();
23
- });
24
- Ec.info("命令执行完成!");
77
+
78
+ const padding = ' '.repeat(alignLen - runner.command.length);
79
+ console.log(` ${runner.command.green}${padding}${description}`);
80
+ });
81
+
82
+ console.log(``);
83
+ console.log(`Run "momo help -c <command>" for more info`);
84
+ console.log(``);
85
+ }
25
86
 
26
87
  // 退出程序
27
88
  process.exit(0);