@comate/zulu 0.0.9 → 0.0.12

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 (286) hide show
  1. package/README.md +98 -0
  2. package/comate-engine/bin/comate.js +10 -0
  3. package/comate-engine/fallbackServer.js +1 -0
  4. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.d.ts +188 -0
  5. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +36 -0
  6. package/comate-engine/node_modules/@comate/plugin-engine/package.json +49 -0
  7. package/comate-engine/node_modules/@comate/plugin-host/bin.js +44 -0
  8. package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -0
  9. package/comate-engine/node_modules/@comate/plugin-host/dist/main.d.ts +14 -0
  10. package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +9 -0
  11. package/comate-engine/node_modules/@comate/plugin-host/dist/user-Btg63hPI.js +36 -0
  12. package/comate-engine/node_modules/@comate/plugin-host/package.json +47 -0
  13. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +2849 -0
  14. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +36 -0
  15. package/comate-engine/node_modules/@comate/plugin-shared-internals/package.json +72 -0
  16. package/comate-engine/node_modules/@comate/preview-proxy/bin/preview.js +13 -0
  17. package/comate-engine/node_modules/@comate/preview-proxy/dist/index.js +350 -0
  18. package/comate-engine/node_modules/@comate/preview-proxy/package.json +83 -0
  19. package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.css +1 -0
  20. package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js +2 -0
  21. package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js.LICENSE.txt +58 -0
  22. package/comate-engine/node_modules/compare-versions/LICENSE +21 -0
  23. package/comate-engine/node_modules/compare-versions/README.md +133 -0
  24. package/comate-engine/node_modules/compare-versions/lib/esm/compare.d.ts +19 -0
  25. package/comate-engine/node_modules/compare-versions/lib/esm/compare.js +44 -0
  26. package/comate-engine/node_modules/compare-versions/lib/esm/compare.js.map +1 -0
  27. package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.d.ts +8 -0
  28. package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.js +29 -0
  29. package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.js.map +1 -0
  30. package/comate-engine/node_modules/compare-versions/lib/esm/index.d.ts +5 -0
  31. package/comate-engine/node_modules/compare-versions/lib/esm/index.js +5 -0
  32. package/comate-engine/node_modules/compare-versions/lib/esm/index.js.map +1 -0
  33. package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.d.ts +14 -0
  34. package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.js +66 -0
  35. package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.js.map +1 -0
  36. package/comate-engine/node_modules/compare-versions/lib/esm/utils.d.ts +7 -0
  37. package/comate-engine/node_modules/compare-versions/lib/esm/utils.js +37 -0
  38. package/comate-engine/node_modules/compare-versions/lib/esm/utils.js.map +1 -0
  39. package/comate-engine/node_modules/compare-versions/lib/esm/validate.d.ts +28 -0
  40. package/comate-engine/node_modules/compare-versions/lib/esm/validate.js +31 -0
  41. package/comate-engine/node_modules/compare-versions/lib/esm/validate.js.map +1 -0
  42. package/comate-engine/node_modules/compare-versions/lib/umd/index.js +216 -0
  43. package/comate-engine/node_modules/compare-versions/lib/umd/index.js.map +1 -0
  44. package/comate-engine/node_modules/compare-versions/package.json +45 -0
  45. package/comate-engine/node_modules/compare-versions/src/compare.ts +54 -0
  46. package/comate-engine/node_modules/compare-versions/src/compareVersions.ts +31 -0
  47. package/comate-engine/node_modules/compare-versions/src/index.ts +5 -0
  48. package/comate-engine/node_modules/compare-versions/src/satisfies.ts +69 -0
  49. package/comate-engine/node_modules/compare-versions/src/utils.ts +50 -0
  50. package/comate-engine/node_modules/compare-versions/src/validate.ts +36 -0
  51. package/comate-engine/node_modules/pkce-challenge/LICENSE +21 -0
  52. package/comate-engine/node_modules/pkce-challenge/README.md +55 -0
  53. package/comate-engine/node_modules/pkce-challenge/dist/index.browser.d.ts +19 -0
  54. package/comate-engine/node_modules/pkce-challenge/dist/index.browser.js +72 -0
  55. package/comate-engine/node_modules/pkce-challenge/dist/index.node.cjs +80 -0
  56. package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.cts +19 -0
  57. package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.ts +19 -0
  58. package/comate-engine/node_modules/pkce-challenge/dist/index.node.js +75 -0
  59. package/comate-engine/node_modules/pkce-challenge/package.json +58 -0
  60. package/comate-engine/node_modules/web-streams-polyfill/LICENSE +22 -0
  61. package/comate-engine/node_modules/web-streams-polyfill/README.md +119 -0
  62. package/comate-engine/node_modules/web-streams-polyfill/dist/polyfill.es5.js +8 -0
  63. package/comate-engine/node_modules/web-streams-polyfill/dist/polyfill.js +8 -0
  64. package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.es5.js +8 -0
  65. package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.es5.mjs +8 -0
  66. package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.js +8 -0
  67. package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.mjs +8 -0
  68. package/comate-engine/node_modules/web-streams-polyfill/package.json +98 -0
  69. package/comate-engine/node_modules/web-streams-polyfill/types/polyfill.d.ts +28 -0
  70. package/comate-engine/node_modules/web-streams-polyfill/types/ponyfill.d.ts +809 -0
  71. package/comate-engine/node_modules/web-streams-polyfill/types/tsdoc-metadata.json +11 -0
  72. package/comate-engine/package.json +94 -0
  73. package/comate-engine/plugins/aiscan/assets/icon.svg +12 -0
  74. package/comate-engine/plugins/aiscan/dist/index.js +53861 -0
  75. package/comate-engine/plugins/aiscan/package.json +67 -0
  76. package/comate-engine/plugins/appdev/assets/icon.png +0 -0
  77. package/comate-engine/plugins/appdev/dist/help.md +12 -0
  78. package/comate-engine/plugins/appdev/dist/index.d.ts +2 -0
  79. package/comate-engine/plugins/appdev/dist/index.js +194 -0
  80. package/comate-engine/plugins/appdev/dist/providers/err.d.ts +8 -0
  81. package/comate-engine/plugins/appdev/dist/providers/err.js +37 -0
  82. package/comate-engine/plugins/appdev/dist/providers/fallback.d.ts +5 -0
  83. package/comate-engine/plugins/appdev/dist/providers/fallback.js +28 -0
  84. package/comate-engine/plugins/appdev/dist/providers/help.d.ts +8 -0
  85. package/comate-engine/plugins/appdev/dist/providers/help.js +19 -0
  86. package/comate-engine/plugins/appdev/dist/providers/medusa.d.ts +8 -0
  87. package/comate-engine/plugins/appdev/dist/providers/medusa.js +39 -0
  88. package/comate-engine/plugins/appdev/dist/providers/qa.d.ts +8 -0
  89. package/comate-engine/plugins/appdev/dist/providers/qa.js +33 -0
  90. package/comate-engine/plugins/appdev/package.json +67 -0
  91. package/comate-engine/plugins/bfc/assets/bfc-icon.png +0 -0
  92. package/comate-engine/plugins/bfc/dist/config/config.d.ts +4 -0
  93. package/comate-engine/plugins/bfc/dist/config/config.js +4 -0
  94. package/comate-engine/plugins/bfc/dist/help.md +11 -0
  95. package/comate-engine/plugins/bfc/dist/index.d.ts +2 -0
  96. package/comate-engine/plugins/bfc/dist/index.js +452 -0
  97. package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.d.ts +8 -0
  98. package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.js +77 -0
  99. package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.d.ts +8 -0
  100. package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.js +71 -0
  101. package/comate-engine/plugins/bfc/dist/providers/genBfcCode.d.ts +8 -0
  102. package/comate-engine/plugins/bfc/dist/providers/genBfcCode.js +74 -0
  103. package/comate-engine/plugins/bfc/dist/providers/getBatchCases.d.ts +10 -0
  104. package/comate-engine/plugins/bfc/dist/providers/getBatchCases.js +71 -0
  105. package/comate-engine/plugins/bfc/dist/providers/help.d.ts +8 -0
  106. package/comate-engine/plugins/bfc/dist/providers/help.js +19 -0
  107. package/comate-engine/plugins/bfc/dist/service/generateService.d.ts +14 -0
  108. package/comate-engine/plugins/bfc/dist/service/generateService.js +27 -0
  109. package/comate-engine/plugins/bfc/package.json +85 -0
  110. package/comate-engine/plugins/bpm/assets/bpm.png +0 -0
  111. package/comate-engine/plugins/bpm/dist/index.js +313 -0
  112. package/comate-engine/plugins/bpm/package.json +65 -0
  113. package/comate-engine/plugins/casebuilder/assets/icon.svg +1 -0
  114. package/comate-engine/plugins/casebuilder/dist/help.md +33 -0
  115. package/comate-engine/plugins/casebuilder/dist/index.js +837 -0
  116. package/comate-engine/plugins/casebuilder/package.json +80 -0
  117. package/comate-engine/plugins/centrino/assets/icon.png +0 -0
  118. package/comate-engine/plugins/centrino/dist/help.md +30 -0
  119. package/comate-engine/plugins/centrino/dist/index.js +1046 -0
  120. package/comate-engine/plugins/centrino/package.json +68 -0
  121. package/comate-engine/plugins/cnap/assets/cnap.png +0 -0
  122. package/comate-engine/plugins/cnap/dist/help.md +11 -0
  123. package/comate-engine/plugins/cnap/dist/index.js +171 -0
  124. package/comate-engine/plugins/cnap/package.json +65 -0
  125. package/comate-engine/plugins/demo-feature/assets/icon.svg +1 -0
  126. package/comate-engine/plugins/demo-feature/dist/help.md +1 -0
  127. package/comate-engine/plugins/demo-feature/dist/index.d.ts +2 -0
  128. package/comate-engine/plugins/demo-feature/dist/index.js +36008 -0
  129. package/comate-engine/plugins/demo-feature/dist/providers/codeQuery.d.ts +12 -0
  130. package/comate-engine/plugins/demo-feature/dist/providers/codeQuery.js +23 -0
  131. package/comate-engine/plugins/demo-feature/dist/providers/codeSearch.d.ts +8 -0
  132. package/comate-engine/plugins/demo-feature/dist/providers/codeSearch.js +26 -0
  133. package/comate-engine/plugins/demo-feature/dist/providers/config.d.ts +13 -0
  134. package/comate-engine/plugins/demo-feature/dist/providers/config.js +25 -0
  135. package/comate-engine/plugins/demo-feature/dist/providers/context.d.ts +10 -0
  136. package/comate-engine/plugins/demo-feature/dist/providers/context.js +49 -0
  137. package/comate-engine/plugins/demo-feature/dist/providers/debugAgent.d.ts +8 -0
  138. package/comate-engine/plugins/demo-feature/dist/providers/debugAgent.js +65 -0
  139. package/comate-engine/plugins/demo-feature/dist/providers/explainCode.d.ts +9 -0
  140. package/comate-engine/plugins/demo-feature/dist/providers/explainCode.js +24 -0
  141. package/comate-engine/plugins/demo-feature/dist/providers/fallback.d.ts +5 -0
  142. package/comate-engine/plugins/demo-feature/dist/providers/fallback.js +23 -0
  143. package/comate-engine/plugins/demo-feature/dist/providers/file.d.ts +13 -0
  144. package/comate-engine/plugins/demo-feature/dist/providers/file.js +36 -0
  145. package/comate-engine/plugins/demo-feature/dist/providers/help.d.ts +8 -0
  146. package/comate-engine/plugins/demo-feature/dist/providers/help.js +19 -0
  147. package/comate-engine/plugins/demo-feature/dist/providers/information.d.ts +13 -0
  148. package/comate-engine/plugins/demo-feature/dist/providers/information.js +23 -0
  149. package/comate-engine/plugins/demo-feature/dist/providers/knowledge.d.ts +15 -0
  150. package/comate-engine/plugins/demo-feature/dist/providers/knowledge.js +71 -0
  151. package/comate-engine/plugins/demo-feature/dist/providers/log.d.ts +12 -0
  152. package/comate-engine/plugins/demo-feature/dist/providers/log.js +21 -0
  153. package/comate-engine/plugins/demo-feature/dist/providers/onlyCode.d.ts +8 -0
  154. package/comate-engine/plugins/demo-feature/dist/providers/onlyCode.js +23 -0
  155. package/comate-engine/plugins/demo-feature/dist/providers/pluginConfig.d.ts +8 -0
  156. package/comate-engine/plugins/demo-feature/dist/providers/pluginConfig.js +47 -0
  157. package/comate-engine/plugins/demo-feature/dist/providers/prompt.d.ts +7 -0
  158. package/comate-engine/plugins/demo-feature/dist/providers/prompt.js +7 -0
  159. package/comate-engine/plugins/demo-feature/dist/providers/ragProvider.d.ts +8 -0
  160. package/comate-engine/plugins/demo-feature/dist/providers/ragProvider.js +17 -0
  161. package/comate-engine/plugins/demo-feature/dist/providers/render.d.ts +8 -0
  162. package/comate-engine/plugins/demo-feature/dist/providers/render.js +75 -0
  163. package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.d.ts +10 -0
  164. package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.js +173 -0
  165. package/comate-engine/plugins/demo-feature/dist/providers/section.d.ts +8 -0
  166. package/comate-engine/plugins/demo-feature/dist/providers/section.js +136 -0
  167. package/comate-engine/plugins/demo-feature/dist/providers/selectedKnowledge.d.ts +12 -0
  168. package/comate-engine/plugins/demo-feature/dist/providers/selectedKnowledge.js +17 -0
  169. package/comate-engine/plugins/demo-feature/dist/providers/streaming.d.ts +8 -0
  170. package/comate-engine/plugins/demo-feature/dist/providers/streaming.js +29 -0
  171. package/comate-engine/plugins/demo-feature/dist/providers/userDetail.d.ts +8 -0
  172. package/comate-engine/plugins/demo-feature/dist/providers/userDetail.js +28 -0
  173. package/comate-engine/plugins/demo-feature/package.json +214 -0
  174. package/comate-engine/plugins/demo-timer/assets/icon.svg +2 -0
  175. package/comate-engine/plugins/demo-timer/dist/index.js +463 -0
  176. package/comate-engine/plugins/demo-timer/package.json +73 -0
  177. package/comate-engine/plugins/dev-tools/assets/icon.png +0 -0
  178. package/comate-engine/plugins/dev-tools/dist/help.md +18 -0
  179. package/comate-engine/plugins/dev-tools/dist/index.js +166160 -0
  180. package/comate-engine/plugins/dev-tools/package.json +95 -0
  181. package/comate-engine/plugins/devaux/assets/icon.svg +1 -0
  182. package/comate-engine/plugins/devaux/dist/help.md +41 -0
  183. package/comate-engine/plugins/devaux/dist/index.js +73829 -0
  184. package/comate-engine/plugins/devaux/dist/static/tree-sitter-cpp.wasm +0 -0
  185. package/comate-engine/plugins/devaux/dist/static/tree-sitter-go.wasm +0 -0
  186. package/comate-engine/plugins/devaux/dist/static/tree-sitter.wasm +0 -0
  187. package/comate-engine/plugins/devaux/dist/tree-sitter.wasm +0 -0
  188. package/comate-engine/plugins/devaux/package.json +83 -0
  189. package/comate-engine/plugins/f2c/assets/icon.svg +11 -0
  190. package/comate-engine/plugins/f2c/dist/help.md +13 -0
  191. package/comate-engine/plugins/f2c/dist/index.js +64551 -0
  192. package/comate-engine/plugins/f2c/package.json +56 -0
  193. package/comate-engine/plugins/fcnap/assets/icon.png +0 -0
  194. package/comate-engine/plugins/fcnap/dist/help.md +9 -0
  195. package/comate-engine/plugins/fcnap/dist/index.js +105 -0
  196. package/comate-engine/plugins/fcnap/package.json +50 -0
  197. package/comate-engine/plugins/front-end-skills/assets/icon.svg +1 -0
  198. package/comate-engine/plugins/front-end-skills/dist/help.md +17 -0
  199. package/comate-engine/plugins/front-end-skills/dist/index.js +8172 -0
  200. package/comate-engine/plugins/front-end-skills/package.json +79 -0
  201. package/comate-engine/plugins/gdp/assets/icon.png +0 -0
  202. package/comate-engine/plugins/gdp/dist/help.md +11 -0
  203. package/comate-engine/plugins/gdp/dist/index.js +53065 -0
  204. package/comate-engine/plugins/gdp/package.json +79 -0
  205. package/comate-engine/plugins/git/assets/git.svg +1 -0
  206. package/comate-engine/plugins/git/assets/icon.svg +1 -0
  207. package/comate-engine/plugins/git/dist/help.md +7 -0
  208. package/comate-engine/plugins/git/dist/index.js +32675 -0
  209. package/comate-engine/plugins/git/package.json +91 -0
  210. package/comate-engine/plugins/harmonyos/assets/harmonyos.png +0 -0
  211. package/comate-engine/plugins/harmonyos/dist/index.js +78 -0
  212. package/comate-engine/plugins/harmonyos/package.json +37 -0
  213. package/comate-engine/plugins/iapi/assets/icon.png +0 -0
  214. package/comate-engine/plugins/iapi/dist/help.md +13 -0
  215. package/comate-engine/plugins/iapi/dist/index.js +458 -0
  216. package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-go.wasm +0 -0
  217. package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-java.wasm +0 -0
  218. package/comate-engine/plugins/iapi/dist/static/tree-sitter-go.wasm +0 -0
  219. package/comate-engine/plugins/iapi/dist/static/tree-sitter-java.wasm +0 -0
  220. package/comate-engine/plugins/iapi/dist/tree-sitter.wasm +0 -0
  221. package/comate-engine/plugins/iapi/package.json +102 -0
  222. package/comate-engine/plugins/icafe/assets/icafe.svg +1 -0
  223. package/comate-engine/plugins/icafe/dist/help.md +5 -0
  224. package/comate-engine/plugins/icafe/dist/index.js +885 -0
  225. package/comate-engine/plugins/icafe/package.json +74 -0
  226. package/comate-engine/plugins/ievalue/assets/iEValue.svg +10 -0
  227. package/comate-engine/plugins/ievalue/dist/index.js +2920 -0
  228. package/comate-engine/plugins/ievalue/package.json +88 -0
  229. package/comate-engine/plugins/ipipe/assets/iPipePlugin.png +0 -0
  230. package/comate-engine/plugins/ipipe/dist/help.md +15 -0
  231. package/comate-engine/plugins/ipipe/dist/index.js +7264 -0
  232. package/comate-engine/plugins/ipipe/package.json +62 -0
  233. package/comate-engine/plugins/jarvis/assets/icon.svg +1 -0
  234. package/comate-engine/plugins/jarvis/dist/help.md +17 -0
  235. package/comate-engine/plugins/jarvis/dist/index.js +140416 -0
  236. package/comate-engine/plugins/jarvis/package.json +93 -0
  237. package/comate-engine/plugins/mapsearch/assets/mapsearchicon.png +0 -0
  238. package/comate-engine/plugins/mapsearch/dist/help.md +4 -0
  239. package/comate-engine/plugins/mapsearch/dist/index.js +145 -0
  240. package/comate-engine/plugins/mapsearch/package.json +53 -0
  241. package/comate-engine/plugins/paddle/assets/icon.png +0 -0
  242. package/comate-engine/plugins/paddle/assets/paconvert-3.0.1-py3-none-any.whl +0 -0
  243. package/comate-engine/plugins/paddle/dist/help.md +31 -0
  244. package/comate-engine/plugins/paddle/dist/index.js +1011 -0
  245. package/comate-engine/plugins/paddle/package.json +129 -0
  246. package/comate-engine/plugins/robot/assets/Robot.png +0 -0
  247. package/comate-engine/plugins/robot/dist/index.js +288 -0
  248. package/comate-engine/plugins/robot/package.json +67 -0
  249. package/comate-engine/plugins/security/assets/comate.png +0 -0
  250. package/comate-engine/plugins/security/dist/index.js +18393 -0
  251. package/comate-engine/plugins/security/package.json +82 -0
  252. package/comate-engine/plugins/smartapp/assets/icon.png +0 -0
  253. package/comate-engine/plugins/smartapp/dist/help.md +4 -0
  254. package/comate-engine/plugins/smartapp/dist/index.js +113 -0
  255. package/comate-engine/plugins/smartapp/package.json +54 -0
  256. package/comate-engine/plugins/springer/assets/icon.png +0 -0
  257. package/comate-engine/plugins/springer/dist/help.md +4 -0
  258. package/comate-engine/plugins/springer/dist/index.js +94525 -0
  259. package/comate-engine/plugins/springer/package.json +71 -0
  260. package/comate-engine/plugins/testmate/assets/icon.svg +1 -0
  261. package/comate-engine/plugins/testmate/dist/help.md +62 -0
  262. package/comate-engine/plugins/testmate/dist/index.js +21483 -0
  263. package/comate-engine/plugins/testmate/package.json +85 -0
  264. package/comate-engine/plugins/tor/assets/TorPlugin.png +0 -0
  265. package/comate-engine/plugins/tor/dist/help.md +22 -0
  266. package/comate-engine/plugins/tor/dist/index.js +807 -0
  267. package/comate-engine/plugins/tor/package.json +99 -0
  268. package/comate-engine/plugins/weiyun/assets/icon.png +0 -0
  269. package/comate-engine/plugins/weiyun/dist/help.md +11 -0
  270. package/comate-engine/plugins/weiyun/dist/index.js +100491 -0
  271. package/comate-engine/plugins/weiyun/package.json +55 -0
  272. package/comate-engine/plugins/wenku/assets/icon.svg +1 -0
  273. package/comate-engine/plugins/wenku/dist/index.js +249 -0
  274. package/comate-engine/plugins/wenku/package.json +55 -0
  275. package/comate-engine/plugins/workcard/assets/favicon.png +0 -0
  276. package/comate-engine/plugins/workcard/dist/help.md +30 -0
  277. package/comate-engine/plugins/workcard/dist/index.js +490 -0
  278. package/comate-engine/plugins/workcard/package.json +95 -0
  279. package/comate-engine/plugins/xiaomi-aiot/assets/icon.png +0 -0
  280. package/comate-engine/plugins/xiaomi-aiot/dist/help.md +6 -0
  281. package/comate-engine/plugins/xiaomi-aiot/dist/index.js +37466 -0
  282. package/comate-engine/plugins/xiaomi-aiot/package.json +63 -0
  283. package/comate-engine/server.d.ts +3 -0
  284. package/comate-engine/server.js +474 -0
  285. package/dist/bundle/index.js +29 -58174
  286. package/package.json +2 -1
@@ -0,0 +1,55 @@
1
+ {
2
+ "private": true,
3
+ "name": "@comate-plugin/weiyun",
4
+ "version": "0.8.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "clean": "rm -rf dist",
8
+ "dev": "cpd dev",
9
+ "build": "tsc && cpd build"
10
+ },
11
+ "devDependencies": {
12
+ "@comate/plugin-cli": "^0.9.2",
13
+ "@comate/plugin-host": "^0.9.2",
14
+ "form-data": "^4.0.0",
15
+ "node-fetch": "^2.6.1",
16
+ "@types/node-fetch": "^2.6.1"
17
+ },
18
+ "comate": {
19
+ "name": "weiyun",
20
+ "version": "1.0.0",
21
+ "icon": "./assets/icon.png",
22
+ "entry": "./dist/index.js",
23
+ "displayName": "微云助手",
24
+ "description": "微云助手",
25
+ "keyword": [],
26
+ "capabilities": [
27
+ {
28
+ "type": "Skill",
29
+ "name": "weiyun-help",
30
+ "displayName": "插件介绍",
31
+ "description": "微云助手是什么"
32
+ },
33
+ {
34
+ "type": "Skill",
35
+ "name": "weiyunDeploy",
36
+ "displayName": "应用部署",
37
+ "description": "微云更新部署",
38
+ "placeholder": "请输入部署应用对应的配置名"
39
+ },
40
+ {
41
+ "type": "Fallback",
42
+ "name": "fallback",
43
+ "displayName": "对话框兜底",
44
+ "description": "对话框兜底"
45
+ }
46
+ ],
47
+ "configSchema": {
48
+ "sections": []
49
+ }
50
+ },
51
+ "dependencies": {
52
+ "form-data": "^4.0.0",
53
+ "simple-git": "^3.22.0"
54
+ }
55
+ }
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="42"><defs><linearGradient id="b" x1="0%" x2="126.892%" y1="50%" y2="50%"><stop offset="0%" stop-color="#01B88D"/><stop offset="100%" stop-color="#1BD1A7"/></linearGradient><linearGradient id="e" x1="0%" x2="126.892%" y1="50%" y2="50%"><stop offset="0%" stop-color="#01B88D"/><stop offset="100%" stop-color="#1BD1A7"/></linearGradient><linearGradient id="h" x1="0%" x2="126.892%" y1="50%" y2="50%"><stop offset="0%" stop-color="#01B88D"/><stop offset="100%" stop-color="#1BD1A7"/></linearGradient><linearGradient id="k" x1="0%" x2="126.892%" y1="50%" y2="50%"><stop offset="0%" stop-color="#01B88D"/><stop offset="100%" stop-color="#1BD1A7"/></linearGradient><path id="a" d="M28.65 12.826h-4.61c-.12 0-.22.084-.234.196-.005.05-.597 4.946-3.403 9-2.867 4.141-4.739 5.83-9.536 8.602-.776.388-2.316.99-2.652 1.096-.694.216-.987.7-.807 1.33.127.439.443.672.917.672.207 0 .405-.044.561-.078l.054-.012c.072-.016 7.88-2.227 12.517-7.008 4.577-4.72 6.381-8.007 7.423-13.525a.23.23 0 0 0 .007-.053c0-.122-.105-.22-.236-.22"/><path id="d" d="m17.75 6.956.005 4.016c0 .121.106.22.235.22h4.182c.129 0 .234-.098.235-.219l.014-2.018.327-.553a.848.848 0 0 0 .06-.75.933.933 0 0 0-.571-.53l-3.115-1.063A1.067 1.067 0 0 0 18.771 6c-.563 0-1.02.428-1.02.956"/><path id="g" d="m30.403 9.31-1.646 1.263c-.047.024-.209.098-.294.098l-20.349-.036c-.42 0-.799.216-.99.564a.977.977 0 0 0 .084 1.079l.84 1.1a.89.89 0 0 0 .707.34.892.892 0 0 0 .658-.284.15.15 0 0 1 .113-.049l23.429.038c.405 0 .764-.213.939-.552a.913.913 0 0 0-.13-1.03L31.69 9.434a.956.956 0 0 0-1.286-.125"/><path id="j" d="M14.662 14.726c-.307.022-.553.132-.73.328-.326.358-.284.872-.282.894.011.075 1.141 7.062 5.63 11.849a24.592 24.592 0 0 0 6.312 4.863c1.732.921 2.904 1.253 2.954 1.267.003 0 .225.073.514.073.374 0 .69-.12.918-.347l.057-.056c.46-.457 1.228-1.223 2.212-1.563.187-.064.357-.118.51-.166.742-.236 1.23-.392 1.237-1.064a.732.732 0 0 0-.144-.526c-.193-.274-.553-.46-1.07-.555-1.068-.195-5.743-1.409-9.086-3.79-3.765-2.677-5.424-4.937-6.078-6.046-.871-1.477-1.788-4.203-1.826-4.33-.06-.286-.354-.835-1.033-.835-.03 0-.062.001-.095.004"/></defs><g fill="none" fill-rule="evenodd"><g transform="translate(1 1)"><rect width="41" height="41" x="-.5" y="-.5" fill="#FFF" stroke="#E7E7E7" rx="8"/><mask id="c" fill="#fff"><use xlink:href="#a"/></mask><path fill="url(#b)" d="M28.65 12.826h-4.61c-.12 0-.22.084-.234.196-.005.05-.597 4.946-3.403 9-2.867 4.141-4.739 5.83-9.536 8.602-.776.388-2.316.99-2.652 1.096-.694.216-.987.7-.807 1.33.127.439.443.672.917.672.207 0 .405-.044.561-.078l.054-.012c.072-.016 7.88-2.227 12.517-7.008 4.577-4.72 6.381-8.007 7.423-13.525a.23.23 0 0 0 .007-.053c0-.122-.105-.22-.236-.22" mask="url(#c)"/><mask id="f" fill="#fff"><use xlink:href="#d"/></mask><path fill="url(#e)" d="m17.75 6.956.005 4.016c0 .121.106.22.235.22h4.182c.129 0 .234-.098.235-.219l.014-2.018.327-.553a.848.848 0 0 0 .06-.75.933.933 0 0 0-.571-.53l-3.115-1.063A1.067 1.067 0 0 0 18.771 6c-.563 0-1.02.428-1.02.956" mask="url(#f)"/><mask id="i" fill="#fff"><use xlink:href="#g"/></mask><path fill="url(#h)" d="M28.757 10.573c-.047.024-.209.098-.294.098l-20.349-.036c-.42 0-.799.216-.99.564a.977.977 0 0 0 .084 1.079l.84 1.1a.89.89 0 0 0 .707.34.892.892 0 0 0 .658-.284.15.15 0 0 1 .113-.049l23.429.038c.405 0 .764-.213.939-.552a.913.913 0 0 0-.13-1.03L31.69 9.434a.956.956 0 0 0-1.286-.125l-1.646 1.264" mask="url(#i)"/><mask id="l" fill="#fff"><use xlink:href="#j"/></mask><path fill="url(#k)" d="M14.662 14.726c-.307.022-.553.132-.73.328-.326.358-.284.872-.282.894.011.075 1.141 7.062 5.63 11.849a24.592 24.592 0 0 0 6.312 4.863c1.732.921 2.904 1.253 2.954 1.267.003 0 .225.073.514.073.374 0 .69-.12.918-.347l.057-.056c.46-.457 1.228-1.223 2.212-1.563.187-.064.357-.118.51-.166.742-.236 1.23-.392 1.237-1.064a.732.732 0 0 0-.144-.526c-.193-.274-.553-.46-1.07-.555-1.068-.195-5.743-1.409-9.086-3.79-3.765-2.677-5.424-4.937-6.078-6.046-.871-1.477-1.788-4.203-1.826-4.33-.06-.286-.354-.835-1.033-.835-.03 0-.062.001-.095.004" mask="url(#l)"/></g></g></svg>
@@ -0,0 +1,249 @@
1
+ import { SkillProvider, ElementChunkStream, FallbackProvider, StringChunkStream, TextModel } from '@comate/plugin-host';
2
+
3
+ function jsx(type, props) {
4
+ // 按照React的逻辑,`boolean`、`null`、`undefined`是不会显示出来的
5
+ const children = Array.isArray(props.children) ? props.children.filter((v)=>v != null && typeof v !== 'boolean') : props.children;
6
+ return {
7
+ type,
8
+ ...props,
9
+ children
10
+ };
11
+ }
12
+
13
+ class HelpSkillProvider extends SkillProvider {
14
+ static{
15
+ this.skillName = 'wenku-help';
16
+ }
17
+ static{
18
+ this.description = '插件介绍';
19
+ }
20
+ static{
21
+ this.parameters = {
22
+ type: 'object',
23
+ properties: {}
24
+ };
25
+ }
26
+ async *execute() {
27
+ const stream = new ElementChunkStream();
28
+ yield stream.flush(/*#__PURE__*/ jsx("p", {
29
+ children: "文库研发小助手,为开发人员提供内部知识问答、函数推荐等服务,助力开发效率提升。"
30
+ }));
31
+ }
32
+ }
33
+
34
+ const DESCRIPTION = `
35
+ 该插件目前支持以下能力:
36
+ - 插件介绍
37
+ - 函数推荐
38
+
39
+ 您可以选择上述指令进行体验,欢迎使用文库助手。
40
+ `;
41
+ class WenkuFallbackProvider extends FallbackProvider {
42
+ static{
43
+ this.description = '能力解释';
44
+ }
45
+ async *handleQuery() {
46
+ const stream = new ElementChunkStream();
47
+ yield stream.flush(/*#__PURE__*/ jsx("p", {
48
+ children: DESCRIPTION
49
+ }));
50
+ }
51
+ }
52
+
53
+ var funcSearchPrompt = "请根据以下背景知识:{{trimedKnowledge}}\n\n回答问题:背景知识中可以实现 {{query}} 功能的相似的公共函数有哪些,注意按照推荐指数降序排列(如果内容超过1条的话),回答格式如下:\n 1. <函数名>\n - 功能:\n - 所在仓库:\n - 推荐指数:\n 2. <函数名>\n - 功能:\n - 所在仓库:\n - 推荐指数:\n ......\n\n回答准则:\n* 安全性:回答时不应带有提问问题的相关说明,仅作答即可。\n* 真实性:需要严格按照提供的背景知识进行解答,避免臆造、假设等不相关的内容。\n* 详实性:若代码示例不足以解答问题,应主动提出疑问而非强行作答。";
54
+
55
+ const parseQuery = (currentContext)=>{
56
+ const baseQuery = currentContext.query;
57
+ const flag = 'debug';
58
+ const isDebug = baseQuery.startsWith(flag);
59
+ const query = isDebug ? baseQuery.substring(flag.length) : baseQuery;
60
+ return [
61
+ query,
62
+ isDebug
63
+ ];
64
+ };
65
+ const trimKnowledge = (list, maxCount = 6, maxLength = 10000)=>{
66
+ const state = {
67
+ length: 0
68
+ };
69
+ const output = [];
70
+ for (const item of list){
71
+ if (state.length + item.length > maxLength || output.length >= maxCount) {
72
+ break;
73
+ }
74
+ output.push(item);
75
+ state.length += item.length;
76
+ }
77
+ return output;
78
+ };
79
+
80
+ class FuncSearchSkillProvider extends SkillProvider {
81
+ static{
82
+ this.skillName = 'funcSearch';
83
+ }
84
+ static{
85
+ this.displayName = '函数推荐';
86
+ }
87
+ static{
88
+ this.description = '智能推荐文库内部公共函数';
89
+ }
90
+ static{
91
+ this.parameters = {
92
+ type: 'object',
93
+ properties: {}
94
+ };
95
+ }
96
+ async *execute() {
97
+ const [query, isDebug] = parseQuery(this.currentContext);
98
+ if (!query) {
99
+ const stream = new ElementChunkStream();
100
+ yield stream.flush(/*#__PURE__*/ jsx("p", {
101
+ children: [
102
+ /*#__PURE__*/ jsx("alert-tag", {
103
+ level: "medium",
104
+ children: "注意"
105
+ }),
106
+ "未检测到任何输入,请输入功能描述进行公共函数检索"
107
+ ]
108
+ }));
109
+ } else {
110
+ const stream = new StringChunkStream();
111
+ yield stream.flush('正在思考中,请耐心等候...');
112
+ try {
113
+ const knowledge = await this.getKnowledge(query);
114
+ if (knowledge.length) {
115
+ const prompt = this.llm.createPrompt(funcSearchPrompt, {
116
+ trimedKnowledge: trimKnowledge(knowledge, 20),
117
+ query
118
+ });
119
+ yield stream.flushReplaceLast('');
120
+ yield stream.flush(`共检索到${knowledge.length}条相关知识, 总结如下:\n\n`);
121
+ if (isDebug) {
122
+ yield stream.flush('\n\n========prompt========\n\n');
123
+ yield stream.flush(JSON.stringify(prompt));
124
+ yield stream.flush('\n\n======================\n\n');
125
+ }
126
+ const chunks = this.llm.askForTextStreaming(prompt, {
127
+ model: TextModel.Default
128
+ });
129
+ for await (const chunk of chunks){
130
+ yield stream.flush(chunk);
131
+ }
132
+ } else {
133
+ yield stream.flushReplaceLast('未检索到相关公共函数');
134
+ }
135
+ } catch (error) {
136
+ yield stream.flushReplaceLast('出现错误,请稍后再试');
137
+ }
138
+ }
139
+ }
140
+ async getKnowledge(query) {
141
+ const knowledge = await this.retriever.knowledgeFromQuery(query, {
142
+ knowledgeSets: [
143
+ {
144
+ uuid: '112ff4b5-a576-4f30-b58b-032879a8ce82',
145
+ type: 'NORMAL'
146
+ }
147
+ ]
148
+ });
149
+ return knowledge;
150
+ }
151
+ }
152
+
153
+ var chatPrompt = "请根据以下背景知识:{{trimedKnowledge}}\n\n回答问题: {{query}}\n\n回答准则:\n* 安全性:回答时不应带有提问问题的相关说明,仅作答即可。\n* 真实性:需要严格按照提供的背景知识进行解答,避免臆造、假设等不相关的内容。\n* 详实性:回答问题需要严谨,描述充分,若代码示例不足以解答问题,应主动提出疑问而非强行作答。";
154
+
155
+ class ChatSkillProvider extends SkillProvider {
156
+ static{
157
+ this.skillName = 'answerQuestion';
158
+ }
159
+ static{
160
+ this.displayName = '知识问答';
161
+ }
162
+ static{
163
+ this.description = '基于内部知识库回答问题';
164
+ }
165
+ static{
166
+ this.parameters = {
167
+ type: 'object',
168
+ properties: {}
169
+ };
170
+ }
171
+ async *execute() {
172
+ const [query, isDebug] = parseQuery(this.currentContext);
173
+ if (!query) {
174
+ const stream = new ElementChunkStream();
175
+ yield stream.flush(/*#__PURE__*/ jsx("p", {
176
+ children: [
177
+ /*#__PURE__*/ jsx("alert-tag", {
178
+ level: "medium",
179
+ children: "注意"
180
+ }),
181
+ "未检测到任何输入,请输入相关提问内容后重试"
182
+ ]
183
+ }));
184
+ } else {
185
+ const stream = new StringChunkStream();
186
+ yield stream.flush('正在思考中,请耐心等候...');
187
+ try {
188
+ const [knowledgeList, sourceList] = await this.getKnowledge(query);
189
+ if (knowledgeList.length) {
190
+ const prompt = this.llm.createPrompt(chatPrompt, {
191
+ trimedKnowledge: trimKnowledge(knowledgeList, 20),
192
+ query
193
+ });
194
+ yield stream.flushReplaceLast('');
195
+ yield stream.flush(`共检索到${knowledgeList.length}条相关知识,检索来源如下:\n\n`);
196
+ for (const item of sourceList){
197
+ yield stream.flush(`${item}\n\n`);
198
+ }
199
+ yield stream.flush('总结如下\n\n');
200
+ if (isDebug) {
201
+ yield stream.flush('\n\n========prompt========\n\n');
202
+ yield stream.flush(JSON.stringify(prompt));
203
+ yield stream.flush('\n\n======================\n\n');
204
+ }
205
+ const chunks = this.llm.askForTextStreaming(prompt, {
206
+ model: TextModel.Default
207
+ });
208
+ for await (const chunk of chunks){
209
+ yield stream.flush(chunk);
210
+ }
211
+ } else {
212
+ yield stream.flushReplaceLast(/*#__PURE__*/ jsx("p", {
213
+ children: "未检索到相关知识"
214
+ }));
215
+ }
216
+ } catch (error) {
217
+ yield stream.flushReplaceLast(/*#__PURE__*/ jsx("p", {
218
+ children: "出现错误,请稍后再试"
219
+ }));
220
+ }
221
+ }
222
+ }
223
+ async getKnowledge(query) {
224
+ const baseKnowledgeList = await this.retriever.knowledgeFromQuery(query, {
225
+ knowledgeSets: [
226
+ {
227
+ uuid: '152f546e-c5b2-44df-aa70-b567938f3ba7',
228
+ type: 'NORMAL'
229
+ }
230
+ ],
231
+ withSource: true
232
+ });
233
+ const knowledgeList = baseKnowledgeList.map((x)=>x.content) || [];
234
+ const sourceList = Array.from(new Set(baseKnowledgeList.map((x)=>x.source))) || [];
235
+ return [
236
+ knowledgeList,
237
+ sourceList
238
+ ];
239
+ }
240
+ }
241
+
242
+ function setup({ registry }) {
243
+ registry.registerSkillProvider('wenku-help', HelpSkillProvider);
244
+ registry.registerSkillProvider('wenku-func-search', FuncSearchSkillProvider);
245
+ registry.registerSkillProvider('wenku-chat', ChatSkillProvider);
246
+ registry.registerFallbackProvider('wenku-fallback', WenkuFallbackProvider);
247
+ }
248
+
249
+ export { setup };
@@ -0,0 +1,55 @@
1
+ {
2
+ "private": true,
3
+ "name": "@comate-plugin/wenku",
4
+ "version": "0.1.0",
5
+ "type": "module",
6
+ "scripts": {
7
+ "clean": "rm -rf dist",
8
+ "dev": "cpd dev",
9
+ "build": "tsc && cpd build"
10
+ },
11
+ "dependencies": {},
12
+ "devDependencies": {
13
+ "@comate/plugin-cli": "^0.9.2",
14
+ "@comate/plugin-host": "^0.9.2",
15
+ "typescript": "^5.3.2"
16
+ },
17
+ "comate": {
18
+ "name": "wenku",
19
+ "version": "1.0.0",
20
+ "icon": "./assets/icon.svg",
21
+ "entry": "./dist/index.js",
22
+ "displayName": "文库助手",
23
+ "description": "基于内部知识库回答相关问题",
24
+ "keyword": [],
25
+ "capabilities": [
26
+ {
27
+ "type": "Skill",
28
+ "name": "wenku-help",
29
+ "displayName": "插件介绍",
30
+ "description": "文库助手插件介绍"
31
+ },
32
+ {
33
+ "type": "Skill",
34
+ "name": "wenku-func-search",
35
+ "displayName": "公共函数检索",
36
+ "description": "智能推荐文库内部公共函数"
37
+ },
38
+ {
39
+ "type": "Skill",
40
+ "name": "wenku-chat",
41
+ "displayName": "文库知识问答",
42
+ "description": "基于内部知识库回答问题"
43
+ },
44
+ {
45
+ "type": "Fallback",
46
+ "name": "wenku-fallback",
47
+ "displayName": "能力兜底",
48
+ "description": "能力兜底"
49
+ }
50
+ ],
51
+ "configSchema": {
52
+ "sections": []
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,30 @@
1
+ 您好,我是智能工作卡接入代码编写助手,提供卡片发送参数对象定义,修改卡片接口入参定义,回调接口入参和返回值定义,回调加解密方法等能力。
2
+ 按照智卡能力接入习惯,可按照顺序依次使用一下能力,如无异常,可以点击『生成文件』按钮直接保存使用:
3
+
4
+ **1. 生成可调试发卡框架**
5
+ - 使用场景:业务接入工作卡时,发送卡片。
6
+ - 指令描述:该指令会生成1个java类,包含了发送卡片方法以及所依赖的所有方法步骤。
7
+ **2. 生成气泡卡可调试发卡框架**
8
+ - 使用场景:业务接入群智能机器人发送的气泡卡时,发送卡片。
9
+ - 指令描述:该指令会生成1个java类,包含了发送气泡卡方法以及所依赖的所有方法步骤。
10
+ **3. 生成鉴权的appToken方法**
11
+ - 使用场景:业务发送卡片时,调用卡片发送接口需要在请求头传入appToken字段,用于鉴权。
12
+ - 指令描述:该指令会生成1个java类,包含了获取appToken方法以及发送post请求方法和调试使用的Main方法。
13
+ **4. 生成卡片UserData对象**
14
+ - 使用场景:业务在接入工作卡时,发送卡片,修改卡片,回调返回都会用到该对象
15
+ - 指令描述:根据用户输入模板ID将卡片模板中绑定的动态变量转化为Java对象,并生成对应的代码;该指令生成一个java类。
16
+ 其中类名:WorkCardUserData建议修改为业务相关名称
17
+ **5. 生成卡片发送入参&返回值对象**
18
+ - 使用场景:业务创建完卡片模板后,开发「卡片发送」代码逻辑时
19
+ - 指令描述:该指令会生成2个java类,一个为发卡接口入参SendCardRequest,一个为发卡请求返回值SendCardResponse。
20
+ **6. 生成卡片修改请求入参对象**
21
+ - 使用场景:业务需要修改已发送卡片内容,开发「卡片修改」代码逻辑时
22
+ - 指令描述:该指令会生成1个java类,根据用户输入模板ID自动生成卡片「修改接口」入参对应的Java对象ModifyCardRequest。
23
+ **7. 生成卡片回调入参&返回值对象**
24
+ - 使用场景:业务处理「卡片回调」逻辑时
25
+ - 指令描述:该指令会生成3个java类,一个为回调入参解密后参数对象CallbackRequestMsgJson,一个为回调业务响应数据CallbackResponseMsgJson,一个为回调方法实际返回对象CallbackResponse(加密后)。
26
+ **8. 回调加解密方法**
27
+ - 使用场景:业务处理「卡片回调」逻辑时,处理接收参数(解密),以及处理返回值(加密)
28
+ - 指令描述:该指令会生成1个java类,包含了回调入参解析解密方法,以及回调业务响应加密算法。
29
+
30
+ 如果您在使用过程中发现问题或有其他需求、建议,欢迎加入我们的如流用户群 **5798923** 进行反馈。