@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,224 @@
1
+ /**
2
+ * RequestHistoricalContext Tool Executor
3
+ *
4
+ * Requests historical context using a cheap helper model (e.g., FREE Gemma).
5
+ * Cost-effective way to access archived context outside the main model's window.
6
+ */
7
+ import { BaseTool } from '../../base/index.js';
8
+ import { SchemaValidator } from '../../utils/SchemaValidator.js';
9
+ import { RequestHistoricalContextTool as CoreRequestContextTool, JSONLHistoryStore, } from '@nexus-cortex/core';
10
+ /**
11
+ * RequestHistoricalContext Tool Executor
12
+ *
13
+ * Features:
14
+ * - Uses FREE Gemma models for cost-effective context retrieval
15
+ * - Searches both recent and compacted history
16
+ * - Configurable detail level
17
+ * - Returns sources and cost information
18
+ */
19
+ export class RequestHistoricalContextToolExecutor extends BaseTool {
20
+ config;
21
+ constructor(config) {
22
+ super('RequestHistoricalContext', 'RequestHistoricalContext', `Request historical context using cheap helper model. Cost-effective for accessing archived context.
23
+
24
+ Uses FREE Gemma models to generate context from historical conversation data.`, {
25
+ type: 'object',
26
+ properties: {
27
+ query: {
28
+ type: 'string',
29
+ description: 'Query describing what historical context is needed',
30
+ },
31
+ detailLevel: {
32
+ type: 'string',
33
+ enum: ['brief', 'standard', 'detailed'],
34
+ description: 'Detail level for the response',
35
+ default: 'standard',
36
+ },
37
+ maxTokens: {
38
+ type: 'number',
39
+ description: 'Maximum tokens for the response',
40
+ default: 1000,
41
+ },
42
+ useHelperModel: {
43
+ type: 'boolean',
44
+ description: 'Whether to use helper model (vs main model)',
45
+ default: true,
46
+ },
47
+ },
48
+ required: ['query'],
49
+ });
50
+ this.config = config;
51
+ }
52
+ /**
53
+ * Get workspace root from config (dynamically resolved)
54
+ */
55
+ getWorkspaceRoot() {
56
+ return this.config.workspaceRoot || this.config.storageDir || this.config.workingDirectory;
57
+ }
58
+ validateToolParams(params) {
59
+ // Schema validation
60
+ const schemaError = SchemaValidator.validate(this.parameterSchema, params);
61
+ if (schemaError) {
62
+ return schemaError;
63
+ }
64
+ // Validate query
65
+ if (!params.query || params.query.trim().length === 0) {
66
+ return 'Query cannot be empty.';
67
+ }
68
+ if (params.query.length > 1000) {
69
+ return 'Query too long (max 1000 characters).';
70
+ }
71
+ // Validate detailLevel
72
+ if (params.detailLevel && !['brief', 'standard', 'detailed'].includes(params.detailLevel)) {
73
+ return `Invalid detailLevel: ${params.detailLevel}. Must be 'brief', 'standard', or 'detailed'.`;
74
+ }
75
+ // Validate maxTokens
76
+ if (params.maxTokens !== undefined) {
77
+ if (params.maxTokens < 100) {
78
+ return 'maxTokens must be at least 100.';
79
+ }
80
+ if (params.maxTokens > 10000) {
81
+ return 'maxTokens cannot exceed 10000.';
82
+ }
83
+ }
84
+ return null;
85
+ }
86
+ getDescription(params) {
87
+ const detailLevel = params.detailLevel || 'standard';
88
+ return `Requesting historical context for "${params.query}" (${detailLevel})`;
89
+ }
90
+ async execute(params, signal, updateOutput) {
91
+ const startTime = Date.now();
92
+ try {
93
+ // Check for abort
94
+ if (signal.aborted) {
95
+ return {
96
+ ...this.createErrorResult('Context request was cancelled'),
97
+ metadata: {
98
+ executionTime: Date.now() - startTime,
99
+ },
100
+ };
101
+ }
102
+ // Validate parameters
103
+ const validationError = this.validateToolParams(params);
104
+ if (validationError) {
105
+ return {
106
+ ...this.createErrorResult(validationError),
107
+ metadata: {
108
+ executionTime: Date.now() - startTime,
109
+ },
110
+ };
111
+ }
112
+ // Get session ID from config
113
+ const sessionId = this.config.sessionId;
114
+ if (!sessionId) {
115
+ return {
116
+ ...this.createErrorResult('Session ID not provided in executor config. Historical tools require active session context.'),
117
+ metadata: {
118
+ executionTime: Date.now() - startTime,
119
+ },
120
+ };
121
+ }
122
+ // Get storage directory from config (updated after session creation)
123
+ const storageDir = this.config.storageDir || '.cortex/sessions';
124
+ const workspaceRoot = this.getWorkspaceRoot();
125
+ // Create history store with storage directory
126
+ const historyStore = new JSONLHistoryStore({ baseDir: storageDir });
127
+ // Load messages from session storage (without workspacePath to use baseDir directly)
128
+ const messages = await historyStore.loadSession(sessionId);
129
+ if (messages.length === 0) {
130
+ return {
131
+ ...this.createSuccessResult('No historical context available in this session.'),
132
+ metadata: {
133
+ executionTime: Date.now() - startTime,
134
+ sessionId,
135
+ messageCount: 0,
136
+ },
137
+ };
138
+ }
139
+ // Note: The core tool requires HelperMiddlewareAdapter which may not be available
140
+ // in the executor context. For now, we'll create the tool without it and rely
141
+ // on it using stored compaction summaries instead of generating new context.
142
+ const coreTool = new CoreRequestContextTool(workspaceRoot);
143
+ const input = {
144
+ query: params.query,
145
+ detailLevel: params.detailLevel,
146
+ maxTokens: params.maxTokens,
147
+ useHelperModel: params.useHelperModel,
148
+ };
149
+ const result = await coreTool.execute(input, sessionId, messages);
150
+ // Check for abort
151
+ if (signal.aborted) {
152
+ return {
153
+ ...this.createErrorResult('Context request was cancelled'),
154
+ metadata: {
155
+ executionTime: Date.now() - startTime,
156
+ },
157
+ };
158
+ }
159
+ // Format output
160
+ const formattedOutput = this.formatContext(result, params.query);
161
+ return {
162
+ ...this.createSuccessResult(formattedOutput),
163
+ metadata: {
164
+ executionTime: Date.now() - startTime,
165
+ sessionId,
166
+ tokensUsed: result.tokensUsed,
167
+ modelUsed: result.modelUsed,
168
+ cost: result.cost,
169
+ processingTime: result.processingTime,
170
+ sourceCount: result.sources.length,
171
+ },
172
+ };
173
+ }
174
+ catch (error) {
175
+ // Check for abort
176
+ if (signal.aborted) {
177
+ return {
178
+ ...this.createErrorResult('Context request was cancelled'),
179
+ metadata: {
180
+ executionTime: Date.now() - startTime,
181
+ },
182
+ };
183
+ }
184
+ const errorMessage = error.message || String(error);
185
+ return {
186
+ ...this.createErrorResult(`Error requesting historical context: ${errorMessage}`),
187
+ metadata: {
188
+ executionTime: Date.now() - startTime,
189
+ error: errorMessage,
190
+ },
191
+ };
192
+ }
193
+ }
194
+ /**
195
+ * Format historical context result for display
196
+ */
197
+ formatContext(result, query) {
198
+ const lines = [];
199
+ lines.push(`=== Historical Context for "${query}" ===\n\n`);
200
+ lines.push('## Context\n\n');
201
+ lines.push(result.context);
202
+ lines.push('\n\n');
203
+ lines.push('## Sources\n\n');
204
+ if (result.sources.length === 0) {
205
+ lines.push('No specific sources referenced.\n');
206
+ }
207
+ else {
208
+ result.sources.forEach((source, index) => {
209
+ lines.push(`${index + 1}. Turn ${source.turnNumber} (${source.timestamp.toLocaleString()})\n`);
210
+ if (source.isCompacted) {
211
+ lines.push(` From compacted section: ${source.compactionId}\n`);
212
+ }
213
+ });
214
+ }
215
+ lines.push('\n');
216
+ lines.push('## Metadata\n\n');
217
+ lines.push(`Model used: ${result.modelUsed}\n`);
218
+ lines.push(`Tokens used: ${result.tokensUsed}\n`);
219
+ lines.push(`Processing time: ${result.processingTime}ms\n`);
220
+ lines.push(`Cost: $${result.cost.toFixed(6)}\n`);
221
+ return lines.join('');
222
+ }
223
+ }
224
+ //# sourceMappingURL=RequestHistoricalContextTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RequestHistoricalContextTool.js","sourceRoot":"","sources":["../../../src/implementations/historical/RequestHistoricalContextTool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGjE,OAAO,EACL,4BAA4B,IAAI,sBAAsB,EACtD,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAmB5B;;;;;;;;GAQG;AACH,MAAM,OAAO,oCAAqC,SAAQ,QAGzD;IACqB;IAApB,YAAoB,MAAsB;QACxC,KAAK,CACH,0BAA0B,EAC1B,0BAA0B,EAC1B;;8EAEwE,EACxE;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAA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,gBAAgB,MAAM,CAAC,UAAU,IAAI,CAAC,CAAC;QAClD,KAAK,CAAC,IAAI,CAAC,oBAAoB,MAAM,CAAC,cAAc,MAAM,CAAC,CAAC;QAC5D,KAAK,CAAC,IAAI,CAAC,UAAU,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAEjD,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;CACF"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * SearchConversationHistory Tool Executor
3
+ *
4
+ * Searches conversation history including both recent messages and compacted boundaries.
5
+ * Provides semantic search across the full conversation timeline.
6
+ */
7
+ import { BaseTool, type ToolResult } from '../../base/index.js';
8
+ import type { ExecutorConfig } from '../../base/ToolRegistry.js';
9
+ /**
10
+ * Parameters for the SearchConversationHistory tool
11
+ */
12
+ export interface SearchConversationHistoryToolParams {
13
+ /** Search query string */
14
+ query: string;
15
+ /** Maximum number of results to return */
16
+ maxResults?: number;
17
+ /** Time range filter */
18
+ timeRange?: {
19
+ start: string;
20
+ end: string;
21
+ };
22
+ /** Include compacted messages in search */
23
+ includeCompacted?: boolean;
24
+ /** Search scope: 'current' (current session), 'all' (all sessions), or specific session IDs */
25
+ searchScope?: 'current' | 'all' | string[];
26
+ }
27
+ /**
28
+ * SearchConversationHistory Tool Executor
29
+ *
30
+ * Features:
31
+ * - Searches both recent and compacted messages
32
+ * - Semantic search with relevance scoring
33
+ * - Time range filtering
34
+ * - Configurable result limit
35
+ */
36
+ export declare class SearchConversationHistoryToolExecutor extends BaseTool<SearchConversationHistoryToolParams, ToolResult> {
37
+ private config;
38
+ constructor(config: ExecutorConfig);
39
+ /**
40
+ * Get storage directory from config (dynamically resolved)
41
+ */
42
+ private getStorageDir;
43
+ validateToolParams(params: SearchConversationHistoryToolParams): string | null;
44
+ getDescription(params: SearchConversationHistoryToolParams): string;
45
+ execute(params: SearchConversationHistoryToolParams, signal: AbortSignal, updateOutput?: (output: string) => void): Promise<ToolResult>;
46
+ /**
47
+ * Format search results for display
48
+ */
49
+ private formatResults;
50
+ }
51
+ //# sourceMappingURL=SearchConversationHistoryTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchConversationHistoryTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/historical/SearchConversationHistoryTool.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;AAOjE;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IAEd,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,wBAAwB;IACxB,SAAS,CAAC,EAAE;QACV,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IAEF,2CAA2C;IAC3C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B,+FAA+F;IAC/F,WAAW,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,MAAM,EAAE,CAAC;CAC5C;AAED;;;;;;;;GAQG;AACH,qBAAa,qCAAsC,SAAQ,QAAQ,CACjE,mCAAmC,EACnC,UAAU,CACX;IACa,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAoD1C;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB,kBAAkB,CAAC,MAAM,EAAE,mCAAmC,GAAG,MAAM,GAAG,IAAI;IAiD9E,cAAc,CAAC,MAAM,EAAE,mCAAmC,GAAG,MAAM;IAK7D,OAAO,CACX,MAAM,EAAE,mCAAmC,EAC3C,MAAM,EAAE,WAAW,EACnB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GACtC,OAAO,CAAC,UAAU,CAAC;IA8JtB;;OAEG;IACH,OAAO,CAAC,aAAa;CA4CtB"}
@@ -0,0 +1,306 @@
1
+ /**
2
+ * SearchConversationHistory Tool Executor
3
+ *
4
+ * Searches conversation history including both recent messages and compacted boundaries.
5
+ * Provides semantic search across the full conversation timeline.
6
+ */
7
+ import { BaseTool } from '../../base/index.js';
8
+ import { SchemaValidator } from '../../utils/SchemaValidator.js';
9
+ import { SearchConversationHistoryTool as CoreSearchTool, JSONLHistoryStore, } from '@nexus-cortex/core';
10
+ /**
11
+ * SearchConversationHistory Tool Executor
12
+ *
13
+ * Features:
14
+ * - Searches both recent and compacted messages
15
+ * - Semantic search with relevance scoring
16
+ * - Time range filtering
17
+ * - Configurable result limit
18
+ */
19
+ export class SearchConversationHistoryToolExecutor extends BaseTool {
20
+ config;
21
+ constructor(config) {
22
+ super('SearchConversationHistory', 'SearchConversationHistory', `Search conversation history across ALL previous sessions and current session.
23
+
24
+ Use this tool to:
25
+ - Find messages from previous conversations/sessions
26
+ - Search across all historical session data (default behavior)
27
+ - Locate specific topics or information from past interactions
28
+
29
+ By default searches ALL sessions. Use searchScope parameter to limit to current session only.`, {
30
+ type: 'object',
31
+ properties: {
32
+ query: {
33
+ type: 'string',
34
+ description: 'Search query string',
35
+ },
36
+ maxResults: {
37
+ type: 'number',
38
+ description: 'Maximum number of results to return',
39
+ default: 10,
40
+ },
41
+ timeRange: {
42
+ type: 'object',
43
+ properties: {
44
+ start: { type: 'string', format: 'date-time' },
45
+ end: { type: 'string', format: 'date-time' },
46
+ },
47
+ description: 'Optional time range filter',
48
+ },
49
+ includeCompacted: {
50
+ type: 'boolean',
51
+ description: 'Include compacted messages in search',
52
+ default: true,
53
+ },
54
+ searchScope: {
55
+ type: 'string',
56
+ oneOf: [
57
+ { type: 'string', enum: ['current', 'all'] },
58
+ { type: 'array', items: { type: 'string' } }
59
+ ],
60
+ description: 'Search scope: "current" (current session only), "all" (all sessions), or array of specific session IDs. Defaults to "all" to search across all sessions.',
61
+ default: 'all',
62
+ },
63
+ },
64
+ required: ['query'],
65
+ });
66
+ this.config = config;
67
+ }
68
+ /**
69
+ * Get storage directory from config (dynamically resolved)
70
+ */
71
+ getStorageDir() {
72
+ return this.config.storageDir || '.cortex/sessions';
73
+ }
74
+ validateToolParams(params) {
75
+ // Schema validation
76
+ const schemaError = SchemaValidator.validate(this.parameterSchema, params);
77
+ if (schemaError) {
78
+ return schemaError;
79
+ }
80
+ // Validate query
81
+ if (!params.query || params.query.trim().length === 0) {
82
+ return 'Query cannot be empty.';
83
+ }
84
+ if (params.query.length > 1000) {
85
+ return 'Query too long (max 1000 characters).';
86
+ }
87
+ // Validate maxResults
88
+ if (params.maxResults !== undefined) {
89
+ if (params.maxResults < 1) {
90
+ return 'maxResults must be at least 1.';
91
+ }
92
+ if (params.maxResults > 100) {
93
+ return 'maxResults cannot exceed 100.';
94
+ }
95
+ }
96
+ // Validate time range if provided
97
+ if (params.timeRange) {
98
+ try {
99
+ const start = new Date(params.timeRange.start);
100
+ const end = new Date(params.timeRange.end);
101
+ if (isNaN(start.getTime())) {
102
+ return 'Invalid start date in timeRange.';
103
+ }
104
+ if (isNaN(end.getTime())) {
105
+ return 'Invalid end date in timeRange.';
106
+ }
107
+ if (start > end) {
108
+ return 'Time range start must be before end.';
109
+ }
110
+ }
111
+ catch (error) {
112
+ return `Invalid time range: ${error.message}`;
113
+ }
114
+ }
115
+ return null;
116
+ }
117
+ getDescription(params) {
118
+ const maxResults = params.maxResults || 10;
119
+ return `Searching conversation history for "${params.query}" (max ${maxResults} results)`;
120
+ }
121
+ async execute(params, signal, updateOutput) {
122
+ const startTime = Date.now();
123
+ try {
124
+ // Check for abort
125
+ if (signal.aborted) {
126
+ return {
127
+ ...this.createErrorResult('Search was cancelled'),
128
+ metadata: {
129
+ executionTime: Date.now() - startTime,
130
+ },
131
+ };
132
+ }
133
+ // Validate parameters
134
+ const validationError = this.validateToolParams(params);
135
+ if (validationError) {
136
+ return {
137
+ ...this.createErrorResult(validationError),
138
+ metadata: {
139
+ executionTime: Date.now() - startTime,
140
+ },
141
+ };
142
+ }
143
+ // Get session ID from config
144
+ const sessionId = this.config.sessionId;
145
+ if (!sessionId) {
146
+ return {
147
+ ...this.createErrorResult('Session ID not provided in executor config. Historical tools require active session context.'),
148
+ metadata: {
149
+ executionTime: Date.now() - startTime,
150
+ },
151
+ };
152
+ }
153
+ // Get storage directory and create history store
154
+ const storageDir = this.getStorageDir();
155
+ const workspaceRoot = this.config.workspaceRoot || storageDir;
156
+ const historyStore = new JSONLHistoryStore({ baseDir: storageDir });
157
+ // Determine which sessions to search
158
+ const searchScope = params.searchScope || 'all';
159
+ let sessionIdsToSearch = [];
160
+ if (searchScope === 'current') {
161
+ // Search only current session
162
+ sessionIdsToSearch = [sessionId];
163
+ }
164
+ else if (searchScope === 'all') {
165
+ // Search all sessions
166
+ const allSessions = await historyStore.listSessions();
167
+ sessionIdsToSearch = allSessions.map((s) => s.sessionId);
168
+ }
169
+ else if (Array.isArray(searchScope)) {
170
+ // Search specific session IDs
171
+ sessionIdsToSearch = searchScope;
172
+ }
173
+ // Load messages from all sessions in scope
174
+ const allMessages = [];
175
+ const sessionMessageCounts = {};
176
+ for (const sid of sessionIdsToSearch) {
177
+ try {
178
+ const messages = await historyStore.loadSession(sid);
179
+ // Tag each message with its source session ID for cross-session search
180
+ const taggedMessages = messages.map(msg => ({
181
+ ...msg,
182
+ _sourceSessionId: sid
183
+ }));
184
+ allMessages.push(...taggedMessages);
185
+ sessionMessageCounts[sid] = messages.length;
186
+ }
187
+ catch (error) {
188
+ // Skip sessions that can't be loaded
189
+ console.warn(`Failed to load session ${sid}: ${error}`);
190
+ }
191
+ }
192
+ if (allMessages.length === 0) {
193
+ return {
194
+ ...this.createSuccessResult('No messages found in session history.'),
195
+ metadata: {
196
+ executionTime: Date.now() - startTime,
197
+ sessionId,
198
+ sessionsSearched: sessionIdsToSearch.length,
199
+ messageCount: 0,
200
+ resultCount: 0,
201
+ },
202
+ };
203
+ }
204
+ // Convert time range to Date objects if provided
205
+ const timeRange = params.timeRange
206
+ ? {
207
+ start: new Date(params.timeRange.start),
208
+ end: new Date(params.timeRange.end),
209
+ }
210
+ : undefined;
211
+ // Create core tool and execute search across all messages
212
+ const coreTool = new CoreSearchTool(workspaceRoot);
213
+ const input = {
214
+ query: params.query,
215
+ maxResults: params.maxResults,
216
+ timeRange,
217
+ includeCompacted: params.includeCompacted,
218
+ };
219
+ const results = await coreTool.execute(input, sessionId, allMessages);
220
+ // Check for abort
221
+ if (signal.aborted) {
222
+ return {
223
+ ...this.createErrorResult('Search was cancelled'),
224
+ metadata: {
225
+ executionTime: Date.now() - startTime,
226
+ },
227
+ };
228
+ }
229
+ // Format results
230
+ const formattedOutput = this.formatResults(results, params.query);
231
+ return {
232
+ ...this.createSuccessResult(formattedOutput),
233
+ metadata: {
234
+ executionTime: Date.now() - startTime,
235
+ sessionId,
236
+ sessionsSearched: sessionIdsToSearch.length,
237
+ messageCount: allMessages.length,
238
+ resultCount: results.length,
239
+ query: params.query,
240
+ searchScope: searchScope,
241
+ },
242
+ };
243
+ }
244
+ catch (error) {
245
+ // Check for abort
246
+ if (signal.aborted) {
247
+ return {
248
+ ...this.createErrorResult('Search was cancelled'),
249
+ metadata: {
250
+ executionTime: Date.now() - startTime,
251
+ },
252
+ };
253
+ }
254
+ const errorMessage = error.message || String(error);
255
+ return {
256
+ ...this.createErrorResult(`Error searching conversation history: ${errorMessage}`),
257
+ metadata: {
258
+ executionTime: Date.now() - startTime,
259
+ error: errorMessage,
260
+ },
261
+ };
262
+ }
263
+ }
264
+ /**
265
+ * Format search results for display
266
+ */
267
+ formatResults(results, query) {
268
+ if (results.length === 0) {
269
+ return `No results found for "${query}".`;
270
+ }
271
+ const lines = [];
272
+ lines.push(`=== Search Results for "${query}" ===\n\n`);
273
+ lines.push(`Found ${results.length} result${results.length > 1 ? 's' : ''}:\n\n`);
274
+ // Group results by session for clarity
275
+ const resultsBySession = new Map();
276
+ results.forEach(result => {
277
+ const sessionResults = resultsBySession.get(result.sessionId) || [];
278
+ sessionResults.push(result);
279
+ resultsBySession.set(result.sessionId, sessionResults);
280
+ });
281
+ let globalIndex = 0;
282
+ resultsBySession.forEach((sessionResults, sessionId) => {
283
+ if (resultsBySession.size > 1) {
284
+ // Show session header if results span multiple sessions
285
+ lines.push(`--- Session: ${sessionId} (${sessionResults.length} result${sessionResults.length > 1 ? 's' : ''}) ---\n\n`);
286
+ }
287
+ sessionResults.forEach((result) => {
288
+ globalIndex++;
289
+ lines.push(`${globalIndex}. Turn ${result.turnNumber} (${result.timestamp.toLocaleString()})\n`);
290
+ if (resultsBySession.size === 1) {
291
+ lines.push(` Session: ${result.sessionId}\n`);
292
+ }
293
+ lines.push(` Relevance: ${result.relevanceScore}%\n`);
294
+ if (result.isCompacted) {
295
+ lines.push(` Source: Compacted section (ID: ${result.compactionId})\n`);
296
+ }
297
+ else {
298
+ lines.push(` Source: Message ${result.messageId}\n`);
299
+ }
300
+ lines.push(` Preview: ${result.preview}\n\n`);
301
+ });
302
+ });
303
+ return lines.join('');
304
+ }
305
+ }
306
+ //# sourceMappingURL=SearchConversationHistoryTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchConversationHistoryTool.js","sourceRoot":"","sources":["../../../src/implementations/historical/SearchConversationHistoryTool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAGjE,OAAO,EACL,6BAA6B,IAAI,cAAc,EAC/C,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAyB5B;;;;;;;;GAQG;AACH,MAAM,OAAO,qCAAsC,SAAQ,QAG1D;IACqB;IAApB,YAAoB,MAAsB;QACxC,KAAK,CACH,2BAA2B,EAC3B,2BAA2B,EAC3B;;;;;;;8FAOwF,EACxF;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBAC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C;oBAChC,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC;gBAChD,CAAC;gBACD,KAAK,CAAC,IAAI,CAAC,eAAe,MAAM,CAAC,cAAc,KAAK,CAAC,CAAC;gBAEtD,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;oBACvB,KAAK,CAAC,IAAI,CAAC,mCAAmC,MAAM,CAAC,YAAY,KAAK,CAAC,CAAC;gBAC1E,CAAC;qBAAM,CAAC;oBACN,KAAK,CAAC,IAAI,CAAC,oBAAoB,MAAM,CAAC,SAAS,IAAI,CAAC,CAAC;gBACvD,CAAC;gBAED,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC;YAChD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;CACF"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Historical Tools
3
+ *
4
+ * Tools for accessing conversation history, compaction boundaries, and historical context
5
+ */
6
+ export * from './SearchConversationHistoryTool.js';
7
+ export * from './GetConversationSegmentTool.js';
8
+ export * from './ListCompactionBoundariesTool.js';
9
+ export * from './RequestHistoricalContextTool.js';
10
+ export * from './ListSessionsTool.js';
11
+ export * from './LoadSessionTool.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/implementations/historical/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Historical Tools
3
+ *
4
+ * Tools for accessing conversation history, compaction boundaries, and historical context
5
+ */
6
+ export * from './SearchConversationHistoryTool.js';
7
+ export * from './GetConversationSegmentTool.js';
8
+ export * from './ListCompactionBoundariesTool.js';
9
+ export * from './RequestHistoricalContextTool.js';
10
+ export * from './ListSessionsTool.js';
11
+ export * from './LoadSessionTool.js';
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/historical/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Tool Executor Implementations
3
+ */
4
+ export * from './file/index.js';
5
+ export * from './search/index.js';
6
+ export * from './web/index.js';
7
+ export * from './execution/index.js';
8
+ export * from './ui/index.js';
9
+ export * from './notebook/index.js';
10
+ export * from './historical/index.js';
11
+ export * from './mcp/index.js';
12
+ export * from './extensions/index.js';
13
+ export * from './agent/index.js';
14
+ export * from './addon/index.js';
15
+ export * from './tmux/index.js';
16
+ //# sourceMappingURL=index.d.ts.map