@nexus-cortex/executors 4.26.0

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 (365) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +2 -0
  3. package/README.md +13 -0
  4. package/dist/ExecutorRegistry.d.ts +89 -0
  5. package/dist/ExecutorRegistry.d.ts.map +1 -0
  6. package/dist/ExecutorRegistry.js +219 -0
  7. package/dist/ExecutorRegistry.js.map +1 -0
  8. package/dist/base/BaseTool.d.ts +108 -0
  9. package/dist/base/BaseTool.d.ts.map +1 -0
  10. package/dist/base/BaseTool.js +111 -0
  11. package/dist/base/BaseTool.js.map +1 -0
  12. package/dist/base/ToolRegistry.d.ts +141 -0
  13. package/dist/base/ToolRegistry.d.ts.map +1 -0
  14. package/dist/base/ToolRegistry.js +241 -0
  15. package/dist/base/ToolRegistry.js.map +1 -0
  16. package/dist/base/ToolResult.d.ts +63 -0
  17. package/dist/base/ToolResult.d.ts.map +1 -0
  18. package/dist/base/ToolResult.js +8 -0
  19. package/dist/base/ToolResult.js.map +1 -0
  20. package/dist/base/index.d.ts +10 -0
  21. package/dist/base/index.d.ts.map +1 -0
  22. package/dist/base/index.js +8 -0
  23. package/dist/base/index.js.map +1 -0
  24. package/dist/implementations/addon/CreateArtifactTool.d.ts +221 -0
  25. package/dist/implementations/addon/CreateArtifactTool.d.ts.map +1 -0
  26. package/dist/implementations/addon/CreateArtifactTool.js +1042 -0
  27. package/dist/implementations/addon/CreateArtifactTool.js.map +1 -0
  28. package/dist/implementations/addon/FrameDiffCache.d.ts +166 -0
  29. package/dist/implementations/addon/FrameDiffCache.d.ts.map +1 -0
  30. package/dist/implementations/addon/FrameDiffCache.js +395 -0
  31. package/dist/implementations/addon/FrameDiffCache.js.map +1 -0
  32. package/dist/implementations/addon/H264StreamEncoder.d.ts +84 -0
  33. package/dist/implementations/addon/H264StreamEncoder.d.ts.map +1 -0
  34. package/dist/implementations/addon/H264StreamEncoder.js +203 -0
  35. package/dist/implementations/addon/H264StreamEncoder.js.map +1 -0
  36. package/dist/implementations/addon/HybridScreenshotManager.d.ts +197 -0
  37. package/dist/implementations/addon/HybridScreenshotManager.d.ts.map +1 -0
  38. package/dist/implementations/addon/HybridScreenshotManager.js +415 -0
  39. package/dist/implementations/addon/HybridScreenshotManager.js.map +1 -0
  40. package/dist/implementations/addon/InspectSandboxTool.d.ts +54 -0
  41. package/dist/implementations/addon/InspectSandboxTool.d.ts.map +1 -0
  42. package/dist/implementations/addon/InspectSandboxTool.js +226 -0
  43. package/dist/implementations/addon/InspectSandboxTool.js.map +1 -0
  44. package/dist/implementations/addon/InteractWithSandboxTool.d.ts +90 -0
  45. package/dist/implementations/addon/InteractWithSandboxTool.d.ts.map +1 -0
  46. package/dist/implementations/addon/InteractWithSandboxTool.js +367 -0
  47. package/dist/implementations/addon/InteractWithSandboxTool.js.map +1 -0
  48. package/dist/implementations/addon/KeyframeDetector.d.ts +140 -0
  49. package/dist/implementations/addon/KeyframeDetector.d.ts.map +1 -0
  50. package/dist/implementations/addon/KeyframeDetector.js +390 -0
  51. package/dist/implementations/addon/KeyframeDetector.js.map +1 -0
  52. package/dist/implementations/addon/ModifySandboxTool.d.ts +62 -0
  53. package/dist/implementations/addon/ModifySandboxTool.d.ts.map +1 -0
  54. package/dist/implementations/addon/ModifySandboxTool.js +266 -0
  55. package/dist/implementations/addon/ModifySandboxTool.js.map +1 -0
  56. package/dist/implementations/addon/ReactArtifactBuilder.d.ts +27 -0
  57. package/dist/implementations/addon/ReactArtifactBuilder.d.ts.map +1 -0
  58. package/dist/implementations/addon/ReactArtifactBuilder.js +198 -0
  59. package/dist/implementations/addon/ReactArtifactBuilder.js.map +1 -0
  60. package/dist/implementations/addon/SandboxEventBroadcaster.d.ts +143 -0
  61. package/dist/implementations/addon/SandboxEventBroadcaster.d.ts.map +1 -0
  62. package/dist/implementations/addon/SandboxEventBroadcaster.js +258 -0
  63. package/dist/implementations/addon/SandboxEventBroadcaster.js.map +1 -0
  64. package/dist/implementations/addon/SandboxIntrospectionTools.d.ts +77 -0
  65. package/dist/implementations/addon/SandboxIntrospectionTools.d.ts.map +1 -0
  66. package/dist/implementations/addon/SandboxIntrospectionTools.js +292 -0
  67. package/dist/implementations/addon/SandboxIntrospectionTools.js.map +1 -0
  68. package/dist/implementations/addon/SandboxViewServer.d.ts +127 -0
  69. package/dist/implementations/addon/SandboxViewServer.d.ts.map +1 -0
  70. package/dist/implementations/addon/SandboxViewServer.js +775 -0
  71. package/dist/implementations/addon/SandboxViewServer.js.map +1 -0
  72. package/dist/implementations/addon/ScreenStream.d.ts +149 -0
  73. package/dist/implementations/addon/ScreenStream.d.ts.map +1 -0
  74. package/dist/implementations/addon/ScreenStream.js +306 -0
  75. package/dist/implementations/addon/ScreenStream.js.map +1 -0
  76. package/dist/implementations/addon/StopSandboxTool.d.ts +61 -0
  77. package/dist/implementations/addon/StopSandboxTool.d.ts.map +1 -0
  78. package/dist/implementations/addon/StopSandboxTool.js +252 -0
  79. package/dist/implementations/addon/StopSandboxTool.js.map +1 -0
  80. package/dist/implementations/addon/TerminalSandbox.d.ts +111 -0
  81. package/dist/implementations/addon/TerminalSandbox.d.ts.map +1 -0
  82. package/dist/implementations/addon/TerminalSandbox.js +345 -0
  83. package/dist/implementations/addon/TerminalSandbox.js.map +1 -0
  84. package/dist/implementations/addon/VisualFeedbackBridge.d.ts +367 -0
  85. package/dist/implementations/addon/VisualFeedbackBridge.d.ts.map +1 -0
  86. package/dist/implementations/addon/VisualFeedbackBridge.js +888 -0
  87. package/dist/implementations/addon/VisualFeedbackBridge.js.map +1 -0
  88. package/dist/implementations/addon/WindowManager.d.ts +138 -0
  89. package/dist/implementations/addon/WindowManager.d.ts.map +1 -0
  90. package/dist/implementations/addon/WindowManager.js +276 -0
  91. package/dist/implementations/addon/WindowManager.js.map +1 -0
  92. package/dist/implementations/addon/index.d.ts +29 -0
  93. package/dist/implementations/addon/index.d.ts.map +1 -0
  94. package/dist/implementations/addon/index.js +29 -0
  95. package/dist/implementations/addon/index.js.map +1 -0
  96. package/dist/implementations/addon/injectables/reactIntrospection.d.ts +57 -0
  97. package/dist/implementations/addon/injectables/reactIntrospection.d.ts.map +1 -0
  98. package/dist/implementations/addon/injectables/reactIntrospection.js +480 -0
  99. package/dist/implementations/addon/injectables/reactIntrospection.js.map +1 -0
  100. package/dist/implementations/addon/terminal-client.html +253 -0
  101. package/dist/implementations/agent/PRAgentTool.d.ts +37 -0
  102. package/dist/implementations/agent/PRAgentTool.d.ts.map +1 -0
  103. package/dist/implementations/agent/PRAgentTool.js +257 -0
  104. package/dist/implementations/agent/PRAgentTool.js.map +1 -0
  105. package/dist/implementations/agent/TaskTool.d.ts +76 -0
  106. package/dist/implementations/agent/TaskTool.d.ts.map +1 -0
  107. package/dist/implementations/agent/TaskTool.js +424 -0
  108. package/dist/implementations/agent/TaskTool.js.map +1 -0
  109. package/dist/implementations/agent/index.d.ts +5 -0
  110. package/dist/implementations/agent/index.d.ts.map +1 -0
  111. package/dist/implementations/agent/index.js +3 -0
  112. package/dist/implementations/agent/index.js.map +1 -0
  113. package/dist/implementations/execution/BackgroundProcessRegistry.d.ts +68 -0
  114. package/dist/implementations/execution/BackgroundProcessRegistry.d.ts.map +1 -0
  115. package/dist/implementations/execution/BackgroundProcessRegistry.js +146 -0
  116. package/dist/implementations/execution/BackgroundProcessRegistry.js.map +1 -0
  117. package/dist/implementations/execution/BashOutputTool.d.ts +42 -0
  118. package/dist/implementations/execution/BashOutputTool.d.ts.map +1 -0
  119. package/dist/implementations/execution/BashOutputTool.js +168 -0
  120. package/dist/implementations/execution/BashOutputTool.js.map +1 -0
  121. package/dist/implementations/execution/CodeExecuteTool.d.ts +31 -0
  122. package/dist/implementations/execution/CodeExecuteTool.d.ts.map +1 -0
  123. package/dist/implementations/execution/CodeExecuteTool.js +127 -0
  124. package/dist/implementations/execution/CodeExecuteTool.js.map +1 -0
  125. package/dist/implementations/execution/KillShellTool.d.ts +37 -0
  126. package/dist/implementations/execution/KillShellTool.d.ts.map +1 -0
  127. package/dist/implementations/execution/KillShellTool.js +144 -0
  128. package/dist/implementations/execution/KillShellTool.js.map +1 -0
  129. package/dist/implementations/execution/SearchToolsTool.d.ts +32 -0
  130. package/dist/implementations/execution/SearchToolsTool.d.ts.map +1 -0
  131. package/dist/implementations/execution/SearchToolsTool.js +109 -0
  132. package/dist/implementations/execution/SearchToolsTool.js.map +1 -0
  133. package/dist/implementations/execution/ShellTool.d.ts +108 -0
  134. package/dist/implementations/execution/ShellTool.d.ts.map +1 -0
  135. package/dist/implementations/execution/ShellTool.js +546 -0
  136. package/dist/implementations/execution/ShellTool.js.map +1 -0
  137. package/dist/implementations/execution/WorkspaceManagerTool.d.ts +40 -0
  138. package/dist/implementations/execution/WorkspaceManagerTool.d.ts.map +1 -0
  139. package/dist/implementations/execution/WorkspaceManagerTool.js +370 -0
  140. package/dist/implementations/execution/WorkspaceManagerTool.js.map +1 -0
  141. package/dist/implementations/execution/index.d.ts +13 -0
  142. package/dist/implementations/execution/index.d.ts.map +1 -0
  143. package/dist/implementations/execution/index.js +13 -0
  144. package/dist/implementations/execution/index.js.map +1 -0
  145. package/dist/implementations/extensions/EndTurnTool.d.ts +62 -0
  146. package/dist/implementations/extensions/EndTurnTool.d.ts.map +1 -0
  147. package/dist/implementations/extensions/EndTurnTool.js +172 -0
  148. package/dist/implementations/extensions/EndTurnTool.js.map +1 -0
  149. package/dist/implementations/extensions/ResearchBacklogTool.d.ts +37 -0
  150. package/dist/implementations/extensions/ResearchBacklogTool.d.ts.map +1 -0
  151. package/dist/implementations/extensions/ResearchBacklogTool.js +102 -0
  152. package/dist/implementations/extensions/ResearchBacklogTool.js.map +1 -0
  153. package/dist/implementations/extensions/SkillTool.d.ts +108 -0
  154. package/dist/implementations/extensions/SkillTool.d.ts.map +1 -0
  155. package/dist/implementations/extensions/SkillTool.js +351 -0
  156. package/dist/implementations/extensions/SkillTool.js.map +1 -0
  157. package/dist/implementations/extensions/SlashCommandTool.d.ts +112 -0
  158. package/dist/implementations/extensions/SlashCommandTool.d.ts.map +1 -0
  159. package/dist/implementations/extensions/SlashCommandTool.js +315 -0
  160. package/dist/implementations/extensions/SlashCommandTool.js.map +1 -0
  161. package/dist/implementations/extensions/index.d.ts +14 -0
  162. package/dist/implementations/extensions/index.d.ts.map +1 -0
  163. package/dist/implementations/extensions/index.js +10 -0
  164. package/dist/implementations/extensions/index.js.map +1 -0
  165. package/dist/implementations/file/EditTool.d.ts +232 -0
  166. package/dist/implementations/file/EditTool.d.ts.map +1 -0
  167. package/dist/implementations/file/EditTool.js +707 -0
  168. package/dist/implementations/file/EditTool.js.map +1 -0
  169. package/dist/implementations/file/ReadFileTool.d.ts +49 -0
  170. package/dist/implementations/file/ReadFileTool.d.ts.map +1 -0
  171. package/dist/implementations/file/ReadFileTool.js +225 -0
  172. package/dist/implementations/file/ReadFileTool.js.map +1 -0
  173. package/dist/implementations/file/WriteBinaryTool.d.ts +21 -0
  174. package/dist/implementations/file/WriteBinaryTool.d.ts.map +1 -0
  175. package/dist/implementations/file/WriteBinaryTool.js +153 -0
  176. package/dist/implementations/file/WriteBinaryTool.js.map +1 -0
  177. package/dist/implementations/file/WriteFileTool.d.ts +41 -0
  178. package/dist/implementations/file/WriteFileTool.d.ts.map +1 -0
  179. package/dist/implementations/file/WriteFileTool.js +220 -0
  180. package/dist/implementations/file/WriteFileTool.js.map +1 -0
  181. package/dist/implementations/file/index.d.ts +8 -0
  182. package/dist/implementations/file/index.d.ts.map +1 -0
  183. package/dist/implementations/file/index.js +8 -0
  184. package/dist/implementations/file/index.js.map +1 -0
  185. package/dist/implementations/historical/GetConversationSegmentTool.d.ts +44 -0
  186. package/dist/implementations/historical/GetConversationSegmentTool.d.ts.map +1 -0
  187. package/dist/implementations/historical/GetConversationSegmentTool.js +220 -0
  188. package/dist/implementations/historical/GetConversationSegmentTool.js.map +1 -0
  189. package/dist/implementations/historical/ListCompactionBoundariesTool.d.ts +36 -0
  190. package/dist/implementations/historical/ListCompactionBoundariesTool.d.ts.map +1 -0
  191. package/dist/implementations/historical/ListCompactionBoundariesTool.js +174 -0
  192. package/dist/implementations/historical/ListCompactionBoundariesTool.js.map +1 -0
  193. package/dist/implementations/historical/ListSessionsTool.d.ts +38 -0
  194. package/dist/implementations/historical/ListSessionsTool.d.ts.map +1 -0
  195. package/dist/implementations/historical/ListSessionsTool.js +140 -0
  196. package/dist/implementations/historical/ListSessionsTool.js.map +1 -0
  197. package/dist/implementations/historical/LoadSessionTool.d.ts +39 -0
  198. package/dist/implementations/historical/LoadSessionTool.d.ts.map +1 -0
  199. package/dist/implementations/historical/LoadSessionTool.js +171 -0
  200. package/dist/implementations/historical/LoadSessionTool.js.map +1 -0
  201. package/dist/implementations/historical/RequestHistoricalContextTool.d.ts +46 -0
  202. package/dist/implementations/historical/RequestHistoricalContextTool.d.ts.map +1 -0
  203. package/dist/implementations/historical/RequestHistoricalContextTool.js +224 -0
  204. package/dist/implementations/historical/RequestHistoricalContextTool.js.map +1 -0
  205. package/dist/implementations/historical/SearchConversationHistoryTool.d.ts +51 -0
  206. package/dist/implementations/historical/SearchConversationHistoryTool.d.ts.map +1 -0
  207. package/dist/implementations/historical/SearchConversationHistoryTool.js +306 -0
  208. package/dist/implementations/historical/SearchConversationHistoryTool.js.map +1 -0
  209. package/dist/implementations/historical/index.d.ts +12 -0
  210. package/dist/implementations/historical/index.d.ts.map +1 -0
  211. package/dist/implementations/historical/index.js +12 -0
  212. package/dist/implementations/historical/index.js.map +1 -0
  213. package/dist/implementations/index.d.ts +16 -0
  214. package/dist/implementations/index.d.ts.map +1 -0
  215. package/dist/implementations/index.js +28 -0
  216. package/dist/implementations/index.js.map +1 -0
  217. package/dist/implementations/mcp/DiscoveredMcpTool.d.ts +58 -0
  218. package/dist/implementations/mcp/DiscoveredMcpTool.d.ts.map +1 -0
  219. package/dist/implementations/mcp/DiscoveredMcpTool.js +269 -0
  220. package/dist/implementations/mcp/DiscoveredMcpTool.js.map +1 -0
  221. package/dist/implementations/mcp/index.d.ts +9 -0
  222. package/dist/implementations/mcp/index.d.ts.map +1 -0
  223. package/dist/implementations/mcp/index.js +8 -0
  224. package/dist/implementations/mcp/index.js.map +1 -0
  225. package/dist/implementations/notebook/NotebookEditTool.d.ts +96 -0
  226. package/dist/implementations/notebook/NotebookEditTool.d.ts.map +1 -0
  227. package/dist/implementations/notebook/NotebookEditTool.js +390 -0
  228. package/dist/implementations/notebook/NotebookEditTool.js.map +1 -0
  229. package/dist/implementations/notebook/index.d.ts +7 -0
  230. package/dist/implementations/notebook/index.d.ts.map +1 -0
  231. package/dist/implementations/notebook/index.js +7 -0
  232. package/dist/implementations/notebook/index.js.map +1 -0
  233. package/dist/implementations/search/GlobTool.d.ts +73 -0
  234. package/dist/implementations/search/GlobTool.d.ts.map +1 -0
  235. package/dist/implementations/search/GlobTool.js +213 -0
  236. package/dist/implementations/search/GlobTool.js.map +1 -0
  237. package/dist/implementations/search/GrepTool.d.ts +102 -0
  238. package/dist/implementations/search/GrepTool.d.ts.map +1 -0
  239. package/dist/implementations/search/GrepTool.js +754 -0
  240. package/dist/implementations/search/GrepTool.js.map +1 -0
  241. package/dist/implementations/search/index.d.ts +6 -0
  242. package/dist/implementations/search/index.d.ts.map +1 -0
  243. package/dist/implementations/search/index.js +6 -0
  244. package/dist/implementations/search/index.js.map +1 -0
  245. package/dist/implementations/tmux/TmuxSessionTool.d.ts +82 -0
  246. package/dist/implementations/tmux/TmuxSessionTool.d.ts.map +1 -0
  247. package/dist/implementations/tmux/TmuxSessionTool.js +371 -0
  248. package/dist/implementations/tmux/TmuxSessionTool.js.map +1 -0
  249. package/dist/implementations/tmux/TmuxViewServer.d.ts +86 -0
  250. package/dist/implementations/tmux/TmuxViewServer.d.ts.map +1 -0
  251. package/dist/implementations/tmux/TmuxViewServer.js +480 -0
  252. package/dist/implementations/tmux/TmuxViewServer.js.map +1 -0
  253. package/dist/implementations/tmux/index.d.ts +6 -0
  254. package/dist/implementations/tmux/index.d.ts.map +1 -0
  255. package/dist/implementations/tmux/index.js +6 -0
  256. package/dist/implementations/tmux/index.js.map +1 -0
  257. package/dist/implementations/ui/AskUserQuestionTool.d.ts +77 -0
  258. package/dist/implementations/ui/AskUserQuestionTool.d.ts.map +1 -0
  259. package/dist/implementations/ui/AskUserQuestionTool.js +241 -0
  260. package/dist/implementations/ui/AskUserQuestionTool.js.map +1 -0
  261. package/dist/implementations/ui/ExitPlanModeTool.d.ts +44 -0
  262. package/dist/implementations/ui/ExitPlanModeTool.d.ts.map +1 -0
  263. package/dist/implementations/ui/ExitPlanModeTool.js +150 -0
  264. package/dist/implementations/ui/ExitPlanModeTool.js.map +1 -0
  265. package/dist/implementations/ui/TodoWriteTool.d.ts +59 -0
  266. package/dist/implementations/ui/TodoWriteTool.d.ts.map +1 -0
  267. package/dist/implementations/ui/TodoWriteTool.js +315 -0
  268. package/dist/implementations/ui/TodoWriteTool.js.map +1 -0
  269. package/dist/implementations/ui/index.d.ts +9 -0
  270. package/dist/implementations/ui/index.d.ts.map +1 -0
  271. package/dist/implementations/ui/index.js +9 -0
  272. package/dist/implementations/ui/index.js.map +1 -0
  273. package/dist/implementations/web/BrowseTool.d.ts +43 -0
  274. package/dist/implementations/web/BrowseTool.d.ts.map +1 -0
  275. package/dist/implementations/web/BrowseTool.js +181 -0
  276. package/dist/implementations/web/BrowseTool.js.map +1 -0
  277. package/dist/implementations/web/SandboxTransferTool.d.ts +30 -0
  278. package/dist/implementations/web/SandboxTransferTool.d.ts.map +1 -0
  279. package/dist/implementations/web/SandboxTransferTool.js +261 -0
  280. package/dist/implementations/web/SandboxTransferTool.js.map +1 -0
  281. package/dist/implementations/web/WebFetchTool.d.ts +93 -0
  282. package/dist/implementations/web/WebFetchTool.d.ts.map +1 -0
  283. package/dist/implementations/web/WebFetchTool.js +484 -0
  284. package/dist/implementations/web/WebFetchTool.js.map +1 -0
  285. package/dist/implementations/web/WebSearchTool.d.ts +53 -0
  286. package/dist/implementations/web/WebSearchTool.d.ts.map +1 -0
  287. package/dist/implementations/web/WebSearchTool.js +227 -0
  288. package/dist/implementations/web/WebSearchTool.js.map +1 -0
  289. package/dist/implementations/web/escalateDirective.d.ts +11 -0
  290. package/dist/implementations/web/escalateDirective.d.ts.map +1 -0
  291. package/dist/implementations/web/escalateDirective.js +20 -0
  292. package/dist/implementations/web/escalateDirective.js.map +1 -0
  293. package/dist/implementations/web/index.d.ts +10 -0
  294. package/dist/implementations/web/index.d.ts.map +1 -0
  295. package/dist/implementations/web/index.js +10 -0
  296. package/dist/implementations/web/index.js.map +1 -0
  297. package/dist/implementations/web/webBackends.d.ts +65 -0
  298. package/dist/implementations/web/webBackends.d.ts.map +1 -0
  299. package/dist/implementations/web/webBackends.js +430 -0
  300. package/dist/implementations/web/webBackends.js.map +1 -0
  301. package/dist/implementations/web/webFetchRequestInit.d.ts +9 -0
  302. package/dist/implementations/web/webFetchRequestInit.d.ts.map +1 -0
  303. package/dist/implementations/web/webFetchRequestInit.js +21 -0
  304. package/dist/implementations/web/webFetchRequestInit.js.map +1 -0
  305. package/dist/index.d.ts +14 -0
  306. package/dist/index.d.ts.map +1 -0
  307. package/dist/index.js +18 -0
  308. package/dist/index.js.map +1 -0
  309. package/dist/utils/ArtifactRegistry.d.ts +138 -0
  310. package/dist/utils/ArtifactRegistry.d.ts.map +1 -0
  311. package/dist/utils/ArtifactRegistry.js +259 -0
  312. package/dist/utils/ArtifactRegistry.js.map +1 -0
  313. package/dist/utils/ChromiumBrowserManager.d.ts +56 -0
  314. package/dist/utils/ChromiumBrowserManager.d.ts.map +1 -0
  315. package/dist/utils/ChromiumBrowserManager.js +243 -0
  316. package/dist/utils/ChromiumBrowserManager.js.map +1 -0
  317. package/dist/utils/FileUtils.d.ts +81 -0
  318. package/dist/utils/FileUtils.d.ts.map +1 -0
  319. package/dist/utils/FileUtils.js +148 -0
  320. package/dist/utils/FileUtils.js.map +1 -0
  321. package/dist/utils/GitPolicy.d.ts +70 -0
  322. package/dist/utils/GitPolicy.d.ts.map +1 -0
  323. package/dist/utils/GitPolicy.js +166 -0
  324. package/dist/utils/GitPolicy.js.map +1 -0
  325. package/dist/utils/GitUtils.d.ts +18 -0
  326. package/dist/utils/GitUtils.d.ts.map +1 -0
  327. package/dist/utils/GitUtils.js +62 -0
  328. package/dist/utils/GitUtils.js.map +1 -0
  329. package/dist/utils/SandboxRegistry.d.ts +110 -0
  330. package/dist/utils/SandboxRegistry.d.ts.map +1 -0
  331. package/dist/utils/SandboxRegistry.js +220 -0
  332. package/dist/utils/SandboxRegistry.js.map +1 -0
  333. package/dist/utils/SchemaValidator.d.ts +21 -0
  334. package/dist/utils/SchemaValidator.d.ts.map +1 -0
  335. package/dist/utils/SchemaValidator.js +67 -0
  336. package/dist/utils/SchemaValidator.js.map +1 -0
  337. package/dist/utils/SessionLock.d.ts +96 -0
  338. package/dist/utils/SessionLock.d.ts.map +1 -0
  339. package/dist/utils/SessionLock.js +276 -0
  340. package/dist/utils/SessionLock.js.map +1 -0
  341. package/dist/utils/SessionPersistence.d.ts +89 -0
  342. package/dist/utils/SessionPersistence.d.ts.map +1 -0
  343. package/dist/utils/SessionPersistence.js +244 -0
  344. package/dist/utils/SessionPersistence.js.map +1 -0
  345. package/dist/utils/TextUtils.d.ts +77 -0
  346. package/dist/utils/TextUtils.d.ts.map +1 -0
  347. package/dist/utils/TextUtils.js +112 -0
  348. package/dist/utils/TextUtils.js.map +1 -0
  349. package/dist/utils/TmuxCapture.d.ts +94 -0
  350. package/dist/utils/TmuxCapture.d.ts.map +1 -0
  351. package/dist/utils/TmuxCapture.js +131 -0
  352. package/dist/utils/TmuxCapture.js.map +1 -0
  353. package/dist/utils/TmuxManager.d.ts +65 -0
  354. package/dist/utils/TmuxManager.d.ts.map +1 -0
  355. package/dist/utils/TmuxManager.js +304 -0
  356. package/dist/utils/TmuxManager.js.map +1 -0
  357. package/dist/utils/autoResearchPlanGate.d.ts +10 -0
  358. package/dist/utils/autoResearchPlanGate.d.ts.map +1 -0
  359. package/dist/utils/autoResearchPlanGate.js +57 -0
  360. package/dist/utils/autoResearchPlanGate.js.map +1 -0
  361. package/dist/utils/index.d.ts +19 -0
  362. package/dist/utils/index.d.ts.map +1 -0
  363. package/dist/utils/index.js +13 -0
  364. package/dist/utils/index.js.map +1 -0
  365. package/package.json +83 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/implementations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,cAAc,iBAAiB,CAAC;AAGhC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,sBAAsB,CAAC;AAGrC,cAAc,eAAe,CAAC;AAG9B,cAAc,qBAAqB,CAAC;AAGpC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,gBAAgB,CAAC;AAG/B,cAAc,uBAAuB,CAAC;AAGtC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,kBAAkB,CAAC;AAGjC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Tool Executor Implementations
3
+ */
4
+ // File operations
5
+ export * from './file/index.js';
6
+ // Search operations
7
+ export * from './search/index.js';
8
+ // Web operations
9
+ export * from './web/index.js';
10
+ // Execution operations
11
+ export * from './execution/index.js';
12
+ // UI/Planning operations
13
+ export * from './ui/index.js';
14
+ // Notebook operations
15
+ export * from './notebook/index.js';
16
+ // Historical operations
17
+ export * from './historical/index.js';
18
+ // MCP operations
19
+ export * from './mcp/index.js';
20
+ // Extension operations
21
+ export * from './extensions/index.js';
22
+ // Agent operations
23
+ export * from './agent/index.js';
24
+ // Addon operations
25
+ export * from './addon/index.js';
26
+ // Tmux operations
27
+ export * from './tmux/index.js';
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/implementations/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,kBAAkB;AAClB,cAAc,iBAAiB,CAAC;AAEhC,oBAAoB;AACpB,cAAc,mBAAmB,CAAC;AAElC,iBAAiB;AACjB,cAAc,gBAAgB,CAAC;AAE/B,uBAAuB;AACvB,cAAc,sBAAsB,CAAC;AAErC,yBAAyB;AACzB,cAAc,eAAe,CAAC;AAE9B,sBAAsB;AACtB,cAAc,qBAAqB,CAAC;AAEpC,wBAAwB;AACxB,cAAc,uBAAuB,CAAC;AAEtC,iBAAiB;AACjB,cAAc,gBAAgB,CAAC;AAE/B,uBAAuB;AACvB,cAAc,uBAAuB,CAAC;AAEtC,mBAAmB;AACnB,cAAc,kBAAkB,CAAC;AAEjC,mBAAmB;AACnB,cAAc,kBAAkB,CAAC;AAEjC,kBAAkB;AAClB,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * DiscoveredMcpTool - Dynamic MCP Tool Wrapper
3
+ *
4
+ * Each tool discovered from an MCP server is wrapped in this class
5
+ * and registered as an individual tool in the tool registry.
6
+ *
7
+ * The LLM sees each MCP tool as a separate tool with its own name,
8
+ * description, and parameter schema.
9
+ */
10
+ import { BaseTool, type ToolResult } from '../../base/index.js';
11
+ import type { McpClientManager } from '@nexus-cortex/core';
12
+ import type { Tool } from '@modelcontextprotocol/sdk/types.js';
13
+ /**
14
+ * Parameters for discovered MCP tools
15
+ * The actual parameters are dynamic based on the tool's schema
16
+ */
17
+ export type DiscoveredMcpToolParams = Record<string, unknown>;
18
+ /**
19
+ * DiscoveredMcpTool - Wraps an individual MCP tool
20
+ *
21
+ * Each instance represents one tool from one MCP server.
22
+ * These tools are dynamically registered after MCP server connection.
23
+ *
24
+ * Example:
25
+ * - filesystem server exposes "read_file" → DiscoveredMcpTool("read_file", "filesystem", ...)
26
+ * - github server exposes "create_issue" → DiscoveredMcpTool("create_issue", "github", ...)
27
+ */
28
+ export declare class DiscoveredMcpToolExecutor extends BaseTool<DiscoveredMcpToolParams, ToolResult> {
29
+ private serverName;
30
+ private serverToolName;
31
+ private toolDeclaration;
32
+ private mcpManagerGetter;
33
+ private mcpManager;
34
+ constructor(serverName: string, serverToolName: string, toolDeclaration: Tool, mcpManagerGetter: () => McpClientManager | undefined, toolNameOverride?: string);
35
+ validateToolParams(params: DiscoveredMcpToolParams): string | null;
36
+ getDescription(params: DiscoveredMcpToolParams): string;
37
+ execute(params: DiscoveredMcpToolParams, signal: AbortSignal, updateOutput?: (output: string) => void): Promise<ToolResult>;
38
+ /**
39
+ * Execute tool call with abort signal support
40
+ */
41
+ private executeWithAbort;
42
+ /**
43
+ * Format MCP tool result for display
44
+ */
45
+ private formatToolResult;
46
+ /**
47
+ * Format MCP content blocks (text, images, resources, etc.)
48
+ */
49
+ private formatMcpContent;
50
+ }
51
+ /**
52
+ * Generate a valid tool name from MCP tool name
53
+ * Follows Gemini API constraints:
54
+ * - Max 63 characters
55
+ * - Only alphanumeric, underscore, dash, dot
56
+ */
57
+ export declare function generateValidToolName(name: string): string;
58
+ //# sourceMappingURL=DiscoveredMcpTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscoveredMcpTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/mcp/DiscoveredMcpTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE9D;;;;;;;;;GASG;AACH,qBAAa,yBAA0B,SAAQ,QAAQ,CACrD,uBAAuB,EACvB,UAAU,CACX;IAIG,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,eAAe;IACvB,OAAO,CAAC,gBAAgB;IAN1B,OAAO,CAAC,UAAU,CAA+B;gBAGvC,UAAU,EAAE,MAAM,EAClB,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,IAAI,EACrB,gBAAgB,EAAE,MAAM,gBAAgB,GAAG,SAAS,EAC5D,gBAAgB,CAAC,EAAE,MAAM;IAwB3B,kBAAkB,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM,GAAG,IAAI;IAUlE,cAAc,CAAC,MAAM,EAAE,uBAAuB,GAAG,MAAM;IAIjD,OAAO,CACX,MAAM,EAAE,uBAAuB,EAC/B,MAAM,EAAE,WAAW,EACnB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GACtC,OAAO,CAAC,UAAU,CAAC;IA0HtB;;OAEG;YACW,gBAAgB;IAyC9B;;OAEG;IACH,OAAO,CAAC,gBAAgB;IA6BxB;;OAEG;IACH,OAAO,CAAC,gBAAgB;CAwCzB;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAU1D"}
@@ -0,0 +1,269 @@
1
+ /**
2
+ * DiscoveredMcpTool - Dynamic MCP Tool Wrapper
3
+ *
4
+ * Each tool discovered from an MCP server is wrapped in this class
5
+ * and registered as an individual tool in the tool registry.
6
+ *
7
+ * The LLM sees each MCP tool as a separate tool with its own name,
8
+ * description, and parameter schema.
9
+ */
10
+ import { BaseTool } from '../../base/index.js';
11
+ import { SchemaValidator } from '../../utils/SchemaValidator.js';
12
+ /**
13
+ * DiscoveredMcpTool - Wraps an individual MCP tool
14
+ *
15
+ * Each instance represents one tool from one MCP server.
16
+ * These tools are dynamically registered after MCP server connection.
17
+ *
18
+ * Example:
19
+ * - filesystem server exposes "read_file" → DiscoveredMcpTool("read_file", "filesystem", ...)
20
+ * - github server exposes "create_issue" → DiscoveredMcpTool("create_issue", "github", ...)
21
+ */
22
+ export class DiscoveredMcpToolExecutor extends BaseTool {
23
+ serverName;
24
+ serverToolName;
25
+ toolDeclaration;
26
+ mcpManagerGetter;
27
+ mcpManager;
28
+ constructor(serverName, serverToolName, toolDeclaration, mcpManagerGetter, toolNameOverride) {
29
+ // Generate a valid tool name for the LLM
30
+ const toolName = toolNameOverride ?? generateValidToolName(serverToolName);
31
+ // Use the tool's description from MCP server
32
+ const description = toolDeclaration.description || `Tool from MCP server '${serverName}'`;
33
+ // Use the tool's parameter schema from MCP server
34
+ const parameterSchema = (toolDeclaration.inputSchema || {
35
+ type: 'object',
36
+ properties: {},
37
+ }); // MCP schemas are dynamic
38
+ super(toolName, toolName, // displayName
39
+ `${description}\n\n*Source: ${serverName} MCP Server*`, parameterSchema);
40
+ this.serverName = serverName;
41
+ this.serverToolName = serverToolName;
42
+ this.toolDeclaration = toolDeclaration;
43
+ this.mcpManagerGetter = mcpManagerGetter;
44
+ this.mcpManager = mcpManagerGetter();
45
+ }
46
+ validateToolParams(params) {
47
+ // Validate against the MCP tool's schema
48
+ const schemaError = SchemaValidator.validate(this.parameterSchema, params);
49
+ if (schemaError) {
50
+ return schemaError;
51
+ }
52
+ return null;
53
+ }
54
+ getDescription(params) {
55
+ return `Calling ${this.serverToolName} on ${this.serverName} MCP server`;
56
+ }
57
+ async execute(params, signal, updateOutput) {
58
+ const startTime = Date.now();
59
+ try {
60
+ // Check for abort
61
+ if (signal.aborted) {
62
+ return {
63
+ ...this.createErrorResult('Tool call was cancelled'),
64
+ metadata: {
65
+ executionTime: Date.now() - startTime,
66
+ serverName: this.serverName,
67
+ toolName: this.serverToolName,
68
+ },
69
+ };
70
+ }
71
+ // Validate parameters
72
+ const validationError = this.validateToolParams(params);
73
+ if (validationError) {
74
+ return {
75
+ ...this.createErrorResult(validationError),
76
+ metadata: {
77
+ executionTime: Date.now() - startTime,
78
+ serverName: this.serverName,
79
+ toolName: this.serverToolName,
80
+ },
81
+ };
82
+ }
83
+ // Get MCP manager
84
+ if (!this.mcpManager) {
85
+ this.mcpManager = this.mcpManagerGetter();
86
+ }
87
+ if (!this.mcpManager) {
88
+ return {
89
+ ...this.createErrorResult('MCP manager not available. MCP functionality requires proper configuration.'),
90
+ metadata: {
91
+ executionTime: Date.now() - startTime,
92
+ serverName: this.serverName,
93
+ toolName: this.serverToolName,
94
+ },
95
+ };
96
+ }
97
+ // Check server is connected
98
+ if (!this.mcpManager.isServerConnected(this.serverName)) {
99
+ return {
100
+ ...this.createErrorResult(`MCP server '${this.serverName}' is not connected.`),
101
+ metadata: {
102
+ executionTime: Date.now() - startTime,
103
+ serverName: this.serverName,
104
+ toolName: this.serverToolName,
105
+ },
106
+ };
107
+ }
108
+ // Execute the tool call with abort support
109
+ const result = await this.executeWithAbort(this.mcpManager, this.serverName, this.serverToolName, params, signal);
110
+ // Check for abort after execution
111
+ if (signal.aborted) {
112
+ return {
113
+ ...this.createErrorResult('Tool call was cancelled'),
114
+ metadata: {
115
+ executionTime: Date.now() - startTime,
116
+ serverName: this.serverName,
117
+ toolName: this.serverToolName,
118
+ },
119
+ };
120
+ }
121
+ // Format the result
122
+ const formattedOutput = this.formatToolResult(result);
123
+ return {
124
+ ...this.createSuccessResult(formattedOutput),
125
+ metadata: {
126
+ executionTime: Date.now() - startTime,
127
+ serverName: this.serverName,
128
+ toolName: this.serverToolName,
129
+ resultType: typeof result,
130
+ },
131
+ };
132
+ }
133
+ catch (error) {
134
+ // Check for abort
135
+ if (signal.aborted) {
136
+ return {
137
+ ...this.createErrorResult('Tool call was cancelled'),
138
+ metadata: {
139
+ executionTime: Date.now() - startTime,
140
+ serverName: this.serverName,
141
+ toolName: this.serverToolName,
142
+ },
143
+ };
144
+ }
145
+ const errorMessage = error.message || String(error);
146
+ return {
147
+ ...this.createErrorResult(`Error calling MCP tool '${this.serverToolName}' on server '${this.serverName}': ${errorMessage}`),
148
+ metadata: {
149
+ executionTime: Date.now() - startTime,
150
+ serverName: this.serverName,
151
+ toolName: this.serverToolName,
152
+ error: errorMessage,
153
+ },
154
+ };
155
+ }
156
+ }
157
+ /**
158
+ * Execute tool call with abort signal support
159
+ */
160
+ async executeWithAbort(mcpManager, serverName, toolName, args, signal) {
161
+ return new Promise((resolve, reject) => {
162
+ if (signal.aborted) {
163
+ const error = new Error('Tool call aborted');
164
+ error.name = 'AbortError';
165
+ reject(error);
166
+ return;
167
+ }
168
+ const onAbort = () => {
169
+ cleanup();
170
+ const error = new Error('Tool call aborted');
171
+ error.name = 'AbortError';
172
+ reject(error);
173
+ };
174
+ const cleanup = () => {
175
+ signal.removeEventListener('abort', onAbort);
176
+ };
177
+ signal.addEventListener('abort', onAbort, { once: true });
178
+ mcpManager
179
+ .callTool(serverName, toolName, args)
180
+ .then((res) => {
181
+ cleanup();
182
+ resolve(res);
183
+ })
184
+ .catch((err) => {
185
+ cleanup();
186
+ reject(err);
187
+ });
188
+ });
189
+ }
190
+ /**
191
+ * Format MCP tool result for display
192
+ */
193
+ formatToolResult(result) {
194
+ if (result === null || result === undefined) {
195
+ return 'Tool executed successfully (no return value)';
196
+ }
197
+ // Handle MCP content blocks
198
+ if (Array.isArray(result.content)) {
199
+ return this.formatMcpContent(result.content);
200
+ }
201
+ // Handle direct result
202
+ if (typeof result === 'string') {
203
+ return result;
204
+ }
205
+ // Handle object result
206
+ if (typeof result === 'object') {
207
+ // Check if it's a simple text response
208
+ if (result.text) {
209
+ return result.text;
210
+ }
211
+ // Format as JSON
212
+ return '```json\n' + JSON.stringify(result, null, 2) + '\n```';
213
+ }
214
+ return String(result);
215
+ }
216
+ /**
217
+ * Format MCP content blocks (text, images, resources, etc.)
218
+ */
219
+ formatMcpContent(content) {
220
+ const parts = [];
221
+ for (const block of content) {
222
+ if (!block || typeof block !== 'object') {
223
+ continue;
224
+ }
225
+ switch (block.type) {
226
+ case 'text':
227
+ if (block.text) {
228
+ parts.push(block.text);
229
+ }
230
+ break;
231
+ case 'image':
232
+ case 'audio':
233
+ parts.push(`[${block.type}: ${block.mimeType || 'unknown type'}]`);
234
+ break;
235
+ case 'resource':
236
+ if (block.resource?.text) {
237
+ parts.push(block.resource.text);
238
+ }
239
+ else {
240
+ parts.push(`[Embedded Resource: ${block.resource?.mimeType || 'unknown type'}]`);
241
+ }
242
+ break;
243
+ case 'resource_link':
244
+ const title = block.title || block.name || 'Resource';
245
+ parts.push(`[Link to ${title}: ${block.uri}]`);
246
+ break;
247
+ default:
248
+ parts.push(`[Unknown content type: ${block.type}]`);
249
+ }
250
+ }
251
+ return parts.length > 0 ? parts.join('\n') : 'Tool executed successfully';
252
+ }
253
+ }
254
+ /**
255
+ * Generate a valid tool name from MCP tool name
256
+ * Follows Gemini API constraints:
257
+ * - Max 63 characters
258
+ * - Only alphanumeric, underscore, dash, dot
259
+ */
260
+ export function generateValidToolName(name) {
261
+ // Replace invalid characters with underscores
262
+ let validName = name.replace(/[^a-zA-Z0-9_.-]/g, '_');
263
+ // If longer than 63 characters, truncate middle with '___'
264
+ if (validName.length > 63) {
265
+ validName = validName.slice(0, 28) + '___' + validName.slice(-32);
266
+ }
267
+ return validName;
268
+ }
269
+ //# sourceMappingURL=DiscoveredMcpTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiscoveredMcpTool.js","sourceRoot":"","sources":["../../../src/implementations/mcp/DiscoveredMcpTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAUjE;;;;;;;;;GASG;AACH,MAAM,OAAO,yBAA0B,SAAQ,QAG9C;IAIW;IACA;IACA;IACA;IANF,UAAU,CAA+B;IAEjD,YACU,UAAkB,EAClB,cAAsB,EACtB,eAAqB,EACrB,gBAAoD,EAC5D,gBAAyB;QAEzB,yCAAyC;QACzC,MAAM,QAAQ,GAAG,gBAAgB,IAAI,qBAAqB,CAAC,cAAc,CAAC,CAAC;QAE3E,6CAA6C;QAC7C,MAAM,WAAW,GAAG,eAAe,CAAC,WAAW,IAAI,yBAAyB,UAAU,GAAG,CAAC;QAE1F,kDAAkD;QAClD,MAA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,CAAC,CAAC;IAEtD,2DAA2D;IAC3D,IAAI,SAAS,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;QAC1B,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IACpE,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * MCP Tool Executors
3
+ *
4
+ * Dynamic MCP tool registration - each MCP tool is individually wrapped
5
+ * and registered as a separate tool in the tool registry.
6
+ */
7
+ export { DiscoveredMcpToolExecutor, generateValidToolName } from './DiscoveredMcpTool.js';
8
+ export type { DiscoveredMcpToolParams } from './DiscoveredMcpTool.js';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/implementations/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC1F,YAAY,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * MCP Tool Executors
3
+ *
4
+ * Dynamic MCP tool registration - each MCP tool is individually wrapped
5
+ * and registered as a separate tool in the tool registry.
6
+ */
7
+ export { DiscoveredMcpToolExecutor, generateValidToolName } from './DiscoveredMcpTool.js';
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/mcp/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,96 @@
1
+ /**
2
+ * NotebookEdit Tool Executor
3
+ *
4
+ * Edit Jupyter notebook cells - supports replace, insert, and delete operations.
5
+ * Works with .ipynb files (JSON format).
6
+ */
7
+ import { BaseTool, type ToolResult } from '../../base/index.js';
8
+ import type { ExecutorConfig } from '../../base/ToolRegistry.js';
9
+ /**
10
+ * Edit mode for notebook cell operations
11
+ */
12
+ export type NotebookEditMode = 'replace' | 'insert' | 'delete';
13
+ /**
14
+ * Cell type in Jupyter notebooks
15
+ */
16
+ export type NotebookCellType = 'code' | 'markdown';
17
+ /**
18
+ * Parameters for the NotebookEdit tool
19
+ */
20
+ export interface NotebookEditToolParams {
21
+ /**
22
+ * Absolute path to the Jupyter notebook file
23
+ */
24
+ notebook_path: string;
25
+ /**
26
+ * ID of the cell to edit (optional for insert at end)
27
+ */
28
+ cell_id?: string;
29
+ /**
30
+ * Type of the cell (code or markdown)
31
+ */
32
+ cell_type?: NotebookCellType;
33
+ /**
34
+ * Edit operation: replace, insert, delete
35
+ */
36
+ edit_mode?: NotebookEditMode;
37
+ /**
38
+ * New source content for the cell
39
+ */
40
+ new_source: string;
41
+ }
42
+ /**
43
+ * NotebookEdit Tool Executor
44
+ *
45
+ * Features:
46
+ * - Read and parse .ipynb JSON files
47
+ * - Replace cell content by cell_id
48
+ * - Insert new cells at specific positions
49
+ * - Delete cells by cell_id
50
+ * - Preserve notebook metadata and structure
51
+ */
52
+ export declare class NotebookEditTool extends BaseTool<NotebookEditToolParams, ToolResult> {
53
+ private config;
54
+ constructor(config: ExecutorConfig);
55
+ validateToolParams(params: NotebookEditToolParams): string | null;
56
+ getDescription(params: NotebookEditToolParams): string;
57
+ execute(params: NotebookEditToolParams, signal: AbortSignal, updateOutput?: (output: string) => void): Promise<ToolResult>;
58
+ /**
59
+ * Perform the edit operation on the notebook
60
+ */
61
+ private performEdit;
62
+ /**
63
+ * Get the cell ID from a cell (checks both cell.id and cell.metadata.id)
64
+ * Jupyter notebooks may store cell IDs in either location
65
+ */
66
+ private getCellId;
67
+ /**
68
+ * Find a cell by ID (checks both cell.id and cell.metadata.id)
69
+ */
70
+ private findCellIndex;
71
+ /**
72
+ * Replace an existing cell's content
73
+ */
74
+ private replaceCell;
75
+ /**
76
+ * Insert a new cell
77
+ */
78
+ private insertCell;
79
+ /**
80
+ * Delete a cell
81
+ */
82
+ private deleteCell;
83
+ /**
84
+ * Normalize source content to array of lines
85
+ */
86
+ private normalizeSource;
87
+ /**
88
+ * Generate a unique cell ID
89
+ */
90
+ private generateCellId;
91
+ /**
92
+ * Format success message
93
+ */
94
+ private formatSuccessMessage;
95
+ }
96
+ //# sourceMappingURL=NotebookEditTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotebookEditTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/notebook/NotebookEditTool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAIjE;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAwBD;;;;;;;;;GASG;AACH,qBAAa,gBAAiB,SAAQ,QAAQ,CAC5C,sBAAsB,EACtB,UAAU,CACX;IACa,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAwC1C,kBAAkB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,GAAG,IAAI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