momo-ai 1.0.19 → 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.
- package/.claude/skills/algorithmic-art/LICENSE.txt +202 -0
- package/.claude/skills/algorithmic-art/SKILL.md +405 -0
- package/.claude/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/.claude/skills/algorithmic-art/templates/viewer.html +599 -0
- package/.claude/skills/r2mo-rad-lain/PROMPT.md +281 -0
- package/.claude/skills/r2mo-rad-lain/README.md +192 -0
- package/.claude/skills/r2mo-rad-lain/SKILL.md +412 -0
- package/.claude/skills/r2mo-rad-lain/examples/argument-parsing.js +154 -0
- package/.claude/skills/r2mo-rad-lain/examples/file-operations.js +182 -0
- package/.claude/skills/r2mo-rad-lain/file-utils-api.md +281 -0
- package/.claude/skills/r2mo-rad-lain/menu-api.md +187 -0
- package/.claude/skills/r2mo-rad-lain/scripts/file-utils.js +223 -0
- package/.claude/skills/r2mo-rad-lain/scripts/menu.js +289 -0
- package/.claude/skills/r2mo-rad-lain/scripts/yaml-parser.js +209 -0
- package/.claude/skills/r2mo-rad-lain/templates/command.json.template +13 -0
- package/.claude/skills/r2mo-rad-lain/templates/executor.js.template +32 -0
- package/.claude/skills/r2mo-rad-lain/templates/interactive-menu.js.template +221 -0
- package/.cursor/mcp.json +17 -0
- package/.obsidian/app.json +1 -0
- package/.obsidian/appearance.json +4 -0
- package/.obsidian/community-plugins.json +4 -0
- package/.obsidian/core-plugins.json +33 -0
- package/.obsidian/plugins/ai-agent/main.js +98495 -0
- package/.obsidian/plugins/ai-agent/manifest.json +11 -0
- package/.obsidian/plugins/ai-agent/styles.css +806 -0
- package/.obsidian/plugins/dataview/main.js +20876 -0
- package/.obsidian/plugins/dataview/manifest.json +11 -0
- package/.obsidian/plugins/dataview/styles.css +141 -0
- package/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +10 -0
- package/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
- package/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
- package/.obsidian/plugins/templater-obsidian/main.js +45 -0
- package/.obsidian/plugins/templater-obsidian/manifest.json +11 -0
- package/.obsidian/plugins/templater-obsidian/styles.css +226 -0
- package/.obsidian/plugins/terminal/main.js +200 -0
- package/.obsidian/plugins/terminal/manifest.json +14 -0
- package/.obsidian/plugins/terminal/styles.css +32 -0
- package/.obsidian/themes/AnuPpuccin/manifest.json +7 -0
- package/.obsidian/themes/AnuPpuccin/theme.css +9080 -0
- package/.obsidian/themes/Things/manifest.json +7 -0
- package/.obsidian/themes/Things/theme.css +1628 -0
- package/.obsidian/workspace.json +196 -0
- package/README.md +10 -123
- package/docs/images/logo.jpeg +0 -0
- package/install.sh +1 -0
- package/package.json +6 -2
- package/skills/r2mo-rad-lain/SKILL.md +101 -0
- package/src/_agent/trae/momo-datamodel.json +2 -1
- package/src/_agent/trae/momo-module-req.json +2 -1
- package/src/_agent/trae/momo-system-req.json +2 -1
- package/src/_agent/trae/momo-task.json +2 -1
- package/src/_agent/trae/momo-taskplan.json +2 -1
- package/src/_mcp/skills-server.mjs +70 -0
- package/src/_skill/repositories.json +16 -0
- package/src/_template/LAIN/.momo/advanced/refer.json +0 -4
- package/src/commander/help.json +5 -0
- package/src/commander/mcp.json +13 -0
- package/src/commander/open.json +8 -2
- package/src/commander/skills.json +20 -0
- package/src/executor/executeEnv.js +48 -38
- package/src/executor/executeHelp.js +77 -16
- package/src/executor/executeInit.js +203 -149
- package/src/executor/executeMcp.js +290 -0
- package/src/executor/executeOpen.js +144 -125
- package/src/executor/executeSkills.js +747 -0
- package/src/executor/index.js +5 -39
- package/src/momo.js +2 -1
- package/src/utils/momo-args.js +39 -0
- package/src/utils/momo-file-utils.js +75 -0
- package/src/utils/momo-menu.js +54 -0
- package/src/commander/actor.json +0 -12
- package/src/commander/actors.json +0 -6
- package/src/commander/add.json +0 -12
- package/src/commander/agent.json +0 -12
- package/src/commander/agentcfg.json +0 -5
- package/src/commander/archive.json +0 -12
- package/src/commander/commit.json +0 -12
- package/src/commander/console.json +0 -7
- package/src/commander/lain.json +0 -7
- package/src/commander/list.json +0 -7
- package/src/commander/plan.json +0 -12
- package/src/commander/project.json +0 -12
- package/src/commander/pull.json +0 -6
- package/src/commander/push.json +0 -6
- package/src/commander/repo.json +0 -18
- package/src/commander/run.json +0 -18
- package/src/commander/show.json +0 -12
- package/src/commander/tasks.json +0 -18
- package/src/commander/unlock.json +0 -6
- package/src/commander/validate.json +0 -12
- package/src/executor/executeActor.js +0 -133
- package/src/executor/executeActors.js +0 -58
- package/src/executor/executeAdd.js +0 -307
- package/src/executor/executeAgent.js +0 -224
- package/src/executor/executeAgentCfg.js +0 -195
- package/src/executor/executeArchive.js +0 -124
- package/src/executor/executeCommit.js +0 -202
- package/src/executor/executeConsole.js +0 -142
- package/src/executor/executeList.js +0 -133
- package/src/executor/executePlan.js +0 -164
- package/src/executor/executeProject.js +0 -312
- package/src/executor/executePull.js +0 -127
- package/src/executor/executePush.js +0 -243
- package/src/executor/executeRepo.js +0 -238
- package/src/executor/executeRun.js +0 -644
- package/src/executor/executeShow.js +0 -164
- package/src/executor/executeTasks.js +0 -384
- package/src/executor/executeUnlock.js +0 -110
- package/src/executor/executeValidate.js +0 -210
package/src/commander/open.json
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"executor": "executeSkills",
|
|
3
|
+
"description": "安装技能到项目或全局目录!",
|
|
4
|
+
"command": "skills",
|
|
5
|
+
"options": [
|
|
6
|
+
{
|
|
7
|
+
"name": "remote",
|
|
8
|
+
"alias": "r",
|
|
9
|
+
"description": "从远程仓库安装技能(可选指定仓库名)",
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "global",
|
|
14
|
+
"alias": "g",
|
|
15
|
+
"description": "安装到全局 ~/.claude/skills/ 目录",
|
|
16
|
+
"type": "boolean",
|
|
17
|
+
"default": false
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -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(`💻
|
|
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(`📦
|
|
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(`🌱
|
|
123
|
+
Ec.waiting(`🌱 Git 版本 : ${gitVersion.trim()}`);
|
|
101
124
|
} catch (error) {
|
|
102
125
|
Ec.waiting('⚠️ 无法获取 Git 版本信息');
|
|
103
126
|
}
|
|
104
127
|
|
|
105
|
-
//
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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
|
-
|
|
2
|
+
|
|
3
3
|
module.exports = (options) => {
|
|
4
|
+
const parsed = Ec.parseArgument(options);
|
|
4
5
|
const metadata = Ec.parseMetadata();
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
23
|
-
});
|
|
24
|
-
|
|
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);
|