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
package/src/commander/agent.json
DELETED
package/src/commander/lain.json
DELETED
package/src/commander/list.json
DELETED
package/src/commander/plan.json
DELETED
package/src/commander/pull.json
DELETED
package/src/commander/push.json
DELETED
package/src/commander/repo.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"executor": "executeRepo",
|
|
3
|
-
"description": "Clone 仓库中的代码到工作区!",
|
|
4
|
-
"command": "repo",
|
|
5
|
-
"options": [
|
|
6
|
-
{
|
|
7
|
-
"name": "address",
|
|
8
|
-
"alias": "a",
|
|
9
|
-
"description": "当前项目的远程 Git 仓库地址!"
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
"name": "instance",
|
|
13
|
-
"alias": "i",
|
|
14
|
-
"description": "需要 Clone 的远程仓库的实例副本数量!",
|
|
15
|
-
"default": 10
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|
package/src/commander/run.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"executor": "executeRun",
|
|
3
|
-
"description": "(CV)执行指定的任务!",
|
|
4
|
-
"command": "run",
|
|
5
|
-
"options": [
|
|
6
|
-
{
|
|
7
|
-
"name": "actor",
|
|
8
|
-
"alias": "a",
|
|
9
|
-
"description": "指定执行任务的 Actor 名称",
|
|
10
|
-
"default": "unknown"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "task",
|
|
14
|
-
"alias": "t",
|
|
15
|
-
"description": "任务名称"
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|
package/src/commander/show.json
DELETED
package/src/commander/tasks.json
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"executor": "executeTasks",
|
|
3
|
-
"description": "(CV)枚举所有任务信息!",
|
|
4
|
-
"command": "tasks",
|
|
5
|
-
"options": [
|
|
6
|
-
{
|
|
7
|
-
"name": "actor",
|
|
8
|
-
"alias": "a",
|
|
9
|
-
"description": "指定执行任务的 Actor 名称",
|
|
10
|
-
"default": "unknown"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "task",
|
|
14
|
-
"alias": "t",
|
|
15
|
-
"description": "任务名称"
|
|
16
|
-
}
|
|
17
|
-
]
|
|
18
|
-
}
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
const Ec = require('../epic');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 交互式选择LLM
|
|
7
|
-
*/
|
|
8
|
-
const _selectLLM = async (actorName) => {
|
|
9
|
-
Ec.waiting('🤖 请选择要使用的LLM:');
|
|
10
|
-
|
|
11
|
-
const llmOptions = [
|
|
12
|
-
{name: 'OpenSpec', value: 'openspec'},
|
|
13
|
-
{name: 'SpecKit', value: 'spec-kit'},
|
|
14
|
-
{name: 'Kiro', value: 'kiro'},
|
|
15
|
-
{name: 'Trea', value: 'trea'},
|
|
16
|
-
{name: 'Cursor', value: 'cursor'},
|
|
17
|
-
{name: 'Lingma', value: 'lingma'},
|
|
18
|
-
{name: 'Qoder', value: 'qoder'},
|
|
19
|
-
{name: 'WindSurf', value: 'windsurf'},
|
|
20
|
-
{name: 'GitHub Copilot', value: 'github'},
|
|
21
|
-
{name: 'Claude Code', value: 'claude-code'},
|
|
22
|
-
{name: 'ChatGPT', value: 'chatgpt'}
|
|
23
|
-
];
|
|
24
|
-
|
|
25
|
-
// 显示选项
|
|
26
|
-
llmOptions.forEach((option, index) => {
|
|
27
|
-
Ec.waiting(`${index + 1}. ${option.name}`);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// 获取用户选择
|
|
31
|
-
const answer = await Ec.ask('请输入选项编号: ');
|
|
32
|
-
const selectedIndex = parseInt(answer) - 1;
|
|
33
|
-
|
|
34
|
-
// 验证选择
|
|
35
|
-
if (isNaN(selectedIndex) || selectedIndex < 0 || selectedIndex >= llmOptions.length) {
|
|
36
|
-
Ec.error('❌ 无效的选择');
|
|
37
|
-
return _selectLLM(actorName); // 重新选择
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const selectedLLM = llmOptions[selectedIndex];
|
|
41
|
-
|
|
42
|
-
// 获取 token 配置信息
|
|
43
|
-
const token = await Ec.ask(`请输入 ${selectedLLM.name} 的 Token (可选): `);
|
|
44
|
-
|
|
45
|
-
return {
|
|
46
|
-
llm: selectedLLM.value,
|
|
47
|
-
name: actorName,
|
|
48
|
-
token: token || ''
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
module.exports = async (options) => {
|
|
53
|
-
// 参数提取
|
|
54
|
-
const parsed = Ec.parseArgument(options);
|
|
55
|
-
const actorName = parsed.actor || parsed.a;
|
|
56
|
-
|
|
57
|
-
if (!actorName) {
|
|
58
|
-
Ec.error("❌ 请提供角色名称 (-a, --actor)");
|
|
59
|
-
process.exit(1);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// 在 Windows 上检查非法字符
|
|
63
|
-
if (process.platform === 'win32') {
|
|
64
|
-
const illegalChars = /[<>:"/\\|?*\x00-\x1F]/g;
|
|
65
|
-
if (illegalChars.test(actorName)) {
|
|
66
|
-
Ec.error(`❌ 角色名称 "${actorName}" 包含非法字符,请避免使用以下字符: < > : " / \\ | ? * 以及控制字符`);
|
|
67
|
-
process.exit(1);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
try {
|
|
72
|
-
// 检查 specification/actor 目录是否存在
|
|
73
|
-
const actorBaseDir = path.resolve(process.cwd(), 'specification', 'actor');
|
|
74
|
-
if (!fs.existsSync(actorBaseDir)) {
|
|
75
|
-
Ec.error("❌ 未找到 specification/actor 目录,请先初始化项目");
|
|
76
|
-
process.exit(1);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// 检查角色是否已存在
|
|
80
|
-
const actorDir = path.resolve(actorBaseDir, actorName);
|
|
81
|
-
if (fs.existsSync(actorDir)) {
|
|
82
|
-
Ec.error(`❌ 角色 "${actorName}" 已存在`);
|
|
83
|
-
process.exit(1);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// 创建角色目录
|
|
87
|
-
if (!fs.existsSync(actorDir)) {
|
|
88
|
-
fs.mkdirSync(actorDir, { recursive: true });
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// 从模板复制内容到stack.md和limit.md
|
|
92
|
-
const templatePath = path.resolve(__dirname, '../_template/LAIN/.momo/advanced/actor.md');
|
|
93
|
-
if (fs.existsSync(templatePath)) {
|
|
94
|
-
const templateContent = fs.readFileSync(templatePath, 'utf8');
|
|
95
|
-
|
|
96
|
-
// 提取技术栈和限制信息
|
|
97
|
-
const stackMatch = templateContent.match(/## 技术栈([\s\S]*?)## 限制/);
|
|
98
|
-
const limitMatch = templateContent.match(/## 限制([\s\S]*)/);
|
|
99
|
-
|
|
100
|
-
if (stackMatch && limitMatch) {
|
|
101
|
-
const stackContent = `# 技术栈信息\n\n${stackMatch[1].trim()}\n`;
|
|
102
|
-
const stackPath = path.resolve(actorDir, 'stack.md');
|
|
103
|
-
fs.writeFileSync(stackPath, stackContent);
|
|
104
|
-
Ec.waiting(`📄 创建技术栈文件: ${stackPath}`);
|
|
105
|
-
|
|
106
|
-
const limitContent = `# 角色限制\n\n${limitMatch[1].trim()}\n`;
|
|
107
|
-
const limitPath = path.resolve(actorDir, 'limit.md');
|
|
108
|
-
fs.writeFileSync(limitPath, limitContent);
|
|
109
|
-
Ec.waiting(`📄 创建限制文件: ${limitPath}`);
|
|
110
|
-
|
|
111
|
-
// 创建config.json文件
|
|
112
|
-
const configPath = path.resolve(actorDir, 'config.json');
|
|
113
|
-
fs.writeFileSync(configPath, JSON.stringify(llmConfig, null, 4));
|
|
114
|
-
Ec.waiting(`📄 创建配置文件: ${configPath}`);
|
|
115
|
-
|
|
116
|
-
Ec.info(`✅ 成功添加新角色 "${actorName}"`);
|
|
117
|
-
process.exit(0);
|
|
118
|
-
} else {
|
|
119
|
-
Ec.error("❌ 模板文件格式不正确");
|
|
120
|
-
process.exit(1);
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
Ec.error(`❌ 未找到模板文件: ${templatePath}`);
|
|
124
|
-
process.exit(1);
|
|
125
|
-
}
|
|
126
|
-
} catch (error) {
|
|
127
|
-
Ec.error(`❌ 执行过程中发生错误: ${error.message}`);
|
|
128
|
-
if (process.platform === 'win32') {
|
|
129
|
-
Ec.waiting('💡 Windows 用户提示: 请确保您在具有足够权限的命令行中运行此命令');
|
|
130
|
-
}
|
|
131
|
-
process.exit(1);
|
|
132
|
-
}
|
|
133
|
-
};
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
const Ec = require('../epic');
|
|
2
|
-
const fs = require('fs');
|
|
3
|
-
const path = require('path');
|
|
4
|
-
|
|
5
|
-
module.exports = (options) => {
|
|
6
|
-
// 参数提取
|
|
7
|
-
const parsed = Ec.parseArgument(options);
|
|
8
|
-
|
|
9
|
-
try {
|
|
10
|
-
// 获取 actor 目录路径
|
|
11
|
-
const actorsDir = path.resolve(process.cwd(), 'specification', 'actor');
|
|
12
|
-
|
|
13
|
-
// 检查目录是否存在
|
|
14
|
-
if (!fs.existsSync(actorsDir)) {
|
|
15
|
-
Ec.error("❌ 未找到 actor 目录,请先初始化项目或创建角色");
|
|
16
|
-
Ec.askClose();
|
|
17
|
-
process.exit(1);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
// 读取所有 actor 目录
|
|
21
|
-
const actors = fs.readdirSync(actorsDir).filter(file =>
|
|
22
|
-
fs.statSync(path.join(actorsDir, file)).isDirectory()
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
if (actors.length === 0) {
|
|
26
|
-
Ec.waiting("🔍 未找到任何角色");
|
|
27
|
-
Ec.askClose();
|
|
28
|
-
process.exit(0);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// 遍历所有 actor 并读取配置
|
|
32
|
-
actors.forEach((actorName, index) => {
|
|
33
|
-
const configPath = path.resolve(actorsDir, actorName, 'config.json');
|
|
34
|
-
let llm = '-';
|
|
35
|
-
let token = '-';
|
|
36
|
-
|
|
37
|
-
if (fs.existsSync(configPath)) {
|
|
38
|
-
try {
|
|
39
|
-
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
40
|
-
llm = config.llm || '-';
|
|
41
|
-
token = config.token || '-';
|
|
42
|
-
} catch (e) {
|
|
43
|
-
// 解析配置文件出错,保持默认值
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
// 输出格式:序号. 名称 ( LLM = ??, Token = ?? )
|
|
48
|
-
Ec.waiting(`${index + 1}. ${actorName} ( LLM = ${llm}, Token = ${token} )`);
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
Ec.askClose();
|
|
52
|
-
process.exit(0);
|
|
53
|
-
} catch (error) {
|
|
54
|
-
Ec.error(`❌ 执行过程中发生错误: ${error.message}`);
|
|
55
|
-
Ec.askClose();
|
|
56
|
-
process.exit(1);
|
|
57
|
-
}
|
|
58
|
-
};
|