momo-ai 1.0.20 → 1.0.22
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/SKILL.md +101 -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/.trae/skills/algorithmic-art/LICENSE.txt +202 -0
- package/.trae/skills/algorithmic-art/SKILL.md +405 -0
- package/.trae/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/.trae/skills/algorithmic-art/templates/viewer.html +599 -0
- package/.trae/skills/doc-coauthoring/SKILL.md +375 -0
- package/.trae/skills/frontend-design/LICENSE.txt +177 -0
- package/.trae/skills/frontend-design/SKILL.md +42 -0
- package/.trae/skills/r2mo-rad-lain/SKILL.md +101 -0
- package/README.md +12 -148
- package/docs/images/logo.jpeg +0 -0
- package/docs/images/r2mo-lain.png +0 -0
- package/install.sh +1 -0
- package/package.json +15 -11
- package/skills/r2mo-rad-domain/SKILL.md +70 -0
- package/skills/r2mo-rad-lain/SKILL.md +101 -0
- package/src/_mcp/skills-server.mjs +70 -0
- package/src/_skill/repositories.json +22 -0
- package/src/_template/LAIN/.obsidian/app.json +1 -0
- package/src/_template/LAIN/.obsidian/appearance.json +10 -0
- package/src/_template/LAIN/.obsidian/community-plugins.json +7 -0
- package/src/_template/LAIN/.obsidian/core-plugins.json +33 -0
- package/src/_template/LAIN/.obsidian/plugins/dataview/main.js +20876 -0
- package/src/_template/LAIN/.obsidian/plugins/dataview/manifest.json +11 -0
- package/src/_template/LAIN/.obsidian/plugins/dataview/styles.css +141 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/data.json +815 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +10 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/main.js +153 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/manifest.json +11 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/styles.css +1 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/main.js +7732 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/manifest.json +10 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/styles.css +38 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/main.js +504 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +12 -0
- package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/styles.css +1 -0
- package/src/_template/LAIN/.obsidian/snippets/body-font.css +27 -0
- package/src/_template/LAIN/.obsidian/themes/Primary/manifest.json +9 -0
- package/src/_template/LAIN/.obsidian/themes/Primary/theme.css +3878 -0
- package/src/_template/LAIN/.obsidian/themes/Retro Windows/manifest.json +7 -0
- package/src/_template/LAIN/.obsidian/themes/Retro Windows/theme.css +582 -0
- package/src/_template/LAIN/.obsidian/themes/RetroOS 98/manifest.json +9 -0
- package/src/_template/LAIN/.obsidian/themes/RetroOS 98/theme.css +2566 -0
- package/src/_template/LAIN/.obsidian/types.json +28 -0
- package/src/_template/LAIN/.obsidian/workspace.json +184 -0
- package/src/_template/LAIN/AGENTS.md +170 -16
- package/src/_template/R2MO/domain-enhance.md +10 -0
- package/src/commander/app.json +13 -0
- package/src/commander/apply.json +13 -0
- package/src/commander/ask.json +6 -0
- package/src/commander/docs.json +13 -0
- package/src/commander/domain.json +19 -0
- package/src/commander/help.json +5 -0
- package/src/commander/init.json +1 -1
- package/src/commander/mcp.json +13 -0
- package/src/commander/mmr0.json +6 -0
- package/src/commander/mmr2.json +6 -0
- package/src/commander/open.json +8 -2
- package/src/executor/executeApp.js +133 -0
- package/src/executor/executeApply.js +611 -0
- package/src/executor/executeAsk.js +274 -0
- package/src/executor/executeDocs.js +498 -0
- package/src/executor/executeDomain.js +293 -0
- package/src/executor/executeEnv.js +48 -38
- package/src/executor/executeHelp.js +77 -16
- package/src/executor/executeInit.js +176 -346
- package/src/executor/executeMcp.js +363 -0
- package/src/executor/executeMmr0.js +488 -0
- package/src/executor/executeMmr2.js +880 -0
- package/src/executor/executeOpen.js +144 -125
- package/src/executor/index.js +17 -39
- package/src/momo.js +2 -1
- package/src/python/r2mo_proto.py +418 -0
- package/src/python/r2mo_proto_database.py +369 -0
- package/src/python/r2mo_proto_domain.py +458 -0
- package/src/utils/momo-args.js +39 -0
- package/src/utils/momo-file-utils.js +75 -0
- package/src/utils/momo-menu.js +84 -0
- package/src/_template/LAIN/.momo/advanced/actor.md +0 -42
- package/src/_template/LAIN/.momo/advanced/refer.json +0 -46
- package/src/_template/LAIN/.momo/scripts/submodule-clean.sh +0 -56
- package/src/_template/LAIN/changes/proposal.md +0 -39
- package/src/_template/LAIN/changes/tasks/task-detail.md +0 -45
- package/src/_template/LAIN/changes/tasks.md +0 -49
- package/src/_template/LAIN/execute/admin-n-f-dashboard.md +0 -53
- package/src/_template/LAIN/execute/admin-n-f-form.md +0 -51
- package/src/_template/LAIN/execute/admin-n-f-home.md +0 -49
- package/src/_template/LAIN/execute/admin-n-f-list.md +0 -52
- package/src/_template/LAIN/execute/admin-n-f-login.md +0 -56
- package/src/_template/LAIN/specification/project-model.md +0 -13
- package/src/_template/LAIN/specification/project.md +0 -73
- package/src/_template/LAIN/specification/requirement.md +0 -25
- 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 -299
- package/src/executor/executeAgentCfg.js +0 -210
- 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 -313
- 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
|
@@ -1,159 +1,178 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
1
3
|
const Ec = require('../epic');
|
|
2
|
-
const {spawn} = require('child_process');
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
if (availableTools.length === 0) {
|
|
27
|
-
Ec.error('❌ 未找到可用的AI工具,请确保已安装以下工具之一:Trae、Cursor、Lingma、Kiro');
|
|
28
|
-
Ec.askClose();
|
|
29
|
-
process.exit(1);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// 如果只有一个工具可用,直接使用它
|
|
33
|
-
if (availableTools.length === 1) {
|
|
34
|
-
const tool = availableTools[0];
|
|
35
|
-
let toolDisplayName = tool.name;
|
|
36
|
-
if (tool.name === 'Trae' || tool.name === 'Cursor') {
|
|
37
|
-
toolDisplayName = `${tool.name}(${'Multi-Agent'.cyan})`;
|
|
38
|
-
}
|
|
39
|
-
if (tool.name === 'Trae') {
|
|
40
|
-
Ec.waiting(`🔍 检测到可用工具: ${toolDisplayName.green}`);
|
|
41
|
-
} else {
|
|
42
|
-
Ec.waiting(`🔍 检测到可用工具: ${toolDisplayName}`);
|
|
43
|
-
}
|
|
44
|
-
await _openWithTool(tool.command);
|
|
45
|
-
Ec.askClose();
|
|
46
|
-
process.exit(0);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// 显示交互式选择菜单
|
|
50
|
-
Ec.waiting('🔍 检测到多个可用的AI工具,请选择要使用的工具:');
|
|
51
|
-
const choices = availableTools.map((tool, index) => {
|
|
52
|
-
let toolDisplayName = tool.name;
|
|
53
|
-
if (tool.name === 'Trae' || tool.name === 'Cursor') {
|
|
54
|
-
toolDisplayName = `${tool.name}(${'Multi-Agent'.cyan})`;
|
|
55
|
-
}
|
|
56
|
-
if (tool.name === 'Trae') {
|
|
57
|
-
return `${index + 1}. ${toolDisplayName} ${'推荐'.green}`;
|
|
58
|
-
} else {
|
|
59
|
-
return `${index + 1}. ${toolDisplayName}`;
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
// 添加退出选项
|
|
64
|
-
choices.push(`${choices.length + 1}. 退出`);
|
|
65
|
-
|
|
66
|
-
for (const choice of choices) {
|
|
67
|
-
Ec.waiting(choice);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// 获取用户选择
|
|
71
|
-
const answer = await Ec.ask('请输入选项编号: ');
|
|
72
|
-
const selectedIndex = parseInt(answer) - 1;
|
|
4
|
+
const { spawn } = require('child_process');
|
|
5
|
+
const { selectSingle } = require('../utils/momo-menu');
|
|
6
|
+
|
|
7
|
+
// AI 工具配置
|
|
8
|
+
const AI_TOOLS = [
|
|
9
|
+
{
|
|
10
|
+
name: 'Antigravity',
|
|
11
|
+
command: 'antigravity',
|
|
12
|
+
description: 'Claude Code 官方客户端',
|
|
13
|
+
openMethod: 'spawn' // 使用 spawn 直接执行
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'Trae',
|
|
17
|
+
command: 'trae',
|
|
18
|
+
description: '字节跳动 AI IDE',
|
|
19
|
+
openMethod: 'spawn'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'Cursor',
|
|
23
|
+
command: 'cursor',
|
|
24
|
+
description: 'Cursor AI IDE',
|
|
25
|
+
openMethod: 'spawn'
|
|
26
|
+
}
|
|
27
|
+
];
|
|
73
28
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
29
|
+
/**
|
|
30
|
+
* 解析 -d 参数
|
|
31
|
+
* @returns {string|null} 目录路径
|
|
32
|
+
*/
|
|
33
|
+
const _parseDirArg = () => {
|
|
34
|
+
const args = process.argv.slice(3);
|
|
35
|
+
|
|
36
|
+
for (let i = 0; i < args.length; i++) {
|
|
37
|
+
if (args[i] === '-d' || args[i] === '--dir') {
|
|
38
|
+
const next = args[i + 1];
|
|
39
|
+
if (next && !next.startsWith('-')) {
|
|
40
|
+
return next;
|
|
80
41
|
}
|
|
81
|
-
Ec.error('❌ 无效的选择');
|
|
82
|
-
Ec.askClose();
|
|
83
|
-
process.exit(1);
|
|
84
42
|
}
|
|
85
|
-
|
|
86
|
-
// 执行选择的工具
|
|
87
|
-
const selectedTool = availableTools[selectedIndex];
|
|
88
|
-
let toolDisplayName = selectedTool.name;
|
|
89
|
-
if (selectedTool.name === 'Trae' || selectedTool.name === 'Cursor') {
|
|
90
|
-
toolDisplayName = `${selectedTool.name}(${'Multi-Agent'.cyan})`;
|
|
91
|
-
}
|
|
92
|
-
Ec.waiting(`🚀 正在使用 ${toolDisplayName} 打开项目...`);
|
|
93
|
-
await _openWithTool(selectedTool.command);
|
|
94
|
-
Ec.askClose();
|
|
95
|
-
process.exit(0);
|
|
96
|
-
|
|
97
|
-
} catch (error) {
|
|
98
|
-
console.error(error);
|
|
99
|
-
Ec.error(`❌ 执行过程中发生错误: ${error.message}`);
|
|
100
|
-
if (process.platform === 'win32') {
|
|
101
|
-
Ec.waiting('💡 Windows 用户提示: 请确保您在具有足够权限的命令行中运行此命令');
|
|
102
|
-
}
|
|
103
|
-
Ec.askClose();
|
|
104
|
-
process.exit(1);
|
|
105
43
|
}
|
|
44
|
+
|
|
45
|
+
return null;
|
|
106
46
|
};
|
|
107
47
|
|
|
108
48
|
/**
|
|
109
49
|
* 检查命令是否可用
|
|
110
50
|
* @param {string} command 命令名称
|
|
111
|
-
* @returns {Promise<boolean>}
|
|
51
|
+
* @returns {Promise<boolean>}
|
|
112
52
|
*/
|
|
113
53
|
const _isCommandAvailable = async (command) => {
|
|
114
54
|
return new Promise((resolve) => {
|
|
115
|
-
// 在 Windows 上使用 where 命令,在其他系统上使用 which 命令
|
|
116
55
|
const whereCmd = process.platform === 'win32' ? 'where' : 'which';
|
|
117
|
-
const childProcess = spawn(whereCmd, [command]);
|
|
56
|
+
const childProcess = spawn(whereCmd, [command], { stdio: 'pipe' });
|
|
118
57
|
childProcess.on('close', (code) => {
|
|
119
58
|
resolve(code === 0);
|
|
120
59
|
});
|
|
60
|
+
childProcess.on('error', () => {
|
|
61
|
+
resolve(false);
|
|
62
|
+
});
|
|
121
63
|
});
|
|
122
64
|
};
|
|
123
65
|
|
|
124
66
|
/**
|
|
125
|
-
*
|
|
126
|
-
* @param {string}
|
|
67
|
+
* 使用 spawn 方式打开目录
|
|
68
|
+
* @param {string} command 命令
|
|
69
|
+
* @param {string} targetDir 目标目录
|
|
127
70
|
*/
|
|
128
|
-
const
|
|
71
|
+
const _openWithSpawn = async (command, targetDir) => {
|
|
129
72
|
return new Promise((resolve, reject) => {
|
|
130
|
-
|
|
131
|
-
const child = spawn(tool, ['.'], {
|
|
73
|
+
const child = spawn(command, [targetDir], {
|
|
132
74
|
stdio: 'inherit',
|
|
133
|
-
|
|
75
|
+
detached: true
|
|
134
76
|
});
|
|
135
77
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
});
|
|
78
|
+
// 分离子进程,让它独立运行
|
|
79
|
+
child.unref();
|
|
80
|
+
|
|
81
|
+
// 给一点时间让进程启动
|
|
82
|
+
setTimeout(() => {
|
|
83
|
+
resolve();
|
|
84
|
+
}, 500);
|
|
145
85
|
|
|
146
86
|
child.on('error', (error) => {
|
|
147
87
|
if (error.code === 'ENOENT') {
|
|
148
|
-
|
|
149
|
-
if (process.platform === 'win32') {
|
|
150
|
-
Ec.waiting('💡 Windows 用户提示: 请确保工具已正确安装并在 PATH 环境变量中');
|
|
151
|
-
}
|
|
152
|
-
reject(new Error(`未找到命令: ${tool},请确保已正确安装`));
|
|
88
|
+
reject(new Error(`未找到命令: ${command}`));
|
|
153
89
|
} else {
|
|
154
|
-
Ec.error(`❌ 执行 ${tool} 时发生错误: ${error.message}`);
|
|
155
90
|
reject(error);
|
|
156
91
|
}
|
|
157
92
|
});
|
|
158
93
|
});
|
|
159
|
-
};
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* 打开目录
|
|
98
|
+
* @param {Object} tool 工具配置
|
|
99
|
+
* @param {string} targetDir 目标目录
|
|
100
|
+
*/
|
|
101
|
+
const _openDirectory = async (tool, targetDir) => {
|
|
102
|
+
Ec.waiting(`🚀 正在使用 ${tool.name.cyan} 打开目录...`);
|
|
103
|
+
|
|
104
|
+
switch (tool.openMethod) {
|
|
105
|
+
case 'spawn':
|
|
106
|
+
default:
|
|
107
|
+
await _openWithSpawn(tool.command, targetDir);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
Ec.info(`✅ 已启动 ${tool.name}`);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
module.exports = async (options) => {
|
|
115
|
+
try {
|
|
116
|
+
// 1. 解析目录参数
|
|
117
|
+
const dirArg = _parseDirArg();
|
|
118
|
+
let targetDir = dirArg ? path.resolve(dirArg) : process.cwd();
|
|
119
|
+
|
|
120
|
+
// 验证目录是否存在
|
|
121
|
+
if (!fs.existsSync(targetDir)) {
|
|
122
|
+
Ec.error(`❌ 目录不存在: ${targetDir}`);
|
|
123
|
+
process.exit(1);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (!fs.statSync(targetDir).isDirectory()) {
|
|
127
|
+
Ec.error(`❌ 路径不是目录: ${targetDir}`);
|
|
128
|
+
process.exit(1);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// 2. 检查可用工具
|
|
132
|
+
const availableTools = [];
|
|
133
|
+
|
|
134
|
+
for (const tool of AI_TOOLS) {
|
|
135
|
+
if (await _isCommandAvailable(tool.command)) {
|
|
136
|
+
availableTools.push(tool);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (availableTools.length === 0) {
|
|
141
|
+
Ec.error('❌ 未找到可用的 AI 工具');
|
|
142
|
+
console.log('');
|
|
143
|
+
console.log(' 支持的工具:'.gray);
|
|
144
|
+
AI_TOOLS.forEach(tool => {
|
|
145
|
+
console.log(` - ${tool.name}: ${tool.description}`.gray);
|
|
146
|
+
});
|
|
147
|
+
process.exit(1);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// 3. 显示目标目录
|
|
151
|
+
console.log('');
|
|
152
|
+
Ec.info(`📂 目标目录: ${targetDir.cyan}`);
|
|
153
|
+
console.log('');
|
|
154
|
+
|
|
155
|
+
// 4. 交互式选择工具
|
|
156
|
+
const menuItems = availableTools.map(tool => ({
|
|
157
|
+
name: tool.name,
|
|
158
|
+
description: tool.description,
|
|
159
|
+
_tool: tool
|
|
160
|
+
}));
|
|
161
|
+
|
|
162
|
+
const selected = await selectSingle(menuItems, '选择 AI 工具');
|
|
163
|
+
|
|
164
|
+
if (!selected) {
|
|
165
|
+
Ec.waiting('已取消');
|
|
166
|
+
process.exit(0);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// 5. 打开目录
|
|
170
|
+
await _openDirectory(selected._tool, targetDir);
|
|
171
|
+
|
|
172
|
+
process.exit(0);
|
|
173
|
+
|
|
174
|
+
} catch (error) {
|
|
175
|
+
Ec.error(`❌ 执行失败: ${error.message}`);
|
|
176
|
+
process.exit(1);
|
|
177
|
+
}
|
|
178
|
+
};
|
package/src/executor/index.js
CHANGED
|
@@ -1,50 +1,28 @@
|
|
|
1
1
|
const executeHelp = require('./executeHelp');
|
|
2
2
|
const executeInit = require('./executeInit');
|
|
3
|
-
const executeRepo = require('./executeRepo');
|
|
4
|
-
const executeAdd = require('./executeAdd');
|
|
5
|
-
const executePlan = require('./executePlan');
|
|
6
|
-
const executeArchive = require('./executeArchive');
|
|
7
3
|
const executeEnv = require('./executeEnv');
|
|
8
4
|
const executeOpen = require('./executeOpen');
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const executeProject = require('./executeProject');
|
|
18
|
-
const executeAgentCfg = require('./executeAgentCfg');
|
|
19
|
-
const executeAgent = require('./executeAgent');
|
|
20
|
-
const executeConsole = require('./executeConsole');
|
|
21
|
-
const executePull = require('./executePull');
|
|
22
|
-
const executeCommit = require('./executeCommit');
|
|
23
|
-
const executePush = require('./executePush');
|
|
5
|
+
const executeMcp = require('./executeMcp');
|
|
6
|
+
const executeApp = require('./executeApp');
|
|
7
|
+
const executeApply = require('./executeApply');
|
|
8
|
+
const executeDomain = require('./executeDomain');
|
|
9
|
+
const executeAsk = require('./executeAsk');
|
|
10
|
+
const executeMmr2 = require('./executeMmr2');
|
|
11
|
+
const executeMmr0 = require('./executeMmr0');
|
|
12
|
+
const executeDocs = require('./executeDocs');
|
|
24
13
|
|
|
25
14
|
const exported = {
|
|
26
15
|
executeHelp,
|
|
27
16
|
executeInit,
|
|
28
|
-
executeRepo,
|
|
29
|
-
executeAdd,
|
|
30
|
-
executePlan,
|
|
31
|
-
executeArchive,
|
|
32
17
|
executeEnv,
|
|
33
18
|
executeOpen,
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
executeProject,
|
|
43
|
-
executeAgentCfg,
|
|
44
|
-
executeAgent,
|
|
45
|
-
executeConsole,
|
|
46
|
-
executePull,
|
|
47
|
-
executeCommit,
|
|
48
|
-
executePush
|
|
19
|
+
executeMcp,
|
|
20
|
+
executeApp,
|
|
21
|
+
executeApply,
|
|
22
|
+
executeDomain,
|
|
23
|
+
executeAsk,
|
|
24
|
+
executeMmr2,
|
|
25
|
+
executeMmr0,
|
|
26
|
+
executeDocs
|
|
49
27
|
};
|
|
50
|
-
module.exports = exported;
|
|
28
|
+
module.exports = exported;
|
package/src/momo.js
CHANGED