@tyvm/knowhow 0.0.1

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 (492) hide show
  1. package/.vscode/launch.json +14 -0
  2. package/CONFIG.md +336 -0
  3. package/README.md +49 -0
  4. package/autodoc/chat.mdx +20 -0
  5. package/autodoc/cli.mdx +11 -0
  6. package/autodoc/plugins/asana.mdx +47 -0
  7. package/autodoc/plugins/downloader/downloader.mdx +38 -0
  8. package/autodoc/plugins/downloader/plugin.mdx +37 -0
  9. package/autodoc/plugins/downloader/types.mdx +42 -0
  10. package/autodoc/plugins/embedding.mdx +41 -0
  11. package/autodoc/plugins/figma.mdx +45 -0
  12. package/autodoc/plugins/github.mdx +40 -0
  13. package/autodoc/plugins/jira.mdx +46 -0
  14. package/autodoc/plugins/language.mdx +37 -0
  15. package/autodoc/plugins/linear.mdx +35 -0
  16. package/autodoc/plugins/notion.mdx +38 -0
  17. package/autodoc/plugins/plugins.mdx +59 -0
  18. package/autodoc/plugins/types.mdx +51 -0
  19. package/autodoc/plugins/vim.mdx +39 -0
  20. package/autodoc/tools/addInternalTools.mdx +1 -0
  21. package/autodoc/tools/agentCall.mdx +1 -0
  22. package/autodoc/tools/asana/definitions.mdx +10 -0
  23. package/autodoc/tools/asana/index.mdx +12 -0
  24. package/autodoc/tools/askHuman.mdx +1 -0
  25. package/autodoc/tools/callPlugin.mdx +1 -0
  26. package/autodoc/tools/embeddingSearch.mdx +1 -0
  27. package/autodoc/tools/execCommand.mdx +1 -0
  28. package/autodoc/tools/fileSearch.mdx +1 -0
  29. package/autodoc/tools/finalAnswer.mdx +1 -0
  30. package/autodoc/tools/github/definitions.mdx +6 -0
  31. package/autodoc/tools/github/index.mdx +8 -0
  32. package/autodoc/tools/index.mdx +14 -0
  33. package/autodoc/tools/lintFile.mdx +7 -0
  34. package/autodoc/tools/list.mdx +16 -0
  35. package/autodoc/tools/modifyFile.mdx +7 -0
  36. package/autodoc/tools/patch.mdx +9 -0
  37. package/autodoc/tools/readBlocks.mdx +1 -0
  38. package/autodoc/tools/readFile.mdx +1 -0
  39. package/autodoc/tools/scanFile.mdx +1 -0
  40. package/autodoc/tools/textSearch.mdx +6 -0
  41. package/autodoc/tools/types/fileblock.mdx +1 -0
  42. package/autodoc/tools/visionTool.mdx +1 -0
  43. package/autodoc/tools/writeFile.mdx +1 -0
  44. package/jest.config.js +18 -0
  45. package/package.json +89 -0
  46. package/src/agents/base/base.ts +619 -0
  47. package/src/agents/base/prompt.ts +26 -0
  48. package/src/agents/configurable/ConfigAgent.ts +23 -0
  49. package/src/agents/developer/developer.ts +69 -0
  50. package/src/agents/index.ts +8 -0
  51. package/src/agents/interface.ts +11 -0
  52. package/src/agents/patcher/codebase.md +27 -0
  53. package/src/agents/patcher/patcher.ts +110 -0
  54. package/src/agents/researcher/researcher.ts +109 -0
  55. package/src/agents/tools/addInternalTools.ts +21 -0
  56. package/src/agents/tools/agentCall.ts +18 -0
  57. package/src/agents/tools/aiClient.ts +36 -0
  58. package/src/agents/tools/asana/definitions.ts +199 -0
  59. package/src/agents/tools/asana/index.ts +108 -0
  60. package/src/agents/tools/askHuman.ts +8 -0
  61. package/src/agents/tools/callPlugin.ts +4 -0
  62. package/src/agents/tools/embeddingSearch.ts +5 -0
  63. package/src/agents/tools/execCommand.ts +26 -0
  64. package/src/agents/tools/fileSearch.ts +33 -0
  65. package/src/agents/tools/finalAnswer.ts +4 -0
  66. package/src/agents/tools/github/definitions.ts +89 -0
  67. package/src/agents/tools/github/index.ts +67 -0
  68. package/src/agents/tools/googleSearch.ts +242 -0
  69. package/src/agents/tools/index.ts +24 -0
  70. package/src/agents/tools/language/definitions.ts +97 -0
  71. package/src/agents/tools/language/index.ts +19 -0
  72. package/src/agents/tools/lintFile.ts +17 -0
  73. package/src/agents/tools/list.ts +514 -0
  74. package/src/agents/tools/loadWebpage.ts +129 -0
  75. package/src/agents/tools/modifyFile.ts +53 -0
  76. package/src/agents/tools/patch.ts +672 -0
  77. package/src/agents/tools/readBlocks.ts +41 -0
  78. package/src/agents/tools/readFile.ts +39 -0
  79. package/src/agents/tools/scanFile.ts +16 -0
  80. package/src/agents/tools/textSearch.ts +21 -0
  81. package/src/agents/tools/types/fileblock.ts +5 -0
  82. package/src/agents/tools/visionTool.ts +5 -0
  83. package/src/agents/tools/writeFile.ts +46 -0
  84. package/src/agents/vim/vim.ts +153 -0
  85. package/src/ai.ts +167 -0
  86. package/src/chat.ts +412 -0
  87. package/src/cli.ts +85 -0
  88. package/src/clients/anthropic.ts +399 -0
  89. package/src/clients/gemini.ts +486 -0
  90. package/src/clients/http.ts +107 -0
  91. package/src/clients/index.ts +183 -0
  92. package/src/clients/knowhow.ts +33 -0
  93. package/src/clients/openai.ts +253 -0
  94. package/src/clients/types.ts +91 -0
  95. package/src/clients/xai.ts +132 -0
  96. package/src/config.ts +211 -0
  97. package/src/conversion.ts +140 -0
  98. package/src/dataset/diffs/README.md +12 -0
  99. package/src/dataset/diffs/debug-errors.ts +29 -0
  100. package/src/dataset/diffs/debug.ts +64 -0
  101. package/src/dataset/diffs/generate.ts +71 -0
  102. package/src/dataset/diffs/jsonl.ts +54 -0
  103. package/src/dataset/diffs/test.ts +193 -0
  104. package/src/embeddings.ts +411 -0
  105. package/src/hashes.ts +67 -0
  106. package/src/index.ts +376 -0
  107. package/src/login.ts +78 -0
  108. package/src/microphone.ts +136 -0
  109. package/src/modules/index.ts +37 -0
  110. package/src/modules/types.ts +48 -0
  111. package/src/plugins/asana.ts +134 -0
  112. package/src/plugins/downloader/downloader.ts +204 -0
  113. package/src/plugins/downloader/plugin.ts +85 -0
  114. package/src/plugins/downloader/types.ts +85 -0
  115. package/src/plugins/embedding.ts +42 -0
  116. package/src/plugins/figma.ts +137 -0
  117. package/src/plugins/github.ts +153 -0
  118. package/src/plugins/jira.ts +104 -0
  119. package/src/plugins/language.ts +100 -0
  120. package/src/plugins/linear.ts +219 -0
  121. package/src/plugins/notion.ts +170 -0
  122. package/src/plugins/plugins.ts +56 -0
  123. package/src/plugins/types.ts +5 -0
  124. package/src/plugins/url.ts +63 -0
  125. package/src/plugins/vim.ts +73 -0
  126. package/src/prompts/BasicCodeDocumenter.ts +1 -0
  127. package/src/prompts/BasicProjectDocumenter.ts +1 -0
  128. package/src/prompts/EmbeddingSeachHelper.ts +1 -0
  129. package/src/prompts/index.ts +9 -0
  130. package/src/server/index.ts +14 -0
  131. package/src/services/AgentService.ts +98 -0
  132. package/src/services/EmbeddingService.ts +410 -0
  133. package/src/services/EventService.ts +20 -0
  134. package/src/services/GitHub.ts +60 -0
  135. package/src/services/KnowhowClient.ts +113 -0
  136. package/src/services/Mcp.ts +270 -0
  137. package/src/services/McpServer.ts +119 -0
  138. package/src/services/McpWebsocketTransport.ts +64 -0
  139. package/src/services/S3.ts +126 -0
  140. package/src/services/Tools.ts +65 -0
  141. package/src/services/flags.ts +52 -0
  142. package/src/services/index.ts +8 -0
  143. package/src/types.ts +225 -0
  144. package/src/utils/index.ts +108 -0
  145. package/src/worker.ts +80 -0
  146. package/tests/integration/figma.test.ts +70 -0
  147. package/tests/integration/fileblocks/readwrite.test.ts +95 -0
  148. package/tests/integration/patching/input.txt +145 -0
  149. package/tests/integration/patching/output.txt +145 -0
  150. package/tests/integration/patching/patch.txt +15 -0
  151. package/tests/integration/patching/unseen.txt +80 -0
  152. package/tests/integration/patching.test.ts +136 -0
  153. package/tests/languagePlugin.test.ts +74 -0
  154. package/tests/patching/corrupted.test.ts +78 -0
  155. package/tests/patching/imports.patch.txt +11 -0
  156. package/tests/patching/imports.test.ts +43 -0
  157. package/tests/patching/imports.txt +11 -0
  158. package/tests/patching/interface.patch.txt +15 -0
  159. package/tests/patching/interface.txt +7 -0
  160. package/tests/test.spec.ts +132 -0
  161. package/ts_build/src/agents/base/base.d.ts +88 -0
  162. package/ts_build/src/agents/base/base.js +464 -0
  163. package/ts_build/src/agents/base/base.js.map +1 -0
  164. package/ts_build/src/agents/base/prompt.d.ts +1 -0
  165. package/ts_build/src/agents/base/prompt.js +30 -0
  166. package/ts_build/src/agents/base/prompt.js.map +1 -0
  167. package/ts_build/src/agents/configurable/ConfigAgent.d.ts +10 -0
  168. package/ts_build/src/agents/configurable/ConfigAgent.js +25 -0
  169. package/ts_build/src/agents/configurable/ConfigAgent.js.map +1 -0
  170. package/ts_build/src/agents/configurable/OpenAIAgent.d.ts +0 -0
  171. package/ts_build/src/agents/configurable/OpenAIAgent.js +1 -0
  172. package/ts_build/src/agents/configurable/OpenAIAgent.js.map +1 -0
  173. package/ts_build/src/agents/developer/developer.d.ts +9 -0
  174. package/ts_build/src/agents/developer/developer.js +69 -0
  175. package/ts_build/src/agents/developer/developer.js.map +1 -0
  176. package/ts_build/src/agents/index.d.ts +7 -0
  177. package/ts_build/src/agents/index.js +38 -0
  178. package/ts_build/src/agents/index.js.map +1 -0
  179. package/ts_build/src/agents/interface.d.ts +10 -0
  180. package/ts_build/src/agents/interface.js +3 -0
  181. package/ts_build/src/agents/interface.js.map +1 -0
  182. package/ts_build/src/agents/patcher/patcher.d.ts +9 -0
  183. package/ts_build/src/agents/patcher/patcher.js +106 -0
  184. package/ts_build/src/agents/patcher/patcher.js.map +1 -0
  185. package/ts_build/src/agents/researcher/researcher.d.ts +9 -0
  186. package/ts_build/src/agents/researcher/researcher.js +107 -0
  187. package/ts_build/src/agents/researcher/researcher.js.map +1 -0
  188. package/ts_build/src/agents/tools/addInternalTools.d.ts +5 -0
  189. package/ts_build/src/agents/tools/addInternalTools.js +18 -0
  190. package/ts_build/src/agents/tools/addInternalTools.js.map +1 -0
  191. package/ts_build/src/agents/tools/agentCall.d.ts +1 -0
  192. package/ts_build/src/agents/tools/agentCall.js +21 -0
  193. package/ts_build/src/agents/tools/agentCall.js.map +1 -0
  194. package/ts_build/src/agents/tools/aiClient.d.ts +6 -0
  195. package/ts_build/src/agents/tools/aiClient.js +25 -0
  196. package/ts_build/src/agents/tools/aiClient.js.map +1 -0
  197. package/ts_build/src/agents/tools/asana/definitions.d.ts +202 -0
  198. package/ts_build/src/agents/tools/asana/definitions.js +197 -0
  199. package/ts_build/src/agents/tools/asana/definitions.js.map +1 -0
  200. package/ts_build/src/agents/tools/asana/index.d.ts +8 -0
  201. package/ts_build/src/agents/tools/asana/index.js +98 -0
  202. package/ts_build/src/agents/tools/asana/index.js.map +1 -0
  203. package/ts_build/src/agents/tools/askHuman.d.ts +1 -0
  204. package/ts_build/src/agents/tools/askHuman.js +15 -0
  205. package/ts_build/src/agents/tools/askHuman.js.map +1 -0
  206. package/ts_build/src/agents/tools/callPlugin.d.ts +1 -0
  207. package/ts_build/src/agents/tools/callPlugin.js +9 -0
  208. package/ts_build/src/agents/tools/callPlugin.js.map +1 -0
  209. package/ts_build/src/agents/tools/client.d.ts +5 -0
  210. package/ts_build/src/agents/tools/client.js +21 -0
  211. package/ts_build/src/agents/tools/client.js.map +1 -0
  212. package/ts_build/src/agents/tools/embeddingSearch.d.ts +1 -0
  213. package/ts_build/src/agents/tools/embeddingSearch.js +9 -0
  214. package/ts_build/src/agents/tools/embeddingSearch.js.map +1 -0
  215. package/ts_build/src/agents/tools/execCommand.d.ts +1 -0
  216. package/ts_build/src/agents/tools/execCommand.js +25 -0
  217. package/ts_build/src/agents/tools/execCommand.js.map +1 -0
  218. package/ts_build/src/agents/tools/fileSearch.d.ts +1 -0
  219. package/ts_build/src/agents/tools/fileSearch.js +31 -0
  220. package/ts_build/src/agents/tools/fileSearch.js.map +1 -0
  221. package/ts_build/src/agents/tools/finalAnswer.d.ts +1 -0
  222. package/ts_build/src/agents/tools/finalAnswer.js +8 -0
  223. package/ts_build/src/agents/tools/finalAnswer.js.map +1 -0
  224. package/ts_build/src/agents/tools/github/definitions.d.ts +47 -0
  225. package/ts_build/src/agents/tools/github/definitions.js +86 -0
  226. package/ts_build/src/agents/tools/github/definitions.js.map +1 -0
  227. package/ts_build/src/agents/tools/github/index.d.ts +789 -0
  228. package/ts_build/src/agents/tools/github/index.js +56 -0
  229. package/ts_build/src/agents/tools/github/index.js.map +1 -0
  230. package/ts_build/src/agents/tools/googleSearch.d.ts +93 -0
  231. package/ts_build/src/agents/tools/googleSearch.js +117 -0
  232. package/ts_build/src/agents/tools/googleSearch.js.map +1 -0
  233. package/ts_build/src/agents/tools/googleSearchTypes.d.ts +74 -0
  234. package/ts_build/src/agents/tools/googleSearchTypes.js +3 -0
  235. package/ts_build/src/agents/tools/googleSearchTypes.js.map +1 -0
  236. package/ts_build/src/agents/tools/index.d.ts +24 -0
  237. package/ts_build/src/agents/tools/index.js +41 -0
  238. package/ts_build/src/agents/tools/index.js.map +1 -0
  239. package/ts_build/src/agents/tools/language/definitions.d.ts +89 -0
  240. package/ts_build/src/agents/tools/language/definitions.js +95 -0
  241. package/ts_build/src/agents/tools/language/definitions.js.map +1 -0
  242. package/ts_build/src/agents/tools/language/index.d.ts +4 -0
  243. package/ts_build/src/agents/tools/language/index.js +22 -0
  244. package/ts_build/src/agents/tools/language/index.js.map +1 -0
  245. package/ts_build/src/agents/tools/lintFile.d.ts +1 -0
  246. package/ts_build/src/agents/tools/lintFile.js +22 -0
  247. package/ts_build/src/agents/tools/lintFile.js.map +1 -0
  248. package/ts_build/src/agents/tools/list.d.ts +2 -0
  249. package/ts_build/src/agents/tools/list.js +505 -0
  250. package/ts_build/src/agents/tools/list.js.map +1 -0
  251. package/ts_build/src/agents/tools/loadWebpage.d.ts +8 -0
  252. package/ts_build/src/agents/tools/loadWebpage.js +97 -0
  253. package/ts_build/src/agents/tools/loadWebpage.js.map +1 -0
  254. package/ts_build/src/agents/tools/modifyFile.d.ts +2 -0
  255. package/ts_build/src/agents/tools/modifyFile.js +74 -0
  256. package/ts_build/src/agents/tools/modifyFile.js.map +1 -0
  257. package/ts_build/src/agents/tools/patch.d.ts +21 -0
  258. package/ts_build/src/agents/tools/patch.js +443 -0
  259. package/ts_build/src/agents/tools/patch.js.map +1 -0
  260. package/ts_build/src/agents/tools/readBlocks.d.ts +2 -0
  261. package/ts_build/src/agents/tools/readBlocks.js +59 -0
  262. package/ts_build/src/agents/tools/readBlocks.js.map +1 -0
  263. package/ts_build/src/agents/tools/readFile.d.ts +1 -0
  264. package/ts_build/src/agents/tools/readFile.js +46 -0
  265. package/ts_build/src/agents/tools/readFile.js.map +1 -0
  266. package/ts_build/src/agents/tools/scanFile.d.ts +1 -0
  267. package/ts_build/src/agents/tools/scanFile.js +36 -0
  268. package/ts_build/src/agents/tools/scanFile.js.map +1 -0
  269. package/ts_build/src/agents/tools/textSearch.d.ts +1 -0
  270. package/ts_build/src/agents/tools/textSearch.js +22 -0
  271. package/ts_build/src/agents/tools/textSearch.js.map +1 -0
  272. package/ts_build/src/agents/tools/types/fileblock.d.ts +5 -0
  273. package/ts_build/src/agents/tools/types/fileblock.js +3 -0
  274. package/ts_build/src/agents/tools/types/fileblock.js.map +1 -0
  275. package/ts_build/src/agents/tools/visionTool.d.ts +1 -0
  276. package/ts_build/src/agents/tools/visionTool.js +9 -0
  277. package/ts_build/src/agents/tools/visionTool.js.map +1 -0
  278. package/ts_build/src/agents/tools/writeFile.d.ts +2 -0
  279. package/ts_build/src/agents/tools/writeFile.js +61 -0
  280. package/ts_build/src/agents/tools/writeFile.js.map +1 -0
  281. package/ts_build/src/agents/vim/vim.d.ts +14 -0
  282. package/ts_build/src/agents/vim/vim.js +171 -0
  283. package/ts_build/src/agents/vim/vim.js.map +1 -0
  284. package/ts_build/src/ai.d.ts +10 -0
  285. package/ts_build/src/ai.js +102 -0
  286. package/ts_build/src/ai.js.map +1 -0
  287. package/ts_build/src/chat.d.ts +13 -0
  288. package/ts_build/src/chat.js +319 -0
  289. package/ts_build/src/chat.js.map +1 -0
  290. package/ts_build/src/cli.d.ts +2 -0
  291. package/ts_build/src/cli.js +98 -0
  292. package/ts_build/src/cli.js.map +1 -0
  293. package/ts_build/src/clients/anthropic.d.ts +31 -0
  294. package/ts_build/src/clients/anthropic.js +344 -0
  295. package/ts_build/src/clients/anthropic.js.map +1 -0
  296. package/ts_build/src/clients/gemini.d.ts +20 -0
  297. package/ts_build/src/clients/gemini.js +347 -0
  298. package/ts_build/src/clients/gemini.js.map +1 -0
  299. package/ts_build/src/clients/http.d.ts +12 -0
  300. package/ts_build/src/clients/http.js +91 -0
  301. package/ts_build/src/clients/http.js.map +1 -0
  302. package/ts_build/src/clients/index.d.ts +47 -0
  303. package/ts_build/src/clients/index.js +143 -0
  304. package/ts_build/src/clients/index.js.map +1 -0
  305. package/ts_build/src/clients/knowhow.d.ts +10 -0
  306. package/ts_build/src/clients/knowhow.js +24 -0
  307. package/ts_build/src/clients/knowhow.js.map +1 -0
  308. package/ts_build/src/clients/openai.d.ts +20 -0
  309. package/ts_build/src/clients/openai.js +221 -0
  310. package/ts_build/src/clients/openai.js.map +1 -0
  311. package/ts_build/src/clients/types.d.ts +89 -0
  312. package/ts_build/src/clients/types.js +3 -0
  313. package/ts_build/src/clients/types.js.map +1 -0
  314. package/ts_build/src/clients/xai.d.ts +22 -0
  315. package/ts_build/src/clients/xai.js +108 -0
  316. package/ts_build/src/clients/xai.js.map +1 -0
  317. package/ts_build/src/config.d.ts +9 -0
  318. package/ts_build/src/config.js +216 -0
  319. package/ts_build/src/config.js.map +1 -0
  320. package/ts_build/src/conversion.d.ts +7 -0
  321. package/ts_build/src/conversion.js +114 -0
  322. package/ts_build/src/conversion.js.map +1 -0
  323. package/ts_build/src/dataset/diffs/debug-errors.d.ts +1 -0
  324. package/ts_build/src/dataset/diffs/debug-errors.js +28 -0
  325. package/ts_build/src/dataset/diffs/debug-errors.js.map +1 -0
  326. package/ts_build/src/dataset/diffs/debug.d.ts +1 -0
  327. package/ts_build/src/dataset/diffs/debug.js +50 -0
  328. package/ts_build/src/dataset/diffs/debug.js.map +1 -0
  329. package/ts_build/src/dataset/diffs/generate.d.ts +1 -0
  330. package/ts_build/src/dataset/diffs/generate.js +70 -0
  331. package/ts_build/src/dataset/diffs/generate.js.map +1 -0
  332. package/ts_build/src/dataset/diffs/jsonl.d.ts +1 -0
  333. package/ts_build/src/dataset/diffs/jsonl.js +47 -0
  334. package/ts_build/src/dataset/diffs/jsonl.js.map +1 -0
  335. package/ts_build/src/dataset/diffs/test.d.ts +1 -0
  336. package/ts_build/src/dataset/diffs/test.js +114 -0
  337. package/ts_build/src/dataset/diffs/test.js.map +1 -0
  338. package/ts_build/src/embeddings.d.ts +19 -0
  339. package/ts_build/src/embeddings.js +322 -0
  340. package/ts_build/src/embeddings.js.map +1 -0
  341. package/ts_build/src/hashes.d.ts +6 -0
  342. package/ts_build/src/hashes.js +78 -0
  343. package/ts_build/src/hashes.js.map +1 -0
  344. package/ts_build/src/index.d.ts +14 -0
  345. package/ts_build/src/index.js +258 -0
  346. package/ts_build/src/index.js.map +1 -0
  347. package/ts_build/src/login.d.ts +2 -0
  348. package/ts_build/src/login.js +63 -0
  349. package/ts_build/src/login.js.map +1 -0
  350. package/ts_build/src/microphone.d.ts +9 -0
  351. package/ts_build/src/microphone.js +131 -0
  352. package/ts_build/src/microphone.js.map +1 -0
  353. package/ts_build/src/modules/index.d.ts +3 -0
  354. package/ts_build/src/modules/index.js +34 -0
  355. package/ts_build/src/modules/index.js.map +1 -0
  356. package/ts_build/src/modules/types.d.ts +37 -0
  357. package/ts_build/src/modules/types.js +3 -0
  358. package/ts_build/src/modules/types.js.map +1 -0
  359. package/ts_build/src/plugins/asana.d.ts +16 -0
  360. package/ts_build/src/plugins/asana.js +114 -0
  361. package/ts_build/src/plugins/asana.js.map +1 -0
  362. package/ts_build/src/plugins/downloader/downloader.d.ts +12 -0
  363. package/ts_build/src/plugins/downloader/downloader.js +174 -0
  364. package/ts_build/src/plugins/downloader/downloader.js.map +1 -0
  365. package/ts_build/src/plugins/downloader/index.d.ts +3 -0
  366. package/ts_build/src/plugins/downloader/index.js +41 -0
  367. package/ts_build/src/plugins/downloader/index.js.map +1 -0
  368. package/ts_build/src/plugins/downloader/plugin.d.ts +8 -0
  369. package/ts_build/src/plugins/downloader/plugin.js +83 -0
  370. package/ts_build/src/plugins/downloader/plugin.js.map +1 -0
  371. package/ts_build/src/plugins/downloader/types.d.ts +82 -0
  372. package/ts_build/src/plugins/downloader/types.js +79 -0
  373. package/ts_build/src/plugins/downloader/types.js.map +1 -0
  374. package/ts_build/src/plugins/embedding.d.ts +5 -0
  375. package/ts_build/src/plugins/embedding.js +28 -0
  376. package/ts_build/src/plugins/embedding.js.map +1 -0
  377. package/ts_build/src/plugins/figma.d.ts +20 -0
  378. package/ts_build/src/plugins/figma.js +94 -0
  379. package/ts_build/src/plugins/figma.js.map +1 -0
  380. package/ts_build/src/plugins/github.d.ts +1223 -0
  381. package/ts_build/src/plugins/github.js +115 -0
  382. package/ts_build/src/plugins/github.js.map +1 -0
  383. package/ts_build/src/plugins/jira.d.ts +15 -0
  384. package/ts_build/src/plugins/jira.js +94 -0
  385. package/ts_build/src/plugins/jira.js.map +1 -0
  386. package/ts_build/src/plugins/language.d.ts +8 -0
  387. package/ts_build/src/plugins/language.js +69 -0
  388. package/ts_build/src/plugins/language.js.map +1 -0
  389. package/ts_build/src/plugins/linear.d.ts +23 -0
  390. package/ts_build/src/plugins/linear.js +184 -0
  391. package/ts_build/src/plugins/linear.js.map +1 -0
  392. package/ts_build/src/plugins/notion.d.ts +32 -0
  393. package/ts_build/src/plugins/notion.js +131 -0
  394. package/ts_build/src/plugins/notion.js.map +1 -0
  395. package/ts_build/src/plugins/plugins.d.ts +11 -0
  396. package/ts_build/src/plugins/plugins.js +51 -0
  397. package/ts_build/src/plugins/plugins.js.map +1 -0
  398. package/ts_build/src/plugins/types.d.ts +5 -0
  399. package/ts_build/src/plugins/types.js +3 -0
  400. package/ts_build/src/plugins/types.js.map +1 -0
  401. package/ts_build/src/plugins/url.d.ts +8 -0
  402. package/ts_build/src/plugins/url.js +50 -0
  403. package/ts_build/src/plugins/url.js.map +1 -0
  404. package/ts_build/src/plugins/vim.d.ts +11 -0
  405. package/ts_build/src/plugins/vim.js +63 -0
  406. package/ts_build/src/plugins/vim.js.map +1 -0
  407. package/ts_build/src/prompts/BasicCodeDocumenter.d.ts +2 -0
  408. package/ts_build/src/prompts/BasicCodeDocumenter.js +4 -0
  409. package/ts_build/src/prompts/BasicCodeDocumenter.js.map +1 -0
  410. package/ts_build/src/prompts/BasicProjectDocumenter.d.ts +2 -0
  411. package/ts_build/src/prompts/BasicProjectDocumenter.js +4 -0
  412. package/ts_build/src/prompts/BasicProjectDocumenter.js.map +1 -0
  413. package/ts_build/src/prompts/EmbeddingSeachHelper.d.ts +2 -0
  414. package/ts_build/src/prompts/EmbeddingSeachHelper.js +4 -0
  415. package/ts_build/src/prompts/EmbeddingSeachHelper.js.map +1 -0
  416. package/ts_build/src/prompts/index.d.ts +13 -0
  417. package/ts_build/src/prompts/index.js +15 -0
  418. package/ts_build/src/prompts/index.js.map +1 -0
  419. package/ts_build/src/server/index.d.ts +1 -0
  420. package/ts_build/src/server/index.js +17 -0
  421. package/ts_build/src/server/index.js.map +1 -0
  422. package/ts_build/src/services/AgentService.d.ts +14 -0
  423. package/ts_build/src/services/AgentService.js +87 -0
  424. package/ts_build/src/services/AgentService.js.map +1 -0
  425. package/ts_build/src/services/EmbeddingService.d.ts +39 -0
  426. package/ts_build/src/services/EmbeddingService.js +307 -0
  427. package/ts_build/src/services/EmbeddingService.js.map +1 -0
  428. package/ts_build/src/services/EventService.d.ts +9 -0
  429. package/ts_build/src/services/EventService.js +20 -0
  430. package/ts_build/src/services/EventService.js.map +1 -0
  431. package/ts_build/src/services/GitHub.d.ts +11 -0
  432. package/ts_build/src/services/GitHub.js +52 -0
  433. package/ts_build/src/services/GitHub.js.map +1 -0
  434. package/ts_build/src/services/KnowhowClient.d.ts +18 -0
  435. package/ts_build/src/services/KnowhowClient.js +85 -0
  436. package/ts_build/src/services/KnowhowClient.js.map +1 -0
  437. package/ts_build/src/services/Mcp.d.ts +377 -0
  438. package/ts_build/src/services/Mcp.js +221 -0
  439. package/ts_build/src/services/Mcp.js.map +1 -0
  440. package/ts_build/src/services/McpServer.d.ts +19 -0
  441. package/ts_build/src/services/McpServer.js +104 -0
  442. package/ts_build/src/services/McpServer.js.map +1 -0
  443. package/ts_build/src/services/McpWebsocketTransport.d.ts +13 -0
  444. package/ts_build/src/services/McpWebsocketTransport.js +59 -0
  445. package/ts_build/src/services/McpWebsocketTransport.js.map +1 -0
  446. package/ts_build/src/services/S3.d.ts +9 -0
  447. package/ts_build/src/services/S3.js +116 -0
  448. package/ts_build/src/services/S3.js.map +1 -0
  449. package/ts_build/src/services/Tools.d.ts +19 -0
  450. package/ts_build/src/services/Tools.js +51 -0
  451. package/ts_build/src/services/Tools.js.map +1 -0
  452. package/ts_build/src/services/flags.d.ts +13 -0
  453. package/ts_build/src/services/flags.js +48 -0
  454. package/ts_build/src/services/flags.js.map +1 -0
  455. package/ts_build/src/services/index.d.ts +8 -0
  456. package/ts_build/src/services/index.js +38 -0
  457. package/ts_build/src/services/index.js.map +1 -0
  458. package/ts_build/src/terminal.d.ts +1 -0
  459. package/ts_build/src/terminal.js +35 -0
  460. package/ts_build/src/terminal.js.map +1 -0
  461. package/ts_build/src/types.d.ts +181 -0
  462. package/ts_build/src/types.js +94 -0
  463. package/ts_build/src/types.js.map +1 -0
  464. package/ts_build/src/utils/index.d.ts +24 -0
  465. package/ts_build/src/utils/index.js +116 -0
  466. package/ts_build/src/utils/index.js.map +1 -0
  467. package/ts_build/src/worker.d.ts +1 -0
  468. package/ts_build/src/worker.js +68 -0
  469. package/ts_build/src/worker.js.map +1 -0
  470. package/ts_build/tests/integration/figma.test.d.ts +1 -0
  471. package/ts_build/tests/integration/figma.test.js +47 -0
  472. package/ts_build/tests/integration/figma.test.js.map +1 -0
  473. package/ts_build/tests/integration/fileblocks/readwrite.test.d.ts +1 -0
  474. package/ts_build/tests/integration/fileblocks/readwrite.test.js +95 -0
  475. package/ts_build/tests/integration/fileblocks/readwrite.test.js.map +1 -0
  476. package/ts_build/tests/integration/patching.test.d.ts +1 -0
  477. package/ts_build/tests/integration/patching.test.js +117 -0
  478. package/ts_build/tests/integration/patching.test.js.map +1 -0
  479. package/ts_build/tests/languagePlugin.test.d.ts +1 -0
  480. package/ts_build/tests/languagePlugin.test.js +78 -0
  481. package/ts_build/tests/languagePlugin.test.js.map +1 -0
  482. package/ts_build/tests/patching/corrupted.test.d.ts +1 -0
  483. package/ts_build/tests/patching/corrupted.test.js +53 -0
  484. package/ts_build/tests/patching/corrupted.test.js.map +1 -0
  485. package/ts_build/tests/patching/imports.test.d.ts +1 -0
  486. package/ts_build/tests/patching/imports.test.js +61 -0
  487. package/ts_build/tests/patching/imports.test.js.map +1 -0
  488. package/ts_build/tests/test.spec.d.ts +1 -0
  489. package/ts_build/tests/test.spec.js +101 -0
  490. package/ts_build/tests/test.spec.js.map +1 -0
  491. package/tsconfig.json +31 -0
  492. package/tslint.json +11 -0
@@ -0,0 +1,45 @@
1
+ # Figma Plugin Executive Summary
2
+
3
+ ## Overview
4
+
5
+ The Figma Plugin is designed to enhance user interactions by integrating Figma file data into chat environments. It detects and resolves Figma file URLs from user prompts, fetches relevant data from these files, and provides enriched context to the chat. Additionally, it generates embeddings based on the extracted Figma data, which can be used for various downstream applications such as search, recommendation, and more.
6
+
7
+ ## Key Features
8
+
9
+ ### Input Detection and Resolution
10
+
11
+ - **URL Extraction**: The plugin identifies Figma file URLs embedded within user prompts.
12
+ - **Data Fetching**: It retrieves detailed information from the specified Figma files, including images, components, styles, and more.
13
+ - **Error Handling**: The plugin gracefully handles errors during data fetching, ensuring robust performance.
14
+
15
+ ### Context Enrichment
16
+
17
+ - **Image Descriptions**: By leveraging AI (e.g., GPT Vision), the plugin generates descriptive text for images found within Figma files. This provides users with a richer understanding of the visual content.
18
+ - **Structured Data**: The plugin formats and presents Figma data in a structured manner, making it easier for users to comprehend and utilize the information.
19
+
20
+ ### Embedding Generation
21
+
22
+ - **Minimal Embeddings**: The plugin creates minimal embeddings from the Figma data, which include:
23
+ - **ID**: Unique identifier for the Figma file.
24
+ - **Text**: A JSON string representation of the Figma data.
25
+ - **Metadata**: Additional metadata associated with the Figma file.
26
+
27
+ These embeddings can be used for various purposes, such as improving search relevance, enhancing recommendations, and more.
28
+
29
+ ## Environment Variables
30
+
31
+ To function correctly, the Figma Plugin requires the following environment variable to be set:
32
+
33
+ - **FIGMA_API_KEY**: This is the personal access token used to authenticate requests to the Figma API. It must be set in the environment where the plugin is running.
34
+
35
+ ## Usage
36
+
37
+ The Figma Plugin can be integrated into chat applications to provide users with enhanced interactions involving Figma files. Here’s how it can be used:
38
+
39
+ 1. **Detect Figma URLs**: The plugin scans user prompts for Figma file URLs.
40
+ 2. **Fetch Figma Data**: It retrieves data from the identified Figma files, including images and other relevant components.
41
+ 3. **Generate Descriptions**: Using AI, the plugin generates descriptive text for images within the Figma files.
42
+ 4. **Embed Data**: It creates minimal embeddings from the Figma data, which can be used for various downstream applications.
43
+ 5. **Enrich Chat Context**: The plugin adds enriched context to the chat, providing users with detailed information about the Figma files.
44
+
45
+ By integrating this plugin, chat applications can offer users a more interactive and informative experience when dealing with Figma files.
@@ -0,0 +1,40 @@
1
+ # GitHub Plugin Executive Summary
2
+
3
+ ## Overview
4
+
5
+ The GitHub Plugin is designed to enhance chat interactions by detecting and resolving GitHub pull request URLs within user prompts. It provides additional context by embedding detailed information about the changes in the pull requests. This plugin is particularly useful for teams and individuals who frequently discuss code changes and need quick access to the specifics of those changes.
6
+
7
+ ## Key Features
8
+
9
+ ### Input Detection and Resolution
10
+
11
+ - **Pull Request URL Detection**: The plugin scans user prompts for GitHub pull request URLs. It uses a regex pattern to identify URLs that match the format `https://github.com/{owner}/{repo}/pull/{pull_number}`.
12
+ - **Diff Retrieval**: Once a pull request URL is detected, the plugin retrieves the diff associated with that pull request. This includes all the changes made in the pull request, formatted as a diff.
13
+
14
+ ### Contextual Enhancements
15
+
16
+ - **Parsed Diffs**: The plugin parses the diffs to filter out large changes, ensuring that only manageable and relevant changes are included. This helps in focusing on the most significant parts of the pull request.
17
+ - **Formatted Output**: The diffs are formatted in a readable manner, often in Markdown, making it easy to understand the changes directly within the chat interface.
18
+
19
+ ### Embeddings
20
+
21
+ - **Minimal Embeddings**: The plugin generates minimal embeddings for the detected pull request URLs. Each embedding includes:
22
+ - **ID**: The URL of the pull request.
23
+ - **Text**: A JSON string representation of the parsed diff.
24
+ - **Metadata**: Additional metadata, if any, associated with the diff.
25
+
26
+ ## Environment Variables
27
+
28
+ To function correctly, the GitHub Plugin requires the following environment variable to be set:
29
+
30
+ - **GITHUB_TOKEN**: This is a personal access token used to authenticate with the GitHub API. It must be set in the environment where the plugin is running. The token should have sufficient permissions to read pull request data from the repositories of interest.
31
+
32
+ ## Usage
33
+
34
+ The GitHub Plugin can be used in various scenarios, including:
35
+
36
+ - **Code Reviews**: Automatically expand pull request URLs in chat to show the changes, facilitating quick reviews and discussions.
37
+ - **Team Collaboration**: Enhance team communication by providing immediate context about code changes without leaving the chat interface.
38
+ - **Automated Reporting**: Generate summaries of pull request changes for reporting purposes or automated notifications.
39
+
40
+ By integrating this plugin, users can streamline their workflow, reduce context-switching, and improve the efficiency of code-related discussions.
@@ -0,0 +1,46 @@
1
+ # Jira Plugin Executive Summary
2
+
3
+ ## Overview
4
+
5
+ The Jira Plugin is designed to enhance chat interactions by detecting and resolving Jira issue URLs within user prompts. It provides additional context to chats by embedding detailed information about the referenced Jira issues. This plugin is particularly useful for teams that rely on Jira for project management and need to quickly access and share issue details within their communication channels.
6
+
7
+ ## Key Features
8
+
9
+ ### Input Detection and Resolution
10
+
11
+ - **URL Extraction**: The plugin scans user prompts for Jira issue URLs based on a predefined pattern.
12
+ - **Issue Retrieval**: It fetches detailed information about the identified Jira issues using the Jira API.
13
+ - **Error Handling**: The plugin gracefully handles errors during the issue retrieval process, ensuring that the chat experience remains smooth even if some issues cannot be fetched.
14
+
15
+ ### Contextual Enhancements
16
+
17
+ - **Issue Embedding**: The plugin generates embeddings for the detected Jira issues, which include the issue ID, a JSON representation of the issue details, and metadata.
18
+ - **Chat Augmentation**: It enriches chat conversations by providing a structured summary of the Jira issues, including the issue key, summary, URL, and description.
19
+
20
+ ### Embedding Generation
21
+
22
+ - **Minimal Embedding**: The plugin creates minimal embeddings that encapsulate essential information about each Jira issue. These embeddings can be used to provide quick references or to integrate with other systems that require issue data.
23
+
24
+ ## Environment Variables
25
+
26
+ To function correctly, the Jira Plugin requires the following environment variables to be set:
27
+
28
+ - **JIRA_HOST**: The host URL of the Jira instance.
29
+ - **JIRA_USER**: The username for authenticating with the Jira API.
30
+ - **JIRA_PASSWORD**: The password for authenticating with the Jira API.
31
+
32
+ These environment variables ensure secure and authenticated access to the Jira instance, allowing the plugin to fetch issue details as needed.
33
+
34
+ ## Usage
35
+
36
+ The Jira Plugin can be integrated into chat systems to automatically detect and resolve Jira issue URLs. When a user includes a Jira issue URL in their message, the plugin will:
37
+
38
+ 1. Extract the URL and identify the corresponding Jira issue.
39
+ 2. Fetch detailed information about the issue from the Jira API.
40
+ 3. Embed the issue details into the chat, providing a concise summary that includes the issue key, summary, URL, and description.
41
+
42
+ This functionality allows team members to quickly access and share relevant Jira issue information without leaving their chat environment, thereby improving productivity and collaboration.
43
+
44
+ ## Conclusion
45
+
46
+ The Jira Plugin is a powerful tool for teams that use Jira for project management. By automatically detecting and resolving Jira issue URLs and embedding detailed issue information into chats, it enhances communication and ensures that team members have quick access to the information they need. Setting the required environment variables ensures secure and seamless integration with your Jira instance.
@@ -0,0 +1,37 @@
1
+ # Language Plugin Executive Summary
2
+
3
+ ## Overview
4
+
5
+ The Language Plugin is designed to enhance user interactions by detecting specific terms within user prompts and providing additional context to enrich the conversation. This plugin integrates with various other plugins and sources to gather relevant information, ensuring that responses are well-informed and contextually accurate.
6
+
7
+ ## Key Features
8
+
9
+ ### Input Detection and Resolution
10
+
11
+ - **Term Detection**: The plugin scans user prompts for specific terms defined in a language configuration file.
12
+ - **Contextual Expansion**: Upon detecting these terms, the plugin retrieves relevant information from various sources, including files and other integrated plugins.
13
+
14
+ ### Context Addition
15
+
16
+ - **File Content Retrieval**: The plugin reads and includes content from specified files that are relevant to the detected terms.
17
+ - **Textual Data Inclusion**: It also incorporates predefined textual data associated with the detected terms.
18
+ - **Plugin Integration**: The plugin can call other integrated plugins (e.g., GitHub, Asana, Jira, Linear) to fetch additional context, ensuring a comprehensive response.
19
+
20
+ ### Embeddings Generation
21
+
22
+ - **Contextual Embeddings**: Although the primary function is to add context, the plugin can generate embeddings based on the user prompt and the gathered contextual information. These embeddings can be used to further refine responses or for other analytical purposes.
23
+
24
+ ## Environment Variables
25
+
26
+ To function correctly, the Language Plugin requires the following environment variables to be set:
27
+
28
+ - **`process.env.CONFIG_PATH`**: Path to the main configuration file.
29
+ - **`process.env.LANGUAGE_CONFIG_PATH`**: Path to the language-specific configuration file.
30
+
31
+ These environment variables ensure that the plugin can access the necessary configuration files to detect terms and gather relevant context.
32
+
33
+ ## Usage
34
+
35
+ The Language Plugin can be used in any application where enhanced, contextually aware responses are needed. It is particularly useful in customer support, virtual assistants, and any interactive system where understanding and responding to user queries accurately is crucial.
36
+
37
+ By integrating with other plugins and sources, the Language Plugin ensures that responses are not only relevant but also enriched with additional information, providing a more comprehensive and satisfying user experience.
@@ -0,0 +1,35 @@
1
+ # Linear Plugin Executive Summary
2
+
3
+ ## Overview
4
+
5
+ The Linear Plugin is designed to enhance chat interactions by detecting and resolving Linear issue URLs within user prompts. It provides additional context to chats by embedding detailed information about the referenced Linear issues. This plugin is particularly useful for teams using Linear for project management, as it allows seamless integration of issue tracking data into chat environments.
6
+
7
+ ## Key Features
8
+
9
+ ### Input Detection and Resolution
10
+
11
+ - **URL Extraction**: The plugin scans user prompts for Linear issue URLs. It uses a regex pattern to identify URLs that match the Linear issue format.
12
+ - **Issue Data Retrieval**: For each detected URL, the plugin fetches detailed information about the corresponding Linear issue, including its identifier, title, URL, and description.
13
+
14
+ ### Contextual Enhancements
15
+
16
+ - **Issue Embedding**: The plugin generates embeddings for each detected Linear issue. These embeddings include:
17
+ - **ID**: The URL of the issue.
18
+ - **Text**: A formatted string containing the issue's identifier, title, URL, and description.
19
+ - **Metadata**: Additional metadata (currently empty but can be extended).
20
+
21
+ ### Embedding Generation
22
+
23
+ - **Minimal Embedding**: The plugin creates minimal embeddings that encapsulate essential information about each Linear issue. These embeddings can be used to enrich chat interactions with relevant issue details, making it easier for team members to discuss and resolve issues directly within the chat environment.
24
+
25
+ ## Environment Variables
26
+
27
+ To function correctly, the Linear Plugin requires the following environment variable to be set:
28
+
29
+ - **LINEAR_API_KEY**: This API key is used to authenticate requests to the Linear API. Ensure that this environment variable is set with a valid Linear API key before using the plugin.
30
+
31
+ ## Usage
32
+
33
+ The Linear Plugin can be integrated into chat applications to provide real-time issue tracking and context. When a user includes a Linear issue URL in their message, the plugin automatically detects the URL, retrieves the issue details, and embeds the information into the chat. This allows team members to quickly access and discuss relevant issue details without leaving the chat environment.
34
+
35
+ By leveraging the Linear Plugin, teams can improve their workflow efficiency, enhance communication, and maintain better visibility over their project management tasks directly within their chat applications.
@@ -0,0 +1,38 @@
1
+ # Notion Plugin Executive Summary
2
+
3
+ ## Overview
4
+
5
+ The Notion Plugin is designed to enhance chat interactions by integrating Notion content directly into conversations. It detects Notion URLs within user inputs, retrieves the corresponding Notion pages and their child blocks, and generates embeddings that can be used to provide additional context in chats. This plugin is particularly useful for users who frequently reference Notion documents and wish to seamlessly incorporate their content into discussions.
6
+
7
+ ## Key Features
8
+
9
+ ### Input Detection and Resolution
10
+
11
+ - **URL Extraction**: The plugin scans user inputs for Notion URLs using a regular expression pattern. It identifies and extracts URLs that point to Notion pages.
12
+ - **Page Retrieval**: For each detected URL, the plugin retrieves the corresponding Notion page and its child blocks. This includes handling nested blocks up to a specified depth.
13
+
14
+ ### Contextual Enhancements
15
+
16
+ - **Content Embedding**: The plugin generates embeddings from the retrieved Notion pages and their child blocks. These embeddings include the text content and metadata, which can be used to enrich chat interactions with relevant information from Notion.
17
+ - **Hierarchical Data Handling**: The plugin processes hierarchical data structures within Notion pages, ensuring that nested blocks and child pages are included in the embeddings.
18
+
19
+ ### Embedding Generation
20
+
21
+ - **Minimal Embeddings**: The plugin creates minimal embeddings that encapsulate the essential content and metadata of Notion pages and blocks. These embeddings are structured to facilitate easy integration into chat systems.
22
+ - **Comprehensive Data**: The embeddings include text content extracted from various block types within Notion, ensuring a comprehensive representation of the page's information.
23
+
24
+ ## Environment Variables
25
+
26
+ To function correctly, the Notion Plugin requires the following environment variable to be set:
27
+
28
+ - **NOTION_TOKEN**: This token is used to authenticate requests to the Notion API. It must be set in the environment where the plugin is running.
29
+
30
+ ## Usage
31
+
32
+ The Notion Plugin can be used in various scenarios where integrating Notion content into chat interactions is beneficial. For example:
33
+
34
+ - **Customer Support**: Support agents can quickly reference and share relevant Notion documentation with customers during chat sessions.
35
+ - **Team Collaboration**: Team members can embed and discuss specific Notion pages within chat platforms, facilitating more informed and context-rich conversations.
36
+ - **Knowledge Management**: Users can pull in detailed information from Notion pages to answer questions or provide explanations in chat environments.
37
+
38
+ By leveraging the Notion Plugin, users can enhance their chat interactions with rich, contextual information from their Notion workspace, improving communication efficiency and effectiveness.
@@ -0,0 +1,59 @@
1
+ # Plugin Service Executive Summary
2
+
3
+ ## Overview
4
+
5
+ The Plugin Service is a comprehensive system designed to enhance chat interactions by detecting and resolving various types of inputs, adding contextual information, and generating embeddings. This service integrates multiple specialized plugins, each contributing unique functionalities to improve user experience and productivity.
6
+
7
+ ## Input Detection and Resolution
8
+
9
+ The Plugin Service is capable of detecting and resolving a wide range of inputs through its diverse set of plugins. Each plugin is tailored to handle specific types of data and interactions:
10
+
11
+ - **VimPlugin**: Enhances text editing capabilities with Vim-like commands.
12
+ - **GitHubPlugin**: Manages GitHub repositories, issues, and pull requests.
13
+ - **AsanaPlugin**: Integrates with Asana for task and project management.
14
+ - **LinearPlugin**: Connects with Linear for issue tracking and project management.
15
+ - **JiraPlugin**: Interfaces with Jira for comprehensive project tracking.
16
+ - **NotionPlugin**: Syncs with Notion for note-taking and project organization.
17
+ - **DownloaderPlugin**: Facilitates downloading of files and resources.
18
+ - **FigmaPlugin**: Integrates with Figma for design collaboration.
19
+ - **LanguagePlugin**: Provides language processing capabilities.
20
+ - **EmbeddingPlugin**: Generates embeddings for various types of data.
21
+
22
+ ## Contextual Enhancements
23
+
24
+ The Plugin Service adds valuable context to chat interactions by leveraging the capabilities of its integrated plugins. For example:
25
+
26
+ - **GitHubPlugin** can provide context about recent commits, open issues, and pull requests.
27
+ - **AsanaPlugin** and **LinearPlugin** can offer insights into task statuses and project timelines.
28
+ - **JiraPlugin** can deliver updates on project progress and issue resolutions.
29
+ - **NotionPlugin** can share notes and project documentation.
30
+ - **FigmaPlugin** can present design updates and feedback.
31
+
32
+ These contextual enhancements ensure that users have access to relevant information directly within their chat environment, streamlining workflows and improving decision-making.
33
+
34
+ ## Embedding Generation
35
+
36
+ The Plugin Service supports the generation of embeddings through the **EmbeddingPlugin**. Embeddings are vector representations of data that can be used for various purposes, such as:
37
+
38
+ - **Text Embeddings**: Representing textual data in a numerical format for natural language processing tasks.
39
+ - **Image Embeddings**: Converting visual data into vectors for image recognition and analysis.
40
+ - **Custom Embeddings**: Generating embeddings for domain-specific data to enhance search and recommendation systems.
41
+
42
+ These embeddings enable advanced data processing and machine learning applications, making the Plugin Service a powerful tool for data-driven tasks.
43
+
44
+ ## Environment Variables
45
+
46
+ To ensure the proper functioning of the Plugin Service, certain environment variables need to be set. These variables are used to configure the plugins and provide necessary credentials and settings. The required environment variables include:
47
+
48
+ - **GITHUB_TOKEN**: Required for the **GitHubPlugin** to authenticate and interact with GitHub APIs.
49
+ - **ASANA_TOKEN**: Required for the **AsanaPlugin** to access Asana's API.
50
+ - **LINEAR_API_KEY**: Required for the **LinearPlugin** to connect with Linear's services.
51
+ - **JIRA_API_TOKEN**: Required for the **JiraPlugin** to authenticate with Jira.
52
+ - **NOTION_API_KEY**: Required for the **NotionPlugin** to interact with Notion's API.
53
+ - **FIGMA_API_KEY**: Required for the **FigmaPlugin** to access Figma's API.
54
+
55
+ These environment variables should be set in the system where the Plugin Service is deployed to ensure seamless integration and functionality.
56
+
57
+ ## Conclusion
58
+
59
+ The Plugin Service is a versatile and powerful system that enhances chat interactions by detecting and resolving various inputs, adding contextual information, and generating embeddings. By integrating with multiple specialized plugins, it provides a comprehensive solution for improving productivity and user experience in chat environments. Proper configuration of environment variables is essential for the optimal performance of the service.
@@ -0,0 +1,51 @@
1
+ # Executive Summary: Chat Enhancement Plugin
2
+
3
+ ## Overview
4
+
5
+ The Chat Enhancement Plugin is designed to augment chat interactions by detecting and resolving specific types of user inputs, adding valuable context to conversations, and generating various types of embeddings. This plugin is particularly useful for applications that require advanced text processing, contextual understanding, and semantic embedding capabilities.
6
+
7
+ ## Key Features
8
+
9
+ ### Input Detection and Resolution
10
+
11
+ The plugin is capable of detecting and resolving a wide range of user inputs. This includes, but is not limited to:
12
+
13
+ - **Natural Language Queries:** The plugin can interpret and respond to user questions and commands.
14
+ - **Contextual Prompts:** It can understand and provide relevant information based on the context of the conversation.
15
+ - **Data Extraction:** The plugin can identify and extract key pieces of information from user inputs.
16
+
17
+ ### Contextual Enhancements
18
+
19
+ One of the standout features of this plugin is its ability to add extra context to chats. This includes:
20
+
21
+ - **Contextual Responses:** The plugin can generate responses that are contextually relevant to the ongoing conversation.
22
+ - **Information Augmentation:** It can provide additional information that enhances the user's understanding of the topic being discussed.
23
+ - **Dynamic Context Updates:** The plugin can dynamically update the context as the conversation progresses, ensuring that responses remain relevant.
24
+
25
+ ### Embedding Generation
26
+
27
+ The plugin supports the generation of various types of embeddings, which are essential for tasks such as semantic search, recommendation systems, and more. The types of embeddings it can generate include:
28
+
29
+ - **Minimal Embeddings:** These are lightweight embeddings that capture the essential semantics of the user input.
30
+ - **Contextual Embeddings:** These embeddings take into account the context of the conversation, providing a richer representation of the input.
31
+
32
+ ## Environment Variables
33
+
34
+ To ensure the plugin functions correctly, certain environment variables need to be set. These variables are used to configure the plugin and provide necessary credentials or settings. The required environment variables include:
35
+
36
+ - **API_KEY:** This variable should be set to the API key provided by the service the plugin interacts with. It is essential for authenticating requests.
37
+ - **ENVIRONMENT:** This variable specifies the environment in which the plugin is running (e.g., 'development', 'production') and can affect how the plugin behaves.
38
+
39
+ ## Usage
40
+
41
+ The Chat Enhancement Plugin can be integrated into various applications to improve user interactions. It is particularly useful for:
42
+
43
+ - **Customer Support Systems:** Enhancing automated responses and providing relevant information to customer queries.
44
+ - **Virtual Assistants:** Improving the contextual understanding and response generation of virtual assistants.
45
+ - **Content Recommendation:** Generating embeddings that can be used to recommend relevant content based on user inputs.
46
+
47
+ By leveraging this plugin, developers can create more intelligent and responsive chat systems that provide a better user experience.
48
+
49
+ ---
50
+
51
+ This executive summary provides a high-level overview of the Chat Enhancement Plugin, focusing on its key features, required environment variables, and potential use cases. For detailed implementation and integration instructions, please refer to the full documentation.
@@ -0,0 +1,39 @@
1
+ # Vim Plugin Executive Summary
2
+
3
+ ## Overview
4
+
5
+ The Vim Plugin is designed to enhance the functionality of chat applications by detecting and resolving Vim swap files. It provides additional context to chats by identifying which files are currently open in Vim and retrieving their contents. This plugin is particularly useful for developers who frequently use Vim as their text editor and need to keep track of their open files within a collaborative environment.
6
+
7
+ ## Key Features
8
+
9
+ ### Input Detection and Resolution
10
+
11
+ - **Vim Swap Files**: The plugin scans the file system for Vim swap files (`*.swp`). These files are temporary files created by Vim to store changes made to a file that is currently being edited.
12
+ - **Source Path Resolution**: For each detected swap file, the plugin attempts to resolve the original source file path. It checks both the standard file path and the hidden dot file path to ensure accurate resolution.
13
+
14
+ ### Context Addition to Chats
15
+
16
+ - **File Status**: The plugin provides detailed information about the status of each file, including whether the file exists, if it is a directory, or if it is too large to be processed.
17
+ - **File Contents**: For existing files, the plugin reads and returns the file contents, adding valuable context to chats about what files are currently being edited in Vim.
18
+
19
+ ### Embeddings
20
+
21
+ - **Empty Embeddings**: Currently, the plugin's `embed` function returns an empty array. This indicates that the plugin does not generate any specific embeddings for the detected files at this time.
22
+
23
+ ## Environment Variables
24
+
25
+ The following environment variables are required for the plugin to function correctly:
26
+
27
+ - **None**: The current implementation of the Vim Plugin does not require any environment variables to be set. All necessary configurations and paths are handled internally within the plugin.
28
+
29
+ ## Usage
30
+
31
+ The Vim Plugin can be integrated into chat applications to provide real-time updates on files being edited in Vim. This can be particularly useful in collaborative development environments where team members need to stay informed about each other's work. By detecting Vim swap files and resolving their source paths, the plugin ensures that users have access to the most up-to-date information about their open files.
32
+
33
+ ### Example Use Cases
34
+
35
+ - **Collaborative Coding**: Team members can see which files are currently being edited in Vim, helping to avoid conflicts and improve coordination.
36
+ - **Code Reviews**: Reviewers can access the latest changes made to files directly from the chat, streamlining the review process.
37
+ - **Debugging Sessions**: Developers can quickly identify which files are being modified during debugging, making it easier to track changes and resolve issues.
38
+
39
+ In summary, the Vim Plugin enhances chat applications by providing real-time insights into files being edited in Vim, adding valuable context to collaborative development efforts.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to add new internal tools (functions) to its existing set of tools. It also enables the AI to call multiple tools in parallel by adding a special function (`multi_tool_use.parallel`) that can execute several tools at the same time and return their results together.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to receive a name and user input, then use a service to process or respond to that input.
@@ -0,0 +1,10 @@
1
+ This function set allows an AI agent to manage tasks in Asana. It can:
2
+
3
+ 1. **Create tasks** in a project.
4
+ 2. **Update existing tasks** with new information.
5
+ 3. **Search for tasks** using keywords.
6
+ 4. **List all projects** in Asana.
7
+ 5. **Find specific tasks** by their ID.
8
+ 6. **Retrieve tasks assigned to the user** that are not completed.
9
+ 7. **Get subtasks** for a specific task.
10
+ 8. **Create subtasks** under a parent task.
@@ -0,0 +1,12 @@
1
+ This function enables an AI agent to interact with Asana, a project management tool. Specifically, it allows the AI to:
2
+
3
+ 1. **Create Tasks**: Add new tasks to a project.
4
+ 2. **Update Tasks**: Modify existing tasks.
5
+ 3. **Search Tasks**: Find tasks based on a search term.
6
+ 4. **Find Specific Tasks**: Retrieve details of a specific task by its ID.
7
+ 5. **Get Subtasks**: List subtasks of a given task.
8
+ 6. **Create Subtasks**: Add subtasks to an existing task.
9
+ 7. **List My Tasks**: Retrieve tasks assigned to the AI's user.
10
+ 8. **List Projects**: Get a list of all projects in the workspace.
11
+
12
+ This makes the AI capable of managing tasks and projects within Asana.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to ask a human a question. It displays the question in a formatted way and then waits for the human to respond.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to use a specific plugin to process user input. It takes the name of the plugin and the user's input, then calls the plugin to get a result.
@@ -0,0 +1 @@
1
+ This function helps an AI agent find files related to a user's goal by searching for keywords. It uses a plugin to perform the search and returns the results.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to run commands in the system's command line and get the results.
@@ -0,0 +1 @@
1
+ This function helps an AI agent find files on a computer that contain a specific search term in their names. It converts the search term to lowercase, creates a search command, and runs it to locate matching files.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to complete its task and give the final answer back to the user.
@@ -0,0 +1,6 @@
1
+ This function allows an AI agent to:
2
+
3
+ 1. **Fetch a pull request** from GitHub using a URL.
4
+ 2. **Get build statuses** for a pull request using a URL.
5
+ 3. **Retrieve run logs** for a specific GitHub Actions run by providing the run ID, repository owner, and repository name.
6
+ 4. **Fetch build failure logs** for a pull request using a URL.
@@ -0,0 +1,8 @@
1
+ This function enables an AI agent to:
2
+
3
+ 1. **Fetch Pull Request Details**: Retrieve information about a specific pull request from a GitHub repository.
4
+ 2. **Get Build Statuses**: Obtain the build statuses (e.g., success, failure) for the pull request.
5
+ 3. **Retrieve Run Logs**: Fetch the logs of a specific GitHub Actions run.
6
+ 4. **Get Failure Logs**: Identify and retrieve logs related to failed build checks for a pull request, highlighting errors and failures.
7
+
8
+ In short, it helps the AI agent monitor and diagnose issues in pull request builds on GitHub.
@@ -0,0 +1,14 @@
1
+ This function allows an AI agent to perform a variety of tasks such as:
2
+
3
+ - Adding internal tools
4
+ - Calling plugins
5
+ - Searching text and embeddings
6
+ - Executing commands
7
+ - Providing final answers
8
+ - Indexing data
9
+ - Linting, modifying, patching, reading, scanning, and writing files
10
+ - Using vision tools
11
+ - Integrating with Asana and GitHub
12
+ - Searching files
13
+
14
+ In short, it equips the AI with a wide range of capabilities for handling files, executing tasks, and integrating with other tools and platforms.
@@ -0,0 +1,7 @@
1
+ This function allows an AI agent to check a file for coding errors or style issues (linting) based on the file's extension. It does this by:
2
+
3
+ 1. Getting configuration settings.
4
+ 2. Determining the file's extension.
5
+ 3. Finding the appropriate linting command for that extension.
6
+ 4. Running the linting command on the file.
7
+ 5. Returning and logging the results of the linting process.
@@ -0,0 +1,16 @@
1
+ This function provides an AI agent with a variety of tools to perform different tasks. Here's a simple breakdown of what each tool enables the AI to do:
2
+
3
+ 1. **embeddingSearch**: Find files related to a user's goal using fuzzy search.
4
+ 2. **execCommand**: Run commands in the system's terminal.
5
+ 3. **finalAnswer**: Send the final response to the user.
6
+ 4. **callPlugin**: Use additional plugins for extra context or information.
7
+ 5. **visionTool**: Analyze images and answer questions about them.
8
+ 6. **readFile**: Read the contents of a file.
9
+ 7. **readBlocks**: Read specific parts of a file.
10
+ 8. **patchFile**: Modify or create files using patches.
11
+ 9. **lintFile**: Check a file for errors based on its type.
12
+ 10. **textSearch**: Search for exact text matches in files.
13
+ 11. **fileSearch**: Search for files by their paths.
14
+ 12. **askHuman**: Ask a human a question and get a response.
15
+
16
+ Additionally, it includes tools for working with GitHub and Asana.
@@ -0,0 +1,7 @@
1
+ This function allows an AI agent to:
2
+
3
+ 1. **Read and Modify Files**: It can read the content of a file and update specific parts of it based on provided instructions (`fileBlocks`).
4
+ 2. **Track Changes**: It keeps track of the original content and the new content after modifications.
5
+ 3. **Generate Diffs**: It creates a diff (a summary of changes) between the original and modified content.
6
+ 4. **Linting**: It checks the modified file for any coding style or syntax issues.
7
+ 5. **Provide Feedback**: It returns a summary of changes and linting results, asking for confirmation if the changes are correct.
@@ -0,0 +1,9 @@
1
+ This function enables an AI agent to apply a patch to a file, ensuring the patch is correctly formatted and valid. It does the following:
2
+
3
+ 1. **Parse the Patch**: Breaks down the patch into manageable parts (hunks).
4
+ 2. **Validate and Fix Hunks**: Ensures each part of the patch is valid and fixes any issues.
5
+ 3. **Apply the Patch**: Applies the validated and fixed patch to the original file content.
6
+ 4. **Handle Errors**: Saves any errors encountered during the process for debugging.
7
+ 5. **Lint the File**: Checks the updated file for any coding standard issues.
8
+
9
+ In short, it helps the AI agent to safely and correctly update files using patches.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to read specific parts (blocks) of a file. It takes a file path and a list of block numbers, reads the file, and returns only the blocks that match the given numbers.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to read a file from the filesystem, break its content into smaller chunks (blocks) of a specified size, and return these chunks as an array. If the file does not exist, it suggests possible related files. This helps the AI handle large files efficiently and manage cases where the file might be missing.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to read and return a specific range of lines from a text file, including a few lines before and after the specified range for context.
@@ -0,0 +1,6 @@
1
+ This function allows an AI agent to search for a text term in two ways:
2
+
3
+ 1. **Primary Method**: It uses a command-line tool (`ag`) to search for the term.
4
+ 2. **Fallback Method**: If the tool isn't available, it searches through pre-configured text embeddings to find matches.
5
+
6
+ In simple terms, it helps the AI find information either using a fast tool or a backup method if the tool fails.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to handle parts of a file by breaking it into blocks. Each block has a number, optional starting line, and some content. This helps the AI manage and process large files in smaller, more manageable pieces.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to analyze an image and answer a question about it.
@@ -0,0 +1 @@
1
+ This function allows an AI agent to save text to a file on the computer. If successful, it confirms the file was written; if there's an error, it returns the error message.
package/jest.config.js ADDED
@@ -0,0 +1,18 @@
1
+ module.exports = {
2
+ extensionsToTreatAsEsm: ['.ts'],
3
+ moduleNameMapper: {
4
+ '^(\\.{1,2}/.*)\\.js$': '$1',
5
+ },
6
+ transform: {
7
+ '^.+\\.ts?$': [
8
+ 'ts-jest',
9
+ {
10
+ useESM: true,
11
+ },
12
+ ],
13
+ },
14
+ testEnvironment: 'node',
15
+ testRegex: '/tests/.*\.(test|spec)?\.(ts|tsx|js)$',
16
+ moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
17
+ modulePathIgnorePatterns: ["ts_build"]
18
+ };