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.
Files changed (162) 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/SKILL.md +101 -0
  6. package/.cursor/mcp.json +17 -0
  7. package/.obsidian/app.json +1 -0
  8. package/.obsidian/appearance.json +4 -0
  9. package/.obsidian/community-plugins.json +4 -0
  10. package/.obsidian/core-plugins.json +33 -0
  11. package/.obsidian/plugins/ai-agent/main.js +98495 -0
  12. package/.obsidian/plugins/ai-agent/manifest.json +11 -0
  13. package/.obsidian/plugins/ai-agent/styles.css +806 -0
  14. package/.obsidian/plugins/dataview/main.js +20876 -0
  15. package/.obsidian/plugins/dataview/manifest.json +11 -0
  16. package/.obsidian/plugins/dataview/styles.css +141 -0
  17. package/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +10 -0
  18. package/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
  19. package/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
  20. package/.obsidian/plugins/templater-obsidian/main.js +45 -0
  21. package/.obsidian/plugins/templater-obsidian/manifest.json +11 -0
  22. package/.obsidian/plugins/templater-obsidian/styles.css +226 -0
  23. package/.obsidian/plugins/terminal/main.js +200 -0
  24. package/.obsidian/plugins/terminal/manifest.json +14 -0
  25. package/.obsidian/plugins/terminal/styles.css +32 -0
  26. package/.obsidian/themes/AnuPpuccin/manifest.json +7 -0
  27. package/.obsidian/themes/AnuPpuccin/theme.css +9080 -0
  28. package/.obsidian/themes/Things/manifest.json +7 -0
  29. package/.obsidian/themes/Things/theme.css +1628 -0
  30. package/.obsidian/workspace.json +196 -0
  31. package/.trae/skills/algorithmic-art/LICENSE.txt +202 -0
  32. package/.trae/skills/algorithmic-art/SKILL.md +405 -0
  33. package/.trae/skills/algorithmic-art/templates/generator_template.js +223 -0
  34. package/.trae/skills/algorithmic-art/templates/viewer.html +599 -0
  35. package/.trae/skills/doc-coauthoring/SKILL.md +375 -0
  36. package/.trae/skills/frontend-design/LICENSE.txt +177 -0
  37. package/.trae/skills/frontend-design/SKILL.md +42 -0
  38. package/.trae/skills/r2mo-rad-lain/SKILL.md +101 -0
  39. package/README.md +12 -148
  40. package/docs/images/logo.jpeg +0 -0
  41. package/docs/images/r2mo-lain.png +0 -0
  42. package/install.sh +1 -0
  43. package/package.json +15 -11
  44. package/skills/r2mo-rad-domain/SKILL.md +70 -0
  45. package/skills/r2mo-rad-lain/SKILL.md +101 -0
  46. package/src/_mcp/skills-server.mjs +70 -0
  47. package/src/_skill/repositories.json +22 -0
  48. package/src/_template/LAIN/.obsidian/app.json +1 -0
  49. package/src/_template/LAIN/.obsidian/appearance.json +10 -0
  50. package/src/_template/LAIN/.obsidian/community-plugins.json +7 -0
  51. package/src/_template/LAIN/.obsidian/core-plugins.json +33 -0
  52. package/src/_template/LAIN/.obsidian/plugins/dataview/main.js +20876 -0
  53. package/src/_template/LAIN/.obsidian/plugins/dataview/manifest.json +11 -0
  54. package/src/_template/LAIN/.obsidian/plugins/dataview/styles.css +141 -0
  55. package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/data.json +815 -0
  56. package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/main.js +10 -0
  57. package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/manifest.json +12 -0
  58. package/src/_template/LAIN/.obsidian/plugins/obsidian-excalidraw-plugin/styles.css +1 -0
  59. package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/main.js +153 -0
  60. package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/manifest.json +11 -0
  61. package/src/_template/LAIN/.obsidian/plugins/obsidian-kanban/styles.css +1 -0
  62. package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/main.js +7732 -0
  63. package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/manifest.json +10 -0
  64. package/src/_template/LAIN/.obsidian/plugins/obsidian-plantuml/styles.css +38 -0
  65. package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/main.js +504 -0
  66. package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/manifest.json +12 -0
  67. package/src/_template/LAIN/.obsidian/plugins/obsidian-tasks-plugin/styles.css +1 -0
  68. package/src/_template/LAIN/.obsidian/snippets/body-font.css +27 -0
  69. package/src/_template/LAIN/.obsidian/themes/Primary/manifest.json +9 -0
  70. package/src/_template/LAIN/.obsidian/themes/Primary/theme.css +3878 -0
  71. package/src/_template/LAIN/.obsidian/themes/Retro Windows/manifest.json +7 -0
  72. package/src/_template/LAIN/.obsidian/themes/Retro Windows/theme.css +582 -0
  73. package/src/_template/LAIN/.obsidian/themes/RetroOS 98/manifest.json +9 -0
  74. package/src/_template/LAIN/.obsidian/themes/RetroOS 98/theme.css +2566 -0
  75. package/src/_template/LAIN/.obsidian/types.json +28 -0
  76. package/src/_template/LAIN/.obsidian/workspace.json +184 -0
  77. package/src/_template/LAIN/AGENTS.md +170 -16
  78. package/src/_template/R2MO/domain-enhance.md +10 -0
  79. package/src/commander/app.json +13 -0
  80. package/src/commander/apply.json +13 -0
  81. package/src/commander/ask.json +6 -0
  82. package/src/commander/docs.json +13 -0
  83. package/src/commander/domain.json +19 -0
  84. package/src/commander/help.json +5 -0
  85. package/src/commander/init.json +1 -1
  86. package/src/commander/mcp.json +13 -0
  87. package/src/commander/mmr0.json +6 -0
  88. package/src/commander/mmr2.json +6 -0
  89. package/src/commander/open.json +8 -2
  90. package/src/executor/executeApp.js +133 -0
  91. package/src/executor/executeApply.js +611 -0
  92. package/src/executor/executeAsk.js +274 -0
  93. package/src/executor/executeDocs.js +498 -0
  94. package/src/executor/executeDomain.js +293 -0
  95. package/src/executor/executeEnv.js +48 -38
  96. package/src/executor/executeHelp.js +77 -16
  97. package/src/executor/executeInit.js +176 -346
  98. package/src/executor/executeMcp.js +363 -0
  99. package/src/executor/executeMmr0.js +488 -0
  100. package/src/executor/executeMmr2.js +880 -0
  101. package/src/executor/executeOpen.js +144 -125
  102. package/src/executor/index.js +17 -39
  103. package/src/momo.js +2 -1
  104. package/src/python/r2mo_proto.py +418 -0
  105. package/src/python/r2mo_proto_database.py +369 -0
  106. package/src/python/r2mo_proto_domain.py +458 -0
  107. package/src/utils/momo-args.js +39 -0
  108. package/src/utils/momo-file-utils.js +75 -0
  109. package/src/utils/momo-menu.js +84 -0
  110. package/src/_template/LAIN/.momo/advanced/actor.md +0 -42
  111. package/src/_template/LAIN/.momo/advanced/refer.json +0 -46
  112. package/src/_template/LAIN/.momo/scripts/submodule-clean.sh +0 -56
  113. package/src/_template/LAIN/changes/proposal.md +0 -39
  114. package/src/_template/LAIN/changes/tasks/task-detail.md +0 -45
  115. package/src/_template/LAIN/changes/tasks.md +0 -49
  116. package/src/_template/LAIN/execute/admin-n-f-dashboard.md +0 -53
  117. package/src/_template/LAIN/execute/admin-n-f-form.md +0 -51
  118. package/src/_template/LAIN/execute/admin-n-f-home.md +0 -49
  119. package/src/_template/LAIN/execute/admin-n-f-list.md +0 -52
  120. package/src/_template/LAIN/execute/admin-n-f-login.md +0 -56
  121. package/src/_template/LAIN/specification/project-model.md +0 -13
  122. package/src/_template/LAIN/specification/project.md +0 -73
  123. package/src/_template/LAIN/specification/requirement.md +0 -25
  124. package/src/commander/actor.json +0 -12
  125. package/src/commander/actors.json +0 -6
  126. package/src/commander/add.json +0 -12
  127. package/src/commander/agent.json +0 -12
  128. package/src/commander/agentcfg.json +0 -5
  129. package/src/commander/archive.json +0 -12
  130. package/src/commander/commit.json +0 -12
  131. package/src/commander/console.json +0 -7
  132. package/src/commander/lain.json +0 -7
  133. package/src/commander/list.json +0 -7
  134. package/src/commander/plan.json +0 -12
  135. package/src/commander/project.json +0 -12
  136. package/src/commander/pull.json +0 -6
  137. package/src/commander/push.json +0 -6
  138. package/src/commander/repo.json +0 -18
  139. package/src/commander/run.json +0 -18
  140. package/src/commander/show.json +0 -12
  141. package/src/commander/tasks.json +0 -18
  142. package/src/commander/unlock.json +0 -6
  143. package/src/commander/validate.json +0 -12
  144. package/src/executor/executeActor.js +0 -133
  145. package/src/executor/executeActors.js +0 -58
  146. package/src/executor/executeAdd.js +0 -307
  147. package/src/executor/executeAgent.js +0 -299
  148. package/src/executor/executeAgentCfg.js +0 -210
  149. package/src/executor/executeArchive.js +0 -124
  150. package/src/executor/executeCommit.js +0 -202
  151. package/src/executor/executeConsole.js +0 -142
  152. package/src/executor/executeList.js +0 -133
  153. package/src/executor/executePlan.js +0 -164
  154. package/src/executor/executeProject.js +0 -313
  155. package/src/executor/executePull.js +0 -127
  156. package/src/executor/executePush.js +0 -243
  157. package/src/executor/executeRepo.js +0 -238
  158. package/src/executor/executeRun.js +0 -644
  159. package/src/executor/executeShow.js +0 -164
  160. package/src/executor/executeTasks.js +0 -384
  161. package/src/executor/executeUnlock.js +0 -110
  162. package/src/executor/executeValidate.js +0 -210
@@ -1,12 +0,0 @@
1
- {
2
- "executor": "executeAgent",
3
- "description": "加载并复制指定 Agent 的提示词到剪切板",
4
- "command": "agent",
5
- "options": [
6
- {
7
- "name": "agent",
8
- "alias": "a",
9
- "description": "智能体名称(Arg Name)"
10
- }
11
- ]
12
- }
@@ -1,5 +0,0 @@
1
- {
2
- "executor": "executeAgentCfg",
3
- "description": "配置和打开系统内置 agents",
4
- "command": "agentcfg"
5
- }
@@ -1,12 +0,0 @@
1
- {
2
- "executor": "executeArchive",
3
- "description": "将某个需求归档操作,会删除原始需求信息!",
4
- "command": "archive",
5
- "options": [
6
- {
7
- "name": "name",
8
- "alias": "n",
9
- "description": "需求名称,不可以是 .md 的文档,而且需求必须存在!"
10
- }
11
- ]
12
- }
@@ -1,12 +0,0 @@
1
- {
2
- "executor": "executeCommit",
3
- "description": "提交所有副本的更改到本地仓库!",
4
- "command": "commit",
5
- "options": [
6
- {
7
- "name": "message",
8
- "alias": "m",
9
- "description": "提交信息"
10
- }
11
- ]
12
- }
@@ -1,7 +0,0 @@
1
- {
2
- "executor": "executeConsole",
3
- "description": "启动交互式控制台",
4
- "command": "console",
5
- "options": [
6
- ]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "executor": "executeConsole",
3
- "description": "启动交互式控制台",
4
- "command": "lain",
5
- "options": [
6
- ]
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "executor": "executeList",
3
- "description": "列举所有需求列表!",
4
- "command": "list",
5
- "options": [
6
- ]
7
- }
@@ -1,12 +0,0 @@
1
- {
2
- "executor": "executePlan",
3
- "description": "(CV)生成新的需求计划,重写需求信息!",
4
- "command": "plan",
5
- "options": [
6
- {
7
- "name": "name",
8
- "alias": "n",
9
- "description": "需求名称,不可以是 .md 的文档,而且需求必须存在!"
10
- }
11
- ]
12
- }
@@ -1,12 +0,0 @@
1
- {
2
- "executor": "executeProject",
3
- "description": "引用外部项目到 reference 目录中",
4
- "command": "project",
5
- "options": [
6
- {
7
- "name": "source",
8
- "alias": "s",
9
- "description": "项目路径,必须提供"
10
- }
11
- ]
12
- }
@@ -1,6 +0,0 @@
1
- {
2
- "executor": "executePull",
3
- "description": "从远程仓库拉取所有副本的最新代码!",
4
- "command": "pull",
5
- "options": []
6
- }
@@ -1,6 +0,0 @@
1
- {
2
- "executor": "executePush",
3
- "description": "推送所有副本的更改到远程仓库!",
4
- "command": "push",
5
- "options": []
6
- }
@@ -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
- }
@@ -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
- }
@@ -1,12 +0,0 @@
1
- {
2
- "executor": "executeShow",
3
- "description": "显示指定需求的详细内容!",
4
- "command": "show",
5
- "options": [
6
- {
7
- "name": "name",
8
- "alias": "n",
9
- "description": "需求名称!"
10
- }
11
- ]
12
- }
@@ -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,6 +0,0 @@
1
- {
2
- "executor": "executeUnlock",
3
- "description": "解锁所有被占用的任务和工作空间!",
4
- "command": "unlock",
5
- "options": []
6
- }
@@ -1,12 +0,0 @@
1
- {
2
- "executor": "executeValidate",
3
- "description": "验证指定需求格式是否合法!",
4
- "command": "validate",
5
- "options": [
6
- {
7
- "name": "name",
8
- "alias": "n",
9
- "description": "需求名称!"
10
- }
11
- ]
12
- }
@@ -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
- };