@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":"SandboxEventBroadcaster.d.ts","sourceRoot":"","sources":["../../../src/implementations/addon/SandboxEventBroadcaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,gBAAgB,GACxB,iBAAiB,GACjB,iBAAiB,GACjB,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,kBAAkB,GAClB,qBAAqB,GACrB,sBAAsB,GACtB,sBAAsB,GACtB,mBAAmB,GACnB,gBAAgB,CAAC;AAErB;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,GAAG,CAAC;CACX;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,uBAAwB,SAAQ,YAAY;IACvD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAA0B;IAEjD;;OAEG;IACH,OAAO,CAAC,YAAY,CAA0C;IAE9D;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAQ;IAE/C,OAAO;IAKP;;OAEG;IACH,MAAM,CAAC,WAAW,IAAI,uBAAuB;IAO7C;;OAEG;IACH,gBAAgB,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;IAY3C;;OAEG;IACH,OAAO,CAAC,YAAY;IAcpB;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM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,oBAAoB,CAAC,SAAS,EAAE,gBAAgB,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,GAAG,MAAM,IAAI;IAUtG;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,GAAG,MAAM,IAAI;IAUnE;;OAEG;IACH,QAAQ,IAAI;QACV,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KACtC;CAkBF;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,yBAAwC,CAAC"}
@@ -0,0 +1,258 @@
1
+ import { EventEmitter } from 'events';
2
+ /**
3
+ * SandboxEventBroadcaster - Centralized event system for sandbox operations
4
+ *
5
+ * This singleton class provides real-time event broadcasting for all sandbox operations.
6
+ * It enables:
7
+ * - User real-time monitoring via WebSocket connections
8
+ * - Model observability of sandbox state changes
9
+ * - Debugging and audit trails
10
+ * - Multi-sandbox coordination
11
+ *
12
+ * Event Flow:
13
+ * 1. Tool (CreateAddon, Modify, Interact) emits event → broadcaster.emit()
14
+ * 2. Broadcaster stores event in history
15
+ * 3. Broadcaster notifies all listeners (WebSocket, logs, etc.)
16
+ * 4. User sees update in dashboard
17
+ *
18
+ * Example Usage:
19
+ * ```
20
+ * // In CreateAddonToolEnhanced
21
+ * broadcaster.emit({
22
+ * type: 'sandbox-created',
23
+ * sandboxId: session.id,
24
+ * timestamp: Date.now(),
25
+ * data: { name: session.name, url: session.url }
26
+ * });
27
+ *
28
+ * // In SandboxViewServer
29
+ * broadcaster.on('console-log', (event) => {
30
+ * io.to(event.sandboxId).emit('console-log', event.data);
31
+ * });
32
+ * ```
33
+ */
34
+ export class SandboxEventBroadcaster extends EventEmitter {
35
+ static instance;
36
+ /**
37
+ * Event history (last 1000 events per sandbox)
38
+ */
39
+ eventHistory = new Map();
40
+ /**
41
+ * Maximum events to keep per sandbox
42
+ */
43
+ MAX_EVENTS_PER_SANDBOX = 1000;
44
+ constructor() {
45
+ super();
46
+ this.setMaxListeners(100); // Support many WebSocket connections
47
+ }
48
+ /**
49
+ * Get singleton instance
50
+ */
51
+ static getInstance() {
52
+ if (!SandboxEventBroadcaster.instance) {
53
+ SandboxEventBroadcaster.instance = new SandboxEventBroadcaster();
54
+ }
55
+ return SandboxEventBroadcaster.instance;
56
+ }
57
+ /**
58
+ * Emit a sandbox event
59
+ */
60
+ emitSandboxEvent(event) {
61
+ // Store in history
62
+ this.addToHistory(event);
63
+ // Emit to all listeners
64
+ this.emit(event.type, event);
65
+ this.emit('*', event); // Wildcard listener
66
+ // Also emit sandbox-specific event for filtering
67
+ this.emit(`sandbox:${event.sandboxId}`, event);
68
+ }
69
+ /**
70
+ * Add event to history
71
+ */
72
+ addToHistory(event) {
73
+ if (!this.eventHistory.has(event.sandboxId)) {
74
+ this.eventHistory.set(event.sandboxId, []);
75
+ }
76
+ const history = this.eventHistory.get(event.sandboxId);
77
+ history.push(event);
78
+ // Trim if exceeds max
79
+ if (history.length > this.MAX_EVENTS_PER_SANDBOX) {
80
+ history.shift();
81
+ }
82
+ }
83
+ /**
84
+ * Get event history for a sandbox
85
+ */
86
+ getHistory(sandboxId, limit) {
87
+ const history = this.eventHistory.get(sandboxId) || [];
88
+ if (limit) {
89
+ return history.slice(-limit);
90
+ }
91
+ return [...history];
92
+ }
93
+ /**
94
+ * Get all sandbox IDs with events
95
+ */
96
+ getActiveSandboxes() {
97
+ return Array.from(this.eventHistory.keys());
98
+ }
99
+ /**
100
+ * Clear history for a sandbox
101
+ */
102
+ clearHistory(sandboxId) {
103
+ this.eventHistory.delete(sandboxId);
104
+ }
105
+ /**
106
+ * Clear all history
107
+ */
108
+ clearAllHistory() {
109
+ this.eventHistory.clear();
110
+ }
111
+ /**
112
+ * Helper: Emit console log
113
+ */
114
+ emitConsoleLog(sandboxId, level, message) {
115
+ this.emitSandboxEvent({
116
+ type: `console-${level}`,
117
+ sandboxId,
118
+ timestamp: Date.now(),
119
+ data: { level, message }
120
+ });
121
+ }
122
+ /**
123
+ * Helper: Emit file change
124
+ */
125
+ emitFileChange(sandboxId, filePath, changeType) {
126
+ this.emitSandboxEvent({
127
+ type: 'file-changed',
128
+ sandboxId,
129
+ timestamp: Date.now(),
130
+ data: { filePath, changeType }
131
+ });
132
+ }
133
+ /**
134
+ * Helper: Emit screenshot
135
+ */
136
+ emitScreenshot(sandboxId, screenshot, url) {
137
+ this.emitSandboxEvent({
138
+ type: 'screenshot-captured',
139
+ sandboxId,
140
+ timestamp: Date.now(),
141
+ data: { screenshot, url }
142
+ });
143
+ }
144
+ /**
145
+ * Helper: Emit network request
146
+ */
147
+ emitNetworkRequest(sandboxId, method, url, status) {
148
+ this.emitSandboxEvent({
149
+ type: status ? 'network-response' : 'network-request',
150
+ sandboxId,
151
+ timestamp: Date.now(),
152
+ data: { method, url, status }
153
+ });
154
+ }
155
+ /**
156
+ * Helper: Emit interaction
157
+ */
158
+ emitInteraction(sandboxId, actionType, selector, success = true) {
159
+ this.emitSandboxEvent({
160
+ type: 'interaction-executed',
161
+ sandboxId,
162
+ timestamp: Date.now(),
163
+ data: { actionType, selector, success }
164
+ });
165
+ }
166
+ /**
167
+ * Helper: Emit hot reload
168
+ */
169
+ emitHotReload(sandboxId, fileName) {
170
+ this.emitSandboxEvent({
171
+ type: 'hot-reload-triggered',
172
+ sandboxId,
173
+ timestamp: Date.now(),
174
+ data: { fileName }
175
+ });
176
+ }
177
+ /**
178
+ * Helper: Emit process restart
179
+ */
180
+ emitProcessRestart(sandboxId, reason) {
181
+ this.emitSandboxEvent({
182
+ type: 'process-restarted',
183
+ sandboxId,
184
+ timestamp: Date.now(),
185
+ data: { reason }
186
+ });
187
+ }
188
+ /**
189
+ * Helper: Emit error
190
+ */
191
+ emitError(sandboxId, error) {
192
+ this.emitSandboxEvent({
193
+ type: 'error-occurred',
194
+ sandboxId,
195
+ timestamp: Date.now(),
196
+ data: {
197
+ message: typeof error === 'string' ? error : error.message,
198
+ stack: typeof error === 'string' ? undefined : error.stack
199
+ }
200
+ });
201
+ }
202
+ /**
203
+ * Subscribe to all events for a specific sandbox
204
+ */
205
+ subscribeToSandbox(sandboxId, callback) {
206
+ const listener = (event) => callback(event);
207
+ this.on(`sandbox:${sandboxId}`, listener);
208
+ // Return unsubscribe function
209
+ return () => {
210
+ this.off(`sandbox:${sandboxId}`, listener);
211
+ };
212
+ }
213
+ /**
214
+ * Subscribe to specific event type
215
+ */
216
+ subscribeToEventType(eventType, callback) {
217
+ const listener = (event) => callback(event);
218
+ this.on(eventType, listener);
219
+ // Return unsubscribe function
220
+ return () => {
221
+ this.off(eventType, listener);
222
+ };
223
+ }
224
+ /**
225
+ * Subscribe to all events
226
+ */
227
+ subscribeToAll(callback) {
228
+ const listener = (event) => callback(event);
229
+ this.on('*', listener);
230
+ // Return unsubscribe function
231
+ return () => {
232
+ this.off('*', listener);
233
+ };
234
+ }
235
+ /**
236
+ * Get event statistics
237
+ */
238
+ getStats() {
239
+ let totalEvents = 0;
240
+ const eventsByType = {};
241
+ for (const history of this.eventHistory.values()) {
242
+ totalEvents += history.length;
243
+ for (const event of history) {
244
+ eventsByType[event.type] = (eventsByType[event.type] || 0) + 1;
245
+ }
246
+ }
247
+ return {
248
+ activeSandboxes: this.eventHistory.size,
249
+ totalEvents,
250
+ eventsByType
251
+ };
252
+ }
253
+ }
254
+ /**
255
+ * Export singleton instance
256
+ */
257
+ export const broadcaster = SandboxEventBroadcaster.getInstance();
258
+ //# sourceMappingURL=SandboxEventBroadcaster.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SandboxEventBroadcaster.js","sourceRoot":"","sources":["../../../src/implementations/addon/SandboxEventBroadcaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AA+BtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,OAAO,uBAAwB,SA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AAc,CAAC,QAAuC;QACpD,MAAM,QAAQ,GAAG,CAAC,KAAmB,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC1D,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAEvB,8BAA8B;QAC9B,OAAO,GAAG,EAAE;YACV,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,QAAQ;QAKN,IAAI,WAAW,GAAG,CAAC,CAAC;QACpB,MAAM,YAAY,GAA2B,EAAE,CAAC;QAEhD,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,CAAC;YACjD,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;YAE9B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;gBAC5B,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAED,OAAO;YACL,eAAe,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI;YACvC,WAAW;YACX,YAAY;SACb,CAAC;IACJ,CAAC;CACF;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,uBAAuB,CAAC,WAAW,EAAE,CAAC"}
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Sandbox React-introspection tools: SandboxScan, SandboxGrab, SandboxDetectFramework.
3
+ *
4
+ * These expose the SAME contract as the nexus-browser MCP's scan/grab/detect_framework
5
+ * (provider names: sandbox_scan / sandbox_grab / sandbox_detect_framework), so a model
6
+ * that learned the scan -> act -> scan loop against the remote browser uses the
7
+ * identical muscle memory against a LOCAL artifact:
8
+ * - scan elements carry a unique `cssSelector` (reusable in InteractWithSandbox)
9
+ * - grab results are auto-enriched with
10
+ * `react: { componentName, componentStack, props, sourceLocation }` on React pages
11
+ * - detect_framework returns the same schema (react/reactVersion/next/.../heavyLibraries)
12
+ *
13
+ * Introspection auto-enables on first use (addInitScript before navigation); non-React
14
+ * artifacts degrade gracefully (fiber fields simply absent).
15
+ */
16
+ import { BaseTool } from '../../base/BaseTool.js';
17
+ import type { ToolResult } from '../../base/ToolResult.js';
18
+ export interface SandboxScanParams {
19
+ sandboxId: string;
20
+ filter?: {
21
+ tagName?: string;
22
+ hasText?: string;
23
+ isInteractive?: boolean;
24
+ id?: string;
25
+ className?: string;
26
+ placeholder?: string;
27
+ name?: string;
28
+ componentName?: string;
29
+ };
30
+ limit?: number;
31
+ includeOffscreen?: boolean;
32
+ }
33
+ export declare class SandboxScanExecutor extends BaseTool<SandboxScanParams, ToolResult> {
34
+ constructor();
35
+ validateToolParams(params: SandboxScanParams): string | null;
36
+ execute(params: SandboxScanParams, _signal: AbortSignal): Promise<ToolResult>;
37
+ }
38
+ export interface SandboxGrabParams {
39
+ sandboxId: string;
40
+ selector?: string;
41
+ x?: number;
42
+ y?: number;
43
+ maxLength?: number;
44
+ }
45
+ export declare class SandboxGrabExecutor extends BaseTool<SandboxGrabParams, ToolResult> {
46
+ constructor();
47
+ validateToolParams(params: SandboxGrabParams): string | null;
48
+ execute(params: SandboxGrabParams, _signal: AbortSignal): Promise<ToolResult>;
49
+ }
50
+ export interface SandboxDetectFrameworkParams {
51
+ sandboxId: string;
52
+ }
53
+ export declare class SandboxDetectFrameworkExecutor extends BaseTool<SandboxDetectFrameworkParams, ToolResult> {
54
+ constructor();
55
+ validateToolParams(params: SandboxDetectFrameworkParams): string | null;
56
+ execute(params: SandboxDetectFrameworkParams, _signal: AbortSignal): Promise<ToolResult>;
57
+ }
58
+ export interface SandboxComponentTreeParams {
59
+ sandboxId: string;
60
+ rootSelector?: string;
61
+ maxDepth?: number;
62
+ }
63
+ export declare class SandboxComponentTreeExecutor extends BaseTool<SandboxComponentTreeParams, ToolResult> {
64
+ constructor();
65
+ validateToolParams(params: SandboxComponentTreeParams): string | null;
66
+ execute(params: SandboxComponentTreeParams, _signal: AbortSignal): Promise<ToolResult>;
67
+ }
68
+ export interface SandboxRenderTraceParams {
69
+ sandboxId: string;
70
+ action: 'start' | 'stop';
71
+ }
72
+ export declare class SandboxRenderTraceExecutor extends BaseTool<SandboxRenderTraceParams, ToolResult> {
73
+ constructor();
74
+ validateToolParams(params: SandboxRenderTraceParams): string | null;
75
+ execute(params: SandboxRenderTraceParams, _signal: AbortSignal): Promise<ToolResult>;
76
+ }
77
+ //# sourceMappingURL=SandboxIntrospectionTools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SandboxIntrospectionTools.d.ts","sourceRoot":"","sources":["../../../src/implementations/addon/SandboxIntrospectionTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAkB3D,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,CAAC;IACF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,qBAAa,mBAAoB,SAAQ,QAAQ,CAAC,iBAAiB,EAAE,UAAU,CAAC;;IAgC9E,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,MAAM,GAAG,IA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,WAAW,wBAAwB;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,MAAM,CAAC;CAC1B;AAED,qBAAa,0BAA2B,SAAQ,QAAQ,CAAC,wBAAwB,EAAE,UAAU,CAAC;;IAiB5F,kBAAkB,CAAC,MAAM,EAAE,wBAAwB,GAAG,MAAM,GAAG,IAAI;IAM7D,OAAO,CAAC,MAAM,EAAE,wBAAwB,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;CAqC3F"}
@@ -0,0 +1,292 @@
1
+ /**
2
+ * Sandbox React-introspection tools: SandboxScan, SandboxGrab, SandboxDetectFramework.
3
+ *
4
+ * These expose the SAME contract as the nexus-browser MCP's scan/grab/detect_framework
5
+ * (provider names: sandbox_scan / sandbox_grab / sandbox_detect_framework), so a model
6
+ * that learned the scan -> act -> scan loop against the remote browser uses the
7
+ * identical muscle memory against a LOCAL artifact:
8
+ * - scan elements carry a unique `cssSelector` (reusable in InteractWithSandbox)
9
+ * - grab results are auto-enriched with
10
+ * `react: { componentName, componentStack, props, sourceLocation }` on React pages
11
+ * - detect_framework returns the same schema (react/reactVersion/next/.../heavyLibraries)
12
+ *
13
+ * Introspection auto-enables on first use (addInitScript before navigation); non-React
14
+ * artifacts degrade gracefully (fiber fields simply absent).
15
+ */
16
+ import { BaseTool } from '../../base/BaseTool.js';
17
+ import { CreateArtifactToolExecutor } from './CreateArtifactTool.js';
18
+ import { visualBridge } from './VisualFeedbackBridge.js';
19
+ const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
20
+ function resolveSandboxUrl(sandboxId) {
21
+ const session = CreateArtifactToolExecutor.getActiveSandbox(sandboxId);
22
+ if (!session) {
23
+ return { error: `Sandbox not found: ${sandboxId}. It may have been stopped or never existed.` };
24
+ }
25
+ if (!session.url) {
26
+ return { error: 'Sandbox has no URL (not a web server artifact)' };
27
+ }
28
+ session.lastActivity = new Date();
29
+ return { url: session.url };
30
+ }
31
+ export class SandboxScanExecutor extends BaseTool {
32
+ constructor() {
33
+ super('SandboxScan', 'SandboxScan', 'Discover elements in a running sandbox; same contract as the nexus-browser scan tool', {
34
+ type: 'object',
35
+ properties: {
36
+ sandboxId: { type: 'string', description: 'ID of the sandbox to scan' },
37
+ filter: {
38
+ type: 'object',
39
+ properties: {
40
+ tagName: { type: 'string', description: "Exact lowercase tag match, e.g. 'button'" },
41
+ hasText: { type: 'string', description: 'Case-insensitive substring of textContent' },
42
+ isInteractive: { type: 'boolean', description: 'Only interactive elements (buttons, inputs, links...)' },
43
+ id: { type: 'string', description: 'Exact id attribute' },
44
+ className: { type: 'string', description: 'classList.contains() match' },
45
+ placeholder: { type: 'string', description: 'Case-insensitive placeholder substring' },
46
+ name: { type: 'string', description: 'Exact name attribute' },
47
+ componentName: { type: 'string', description: 'React component name (React artifacts only)' }
48
+ },
49
+ description: 'Element filters (all optional, combined with AND)'
50
+ },
51
+ limit: { type: 'number', description: 'Max elements returned (default 30, max 100)' },
52
+ includeOffscreen: { type: 'boolean', description: 'Include elements outside the viewport' }
53
+ },
54
+ required: ['sandboxId']
55
+ });
56
+ }
57
+ validateToolParams(params) {
58
+ if (!params.sandboxId || !UUID_RE.test(params.sandboxId))
59
+ return 'sandboxId must be a valid UUID';
60
+ return null;
61
+ }
62
+ async execute(params, _signal) {
63
+ const validationError = this.validateToolParams(params);
64
+ if (validationError)
65
+ return this.createErrorResult(validationError);
66
+ const target = resolveSandboxUrl(params.sandboxId);
67
+ if ('error' in target)
68
+ return this.createErrorResult(target.error);
69
+ try {
70
+ await visualBridge.initialize();
71
+ const result = await visualBridge.sandboxScan(target.url, {
72
+ filter: params.filter,
73
+ limit: params.limit,
74
+ includeOffscreen: params.includeOffscreen
75
+ });
76
+ const lines = [
77
+ `Scan: ${result.count} element(s)${result.truncated ? ' (truncated — refine filter or raise limit)' : ''}`,
78
+ '',
79
+ '```json',
80
+ JSON.stringify(result.elements, null, 2),
81
+ '```',
82
+ '',
83
+ 'Use an element\'s `cssSelector` with InteractWithSandbox (click/type) — then scan again to verify.'
84
+ ];
85
+ return {
86
+ ...this.createSuccessResult(lines.join('\n')),
87
+ metadata: { sandboxId: params.sandboxId, count: result.count, truncated: result.truncated }
88
+ };
89
+ }
90
+ catch (error) {
91
+ return this.createErrorResult(`Scan failed: ${error.message}`);
92
+ }
93
+ }
94
+ }
95
+ export class SandboxGrabExecutor extends BaseTool {
96
+ constructor() {
97
+ super('SandboxGrab', 'SandboxGrab', 'Query one element in a running sandbox (DOM detail + React component info); same contract as the nexus-browser grab tool', {
98
+ type: 'object',
99
+ properties: {
100
+ sandboxId: { type: 'string', description: 'ID of the sandbox' },
101
+ selector: { type: 'string', description: 'CSS selector (use cssSelector from sandbox_scan)' },
102
+ x: { type: 'number', description: 'X coordinate (alternative to selector)' },
103
+ y: { type: 'number', description: 'Y coordinate (alternative to selector)' },
104
+ maxLength: { type: 'number', description: 'Max textContent length (default 500)' }
105
+ },
106
+ required: ['sandboxId']
107
+ });
108
+ }
109
+ validateToolParams(params) {
110
+ if (!params.sandboxId || !UUID_RE.test(params.sandboxId))
111
+ return 'sandboxId must be a valid UUID';
112
+ if (!params.selector && (typeof params.x !== 'number' || typeof params.y !== 'number')) {
113
+ return 'Provide selector OR both x and y coordinates';
114
+ }
115
+ return null;
116
+ }
117
+ async execute(params, _signal) {
118
+ const validationError = this.validateToolParams(params);
119
+ if (validationError)
120
+ return this.createErrorResult(validationError);
121
+ const target = resolveSandboxUrl(params.sandboxId);
122
+ if ('error' in target)
123
+ return this.createErrorResult(target.error);
124
+ try {
125
+ await visualBridge.initialize();
126
+ const result = await visualBridge.sandboxGrab(target.url, {
127
+ selector: params.selector,
128
+ x: params.x,
129
+ y: params.y,
130
+ maxLength: params.maxLength
131
+ });
132
+ if (result?.error)
133
+ return this.createErrorResult(result.error);
134
+ const lines = ['```json', JSON.stringify(result, null, 2), '```'];
135
+ if (result.react) {
136
+ lines.push('', `React: <${result.react.componentName}>${result.react.sourceLocation ? ` (${result.react.sourceLocation})` : ''} — stack: ${result.react.componentStack.join(' < ')}`);
137
+ }
138
+ return {
139
+ ...this.createSuccessResult(lines.join('\n')),
140
+ metadata: { sandboxId: params.sandboxId, hasReactInfo: !!result.react }
141
+ };
142
+ }
143
+ catch (error) {
144
+ return this.createErrorResult(`Grab failed: ${error.message}`);
145
+ }
146
+ }
147
+ }
148
+ export class SandboxDetectFrameworkExecutor extends BaseTool {
149
+ constructor() {
150
+ super('SandboxDetectFramework', 'SandboxDetectFramework', 'Detect the frontend framework of a running sandbox; same schema as the nexus-browser detect_framework tool', {
151
+ type: 'object',
152
+ properties: {
153
+ sandboxId: { type: 'string', description: 'ID of the sandbox' }
154
+ },
155
+ required: ['sandboxId']
156
+ });
157
+ }
158
+ validateToolParams(params) {
159
+ if (!params.sandboxId || !UUID_RE.test(params.sandboxId))
160
+ return 'sandboxId must be a valid UUID';
161
+ return null;
162
+ }
163
+ async execute(params, _signal) {
164
+ const validationError = this.validateToolParams(params);
165
+ if (validationError)
166
+ return this.createErrorResult(validationError);
167
+ const target = resolveSandboxUrl(params.sandboxId);
168
+ if ('error' in target)
169
+ return this.createErrorResult(target.error);
170
+ try {
171
+ await visualBridge.initialize();
172
+ const report = await visualBridge.sandboxDetect(target.url);
173
+ return {
174
+ ...this.createSuccessResult('```json\n' + JSON.stringify(report, null, 2) + '\n```'),
175
+ metadata: { sandboxId: params.sandboxId, react: report.react, reactVersion: report.reactVersion }
176
+ };
177
+ }
178
+ catch (error) {
179
+ return this.createErrorResult(`Framework detection failed: ${error.message}`);
180
+ }
181
+ }
182
+ }
183
+ export class SandboxComponentTreeExecutor extends BaseTool {
184
+ constructor() {
185
+ super('SandboxComponentTree', 'SandboxComponentTree', 'Return the React component hierarchy of a running sandbox (component-tree role)', {
186
+ type: 'object',
187
+ properties: {
188
+ sandboxId: { type: 'string', description: 'ID of the sandbox' },
189
+ rootSelector: { type: 'string', description: 'CSS selector for the tree root (default: #root/#app)' },
190
+ maxDepth: { type: 'number', description: 'Max component depth (default 8)' }
191
+ },
192
+ required: ['sandboxId']
193
+ });
194
+ }
195
+ validateToolParams(params) {
196
+ if (!params.sandboxId || !UUID_RE.test(params.sandboxId))
197
+ return 'sandboxId must be a valid UUID';
198
+ return null;
199
+ }
200
+ async execute(params, _signal) {
201
+ const validationError = this.validateToolParams(params);
202
+ if (validationError)
203
+ return this.createErrorResult(validationError);
204
+ const target = resolveSandboxUrl(params.sandboxId);
205
+ if ('error' in target)
206
+ return this.createErrorResult(target.error);
207
+ try {
208
+ await visualBridge.initialize();
209
+ const result = await visualBridge.sandboxComponentTree(target.url, {
210
+ rootSelector: params.rootSelector,
211
+ maxDepth: params.maxDepth
212
+ });
213
+ if (result?.error)
214
+ return this.createErrorResult(result.error);
215
+ const lines = [
216
+ `Component tree: ${result.componentCount} component(s), max depth ${result.maxDepth}`,
217
+ '',
218
+ '```json',
219
+ JSON.stringify(result.tree, null, 2),
220
+ '```'
221
+ ];
222
+ return {
223
+ ...this.createSuccessResult(lines.join('\n')),
224
+ metadata: { sandboxId: params.sandboxId, componentCount: result.componentCount, maxDepth: result.maxDepth }
225
+ };
226
+ }
227
+ catch (error) {
228
+ return this.createErrorResult(`Component tree failed: ${error.message}`);
229
+ }
230
+ }
231
+ }
232
+ export class SandboxRenderTraceExecutor extends BaseTool {
233
+ constructor() {
234
+ super('SandboxRenderTrace', 'SandboxRenderTrace', 'Trace React re-renders in a running sandbox (react-scan role). action:start resets+enables, then interact, then action:stop reports per-component render counts/timings.', {
235
+ type: 'object',
236
+ properties: {
237
+ sandboxId: { type: 'string', description: 'ID of the sandbox' },
238
+ action: { type: 'string', enum: ['start', 'stop'], description: "'start' begins tracing; interact with the UI; 'stop' returns the report." }
239
+ },
240
+ required: ['sandboxId', 'action']
241
+ });
242
+ }
243
+ validateToolParams(params) {
244
+ if (!params.sandboxId || !UUID_RE.test(params.sandboxId))
245
+ return 'sandboxId must be a valid UUID';
246
+ if (params.action !== 'start' && params.action !== 'stop')
247
+ return "action must be 'start' or 'stop'";
248
+ return null;
249
+ }
250
+ async execute(params, _signal) {
251
+ const validationError = this.validateToolParams(params);
252
+ if (validationError)
253
+ return this.createErrorResult(validationError);
254
+ const target = resolveSandboxUrl(params.sandboxId);
255
+ if ('error' in target)
256
+ return this.createErrorResult(target.error);
257
+ try {
258
+ await visualBridge.initialize();
259
+ if (params.action === 'start') {
260
+ const r = await visualBridge.sandboxTraceStart(target.url);
261
+ if (r?.error)
262
+ return this.createErrorResult(r.error);
263
+ return {
264
+ ...this.createSuccessResult('Render trace started. Interact with the sandbox (interact_with_sandbox), then call sandbox_render_trace with action:"stop".'),
265
+ metadata: { sandboxId: params.sandboxId, tracing: true }
266
+ };
267
+ }
268
+ const report = await visualBridge.sandboxTraceReport(target.url, { stop: true });
269
+ if (report?.error)
270
+ return this.createErrorResult(report.error);
271
+ const top = report.components.slice(0, 10)
272
+ .map((c) => ` ${c.renders}x ${c.name} (${c.totalDurationMs}ms)`).join('\n');
273
+ const lines = [
274
+ `Render trace: ${report.totalCommits} commit(s) over ${report.durationMs}ms`,
275
+ report.components.length ? 'Re-renders by component (most first):' : 'No component re-renders recorded.',
276
+ top,
277
+ '',
278
+ '```json',
279
+ JSON.stringify(report.components, null, 2),
280
+ '```'
281
+ ];
282
+ return {
283
+ ...this.createSuccessResult(lines.join('\n')),
284
+ metadata: { sandboxId: params.sandboxId, totalCommits: report.totalCommits, componentsRendered: report.components.length }
285
+ };
286
+ }
287
+ catch (error) {
288
+ return this.createErrorResult(`Render trace failed: ${error.message}`);
289
+ }
290
+ }
291
+ }
292
+ //# sourceMappingURL=SandboxIntrospectionTools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SandboxIntrospectionTools.js","sourceRoot":"","sources":["../../../src/implementations/addon/SandboxIntrospectionTools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,EAAE,MAA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