@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,430 @@
1
+ /**
2
+ * Web Tool Backends — Multi-provider implementations for WebSearch / WebFetch.
3
+ *
4
+ * Resolution order (per call):
5
+ * 1. Provider-native server-side web tool, selected by WEB_TOOLS_MODEL env var:
6
+ * - Anthropic Claude → Messages API + `web_search_20250305` server tool
7
+ * - XAI Grok → Responses API + `web_search` server tool
8
+ * - Google Gemini → GenerateContent + `googleSearch` grounding (default)
9
+ * 2. DuckDuckGo HTML fallback (no API key required) — last resort when:
10
+ * - WEB_TOOLS_MODEL is unset, OR
11
+ * - the configured provider's API key is missing.
12
+ *
13
+ * Provider is inferred from the model ID prefix; this matches the
14
+ * AdapterRegistry's pattern detection. nexus-browser is intentionally NOT a
15
+ * backend here — it is exposed via MCP only, with auth gating at the protocol
16
+ * layer (see nexus-cortex OSS / nexus-browser monetization boundary).
17
+ */
18
+ import { convert as htmlToText } from 'html-to-text';
19
+ /** Resolve which provider serves a given model ID. */
20
+ export function resolveProvider(modelId) {
21
+ if (!modelId)
22
+ return 'fallback';
23
+ const id = modelId.toLowerCase();
24
+ if (id.startsWith('claude-') || id.startsWith('claude_'))
25
+ return 'anthropic';
26
+ if (id.startsWith('grok-') || id.startsWith('grok_'))
27
+ return 'xai';
28
+ if (id.startsWith('gemini-') || id.startsWith('gemma-'))
29
+ return 'google';
30
+ if (id.startsWith('gpt-') ||
31
+ id.startsWith('o1-') || id === 'o1' || id === 'o1-pro' ||
32
+ id.startsWith('o3-') || id === 'o3' || id === 'o3-pro' ||
33
+ id.startsWith('o4-') || id === 'o4-mini') {
34
+ return 'openai';
35
+ }
36
+ return 'fallback';
37
+ }
38
+ /** Resolve and return env API key for a provider; null if missing. */
39
+ function getApiKey(provider) {
40
+ switch (provider) {
41
+ case 'anthropic':
42
+ return process.env.ANTHROPIC_API_KEY ?? null;
43
+ case 'xai':
44
+ return process.env.XAI_API_KEY ?? null;
45
+ case 'openai':
46
+ return process.env.OPENAI_API_KEY ?? null;
47
+ case 'google':
48
+ return process.env.GEMINI_API_KEY ?? process.env.GOOGLE_API_KEY ?? null;
49
+ default:
50
+ return null;
51
+ }
52
+ }
53
+ // ── Anthropic backend ─────────────────────────────────────────────────────────
54
+ async function anthropicCall(modelId, apiKey, userMessage, maxTokens) {
55
+ const res = await fetch('https://api.anthropic.com/v1/messages', {
56
+ method: 'POST',
57
+ headers: {
58
+ 'content-type': 'application/json',
59
+ 'x-api-key': apiKey,
60
+ 'anthropic-version': '2023-06-01',
61
+ },
62
+ body: JSON.stringify({
63
+ model: modelId,
64
+ max_tokens: maxTokens,
65
+ tools: [{ type: 'web_search_20250305', name: 'web_search', max_uses: 5 }],
66
+ messages: [{ role: 'user', content: userMessage }],
67
+ }),
68
+ });
69
+ if (!res.ok) {
70
+ const errBody = await res.text().catch(() => '');
71
+ throw new Error(`Anthropic ${res.status}: ${errBody.slice(0, 300)}`);
72
+ }
73
+ const data = await res.json();
74
+ const textParts = [];
75
+ const sources = [];
76
+ for (const block of data.content ?? []) {
77
+ if (block.type === 'text') {
78
+ textParts.push(block.text);
79
+ }
80
+ else if (block.type === 'web_search_tool_result' && Array.isArray(block.content)) {
81
+ for (const item of block.content) {
82
+ if (item.type === 'web_search_result' && item.url) {
83
+ sources.push({ title: item.title, url: item.url });
84
+ }
85
+ }
86
+ }
87
+ }
88
+ return { text: textParts.join('\n\n'), sources };
89
+ }
90
+ export async function anthropicSearch(query, modelId) {
91
+ const apiKey = getApiKey('anthropic');
92
+ if (!apiKey)
93
+ throw new Error('ANTHROPIC_API_KEY not set');
94
+ const { text, sources } = await anthropicCall(modelId, apiKey, `Search the web for: ${query}\n\nReturn a comprehensive, factual summary citing your sources.`, 16000);
95
+ return { text, sources, backend: 'anthropic-web_search' };
96
+ }
97
+ export async function anthropicFetch(prompt, modelId) {
98
+ const apiKey = getApiKey('anthropic');
99
+ if (!apiKey)
100
+ throw new Error('ANTHROPIC_API_KEY not set');
101
+ const { text, sources } = await anthropicCall(modelId, apiKey, `Fetch and process the URL(s) in the following prompt. Preserve structure (headings, lists, paragraphs).\n\n${prompt}`, 32000);
102
+ return { text, sources, backend: 'anthropic-web_search' };
103
+ }
104
+ // ── XAI backend (Responses API) ───────────────────────────────────────────────
105
+ async function xaiCall(modelId, apiKey, input, maxOutputTokens) {
106
+ const res = await fetch('https://api.x.ai/v1/responses', {
107
+ method: 'POST',
108
+ headers: {
109
+ 'content-type': 'application/json',
110
+ authorization: `Bearer ${apiKey}`,
111
+ },
112
+ body: JSON.stringify({
113
+ model: modelId,
114
+ tools: [{ type: 'web_search' }],
115
+ input,
116
+ temperature: 0.3,
117
+ max_output_tokens: maxOutputTokens,
118
+ }),
119
+ });
120
+ if (!res.ok) {
121
+ const errBody = await res.text().catch(() => '');
122
+ throw new Error(`XAI ${res.status}: ${errBody.slice(0, 300)}`);
123
+ }
124
+ const data = await res.json();
125
+ const textParts = [];
126
+ const sources = [];
127
+ if (Array.isArray(data.output)) {
128
+ for (const item of data.output) {
129
+ if (item.type === 'message' && Array.isArray(item.content)) {
130
+ for (const part of item.content) {
131
+ if (part.type === 'output_text' || part.type === 'text') {
132
+ textParts.push(part.text);
133
+ for (const ann of part.annotations ?? []) {
134
+ if (ann.type === 'url_citation' && ann.url) {
135
+ sources.push({ title: ann.title, url: ann.url });
136
+ }
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ }
143
+ if (textParts.length === 0 && typeof data.output_text === 'string') {
144
+ textParts.push(data.output_text);
145
+ }
146
+ // Deduplicate by URL — XAI repeats annotations per citation position.
147
+ const seen = new Set();
148
+ const uniqueSources = sources.filter((s) => {
149
+ if (seen.has(s.url))
150
+ return false;
151
+ seen.add(s.url);
152
+ return true;
153
+ });
154
+ return { text: textParts.join('\n\n'), sources: uniqueSources };
155
+ }
156
+ export async function xaiSearch(query, modelId) {
157
+ const apiKey = getApiKey('xai');
158
+ if (!apiKey)
159
+ throw new Error('XAI_API_KEY not set');
160
+ const { text, sources } = await xaiCall(modelId, apiKey, `Search the web comprehensively for: ${query}\n\nReturn detailed, factual results with sources.`, 16000);
161
+ return { text, sources, backend: 'xai-web_search' };
162
+ }
163
+ export async function xaiFetch(prompt, modelId) {
164
+ const apiKey = getApiKey('xai');
165
+ if (!apiKey)
166
+ throw new Error('XAI_API_KEY not set');
167
+ const { text, sources } = await xaiCall(modelId, apiKey, `Read and extract content from the URL(s) in the following prompt. Preserve structure.\n\n${prompt}`, 32000);
168
+ return { text, sources, backend: 'xai-web_search' };
169
+ }
170
+ // ── OpenAI backend (Responses API) ────────────────────────────────────────────
171
+ async function openaiCall(modelId, apiKey, input, maxOutputTokens) {
172
+ const res = await fetch('https://api.openai.com/v1/responses', {
173
+ method: 'POST',
174
+ headers: {
175
+ 'content-type': 'application/json',
176
+ authorization: `Bearer ${apiKey}`,
177
+ },
178
+ body: JSON.stringify({
179
+ model: modelId,
180
+ tools: [{ type: 'web_search_preview' }],
181
+ input,
182
+ max_output_tokens: maxOutputTokens,
183
+ }),
184
+ });
185
+ if (!res.ok) {
186
+ const errBody = await res.text().catch(() => '');
187
+ throw new Error(`OpenAI ${res.status}: ${errBody.slice(0, 300)}`);
188
+ }
189
+ const data = await res.json();
190
+ const textParts = [];
191
+ const sources = [];
192
+ if (Array.isArray(data.output)) {
193
+ for (const item of data.output) {
194
+ if (item.type === 'message' && Array.isArray(item.content)) {
195
+ for (const part of item.content) {
196
+ if (part.type === 'output_text' || part.type === 'text') {
197
+ textParts.push(part.text);
198
+ // OpenAI inlines URL annotations within output_text parts.
199
+ for (const ann of part.annotations ?? []) {
200
+ if (ann.type === 'url_citation' && ann.url) {
201
+ sources.push({ title: ann.title, url: ann.url });
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
207
+ }
208
+ }
209
+ if (textParts.length === 0 && typeof data.output_text === 'string') {
210
+ textParts.push(data.output_text);
211
+ }
212
+ return { text: textParts.join('\n\n'), sources };
213
+ }
214
+ export async function openaiSearch(query, modelId) {
215
+ const apiKey = getApiKey('openai');
216
+ if (!apiKey)
217
+ throw new Error('OPENAI_API_KEY not set');
218
+ const { text, sources } = await openaiCall(modelId, apiKey, `Search the web comprehensively for: ${query}\n\nReturn detailed, factual results with sources.`, 16000);
219
+ return { text, sources, backend: 'openai-web_search' };
220
+ }
221
+ export async function openaiFetch(prompt, modelId) {
222
+ const apiKey = getApiKey('openai');
223
+ if (!apiKey)
224
+ throw new Error('OPENAI_API_KEY not set');
225
+ const { text, sources } = await openaiCall(modelId, apiKey, `Read and extract content from the URL(s) in the following prompt. Preserve structure.\n\n${prompt}`, 32000);
226
+ return { text, sources, backend: 'openai-web_search' };
227
+ }
228
+ // ── DuckDuckGo HTML fallback (no API key required) ────────────────────────────
229
+ const FALLBACK_TIMEOUT_MS = 10_000;
230
+ const FALLBACK_USER_AGENT = 'Mozilla/5.0 (compatible; CortexV4/4.0; +https://github.com/Spitfire-Products/nexus-cortex)';
231
+ async function fetchWithTimeout(url, init = {}) {
232
+ const ctl = new AbortController();
233
+ const timer = setTimeout(() => ctl.abort(), FALLBACK_TIMEOUT_MS);
234
+ try {
235
+ return await fetch(url, {
236
+ ...init,
237
+ signal: ctl.signal,
238
+ headers: { 'user-agent': FALLBACK_USER_AGENT, ...(init.headers ?? {}) },
239
+ });
240
+ }
241
+ finally {
242
+ clearTimeout(timer);
243
+ }
244
+ }
245
+ export async function duckDuckGoSearch(query) {
246
+ const url = `https://html.duckduckgo.com/html/?q=${encodeURIComponent(query)}`;
247
+ const res = await fetchWithTimeout(url);
248
+ if (!res.ok)
249
+ throw new Error(`DuckDuckGo ${res.status}`);
250
+ const html = await res.text();
251
+ const sources = [];
252
+ const resultRegex = /<a[^>]+class="[^"]*result__a[^"]*"[^>]+href="([^"]+)"[^>]*>([\s\S]*?)<\/a>[\s\S]*?<a[^>]+class="[^"]*result__snippet[^"]*"[^>]*>([\s\S]*?)<\/a>/g;
253
+ let match;
254
+ let count = 0;
255
+ const lines = [];
256
+ while ((match = resultRegex.exec(html)) !== null && count < 10) {
257
+ const rawUrl = match[1] ?? '';
258
+ const titleHtml = match[2] ?? '';
259
+ const snippetHtml = match[3] ?? '';
260
+ if (!rawUrl)
261
+ continue;
262
+ const title = htmlToText(titleHtml, { wordwrap: false }).trim();
263
+ const snippet = htmlToText(snippetHtml, { wordwrap: false }).trim();
264
+ // DDG wraps URLs as /l/?uddg=ENCODED&...
265
+ const decodedUrl = decodeDdgUrl(rawUrl);
266
+ sources.push({ title, url: decodedUrl });
267
+ lines.push(`[${count + 1}] ${title}\n ${decodedUrl}\n ${snippet}`);
268
+ count += 1;
269
+ }
270
+ if (count === 0) {
271
+ return {
272
+ text: `No results found for: "${query}"`,
273
+ sources: [],
274
+ backend: 'duckduckgo-html',
275
+ };
276
+ }
277
+ return {
278
+ text: `Search results for "${query}" (${count} results):\n\n${lines.join('\n\n')}`,
279
+ sources,
280
+ backend: 'duckduckgo-html',
281
+ };
282
+ }
283
+ function decodeDdgUrl(href) {
284
+ if (!href.startsWith('//') && !href.startsWith('/l/'))
285
+ return href;
286
+ try {
287
+ const u = new URL(href.startsWith('//') ? `https:${href}` : `https://duckduckgo.com${href}`);
288
+ const real = u.searchParams.get('uddg');
289
+ return real ? decodeURIComponent(real) : href;
290
+ }
291
+ catch {
292
+ return href;
293
+ }
294
+ }
295
+ const MAX_DIRECT_FETCH_BYTES = 100_000;
296
+ /** Direct HTTP fetch + html-to-text. URL must be public. */
297
+ export async function directFetch(url) {
298
+ const res = await fetchWithTimeout(url);
299
+ if (!res.ok)
300
+ throw new Error(`Direct fetch ${res.status} for ${url}`);
301
+ const contentType = res.headers.get('content-type') ?? '';
302
+ let body = await res.text();
303
+ if (body.length > MAX_DIRECT_FETCH_BYTES) {
304
+ body = body.slice(0, MAX_DIRECT_FETCH_BYTES) + '\n\n[Content truncated]';
305
+ }
306
+ const isHtml = contentType.includes('html') || /<html[\s>]/i.test(body.slice(0, 500));
307
+ const text = isHtml
308
+ ? htmlToText(body, {
309
+ wordwrap: false,
310
+ selectors: [
311
+ { selector: 'script', format: 'skip' },
312
+ { selector: 'style', format: 'skip' },
313
+ { selector: 'nav', format: 'skip' },
314
+ { selector: 'footer', format: 'skip' },
315
+ ],
316
+ })
317
+ : body;
318
+ return {
319
+ text: `URL: ${url}\n\n${text}`,
320
+ sources: [{ url }],
321
+ backend: 'direct-fetch',
322
+ };
323
+ }
324
+ // ── Selector ──────────────────────────────────────────────────────────────────
325
+ /**
326
+ * Selected web tools model ID. Reads `WEB_TOOLS_MODEL` and, if unset,
327
+ * picks a sensible default based on which provider key is present:
328
+ * GEMINI/GOOGLE → gemini-2.5-flash (free tier-friendly)
329
+ * ANTHROPIC → claude-haiku-4-5
330
+ * XAI → grok-4-fast-non-reasoning
331
+ * none → '' (DuckDuckGo fallback for search, direct fetch for fetch)
332
+ *
333
+ * Verified Gemini models with googleSearch + urlContext (2026-05-27):
334
+ * gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro,
335
+ * gemini-3-flash-preview (= gemini-3.5-flash preview), gemini-3.5-flash, gemini-3.1-pro-preview
336
+ */
337
+ export function getWebToolsModel() {
338
+ const explicit = process.env.WEB_TOOLS_MODEL?.trim();
339
+ if (explicit)
340
+ return explicit;
341
+ if (process.env.GEMINI_API_KEY || process.env.GOOGLE_API_KEY)
342
+ return 'gemini-2.5-flash';
343
+ if (process.env.ANTHROPIC_API_KEY)
344
+ return 'claude-haiku-4-5';
345
+ if (process.env.XAI_API_KEY)
346
+ return 'grok-4-fast-non-reasoning';
347
+ if (process.env.OPENAI_API_KEY)
348
+ return 'gpt-4o';
349
+ return '';
350
+ }
351
+ /**
352
+ * Run a web search with provider-native backends, falling back to DuckDuckGo
353
+ * when no provider is configured or its API key is missing.
354
+ */
355
+ export async function runWebSearch(query) {
356
+ const modelId = getWebToolsModel();
357
+ const provider = resolveProvider(modelId);
358
+ if (provider !== 'fallback' && getApiKey(provider)) {
359
+ try {
360
+ switch (provider) {
361
+ case 'anthropic':
362
+ return await anthropicSearch(query, modelId);
363
+ case 'xai':
364
+ return await xaiSearch(query, modelId);
365
+ case 'openai':
366
+ return await openaiSearch(query, modelId);
367
+ case 'google':
368
+ // Gemini googleSearch is implemented in WebSearchTool itself
369
+ // because it uses the @google/genai SDK and citation-byte logic.
370
+ throw new Error('__USE_GEMINI_SDK__');
371
+ }
372
+ }
373
+ catch (err) {
374
+ if (err.message === '__USE_GEMINI_SDK__')
375
+ throw err;
376
+ console.warn(`[web-tools] ${provider} search failed: ${err.message}`);
377
+ }
378
+ }
379
+ return duckDuckGoSearch(query);
380
+ }
381
+ /**
382
+ * Run a web fetch with provider-native backends, falling back to direct
383
+ * HTTP + html-to-text. The `prompt` parameter contains the URL(s) and
384
+ * processing instructions (matching the WebFetch tool schema).
385
+ */
386
+ export async function runWebFetch(prompt, urls) {
387
+ const modelId = getWebToolsModel();
388
+ const provider = resolveProvider(modelId);
389
+ if (provider !== 'fallback' && getApiKey(provider)) {
390
+ try {
391
+ switch (provider) {
392
+ case 'anthropic':
393
+ return await anthropicFetch(prompt, modelId);
394
+ case 'xai':
395
+ return await xaiFetch(prompt, modelId);
396
+ case 'openai':
397
+ return await openaiFetch(prompt, modelId);
398
+ case 'google':
399
+ throw new Error('__USE_GEMINI_SDK__');
400
+ }
401
+ }
402
+ catch (err) {
403
+ if (err.message === '__USE_GEMINI_SDK__')
404
+ throw err;
405
+ console.warn(`[web-tools] ${provider} fetch failed: ${err.message}`);
406
+ }
407
+ }
408
+ // Direct fetch each URL in the prompt; concatenate results.
409
+ if (urls.length === 0) {
410
+ throw new Error('No URLs supplied for direct fetch fallback');
411
+ }
412
+ const parts = [];
413
+ const sources = [];
414
+ for (const u of urls.slice(0, 5)) {
415
+ try {
416
+ const r = await directFetch(u);
417
+ parts.push(r.text);
418
+ sources.push(...r.sources);
419
+ }
420
+ catch (err) {
421
+ parts.push(`URL: ${u}\n[fetch failed: ${err.message}]`);
422
+ }
423
+ }
424
+ return {
425
+ text: parts.join('\n\n---\n\n'),
426
+ sources,
427
+ backend: 'direct-fetch',
428
+ };
429
+ }
430
+ //# sourceMappingURL=webBackends.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webBackends.js","sourceRoot":"","sources":["../../../src/implementations/web/webBackends.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAarD,sDAAsD;AACtD,MAAM,UAAU,eAAe,CAAC,OAA2B;IACzD,IAAI,CAAC,OAAO;QAAE,OAAO,UAAU,CAAC;IAChC,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IACjC,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,WAAW,CAAC;IAC7E,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO,KAAK,CAAC;IACnE,IAAI,EAAE,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IACzE,IACE,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;QACrB,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,QAAQ;QACtD,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,IAAI,IAAI,EAAE,KAAK,QAAQ;QACtD,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,SAAS,EACxC,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,OAAO,U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,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,GAAQ,EAAE,CAAC;YAClB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,oBAAoB,GAAG,CAAC,OAAO,GAAG,CAAC,CAAC;QAC1D,CAAC;IACH,CAAC;IAED,OAAO;QACL,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC;QAC/B,OAAO;QACP,OAAO,EAAE,cAAc;KACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * WebFetch reliability: the local-fetch fallback was issued with NO request
3
+ * headers, so Node's default User-Agent got 403/blocked by virtually every
4
+ * real site behind a CDN/WAF (county records, gov, news) — the dominant
5
+ * cause of the observed ~1/20 success rate. A browser-like header set makes
6
+ * most "blocked" pages return real HTML.
7
+ */
8
+ export declare function buildBrowserFetchInit(signal: AbortSignal): RequestInit;
9
+ //# sourceMappingURL=webFetchRequestInit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webFetchRequestInit.d.ts","sourceRoot":"","sources":["../../../src/implementations/web/webFetchRequestInit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CActE"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * WebFetch reliability: the local-fetch fallback was issued with NO request
3
+ * headers, so Node's default User-Agent got 403/blocked by virtually every
4
+ * real site behind a CDN/WAF (county records, gov, news) — the dominant
5
+ * cause of the observed ~1/20 success rate. A browser-like header set makes
6
+ * most "blocked" pages return real HTML.
7
+ */
8
+ export function buildBrowserFetchInit(signal) {
9
+ return {
10
+ signal,
11
+ redirect: 'follow',
12
+ headers: {
13
+ 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ' +
14
+ '(KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36',
15
+ Accept: 'text/html,application/xhtml+xml,application/xml;q=0.9,' +
16
+ 'image/avif,image/webp,*/*;q=0.8',
17
+ 'Accept-Language': 'en-US,en;q=0.9',
18
+ },
19
+ };
20
+ }
21
+ //# sourceMappingURL=webFetchRequestInit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webFetchRequestInit.js","sourceRoot":"","sources":["../../../src/implementations/web/webFetchRequestInit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CAAC,MAAmB;IACvD,OAAO;QACL,MAAM;QACN,QAAQ,EAAE,QAAQ;QAClB,OAAO,EAAE;YACP,YAAY,EACV,+DAA+D;gBAC/D,oDAAoD;YACtD,MAAM,EACJ,wDAAwD;gBACxD,iCAAiC;YACnC,iBAAiB,EAAE,gBAAgB;SACpC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @nexus-cortex/executors
3
+ *
4
+ * Tool execution layer for Nexus Cortex
5
+ *
6
+ * Provides concrete implementations for all 25 base tools plus addon tools.
7
+ * Separate from @nexus-cortex/core following the principle:
8
+ * "Definition ≠ Execution"
9
+ */
10
+ export * from './base/index.js';
11
+ export * from './implementations/index.js';
12
+ export * from './utils/index.js';
13
+ export * from './ExecutorRegistry.js';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,cAAc,iBAAiB,CAAC;AAGhC,cAAc,4BAA4B,CAAC;AAG3C,cAAc,kBAAkB,CAAC;AAGjC,cAAc,uBAAuB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @nexus-cortex/executors
3
+ *
4
+ * Tool execution layer for Nexus Cortex
5
+ *
6
+ * Provides concrete implementations for all 25 base tools plus addon tools.
7
+ * Separate from @nexus-cortex/core following the principle:
8
+ * "Definition ≠ Execution"
9
+ */
10
+ // Base classes and interfaces
11
+ export * from './base/index.js';
12
+ // Tool implementations
13
+ export * from './implementations/index.js';
14
+ // Utilities
15
+ export * from './utils/index.js';
16
+ // ExecutorRegistry (Phase 2.5)
17
+ export * from './ExecutorRegistry.js';
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,8BAA8B;AAC9B,cAAc,iBAAiB,CAAC;AAEhC,uBAAuB;AACvB,cAAc,4BAA4B,CAAC;AAE3C,YAAY;AACZ,cAAc,kBAAkB,CAAC;AAEjC,+BAA+B;AAC/B,cAAc,uBAAuB,CAAC"}