engine7 7.0.1 → 7.0.3

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 (182) hide show
  1. package/dist/cli.mjs +66 -3
  2. package/package.json +1 -1
  3. package/templates/skills/aim/SKILL.md +143 -0
  4. package/templates/skills/docx/LICENSE.txt +30 -0
  5. package/templates/skills/docx/SKILL.md +590 -0
  6. package/templates/skills/docx/scripts/__init__.py +1 -0
  7. package/templates/skills/docx/scripts/accept_changes.py +135 -0
  8. package/templates/skills/docx/scripts/comment.py +318 -0
  9. package/templates/skills/docx/scripts/office/helpers/__init__.py +0 -0
  10. package/templates/skills/docx/scripts/office/helpers/merge_runs.py +199 -0
  11. package/templates/skills/docx/scripts/office/helpers/simplify_redlines.py +197 -0
  12. package/templates/skills/docx/scripts/office/pack.py +159 -0
  13. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  14. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  15. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  16. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  17. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  18. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  19. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  20. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  21. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  22. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  23. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  24. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  25. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  26. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  27. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  28. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  29. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  30. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  31. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  32. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  33. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  34. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  35. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  36. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  37. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  38. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  39. package/templates/skills/docx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  40. package/templates/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  41. package/templates/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  42. package/templates/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  43. package/templates/skills/docx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  44. package/templates/skills/docx/scripts/office/schemas/mce/mc.xsd +75 -0
  45. package/templates/skills/docx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  46. package/templates/skills/docx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  47. package/templates/skills/docx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  48. package/templates/skills/docx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  49. package/templates/skills/docx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  50. package/templates/skills/docx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  51. package/templates/skills/docx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  52. package/templates/skills/docx/scripts/office/soffice.py +183 -0
  53. package/templates/skills/docx/scripts/office/unpack.py +132 -0
  54. package/templates/skills/docx/scripts/office/validate.py +111 -0
  55. package/templates/skills/docx/scripts/office/validators/__init__.py +15 -0
  56. package/templates/skills/docx/scripts/office/validators/base.py +847 -0
  57. package/templates/skills/docx/scripts/office/validators/docx.py +446 -0
  58. package/templates/skills/docx/scripts/office/validators/pptx.py +275 -0
  59. package/templates/skills/docx/scripts/office/validators/redlining.py +247 -0
  60. package/templates/skills/docx/scripts/templates/comments.xml +3 -0
  61. package/templates/skills/docx/scripts/templates/commentsExtended.xml +3 -0
  62. package/templates/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
  63. package/templates/skills/docx/scripts/templates/commentsIds.xml +3 -0
  64. package/templates/skills/docx/scripts/templates/people.xml +3 -0
  65. package/templates/skills/pdf/LICENSE.txt +30 -0
  66. package/templates/skills/pdf/SKILL.md +314 -0
  67. package/templates/skills/pdf/forms.md +294 -0
  68. package/templates/skills/pdf/reference.md +612 -0
  69. package/templates/skills/pptx/LICENSE.txt +30 -0
  70. package/templates/skills/pptx/SKILL.md +232 -0
  71. package/templates/skills/pptx/editing.md +205 -0
  72. package/templates/skills/pptx/pptxgenjs.md +420 -0
  73. package/templates/skills/pptx/scripts/__init__.py +0 -0
  74. package/templates/skills/pptx/scripts/add_slide.py +195 -0
  75. package/templates/skills/pptx/scripts/clean.py +286 -0
  76. package/templates/skills/pptx/scripts/office/helpers/__init__.py +0 -0
  77. package/templates/skills/pptx/scripts/office/helpers/merge_runs.py +199 -0
  78. package/templates/skills/pptx/scripts/office/helpers/simplify_redlines.py +197 -0
  79. package/templates/skills/pptx/scripts/office/pack.py +159 -0
  80. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  81. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  82. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  83. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  84. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  85. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  86. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  87. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  88. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  89. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  90. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  91. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  92. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  93. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  94. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  95. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  96. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  97. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  98. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  99. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  100. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  101. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  102. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  103. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  104. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  105. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  106. package/templates/skills/pptx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  107. package/templates/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  108. package/templates/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  109. package/templates/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  110. package/templates/skills/pptx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  111. package/templates/skills/pptx/scripts/office/schemas/mce/mc.xsd +75 -0
  112. package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  113. package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  114. package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  115. package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  116. package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  117. package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  118. package/templates/skills/pptx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  119. package/templates/skills/pptx/scripts/office/soffice.py +183 -0
  120. package/templates/skills/pptx/scripts/office/unpack.py +132 -0
  121. package/templates/skills/pptx/scripts/office/validate.py +111 -0
  122. package/templates/skills/pptx/scripts/office/validators/__init__.py +15 -0
  123. package/templates/skills/pptx/scripts/office/validators/base.py +847 -0
  124. package/templates/skills/pptx/scripts/office/validators/docx.py +446 -0
  125. package/templates/skills/pptx/scripts/office/validators/pptx.py +275 -0
  126. package/templates/skills/pptx/scripts/office/validators/redlining.py +247 -0
  127. package/templates/skills/pptx/scripts/thumbnail.py +289 -0
  128. package/templates/skills/sop/SKILL.md +243 -0
  129. package/templates/skills/xlsx/LICENSE.txt +30 -0
  130. package/templates/skills/xlsx/SKILL.md +292 -0
  131. package/templates/skills/xlsx/scripts/office/helpers/__init__.py +0 -0
  132. package/templates/skills/xlsx/scripts/office/helpers/merge_runs.py +199 -0
  133. package/templates/skills/xlsx/scripts/office/helpers/simplify_redlines.py +197 -0
  134. package/templates/skills/xlsx/scripts/office/pack.py +159 -0
  135. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
  136. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
  137. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
  138. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
  139. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
  140. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
  141. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
  142. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
  143. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
  144. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
  145. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
  146. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
  147. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
  148. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
  149. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
  150. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
  151. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
  152. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
  153. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
  154. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
  155. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
  156. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
  157. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
  158. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
  159. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
  160. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
  161. package/templates/skills/xlsx/scripts/office/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
  162. package/templates/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
  163. package/templates/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
  164. package/templates/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
  165. package/templates/skills/xlsx/scripts/office/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
  166. package/templates/skills/xlsx/scripts/office/schemas/mce/mc.xsd +75 -0
  167. package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-2010.xsd +560 -0
  168. package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-2012.xsd +67 -0
  169. package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-2018.xsd +14 -0
  170. package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-cex-2018.xsd +20 -0
  171. package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-cid-2016.xsd +13 -0
  172. package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
  173. package/templates/skills/xlsx/scripts/office/schemas/microsoft/wml-symex-2015.xsd +8 -0
  174. package/templates/skills/xlsx/scripts/office/soffice.py +183 -0
  175. package/templates/skills/xlsx/scripts/office/unpack.py +132 -0
  176. package/templates/skills/xlsx/scripts/office/validate.py +111 -0
  177. package/templates/skills/xlsx/scripts/office/validators/__init__.py +15 -0
  178. package/templates/skills/xlsx/scripts/office/validators/base.py +847 -0
  179. package/templates/skills/xlsx/scripts/office/validators/docx.py +446 -0
  180. package/templates/skills/xlsx/scripts/office/validators/pptx.py +275 -0
  181. package/templates/skills/xlsx/scripts/office/validators/redlining.py +247 -0
  182. package/templates/skills/xlsx/scripts/recalc.py +184 -0
package/dist/cli.mjs CHANGED
@@ -123,7 +123,26 @@ async function interactiveConfig(rl, defaults) {
123
123
  };
124
124
  const models = modelMap[v.primaryProvider] || ["dashscope/qwen3.7-max"];
125
125
  v.primaryModel = await askChoice(rl, "\u4E3B\u6A21\u578B:", models, 0);
126
- v.visionModel = v.primaryModel;
126
+ const visionCapableMap = {
127
+ "dashscope/qwen3.7-max": true,
128
+ "dashscope/qwen3.7-plus": true,
129
+ "minimax/MiniMax-M3": true,
130
+ "zhipu/glm-5v-turbo": true,
131
+ "zhipu/glm-5.1": false,
132
+ "deepseek/deepseek-v4-pro": false,
133
+ "deepseek/deepseek-v4-flash": false
134
+ };
135
+ const primarySupportsVision = visionCapableMap[v.primaryModel] ?? true;
136
+ if (primarySupportsVision) {
137
+ v.visionModel = v.primaryModel;
138
+ } else {
139
+ console.log(`
140
+ \u26A0\uFE0F \u4E3B\u6A21\u578B ${v.primaryModel} \u4E0D\u652F\u6301\u56FE\u7247`);
141
+ v.visionModel = await ask(rl, "Vision \u6A21\u578B\uFF08\u7528\u4E8E\u56FE\u7247\u8BC6\u522B\uFF0C\u5982 dashscope/qwen3.7-max\uFF09", "dashscope/qwen3.7-max");
142
+ if (!v.visionModel.startsWith(v.primaryProvider)) {
143
+ console.log(` \u6CE8\u610F\uFF1AVision \u6A21\u578B\u7528\u4E86\u4E0D\u540C provider\uFF0C\u9700\u8981\u5728 config \u91CC\u8865\u5145\u5BF9\u5E94\u7684 API key`);
144
+ }
145
+ }
127
146
  console.log("\n=== \u7B2C\u4E8C\u6B65\uFF1A\u53EF\u9009\u914D\u7F6E\uFF08\u56DE\u8F66\u8DF3\u8FC7\uFF09===\n");
128
147
  const discordAns = await ask(rl, "\u542F\u7528 Discord? (y/n)", "n");
129
148
  v.discordEnabled = discordAns.toLowerCase() === "y";
@@ -208,8 +227,8 @@ function generateConfig(v) {
208
227
  api: { port: v.apiPort },
209
228
  prompt: {
210
229
  mode: "custom",
211
- staticFiles: ["AGENTS.md", "USER.md", "MEMORY.md"],
212
- order: ["soul", "AGENTS.md", "using-tools", "USER.md", "MEMORY.md", "auto-memory-instructions"]
230
+ staticFiles: ["AGENTS.md", "USER.md", "MEMORY.md", "memory/distill-output.md"],
231
+ order: ["soul", "AGENTS.md", "prompts/contacts.md", "using-tools", "USER.md", "MEMORY.md", "memory/distill-output.md", "auto-memory-instructions"]
213
232
  },
214
233
  compaction: {
215
234
  enabled: true,
@@ -218,6 +237,10 @@ function generateConfig(v) {
218
237
  minReductionRatio: 0.3,
219
238
  ruleBased: { enabled: true, essentialFields: [] },
220
239
  memoryFlush: { enabled: true, forceFlushTranscriptBytes: "2.0mb" }
240
+ },
241
+ skills: {
242
+ enabled: true,
243
+ path: "skills"
221
244
  }
222
245
  };
223
246
  const providerDefs = {
@@ -519,9 +542,26 @@ engine7 start \u2014 \u542F\u52A8 Engine
519
542
  });
520
543
  if (opts.dryRun) {
521
544
  dryRun(tree);
545
+ const skillsSrc = findTemplateDir("skills");
546
+ if (skillsSrc) {
547
+ const skills = fs.readdirSync(skillsSrc);
548
+ for (const s of skills) {
549
+ console.log(` \u{1F4C1} ${path.join(opts.stateDir, "workspace", "skills", s)}`);
550
+ }
551
+ }
522
552
  } else {
523
553
  console.log("\n\u{1F4E6} \u6B63\u5728\u521B\u5EFA\u76EE\u5F55\u548C\u6587\u4EF6...\n");
524
554
  execute(tree);
555
+ const skillsSrc = findTemplateDir("skills");
556
+ if (skillsSrc) {
557
+ const skillsDest = path.join(opts.stateDir, "workspace", "skills");
558
+ fs.mkdirSync(skillsDest, { recursive: true });
559
+ const skills = fs.readdirSync(skillsSrc);
560
+ for (const s of skills) {
561
+ copyDirRecursive(path.join(skillsSrc, s), path.join(skillsDest, s));
562
+ console.log(` \u{1F4E6} skill: ${s}`);
563
+ }
564
+ }
525
565
  console.log(`
526
566
  \u2705 \u521D\u59CB\u5316\u5B8C\u6210\uFF01
527
567
  `);
@@ -531,6 +571,29 @@ engine7 start \u2014 \u542F\u52A8 Engine
531
571
  console.log(` 3. \u67E5\u770B workspace: ${path.join(opts.stateDir, "workspace")}`);
532
572
  }
533
573
  }
574
+ function copyDirRecursive(src, dest) {
575
+ fs.mkdirSync(dest, { recursive: true });
576
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
577
+ const srcPath = path.join(src, entry.name);
578
+ const destPath = path.join(dest, entry.name);
579
+ if (entry.isDirectory()) {
580
+ copyDirRecursive(srcPath, destPath);
581
+ } else {
582
+ fs.copyFileSync(srcPath, destPath);
583
+ }
584
+ }
585
+ }
586
+ function findTemplateDir(name) {
587
+ const candidates = [
588
+ path.join(__dirname, "..", "templates", name),
589
+ path.join(__dirname, "..", "..", "templates", name),
590
+ path.join(process.cwd(), "templates", name)
591
+ ];
592
+ for (const p of candidates) {
593
+ if (fs.existsSync(p)) return p;
594
+ }
595
+ return null;
596
+ }
534
597
  main().catch((err) => {
535
598
  console.error(`
536
599
  \u274C \u5931\u8D25: ${err.message}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "engine7",
3
- "version": "7.0.1",
3
+ "version": "7.0.3",
4
4
  "type": "module",
5
5
  "description": "Engine 7 — Self-hosted AI agent engine",
6
6
  "main": "dist/main.mjs",
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: aim
3
+ description: 团队协作目标追踪机制。派活→起cron盯→自检→达成→归档→block防循环。用法:/aim create、/aim status、/aim complete、/aim archive
4
+ allowed-tools: Bash(cron_create:*) Bash(cron_list:*) Bash(cron_delete:*) Bash(reply_blocklist:*) read write edit glob
5
+ ---
6
+
7
+ # aim — 团队协作目标追踪
8
+
9
+ > 核心流程:写目标 → 催到完 → 归档 → block
10
+
11
+ ## 命令
12
+
13
+ ### `/aim create` — 创建 aim 任务
14
+
15
+ 参数(从用户消息或 args 中提取):
16
+ - `task`: 任务描述(必填)
17
+ - `goal`: 可验证的完成条件(必填,不能是模糊描述)
18
+ - `channel`: 协作频道(必填,如 discord#CC频道 或 feishu)
19
+ - `assignee`: 指派给谁(必填,agent 名字或 ID)
20
+ - `interval`: cron 检查间隔(默认 10min)
21
+ - `archive`: 归档路径(默认 workspace/aim-archive/<日期-任务名>/)
22
+
23
+ **执行步骤:**
24
+
25
+ 1. 写入 aim 文件到 `workspace/aim-archive/<日期-任务名>/aim.md`:
26
+ ```markdown
27
+ # aim: <task>
28
+
29
+ ## 目标
30
+ <goal>
31
+
32
+ ## 元信息
33
+ - 频道: <channel>
34
+ - 指派: <assignee>
35
+ - 创建时间: <now>
36
+ - 检查间隔: <interval>
37
+ - 状态: 🔄 进行中
38
+
39
+ ## 进度记录
40
+ (cron 自检时追加)
41
+ ```
42
+
43
+ 2. 用 `cron_create` 创建定时检查任务:
44
+ - `schedule_type`: "interval"
45
+ - `schedule_value`: interval 值(如 "10" 表示 10 分钟)
46
+ - `prompt`: 自检指令(见下方模板)
47
+ - `description`: "aim-check: <task>"
48
+
49
+ 3. 在 SESSION-STATE.md 加任务条目:
50
+ `- [ ] 🎯 aim: <task> → <assignee> | cron=<cron_id>`
51
+
52
+ 4. 通知协作者开始干活(通过 channel 发消息)
53
+
54
+ ### cron 自检 prompt 模板
55
+
56
+ ```
57
+ 你是 aim 检查器。检查以下 aim 是否达成:
58
+
59
+ 任务:<task>
60
+ 目标:<goal>
61
+ 频道:<channel>
62
+ 指派:<assignee>
63
+ 归档:<archive_path>
64
+ cron_id:<cron_id>
65
+
66
+ 执行步骤:
67
+ 1. 翻 <channel> 看 <assignee> 的最新进度
68
+ 2. 检查 <goal> 是否达成(要具体验证,不能猜)
69
+ 3. 如果没达成:
70
+ - 在 <channel> 通知 <assignee> 继续做,说明还差什么
71
+ - 在 <archive_path>/aim.md 追加进度记录
72
+ 4. 如果达成了:
73
+ - 回复 "aim 达成:<task>"
74
+ - 后续由 agent 执行 /aim complete
75
+ ```
76
+
77
+ ### `/aim status` — 查看当前 aims
78
+
79
+ 1. 扫描 `workspace/aim-archive/*/aim.md`
80
+ 2. 列出所有状态为 "🔄 进行中" 的 aim
81
+ 3. 显示:任务名 | 指派 | 频道 | 创建时间 | 最后检查时间
82
+
83
+ ### `/aim complete <task-name>` — 标记 aim 达成
84
+
85
+ 1. 更新 `workspace/aim-archive/<task-name>/aim.md`:
86
+ - 状态改为 "✅ 已达成"
87
+ - 追加达成时间和验收结果
88
+
89
+ 2. 用 `cron_delete` 删除对应的 cron 任务
90
+
91
+ 3. 用 `reply_blocklist` block 协作者(防循环):
92
+ - `action`: "add"
93
+ - `user_ids`: 协作者的 ID
94
+
95
+ 4. 更新 SESSION-STATE.md:
96
+ - 把 `- [ ] 🎯 aim:` 改成 `- [x] 🎯 aim:`
97
+
98
+ 5. 通知相关人:aim 已达成
99
+
100
+ ### `/aim archive <task-name>` — 归档(complete 后自动执行)
101
+
102
+ 1. 在 `workspace/aim-archive/<task-name>/` 下生成:
103
+ - `COMPLETE.md` — 完成报告(目标、过程、结果、耗时)
104
+ - 确保 `aim.md` 已更新为达成状态
105
+
106
+ 2. 确认 cron 已删除、协作者已 block
107
+
108
+ ### `/aim unblock <assignee-id>` — 解除 block(需要再协作时)
109
+
110
+ 1. 用 `reply_blocklist` 解除:
111
+ - `action`: "remove"
112
+ - `user_ids`: 协作者 ID
113
+
114
+ 2. 通知协作者:可以继续协作了
115
+
116
+ ## 注意事项
117
+
118
+ - **goal 必须是可验证的**:不是"优化性能",而是"响应时间 < 200ms"
119
+ - **cron 不停催**:翀哥说"歇会儿" ≠ 任务停,cron 继续催
120
+ - **主动翻频道**:不等 msg_send,主动去频道看进度
121
+ - **达成后立即 block**:防止心跳循环,这是铁律
122
+ - **归档要完整**:过程记录、验收结果、耗时统计都要有
123
+
124
+ ## 示例
125
+
126
+ ```
127
+ /aim create
128
+ task: 小柯修复 session 回复路径敏感词
129
+ goal: session 回复路径接上 getSensitiveWords,飞书测试群验证通过
130
+ channel: discord#CC频道
131
+ assignee: 小柯
132
+ interval: 10min
133
+ ```
134
+
135
+ ```
136
+ /aim status
137
+ → 🎯 修复敏感词 | 小柯 | discord#CC频道 | 10分钟前
138
+ ```
139
+
140
+ ```
141
+ /aim complete 修复敏感词
142
+ → ✅ 已达成 | cron 已删 | 小柯已 block | 归档完成
143
+ ```
@@ -0,0 +1,30 @@
1
+ © 2025 Anthropic, PBC. All rights reserved.
2
+
3
+ LICENSE: Use of these materials (including all code, prompts, assets, files,
4
+ and other components of this Skill) is governed by your agreement with
5
+ Anthropic regarding use of Anthropic's services. If no separate agreement
6
+ exists, use is governed by Anthropic's Consumer Terms of Service or
7
+ Commercial Terms of Service, as applicable:
8
+ https://www.anthropic.com/legal/consumer-terms
9
+ https://www.anthropic.com/legal/commercial-terms
10
+ Your applicable agreement is referred to as the "Agreement." "Services" are
11
+ as defined in the Agreement.
12
+
13
+ ADDITIONAL RESTRICTIONS: Notwithstanding anything in the Agreement to the
14
+ contrary, users may not:
15
+
16
+ - Extract these materials from the Services or retain copies of these
17
+ materials outside the Services
18
+ - Reproduce or copy these materials, except for temporary copies created
19
+ automatically during authorized use of the Services
20
+ - Create derivative works based on these materials
21
+ - Distribute, sublicense, or transfer these materials to any third party
22
+ - Make, offer to sell, sell, or import any inventions embodied in these
23
+ materials
24
+ - Reverse engineer, decompile, or disassemble these materials
25
+
26
+ The receipt, viewing, or possession of these materials does not convey or
27
+ imply any license or right beyond those expressly granted above.
28
+
29
+ Anthropic retains all right, title, and interest in these materials,
30
+ including all copyrights, patents, and other intellectual property rights.