tianxincode 1.0.47 → 1.0.49

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 (302) hide show
  1. package/README.md +200 -200
  2. package/dist/cli/commands.js +18 -18
  3. package/dist/core/ai/agents/caller/prompts/role.txt +50 -50
  4. package/dist/core/ai/agents/chat/chat.agent.js +30 -30
  5. package/dist/core/ai/agents/chat/prompts/role.txt +30 -30
  6. package/dist/core/ai/agents/code/code.agent.js +6 -6
  7. package/dist/core/ai/agents/code/prompts/role.txt +50 -50
  8. package/dist/core/ai/agents/common/prompt/role.txt +51 -51
  9. package/dist/core/ai/agents/common/prompts.js +26 -26
  10. package/dist/core/ai/agents/design/design.agent.js +6 -6
  11. package/dist/core/ai/agents/design/prompts/role.txt +36 -36
  12. package/dist/core/ai/agents/dream/prompts/init.txt +20 -20
  13. package/dist/core/ai/agents/mem/mem.agent.js +5 -5
  14. package/dist/core/ai/agents/mem/prompts/role.txt +35 -35
  15. package/dist/core/ai/agents/skill/prompts/role.txt +61 -61
  16. package/dist/core/ai/agents/skill/skill.agent.js +26 -26
  17. package/dist/core/ai/agents/summarizer/prompts/role.txt +30 -30
  18. package/dist/core/ai/agents/task/prompts/role.txt +50 -50
  19. package/dist/core/ai/agents/task/task.agent.js +30 -30
  20. package/dist/core/ai/provider/deepseek.provider.js +1 -1
  21. package/dist/core/ai/provider/deepseek.provider.js.map +1 -1
  22. package/dist/core/ai/provider/openai.provider.js +1 -1
  23. package/dist/core/ai/provider/openai.provider.js.map +1 -1
  24. package/dist/core/db/db.service.d.ts.map +1 -1
  25. package/dist/core/db/db.service.js +3 -1
  26. package/dist/core/db/db.service.js.map +1 -1
  27. package/dist/core/db/init_sql/ai_log.init.js +15 -15
  28. package/dist/core/db/init_sql/code_snippet.init.js +11 -11
  29. package/dist/core/db/init_sql/config.init.js +15 -15
  30. package/dist/core/db/init_sql/custom_action.init.js +10 -10
  31. package/dist/core/db/init_sql/dingding.init.js +9 -9
  32. package/dist/core/db/init_sql/email.init.js +14 -14
  33. package/dist/core/db/init_sql/lsp.init.js +8 -8
  34. package/dist/core/db/init_sql/message_file.init.js +11 -11
  35. package/dist/core/db/init_sql/project.init.js +20 -20
  36. package/dist/core/db/init_sql/provider.init.js +35 -35
  37. package/dist/core/db/init_sql/scheduler.init.js +32 -32
  38. package/dist/core/db/init_sql/session.init.js +23 -23
  39. package/dist/core/db/init_sql/spec.init.js +15 -15
  40. package/dist/core/db/init_sql/waf_gateway.init.js +9 -9
  41. package/dist/core/db/init_sql/zihao.init.js +11 -11
  42. package/dist/core/lsp/sql.js +11 -11
  43. package/dist/core/tools/provider/bash.txt +47 -47
  44. package/dist/core/tools/provider/code_search.txt +20 -20
  45. package/dist/core/tools/provider/edit_file.txt +13 -13
  46. package/dist/core/tools/provider/glob.txt +12 -12
  47. package/dist/core/tools/provider/grep.txt +14 -14
  48. package/dist/core/tools/provider/lsp.txt +19 -19
  49. package/dist/core/tools/provider/memory.txt +21 -21
  50. package/dist/core/tools/provider/read_file.txt +17 -17
  51. package/dist/core/tools/provider/todo_read.txt +16 -16
  52. package/dist/core/tools/provider/todo_write.txt +48 -48
  53. package/dist/core/tools/provider/web_fetch.txt +17 -17
  54. package/dist/core/tools/provider/web_search.txt +18 -18
  55. package/dist/core/tools/provider/write_file.txt +11 -11
  56. package/dist/gateway/api/skill/detail_skill.d.ts.map +1 -1
  57. package/dist/gateway/api/skill/detail_skill.js +7 -5
  58. package/dist/gateway/api/skill/detail_skill.js.map +1 -1
  59. package/dist/gateway/cli/commands.js +18 -18
  60. package/dist/modules/ai/agents/chat/prompts/role.txt +30 -30
  61. package/dist/modules/ai/agents/code/prompts/role.txt +50 -50
  62. package/dist/modules/ai/agents/mem/prompts/role.txt +35 -35
  63. package/dist/modules/ai/agents/skill/prompts/role.txt +61 -61
  64. package/dist/modules/ai/agents/task/prompts/role.txt +50 -50
  65. package/dist/modules/ai/ai-log.service.js +10 -10
  66. package/dist/modules/ai/provider/openai/prompt/role.txt +51 -51
  67. package/dist/modules/ai/summarizer/summarizer.prompts.js +30 -30
  68. package/dist/modules/config/config.service.js +5 -5
  69. package/dist/modules/db/db.service.js +252 -252
  70. package/dist/modules/email/email.config.repository.js +1 -1
  71. package/dist/modules/repositories/project.repository.d.ts +28 -0
  72. package/dist/modules/repositories/project.repository.d.ts.map +1 -0
  73. package/dist/modules/repositories/project.repository.js +47 -0
  74. package/dist/modules/repositories/project.repository.js.map +1 -0
  75. package/dist/modules/scheduler/task-log.service.js +1 -1
  76. package/dist/modules/services/project/project.service.d.ts +14 -0
  77. package/dist/modules/services/project/project.service.d.ts.map +1 -0
  78. package/dist/modules/services/project/project.service.js +47 -0
  79. package/dist/modules/services/project/project.service.js.map +1 -0
  80. package/dist/modules/skill/skill.txt +36 -36
  81. package/dist/modules/spec/spec.injector.js +24 -24
  82. package/dist/modules/tools/provider/bash.txt +47 -47
  83. package/dist/modules/tools/provider/code_search.txt +20 -20
  84. package/dist/modules/tools/provider/edit_file.txt +13 -13
  85. package/dist/modules/tools/provider/glob.txt +12 -12
  86. package/dist/modules/tools/provider/grep.txt +14 -14
  87. package/dist/modules/tools/provider/lsp.txt +19 -19
  88. package/dist/modules/tools/provider/memory.txt +21 -21
  89. package/dist/modules/tools/provider/read_file.txt +17 -17
  90. package/dist/modules/tools/provider/todo_read.txt +16 -16
  91. package/dist/modules/tools/provider/todo_write.txt +48 -48
  92. package/dist/modules/tools/provider/web_fetch.txt +17 -17
  93. package/dist/modules/tools/provider/web_search.txt +18 -18
  94. package/dist/modules/tools/provider/write_file.txt +11 -11
  95. package/dist/modules/waf-gateway/waf-gateway.module.js +8 -8
  96. package/dist/modules/waf-gateway/waf-gateway.service.js +12 -12
  97. package/dist/repositories/project.repository.d.ts +28 -0
  98. package/dist/repositories/project.repository.d.ts.map +1 -0
  99. package/dist/repositories/project.repository.js +47 -0
  100. package/dist/repositories/project.repository.js.map +1 -0
  101. package/dist/repository/ai_log.repository.js +1 -1
  102. package/dist/repository/config.repository.js +5 -5
  103. package/dist/repository/email.repository.js +1 -1
  104. package/dist/repository/memory.repository.js +1 -1
  105. package/dist/repository/project.repository.js +3 -3
  106. package/dist/repository/scheduler.repository.js +2 -2
  107. package/dist/repository/session.repository.js +1 -1
  108. package/dist/repository/zihao-config.repository.js +1 -1
  109. package/dist/services/skill/skill.tool.d.ts.map +1 -1
  110. package/dist/services/skill/skill.tool.js +6 -1
  111. package/dist/services/skill/skill.tool.js.map +1 -1
  112. package/dist/services/skill/skill.txt +36 -36
  113. package/package.json +76 -76
  114. package/scripts/copy-txt.js +31 -31
  115. package/scripts/ink-scroll-demo.tsx +147 -147
  116. package/tsconfig.test.json +9 -9
  117. package/web/dist/assets/{ConfirmDialog-B2bVsPFI.js → ConfirmDialog-B03GcCHQ.js} +1 -1
  118. package/web/dist/assets/PcLayout-CYW3zqcs.css +1 -0
  119. package/web/dist/assets/{PcLayout-DeXNBHu2.js → PcLayout-ZTdJNg7G.js} +1 -1
  120. package/web/dist/assets/{aiLogsView-JvjhLmyo.js → aiLogsView-Bt8Xg1Qx.js} +1 -1
  121. package/web/dist/assets/{cssMode-sYHhwUZh.js → cssMode-CBb6D87U.js} +1 -1
  122. package/web/dist/assets/{customActionsView-Cvmzxvl4.js → customActionsView-DdjnHzwm.js} +1 -1
  123. package/web/dist/assets/deployView-CD7ji9IS.css +1 -0
  124. package/web/dist/assets/{deployView-CjV4ySrf.js → deployView-Cj51_Job.js} +1 -1
  125. package/web/dist/assets/designView-C3pSX4nP.css +1 -0
  126. package/web/dist/assets/designView-RT8tKEN9.js +18 -0
  127. package/web/dist/assets/devWorkflowView-BTozmaiN.js +36 -0
  128. package/web/dist/assets/devWorkflowView-DYhIfbCB.css +1 -0
  129. package/web/dist/assets/devWorkflowViewApp-CErbhC2s.css +1 -0
  130. package/web/dist/assets/{devWorkflowViewApp-DPlFgiS_.js → devWorkflowViewApp-DLslXEq9.js} +3 -3
  131. package/web/dist/assets/{fileZihao-DvZmuTYu.js → fileZihao-CtZ4bUIH.js} +1 -1
  132. package/web/dist/assets/{freemarker2-DTyAQBBj.js → freemarker2-CX3jc3l2.js} +1 -1
  133. package/web/dist/assets/gitChanges-D6QxPcii.css +1 -0
  134. package/web/dist/assets/{gitChanges-Cpf4HHoF.js → gitChanges-DFRvzL5I.js} +1 -1
  135. package/web/dist/assets/gitChangesApp-Bjn-MCmr.css +1 -0
  136. package/web/dist/assets/{gitChangesApp-BOURDd_l.js → gitChangesApp-ZI7-V8oB.js} +2 -2
  137. package/web/dist/assets/{handlebars-DiWIXxOG.js → handlebars-CTaQD6FN.js} +1 -1
  138. package/web/dist/assets/{html-BCQWkFzH.js → html-BruJsfYv.js} +1 -1
  139. package/web/dist/assets/{htmlMode-BbMA34cR.js → htmlMode-wewroXLr.js} +1 -1
  140. package/web/dist/assets/{index-C_tz4Wda.css → index-C0xmVTIn.css} +1 -1
  141. package/web/dist/assets/{index-C7axH05o.js → index-Cn73hS12.js} +9 -9
  142. package/web/dist/assets/{javascript-By4MYHaO.js → javascript-B4ku8P1-.js} +1 -1
  143. package/web/dist/assets/{jsonMode-5JIz7tDN.js → jsonMode-BIvVuBMG.js} +1 -1
  144. package/web/dist/assets/{liquid-BQBVii4f.js → liquid-Bo3G0Ep7.js} +1 -1
  145. package/web/dist/assets/{mdx-Cwk7nqzM.js → mdx-Duv0ylZz.js} +1 -1
  146. package/web/dist/assets/{mediaChat-DivTDoIv.js → mediaChat-RT7iqqYb.js} +1 -1
  147. package/web/dist/assets/{python-L_kGfe1T.js → python-CEhCctGm.js} +1 -1
  148. package/web/dist/assets/{razor-XGuHliMI.js → razor-DPK8nTD7.js} +1 -1
  149. package/web/dist/assets/{taskView-BcJ3LAxp.js → taskView-sOyebRqn.js} +1 -1
  150. package/web/dist/assets/{terminalView-q-UKzK0M.js → terminalView-GTYtDlus.js} +2 -2
  151. package/web/dist/assets/{terminalView-CQVYh6D3.css → terminalView-eZ0agsPP.css} +1 -1
  152. package/web/dist/assets/{tsMode-SuiD3mJa.js → tsMode-BZvUU1nf.js} +1 -1
  153. package/web/dist/assets/{typescript-DJcyqRjT.js → typescript-CmEn-k1B.js} +1 -1
  154. package/web/dist/assets/{wikiView-ygHSGyPp.css → wikiView-C-oqMnJM.css} +1 -1
  155. package/web/dist/assets/{wikiView-B3GIPUlD.js → wikiView-CRjg-cZ8.js} +1 -1
  156. package/web/dist/assets/{xml-DQgCzk55.js → xml-bjvdKeyy.js} +1 -1
  157. package/web/dist/assets/{yaml-DBdEYBPA.js → yaml-N5RXWxJk.js} +1 -1
  158. package/web/dist/index.html +2 -2
  159. package/web/package.json +28 -28
  160. package/dist/modules/ai/react/index.d.ts +0 -5
  161. package/dist/modules/ai/react/index.d.ts.map +0 -1
  162. package/dist/modules/ai/react/index.js +0 -4
  163. package/dist/modules/ai/react/index.js.map +0 -1
  164. package/dist/modules/ai/react/prompt/role.txt +0 -51
  165. package/dist/modules/ai/react/provider.parser.d.ts +0 -20
  166. package/dist/modules/ai/react/provider.parser.d.ts.map +0 -1
  167. package/dist/modules/ai/react/provider.parser.js +0 -88
  168. package/dist/modules/ai/react/provider.parser.js.map +0 -1
  169. package/dist/modules/ai/react/react.parser.d.ts +0 -80
  170. package/dist/modules/ai/react/react.parser.d.ts.map +0 -1
  171. package/dist/modules/ai/react/react.parser.js +0 -365
  172. package/dist/modules/ai/react/react.parser.js.map +0 -1
  173. package/dist/modules/ai/react/react.prompts.d.ts +0 -26
  174. package/dist/modules/ai/react/react.prompts.d.ts.map +0 -1
  175. package/dist/modules/ai/react/react.prompts.js +0 -170
  176. package/dist/modules/ai/react/react.prompts.js.map +0 -1
  177. package/dist/modules/ai/react/react.types.d.ts +0 -50
  178. package/dist/modules/ai/react/react.types.d.ts.map +0 -1
  179. package/dist/modules/ai/react/react.types.js +0 -2
  180. package/dist/modules/ai/react/react.types.js.map +0 -1
  181. package/dist/modules/ai/react/react.validator.d.ts +0 -14
  182. package/dist/modules/ai/react/react.validator.d.ts.map +0 -1
  183. package/dist/modules/ai/react/react.validator.js +0 -53
  184. package/dist/modules/ai/react/react.validator.js.map +0 -1
  185. package/dist/modules/ai/react.agent.d.ts +0 -82
  186. package/dist/modules/ai/react.agent.d.ts.map +0 -1
  187. package/dist/modules/ai/react.agent.js +0 -220
  188. package/dist/modules/ai/react.agent.js.map +0 -1
  189. package/dist/modules/skill/skill.service.d.ts +0 -72
  190. package/dist/modules/skill/skill.service.d.ts.map +0 -1
  191. package/dist/modules/skill/skill.service.js +0 -283
  192. package/dist/modules/skill/skill.service.js.map +0 -1
  193. package/dist/modules/tools/builtin/bash.d.ts +0 -3
  194. package/dist/modules/tools/builtin/bash.d.ts.map +0 -1
  195. package/dist/modules/tools/builtin/bash.js +0 -126
  196. package/dist/modules/tools/builtin/bash.js.map +0 -1
  197. package/dist/modules/tools/builtin/bash.tool.d.ts +0 -6
  198. package/dist/modules/tools/builtin/bash.tool.d.ts.map +0 -1
  199. package/dist/modules/tools/builtin/bash.tool.js +0 -52
  200. package/dist/modules/tools/builtin/bash.tool.js.map +0 -1
  201. package/dist/modules/tools/builtin/bash.txt +0 -69
  202. package/dist/modules/tools/builtin/code_search.d.ts +0 -3
  203. package/dist/modules/tools/builtin/code_search.d.ts.map +0 -1
  204. package/dist/modules/tools/builtin/code_search.js +0 -86
  205. package/dist/modules/tools/builtin/code_search.js.map +0 -1
  206. package/dist/modules/tools/builtin/code_search.txt +0 -41
  207. package/dist/modules/tools/builtin/edit-file.tool.d.ts +0 -6
  208. package/dist/modules/tools/builtin/edit-file.tool.d.ts.map +0 -1
  209. package/dist/modules/tools/builtin/edit-file.tool.js +0 -58
  210. package/dist/modules/tools/builtin/edit-file.tool.js.map +0 -1
  211. package/dist/modules/tools/builtin/edit_file.d.ts +0 -3
  212. package/dist/modules/tools/builtin/edit_file.d.ts.map +0 -1
  213. package/dist/modules/tools/builtin/edit_file.js +0 -105
  214. package/dist/modules/tools/builtin/edit_file.js.map +0 -1
  215. package/dist/modules/tools/builtin/edit_file.txt +0 -61
  216. package/dist/modules/tools/builtin/glob.d.ts +0 -3
  217. package/dist/modules/tools/builtin/glob.d.ts.map +0 -1
  218. package/dist/modules/tools/builtin/glob.js +0 -85
  219. package/dist/modules/tools/builtin/glob.js.map +0 -1
  220. package/dist/modules/tools/builtin/glob.tool.d.ts +0 -6
  221. package/dist/modules/tools/builtin/glob.tool.d.ts.map +0 -1
  222. package/dist/modules/tools/builtin/glob.tool.js +0 -81
  223. package/dist/modules/tools/builtin/glob.tool.js.map +0 -1
  224. package/dist/modules/tools/builtin/glob.txt +0 -33
  225. package/dist/modules/tools/builtin/grep.d.ts +0 -3
  226. package/dist/modules/tools/builtin/grep.d.ts.map +0 -1
  227. package/dist/modules/tools/builtin/grep.js +0 -94
  228. package/dist/modules/tools/builtin/grep.js.map +0 -1
  229. package/dist/modules/tools/builtin/grep.tool.d.ts +0 -6
  230. package/dist/modules/tools/builtin/grep.tool.d.ts.map +0 -1
  231. package/dist/modules/tools/builtin/grep.tool.js +0 -96
  232. package/dist/modules/tools/builtin/grep.tool.js.map +0 -1
  233. package/dist/modules/tools/builtin/grep.txt +0 -37
  234. package/dist/modules/tools/builtin/index.d.ts +0 -8
  235. package/dist/modules/tools/builtin/index.d.ts.map +0 -1
  236. package/dist/modules/tools/builtin/index.js +0 -80
  237. package/dist/modules/tools/builtin/index.js.map +0 -1
  238. package/dist/modules/tools/builtin/lsp.d.ts +0 -7
  239. package/dist/modules/tools/builtin/lsp.d.ts.map +0 -1
  240. package/dist/modules/tools/builtin/lsp.js +0 -126
  241. package/dist/modules/tools/builtin/lsp.js.map +0 -1
  242. package/dist/modules/tools/builtin/lsp.txt +0 -45
  243. package/dist/modules/tools/builtin/memory.d.ts +0 -3
  244. package/dist/modules/tools/builtin/memory.d.ts.map +0 -1
  245. package/dist/modules/tools/builtin/memory.js +0 -77
  246. package/dist/modules/tools/builtin/memory.js.map +0 -1
  247. package/dist/modules/tools/builtin/memory.txt +0 -58
  248. package/dist/modules/tools/builtin/read-file.tool.d.ts +0 -6
  249. package/dist/modules/tools/builtin/read-file.tool.d.ts.map +0 -1
  250. package/dist/modules/tools/builtin/read-file.tool.js +0 -46
  251. package/dist/modules/tools/builtin/read-file.tool.js.map +0 -1
  252. package/dist/modules/tools/builtin/read_file.d.ts +0 -3
  253. package/dist/modules/tools/builtin/read_file.d.ts.map +0 -1
  254. package/dist/modules/tools/builtin/read_file.js +0 -107
  255. package/dist/modules/tools/builtin/read_file.js.map +0 -1
  256. package/dist/modules/tools/builtin/read_file.txt +0 -38
  257. package/dist/modules/tools/builtin/todo_read.d.ts +0 -6
  258. package/dist/modules/tools/builtin/todo_read.d.ts.map +0 -1
  259. package/dist/modules/tools/builtin/todo_read.js +0 -25
  260. package/dist/modules/tools/builtin/todo_read.js.map +0 -1
  261. package/dist/modules/tools/builtin/todo_read.txt +0 -34
  262. package/dist/modules/tools/builtin/todo_write.d.ts +0 -6
  263. package/dist/modules/tools/builtin/todo_write.d.ts.map +0 -1
  264. package/dist/modules/tools/builtin/todo_write.js +0 -46
  265. package/dist/modules/tools/builtin/todo_write.js.map +0 -1
  266. package/dist/modules/tools/builtin/todo_write.txt +0 -67
  267. package/dist/modules/tools/builtin/web_fetch.d.ts +0 -3
  268. package/dist/modules/tools/builtin/web_fetch.d.ts.map +0 -1
  269. package/dist/modules/tools/builtin/web_fetch.js +0 -52
  270. package/dist/modules/tools/builtin/web_fetch.js.map +0 -1
  271. package/dist/modules/tools/builtin/web_fetch.txt +0 -38
  272. package/dist/modules/tools/builtin/web_search.d.ts +0 -3
  273. package/dist/modules/tools/builtin/web_search.d.ts.map +0 -1
  274. package/dist/modules/tools/builtin/web_search.js +0 -100
  275. package/dist/modules/tools/builtin/web_search.js.map +0 -1
  276. package/dist/modules/tools/builtin/web_search.txt +0 -43
  277. package/dist/modules/tools/builtin/write-file.tool.d.ts +0 -6
  278. package/dist/modules/tools/builtin/write-file.tool.d.ts.map +0 -1
  279. package/dist/modules/tools/builtin/write-file.tool.js +0 -38
  280. package/dist/modules/tools/builtin/write-file.tool.js.map +0 -1
  281. package/dist/modules/tools/builtin/write_file.d.ts +0 -3
  282. package/dist/modules/tools/builtin/write_file.d.ts.map +0 -1
  283. package/dist/modules/tools/builtin/write_file.js +0 -61
  284. package/dist/modules/tools/builtin/write_file.js.map +0 -1
  285. package/dist/modules/tools/builtin/write_file.txt +0 -58
  286. package/dist/modules/tools/provider/openai/tools.d.ts +0 -3
  287. package/dist/modules/tools/provider/openai/tools.d.ts.map +0 -1
  288. package/dist/modules/tools/provider/openai/tools.js +0 -212
  289. package/dist/modules/tools/provider/openai/tools.js.map +0 -1
  290. package/dist/modules/tools/provider/skill.d.ts +0 -6
  291. package/dist/modules/tools/provider/skill.d.ts.map +0 -1
  292. package/dist/modules/tools/provider/skill.js +0 -64
  293. package/dist/modules/tools/provider/skill.js.map +0 -1
  294. package/web/dist/assets/PcLayout-L-XuK1oQ.css +0 -1
  295. package/web/dist/assets/deployView-hCh3_M8H.css +0 -1
  296. package/web/dist/assets/designView-CqZ75hOS.css +0 -1
  297. package/web/dist/assets/designView-DrUNRVEE.js +0 -18
  298. package/web/dist/assets/devWorkflowView-BpdJTMEb.js +0 -36
  299. package/web/dist/assets/devWorkflowView-D7EKjoLj.css +0 -1
  300. package/web/dist/assets/devWorkflowViewApp-BYYMIdCm.css +0 -1
  301. package/web/dist/assets/gitChanges-BYj-Y2K-.css +0 -1
  302. package/web/dist/assets/gitChangesApp-Btw-XKcP.css +0 -1
@@ -1,46 +0,0 @@
1
- /**
2
- * 文件读取工具
3
- */
4
- import * as fs from 'fs';
5
- export const readFileTool = {
6
- name: 'read_file',
7
- description: '读取文件内容。支持读取文本文件,返回文件内容字符串。',
8
- parameters: {
9
- type: 'object',
10
- properties: {
11
- file_path: {
12
- type: 'string',
13
- description: '文件的绝对路径',
14
- },
15
- offset: {
16
- type: 'number',
17
- description: '起始行号(可选,从1开始)',
18
- },
19
- limit: {
20
- type: 'number',
21
- description: '读取行数(可选)',
22
- },
23
- },
24
- required: ['file_path'],
25
- },
26
- execute: async (params) => {
27
- const { file_path, offset = 1, limit } = params;
28
- if (!fs.existsSync(file_path)) {
29
- return `错误: 文件不存在: ${file_path}`;
30
- }
31
- try {
32
- const content = fs.readFileSync(file_path, 'utf-8');
33
- const lines = content.split('\n');
34
- const startLine = Math.max(1, offset) - 1;
35
- const endLine = limit ? startLine + limit : lines.length;
36
- const selectedLines = lines.slice(startLine, endLine);
37
- return selectedLines
38
- .map((line, i) => `${startLine + i + 1}: ${line}`)
39
- .join('\n');
40
- }
41
- catch (error) {
42
- return `错误: 读取文件失败: ${error instanceof Error ? error.message : String(error)}`;
43
- }
44
- },
45
- };
46
- //# sourceMappingURL=read-file.tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read-file.tool.js","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/read-file.tool.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAIzB,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,4BAA4B;IACzC,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,SAAS;aACvB;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,eAAe;aAC7B;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,UAAU;aACxB;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;IACD,OAAO,EAAE,KAAK,EAAE,MAA8D,EAAmB,EAAE;QACjG,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;QAEhD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9B,OAAO,cAAc,SAAS,EAAE,CAAC;QACnC,CAAC;QAED,IAAI,CAAC;YACH,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YACpD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAElC,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;YAEzD,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;YAEtD,OAAO,aAAa;iBACjB,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;iBACjD,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,eAAe,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QACjF,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Tool } from '../tool.types.js';
2
- export declare const readFileTool: Tool;
3
- //# sourceMappingURL=read_file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read_file.d.ts","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/read_file.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAA2B,MAAM,kBAAkB,CAAA;AAMhE,eAAO,MAAM,YAAY,EAAE,IA8G1B,CAAA"}
@@ -1,107 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import { readFile } from 'fs/promises';
4
- const DEFAULT_LIMIT = 2000;
5
- const MAX_LINE_LENGTH = 2000;
6
- export const readFileTool = {
7
- name: 'read_file',
8
- description: '',
9
- descriptionFile: 'read_file.txt',
10
- parameters: {
11
- type: 'object',
12
- properties: {
13
- file_path: {
14
- type: 'string',
15
- description: '文件或目录绝对路径'
16
- },
17
- offset: {
18
- type: 'number',
19
- description: '起始行号,从1开始(可选,默认 1)'
20
- },
21
- limit: {
22
- type: 'number',
23
- description: '最大读取行数(可选,默认 2000)'
24
- }
25
- },
26
- required: ['file_path']
27
- },
28
- execute: async (params, context) => {
29
- let { file_path, offset = 1, limit = DEFAULT_LIMIT } = params;
30
- if (!file_path) {
31
- return {
32
- success: false,
33
- output: '',
34
- error: `Missing required parameter: file_path. Available parameters: ${Object.keys(params).join(', ')}`
35
- };
36
- }
37
- if (file_path.startsWith('@')) {
38
- file_path = file_path.substring(1);
39
- }
40
- if (!path.isAbsolute(file_path)) {
41
- file_path = path.resolve(context.workDir || process.cwd(), file_path);
42
- }
43
- const stat = await fs.promises.stat(file_path).catch(() => null);
44
- if (!stat) {
45
- return { success: false, output: '', error: `File not found: ${file_path}` };
46
- }
47
- if (stat.isDirectory()) {
48
- const entries = await fs.promises.readdir(file_path, { withFileTypes: true });
49
- const sorted = entries.map(e => ({
50
- name: e.name + (e.isDirectory() ? '/' : ''),
51
- isDir: e.isDirectory()
52
- })).sort((a, b) => {
53
- if (a.isDir !== b.isDir)
54
- return a.isDir ? -1 : 1;
55
- return a.name.localeCompare(b.name);
56
- });
57
- const start = Math.max(0, offset - 1);
58
- const end = Math.min(start + limit, sorted.length);
59
- const sliced = sorted.slice(start, end);
60
- const truncated = end < sorted.length;
61
- return {
62
- success: true,
63
- output: `<file_path>${file_path}</file_path>\n<type>directory</type>\n<entries>\n${sliced.map(e => e.name).join('\n')}\n</entries>\n${truncated ? `\n(Showing ${sliced.length} of ${sorted.length} entries. Use offset=${end + 1} to continue.)` : `\n(${sorted.length} entries)`}`,
64
- metadata: { truncated, total: sorted.length }
65
- };
66
- }
67
- const buffer = await readFile(file_path);
68
- if (buffer[0] === 0 && buffer.length > 1) {
69
- return { success: false, output: '', error: `Cannot read binary file: ${file_path}` };
70
- }
71
- const content = buffer.toString('utf-8').replace(/\r\n/g, '\n');
72
- const lines = content.split('\n');
73
- if (offset < 1)
74
- offset = 1;
75
- if (offset > lines.length) {
76
- return { success: false, output: '', error: `Offset ${offset} is out of range (file has ${lines.length} lines)` };
77
- }
78
- const start = offset - 1;
79
- const end = Math.min(start + limit, lines.length);
80
- const selected = lines.slice(start, end);
81
- const truncated = end < lines.length;
82
- let result = `<file_path>${file_path}</file_path>\n<type>file</type>\n<content>\n`;
83
- for (let i = 0; i < selected.length; i++) {
84
- const line = selected[i];
85
- const lineNum = start + i + 1;
86
- if (line.length > MAX_LINE_LENGTH) {
87
- result += `${lineNum}: ${line.slice(0, MAX_LINE_LENGTH)} [line truncated]\n`;
88
- }
89
- else {
90
- result += `${lineNum}: ${line}\n`;
91
- }
92
- }
93
- if (truncated) {
94
- result += `\n(Showing lines ${offset}-${end} of ${lines.length}. Use offset=${end + 1} to continue.)`;
95
- }
96
- else {
97
- result += `\n(End of file - total ${lines.length} lines)`;
98
- }
99
- result += '\n</content>';
100
- return {
101
- success: true,
102
- output: result,
103
- metadata: { truncated, totalLines: lines.length }
104
- };
105
- }
106
- };
107
- //# sourceMappingURL=read_file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"read_file.js","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/read_file.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,MAAM,aAAa,GAAG,IAAI,CAAA;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAA;AAE5B,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,EAAE;IACf,eAAe,EAAE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,MAAM,CAAC,CAAA;QACjD,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;QACxC,MAAM,SAAS,GAAG,GAAG,GAAG,KAAK,CAAC,MAAM,CAAA;QAEpC,IAAI,MAAM,GAAG,cAAc,SAAS,8CAA8C,CAAA;QAClF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACzC,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;YACxB,MAAM,OAAO,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAA;YAC7B,IAAI,IAAI,CAAC,MAAM,GAAG,eAAe,EAAE,CAAC;gBAClC,MAAM,IAAI,GAAG,OAAO,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,sBAAsB,CAAA;YAC/E,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,GAAG,OAAO,KAAK,IAAI,IAAI,CAAA;YACnC,CAAC;QACH,CAAC;QAED,IAAI,SAAS,EAAE,CAAC;YACd,MAAM,IAAI,oBAAoB,MAAM,IAAI,GAAG,OAAO,KAAK,CAAC,MAAM,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAA;QACvG,CAAC;aAAM,CAAC;YACN,MAAM,IAAI,0BAA0B,KAAK,CAAC,MAAM,SAAS,CAAA;QAC3D,CAAC;QACD,MAAM,IAAI,cAAc,CAAA;QAExB,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,CAAC,MAAM,EAAE;SAClD,CAAA;IACH,CAAC;CACF,CAAA"}
@@ -1,38 +0,0 @@
1
- ### 工具read_file
2
- 从本地文件系统读取文件或目录内容。如果路径不存在,返回错误。
3
-
4
- **功能**:
5
- - `file_path` 参数应为绝对路径
6
- - 默认返回文件开头最多 2000 行
7
- - `offset` 参数是从哪一行开始(从 1 开始)
8
- - 要读取后面的部分,用更大的 offset 再次调用
9
- - 用 Grep 工具搜索大文件或长行文件
10
- - 不确定正确路径时,用 Glob 工具按 glob 模式查找
11
- - 内容返回时每行带有行号前缀:`<line>: <content>`(如 "1: foo\n")
12
- - 目录返回时每行一个条目,子目录以 `/` 结尾
13
- - 超过 2000 字符的行会被截断
14
- - 可以并行调用此工具读取多个文件
15
- - 避免频繁小量读取(30 行片段),需要更多上下文时读取更大范围
16
- - 此工具可以读取图片和 PDF 并作为附件返回
17
-
18
- 举例:
19
- ```xml
20
- <react>
21
- <thought>读取 App.tsx 文件查看组件结构</thought>
22
- <action>
23
- <action_name>read_file</action_name>
24
- <action_input>
25
- <file_path>E:\ai\txcode\src\components\App.tsx</file_path>
26
- </action_input>
27
- </action>
28
- <keep_context>true</keep_context>
29
- </react>
30
- ```
31
-
32
- 参数说明:
33
-
34
- | 字段 | 类型 | 说明 |
35
- |------|------|
36
- | `file_path` | string | 文件或目录绝对路径 |
37
- | `offset` | number | 起始行号,从1开始(可选,默认 1) |
38
- | `limit` | number | 最大读取行数(可选,默认 2000) |
@@ -1,6 +0,0 @@
1
- /**
2
- * TodoRead 工具 - 读取任务列表
3
- */
4
- import { Tool } from '../tool.types.js';
5
- export declare const todoReadTool: Tool;
6
- //# sourceMappingURL=todo_read.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"todo_read.d.ts","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/todo_read.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAA2B,MAAM,kBAAkB,CAAA;AAIhE,eAAO,MAAM,YAAY,EAAE,IAqB1B,CAAA"}
@@ -1,25 +0,0 @@
1
- /**
2
- * TodoRead 工具 - 读取任务列表
3
- */
4
- const todoStore = new Map();
5
- export const todoReadTool = {
6
- name: 'todoread',
7
- description: '',
8
- descriptionFile: 'todo_read.txt',
9
- parameters: {
10
- type: 'object',
11
- properties: {}
12
- },
13
- execute: async (_params, context) => {
14
- const todos = todoStore.get(context.sessionId) || [];
15
- if (todos.length === 0) {
16
- return { success: true, output: '[]', metadata: { total: 0, todos: [] } };
17
- }
18
- return {
19
- success: true,
20
- output: JSON.stringify(todos, null, 2),
21
- metadata: { total: todos.length, todos }
22
- };
23
- }
24
- };
25
- //# sourceMappingURL=todo_read.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"todo_read.js","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/todo_read.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,SAAS,GAAG,IAAI,GAAG,EAAmE,CAAA;AAE5F,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,EAAE;IACf,eAAe,EAAE,eAAe;IAChC,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;KACf;IACD,OAAO,EAAE,KAAK,EAAE,OAA8B,EAAE,OAAoB,EAAuB,EAAE;QAC3F,MAAM,KAAK,GAAG,SAAS,CAAC,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;QAEpD,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACvB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAA;QAC3E,CAAC;QAED,OAAO;YACL,OAAO,EAAE,IAAI;YACb,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;YACtC,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE;SACzC,CAAA;IACH,CAAC;CACF,CAAA"}
@@ -1,34 +0,0 @@
1
- ### 工具todoread
2
- 使用此工具读取当前会话的任务列表。此工具应主动频繁使用,确保你了解当前任务列表的状态。应在以下情况使用:
3
-
4
- - 对话开始时查看待处理任务
5
- - 开始新任务前优先安排工作
6
- - 用户询问之前的任务或计划时
7
- - 不确定下一步该做什么时
8
- - 完成任务后更新对剩余工作的理解
9
- - 每隔几条消息后检查以确保在正确轨道上
10
-
11
- **使用说明**:
12
- - 此工具不需要参数。留空或发送空对象,**禁止**包含虚拟对象、占位符字符串或 "input"、"empty" 等键名
13
- - 返回任务列表及其状态、优先级和内容
14
- - 用此信息跟踪进度和计划下一步
15
- - 如果还没有任务,返回空列表
16
-
17
- 举例:
18
- ```xml
19
- <react>
20
- <thought>查看当前任务列表</thought>
21
- <action>
22
- <action_name>todoread</action_name>
23
- <action_input>
24
- </action_input>
25
- </action>
26
- <keep_context>true</keep_context>
27
- </react>
28
- ```
29
-
30
- 参数说明:
31
-
32
- | 字段 | 类型 | 说明 |
33
- |------|------|
34
- | (无) | - | 此工具不需要参数 |
@@ -1,6 +0,0 @@
1
- /**
2
- * TodoWrite 工具 - 写入任务列表
3
- */
4
- import { Tool } from '../tool.types.js';
5
- export declare const todoWriteTool: Tool;
6
- //# sourceMappingURL=todo_write.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"todo_write.d.ts","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/todo_write.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,IAAI,EAA2B,MAAM,kBAAkB,CAAA;AAUhE,eAAO,MAAM,aAAa,EAAE,IA2C3B,CAAA"}
@@ -1,46 +0,0 @@
1
- /**
2
- * TodoWrite 工具 - 写入任务列表
3
- */
4
- const todoStore = new Map();
5
- export const todoWriteTool = {
6
- name: 'todowrite',
7
- description: '',
8
- descriptionFile: 'todo_write.txt',
9
- parameters: {
10
- type: 'object',
11
- properties: {
12
- todos: {
13
- type: 'array',
14
- items: {
15
- type: 'object',
16
- properties: {
17
- content: { type: 'string' },
18
- status: { type: 'string', enum: ['pending', 'in_progress', 'completed', 'cancelled'] },
19
- priority: { type: 'string', enum: ['high', 'medium', 'low'] }
20
- },
21
- required: ['content', 'status', 'priority']
22
- }
23
- }
24
- },
25
- required: ['todos']
26
- },
27
- execute: async (params, context) => {
28
- const validStatuses = ['pending', 'in_progress', 'completed', 'cancelled'];
29
- const validPriorities = ['high', 'medium', 'low'];
30
- for (const todo of params.todos) {
31
- if (!validStatuses.includes(todo.status)) {
32
- return { success: false, output: '', error: `Invalid status: ${todo.status}` };
33
- }
34
- if (!validPriorities.includes(todo.priority)) {
35
- return { success: false, output: '', error: `Invalid priority: ${todo.priority}` };
36
- }
37
- }
38
- todoStore.set(context.sessionId, params.todos);
39
- return {
40
- success: true,
41
- output: `已更新 ${params.todos.length} 个任务`,
42
- metadata: { total: params.todos.length, todos: params.todos }
43
- };
44
- }
45
- };
46
- //# sourceMappingURL=todo_write.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"todo_write.js","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/todo_write.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,SAAS,GAAG,IAAI,GAAG,EAAmE,CAAA;AAQ5F,MAAM,CAAC,MAAM,aAAa,GAAS;IACjC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,EAAE;IACf,eAAe,EAAE,gBAAgB;IACjC,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,CAAC,EAAE;wBACtF,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,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1,67 +0,0 @@
1
- ### 工具todowrite
2
- 使用此工具创建和管理当前编码会话的结构化任务列表。这帮助你跟踪进度、组织复杂任务,并向用户展示完成情况。
3
-
4
- ## 何时使用
5
-
6
- **主动使用此工具的场景**:
7
-
8
- 1. **复杂多步任务** - 任务需要 3 个或更多独立步骤或操作
9
- 2. **非平凡复杂任务** - 需要仔细规划或多个操作的任务
10
- 3. **用户明确请求任务列表** - 用户直接要求你规划任务时
11
- 4. **用户提供多任务** - 用户提供要做的事情列表(编号或逗号分隔)
12
- 5. **收到新指令后** - 立即捕获用户需求为任务。可根据新信息编辑任务列表
13
- 6. **完成任务后** - 标记完成并添加后续任务
14
- 7. **开始新任务时** - 标记进行中。同时只能有一个进行中的任务。先完成现有任务再开始新任务
15
-
16
- ## 何时不使用
17
-
18
- **跳过使用此工具的场景**:
19
- 1. 单一、简单的任务
20
- 2. 琐碎任务,跟踪没有组织价值
21
- 3. 可在少于 3 个简单步骤内完成的任务
22
- 4. 完全对话性或信息性的请求
23
-
24
- **注意**:如果只有一个琐碎任务要做,直接做即可,不需要任务列表。
25
-
26
- ## 任务状态
27
-
28
- - `pending`:尚未开始
29
- - `in_progress`:正在进行(同时只能有一个)
30
- - `completed`:已完成
31
- - `cancelled`:不再需要
32
-
33
- ## 任务管理
34
-
35
- - 实时更新状态
36
- - 完成后**立即**标记,不要批量
37
- - 同时只做一个任务
38
- - 完成当前任务后再开始新任务
39
- - 取消不再相关的任务
40
-
41
- ## 任务分解
42
-
43
- - 创建具体、可操作的事项
44
- - 将复杂任务分解为更小、可管理的步骤
45
- - 使用清晰、描述性的任务名称
46
-
47
- 如有疑问,使用此工具。积极主动的任务管理展示专注力,确保完成所有要求。
48
-
49
- 举例:
50
- ```xml
51
- <react>
52
- <thought>创建任务列表来跟踪重构工作</thought>
53
- <action>
54
- <action_name>todowrite</action_name>
55
- <action_input>
56
- <todos>[{"content": "重构 ToolService 类", "status": "in_progress", "priority": "high"}, {"content": "添加单元测试", "status": "pending", "priority": "high"}, {"content": "更新文档", "status": "pending", "priority": "medium"}]</todos>
57
- </action_input>
58
- </action>
59
- <keep_context>true</keep_context>
60
- </react>
61
- ```
62
-
63
- 参数说明:
64
-
65
- | 字段 | 类型 | 说明 |
66
- |------|------|
67
- | `todos` | array | 任务数组,每个任务包含 content(内容)、status(状态)、priority(优先级) |
@@ -1,3 +0,0 @@
1
- import { Tool } from '../tool.types.js';
2
- export declare const webFetchTool: Tool;
3
- //# sourceMappingURL=web_fetch.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web_fetch.d.ts","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/web_fetch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA2B,MAAM,kBAAkB,CAAA;AAEhE,eAAO,MAAM,YAAY,EAAE,IAsD1B,CAAA"}
@@ -1,52 +0,0 @@
1
- export const webFetchTool = {
2
- name: 'web_fetch',
3
- description: '',
4
- descriptionFile: 'web_fetch.txt',
5
- parameters: {
6
- type: 'object',
7
- properties: {
8
- url: {
9
- type: 'string',
10
- description: '要获取的 URL(必须是完整格式)'
11
- },
12
- format: {
13
- type: 'string',
14
- enum: ['markdown', 'text', 'html'],
15
- description: '输出格式(可选,默认 markdown)'
16
- }
17
- },
18
- required: ['url']
19
- },
20
- execute: async (params, context) => {
21
- const { url, format = 'markdown' } = params;
22
- let normalizedUrl = url;
23
- if (url.startsWith('http://')) {
24
- normalizedUrl = 'https://' + url.slice(7);
25
- }
26
- else if (!url.startsWith('https://')) {
27
- return { success: false, output: '', error: 'URL must start with http:// or https://' };
28
- }
29
- try {
30
- const response = await fetch(normalizedUrl, {
31
- signal: context.abortSignal,
32
- headers: { 'User-Agent': 'Mozilla/5.0' }
33
- });
34
- if (!response.ok) {
35
- return { success: false, output: '', error: `HTTP ${response.status}: ${response.statusText}` };
36
- }
37
- const text = await response.text();
38
- if (format === 'text') {
39
- return { success: true, output: text.slice(0, 50000), metadata: { url: normalizedUrl, format, length: text.length } };
40
- }
41
- return {
42
- success: true,
43
- output: `[Web Fetch] URL: ${normalizedUrl}\n[Format: ${format}]\n\n${text.slice(0, 50000)}${text.length > 50000 ? '\n\n[content truncated - exceeded 50000 characters]' : ''}`,
44
- metadata: { url: normalizedUrl, format, length: text.length }
45
- };
46
- }
47
- catch (err) {
48
- return { success: false, output: '', error: err.message };
49
- }
50
- }
51
- };
52
- //# sourceMappingURL=web_fetch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web_fetch.js","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/web_fetch.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,EAAE;IACf,eAAe,EAAE,eAAe;IAChC,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mBAAmB;aACjC;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC;gBAClC,WAAW,EAAE,sBAAsB;aACpC;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,CAAC;KAClB;IACD,OAAO,EAAE,KAAK,EAAE,MAAwC,EAAE,OAAoB,EAAuB,EAAE;QACrG,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,UAAU,EAAE,GAAG,MAAM,CAAA;QAE3C,IAAI,aAAa,GAAG,GAAG,CAAA;QACvB,IAAI,GAAG,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;YAC9B,aAAa,GAAG,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;QAC3C,CAAC;aAAM,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YACvC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,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,CAAC,OAAO,EAAE,CAAA;QAC3D,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -1,38 +0,0 @@
1
- ### 工具web_fetch
2
- 从指定 URL 获取内容。
3
-
4
- **功能**:
5
- - 接收 URL 和可选格式参数
6
- - 获取 URL 内容,转换为请求格式(默认为 markdown)
7
- - 返回指定格式的内容
8
- - 当你需要获取和分析网页内容时使用此工具
9
-
10
- **使用说明**:
11
- - **重要**:如果有其他工具提供更好的网页获取能力、更针对任务、或限制更少,**优先**使用该工具而不是此工具
12
- - URL 必须是完整有效的 URL
13
- - HTTP URL 会自动升级为 HTTPS
14
- - 格式选项:"markdown"(默认)、"text" 或 "html"
15
- - 此工具是只读的,不会修改任何文件
16
- - 内容非常大时可能会被摘要
17
-
18
- 举例:
19
- ```xml
20
- <react>
21
- <thought>获取 TypeScript 官方文档页面</thought>
22
- <action>
23
- <action_name>web_fetch</action_name>
24
- <action_input>
25
- <url>https://www.typescriptlang.org/docs/handbook/2/basic-types.html</url>
26
- <format>markdown</format>
27
- </action_input>
28
- </action>
29
- <keep_context>true</keep_context>
30
- </react>
31
- ```
32
-
33
- 参数说明:
34
-
35
- | 字段 | 类型 | 说明 |
36
- |------|------|
37
- | `url` | string | 要获取的 URL(必须是完整格式) |
38
- | `format` | string | 输出格式(可选,默认 markdown):markdown, text, html |
@@ -1,3 +0,0 @@
1
- import { Tool } from '../tool.types.js';
2
- export declare const webSearchTool: Tool;
3
- //# sourceMappingURL=web_search.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web_search.d.ts","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/web_search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAA2B,MAAM,kBAAkB,CAAA;AAqChE,eAAO,MAAM,aAAa,EAAE,IAsG3B,CAAA"}
@@ -1,100 +0,0 @@
1
- const API_CONFIG = {
2
- BASE_URL: 'https://mcp.exa.ai',
3
- ENDPOINTS: {
4
- SEARCH: '/mcp',
5
- },
6
- DEFAULT_NUM_RESULTS: 8,
7
- TIMEOUT: 25000,
8
- };
9
- export const webSearchTool = {
10
- name: 'web_search',
11
- description: '',
12
- descriptionFile: 'web_search.txt',
13
- parameters: {
14
- type: 'object',
15
- properties: {
16
- query: {
17
- type: 'string',
18
- description: '搜索查询字符串'
19
- },
20
- numResults: {
21
- type: 'number',
22
- description: '返回结果数量(可选,默认 8)'
23
- },
24
- livecrawl: {
25
- type: 'string',
26
- enum: ['fallback', 'preferred'],
27
- description: '实时爬取模式 - fallback: 缓存不可用时备用; preferred: 优先实时爬取(默认: fallback)'
28
- },
29
- type: {
30
- type: 'string',
31
- enum: ['auto', 'fast', 'deep'],
32
- description: '搜索类型 - auto: 平衡搜索; fast: 快速结果; deep: 全面搜索(默认: auto)'
33
- },
34
- contextMaxCharacters: {
35
- type: 'number',
36
- description: 'LLM 上下文最大字符数(可选,默认 10000)'
37
- }
38
- },
39
- required: ['query']
40
- },
41
- execute: async (params, context) => {
42
- const searchRequest = {
43
- jsonrpc: '2.0',
44
- id: 1,
45
- method: 'tools/call',
46
- params: {
47
- name: 'web_search_exa',
48
- arguments: {
49
- query: params.query,
50
- type: params.type || 'auto',
51
- numResults: params.numResults || API_CONFIG.DEFAULT_NUM_RESULTS,
52
- livecrawl: params.livecrawl || 'fallback',
53
- contextMaxCharacters: params.contextMaxCharacters,
54
- },
55
- },
56
- };
57
- const timeoutTimer = setTimeout(() => {
58
- throw new Error('Search request timed out');
59
- }, API_CONFIG.TIMEOUT);
60
- try {
61
- const response = await fetch(`${API_CONFIG.BASE_URL}${API_CONFIG.ENDPOINTS.SEARCH}`, {
62
- method: 'POST',
63
- headers: {
64
- accept: 'application/json, text/event-stream',
65
- 'content-type': 'application/json',
66
- },
67
- body: JSON.stringify(searchRequest),
68
- signal: context.abortSignal,
69
- });
70
- clearTimeout(timeoutTimer);
71
- if (!response.ok) {
72
- const errorText = await response.text();
73
- return { success: false, output: '', error: `Search error (${response.status}): ${errorText}` };
74
- }
75
- const responseText = await response.text();
76
- const lines = responseText.split('\n');
77
- for (const line of lines) {
78
- if (line.startsWith('data: ')) {
79
- const data = JSON.parse(line.substring(6));
80
- if (data.result && data.result.content && data.result.content.length > 0) {
81
- return {
82
- success: true,
83
- output: data.result.content[0].text,
84
- metadata: { query: params.query, numResults: params.numResults || API_CONFIG.DEFAULT_NUM_RESULTS },
85
- };
86
- }
87
- }
88
- }
89
- return { success: true, output: '未找到搜索结果,请尝试其他查询。' };
90
- }
91
- catch (err) {
92
- clearTimeout(timeoutTimer);
93
- if (err.message === 'Search request timed out') {
94
- return { success: false, output: '', error: '搜索请求超时' };
95
- }
96
- return { success: false, output: '', error: err.message };
97
- }
98
- }
99
- };
100
- //# sourceMappingURL=web_search.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web_search.js","sourceRoot":"","sources":["../../../../src/modules/tools/builtin/web_search.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,GAAG;IACjB,QAAQ,EAAE,oBAAoB;IAC9B,SAAS,EAAE;QACT,MAAM,EAAE,MAAM;KACf;IACD,mBAAmB,EAAE,CAAC;IACtB,OAAO,EAAE,KAAK;CACN,CAAA;AA4BV,MAAM,CAAC,MAAM,aAAa,GAAS;IACjC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,EAAE;IACf,eAAe,EAAE,gBAAgB;IACjC,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,SAAS;aACvB;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iBAAiB;aAC/B;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC;gBAC/B,WAAW,EAAE,8DAA8D;aAC5E;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,MAAM,E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