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,210 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const Ec = require('../epic');
4
-
5
- /**
6
- * 获取模板中的标题结构
7
- * @param {string} templatePath 模板文件路径
8
- * @returns {Array} 标题结构数组
9
- */
10
- const _getTemplateStructure = (templatePath) => {
11
- if (!fs.existsSync(templatePath)) {
12
- throw new Error(`模板文件不存在: ${templatePath}`);
13
- }
14
-
15
- const content = fs.readFileSync(templatePath, 'utf8');
16
- const lines = content.split('\n');
17
- const headings = [];
18
-
19
- lines.forEach(line => {
20
- // 直接计算 # 符号数量确定层级
21
- const headingMatch = line.match(/^(#{1,6})\s+(.+)$/);
22
- if (headingMatch) {
23
- const level = headingMatch[1].length;
24
- const title = headingMatch[2].trim();
25
- // 移除标题中的占位符内容(如 [xxx])
26
- const cleanTitle = title.replace(/\[.*?\]/g, '').trim();
27
- if (cleanTitle) {
28
- headings.push({level, title: cleanTitle});
29
- }
30
- }
31
- });
32
-
33
- return headings;
34
- };
35
-
36
- /**
37
- * 获取需求文件中的标题结构
38
- * @param {string} filePath 需求文件路径
39
- * @returns {Array} 标题结构数组
40
- */
41
- const _getFileStructure = (filePath) => {
42
- if (!fs.existsSync(filePath)) {
43
- throw new Error(`需求文件不存在: ${filePath}`);
44
- }
45
-
46
- const content = fs.readFileSync(filePath, 'utf8');
47
- const lines = content.split('\n');
48
- const headings = [];
49
-
50
- lines.forEach(line => {
51
- // 直接计算 # 符号数量确定层级
52
- const headingMatch = line.match(/^(#{1,6})\s+(.+)$/);
53
- if (headingMatch) {
54
- const level = headingMatch[1].length;
55
- const title = headingMatch[2].trim();
56
- headings.push({level, title});
57
- }
58
- });
59
-
60
- return headings;
61
- };
62
-
63
- /**
64
- * 构建完整的树型结构
65
- * @param {Array} headings 标题数组
66
- * @returns {Array} 树型结构
67
- */
68
- const _buildTreeStructure = (headings) => {
69
- const structure = [];
70
- const stack = [];
71
-
72
- headings.forEach(heading => {
73
- const {level, title} = heading;
74
-
75
- // 调整栈以匹配当前层级
76
- while (stack.length >= level) {
77
- stack.pop();
78
- }
79
-
80
- const item = {level, title, children: []};
81
-
82
- if (stack.length > 0) {
83
- stack[stack.length - 1].children.push(item);
84
- } else {
85
- structure.push(item);
86
- }
87
-
88
- stack.push(item);
89
- });
90
-
91
- return structure;
92
- };
93
-
94
- /**
95
- * 打印树型结构
96
- * @param {Array} items 结构项数组
97
- * @param {number} indent 缩进级别
98
- */
99
- const _printTree = (items, indent = 0) => {
100
- items.forEach(item => {
101
- const prefix = ' '.repeat(indent);
102
- Ec.waiting(`${prefix}├─ ${item.title}`);
103
-
104
- if (item.children && item.children.length > 0) {
105
- _printTree(item.children, indent + 1);
106
- }
107
- });
108
- };
109
-
110
- /**
111
- * 打印带高亮的树型结构
112
- * @param {Array} items 结构项数组
113
- * @param {Set} missingTitles 缺失的标题集合
114
- * @param {number} indent 缩进级别
115
- */
116
- const _printTreeWithHighlight = (items, missingTitles, indent = 0) => {
117
- items.forEach(item => {
118
- const prefix = ' '.repeat(indent);
119
- if (missingTitles.has(item.title)) {
120
- // 缺失的章节用红色高亮并添加emoji标识
121
- Ec.error(`${prefix}├─ ❌ ${item.title}`);
122
- } else {
123
- // 正常章节用白色显示
124
- Ec.waiting(`${prefix}├─ ${item.title}`);
125
- }
126
-
127
- if (item.children && item.children.length > 0) {
128
- _printTreeWithHighlight(item.children, missingTitles, indent + 1);
129
- }
130
- });
131
- };
132
-
133
- /**
134
- * 查找缺失的章节
135
- * @param {Array} templateStructure 模板结构
136
- * @param {Array} fileStructure 文件结构
137
- * @returns {Array} 缺失的章节列表
138
- */
139
- const _findMissingSections = (templateStructure, fileStructure) => {
140
- const templateTitles = templateStructure.map(item => item.title);
141
- const fileTitles = fileStructure.map(item => item.title);
142
-
143
- // 找出在模板中存在但在文件中缺失的章节
144
- return templateStructure.filter(item =>
145
- !fileTitles.includes(item.title)
146
- );
147
- };
148
-
149
- module.exports = (options) => {
150
- // 参数提取
151
- const parsed = Ec.parseArgument(options);
152
- const requirementName = parsed.name || parsed.n;
153
-
154
- // 验证参数
155
- if (!requirementName) {
156
- Ec.error("❌ 请提供需求名称 (-n, --name)");
157
- process.exit(1);
158
- }
159
-
160
- try {
161
- // 构建路径
162
- const projectDir = process.cwd();
163
- const changesDir = path.join(projectDir, 'specification', 'changes');
164
- const requirementDir = path.join(changesDir, requirementName);
165
- const proposalFile = path.join(requirementDir, 'proposal.md');
166
- const templateFile = path.join(__dirname, '../_template/LAIN/changes/proposal.md');
167
-
168
- // 检查需求目录是否存在
169
- if (!fs.existsSync(requirementDir)) {
170
- Ec.error(`❌ 需求 "${requirementName}" 不存在`);
171
- process.exit(1);
172
- }
173
-
174
- // 检查 proposal.md 文件是否存在
175
- if (!fs.existsSync(proposalFile)) {
176
- Ec.error(`❌ 需求 "${requirementName}" 中未找到 proposal.md 文件`);
177
- process.exit(1);
178
- }
179
-
180
- // 获取模板和文件的结构
181
- const templateStructure = _getTemplateStructure(templateFile);
182
- const fileStructure = _getFileStructure(proposalFile);
183
-
184
- // 查找缺失的章节
185
- const missingSections = _findMissingSections(templateStructure, fileStructure);
186
-
187
- // 构建模板的树型结构
188
- const templateTree = _buildTreeStructure(templateStructure);
189
-
190
- if (missingSections.length === 0) {
191
- Ec.info(`✅ 需求 "${requirementName}" 格式验证通过`);
192
- process.exit(0);
193
- } else {
194
- Ec.waiting(`需求名称: ${requirementName}`);
195
- Ec.waiting('文档结构验证结果:');
196
-
197
- // 创建缺失标题的集合
198
- const missingTitles = new Set(missingSections.map(section => section.title));
199
-
200
- // 以模板结构为基准打印树型结构,并高亮缺失的章节
201
- _printTreeWithHighlight(templateTree, missingTitles);
202
-
203
- Ec.error(`\n❌ 需求 "${requirementName}" 格式验证失败,缺失 ${missingSections.length} 个章节`);
204
- process.exit(1);
205
- }
206
- } catch (error) {
207
- Ec.error(`❌ 执行过程中发生错误: ${error.message}`);
208
- process.exit(1);
209
- }
210
- };