@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,243 @@
1
+ /**
2
+ * ChromiumBrowserManager - Robust browser binary discovery for Playwright
3
+ * Handles finding Chromium/Chrome binaries across different environments
4
+ */
5
+ import { existsSync, statSync, readdirSync } from 'fs';
6
+ import { join } from 'path';
7
+ /**
8
+ * ChromiumBinaryLocator - Robust chromium binary discovery
9
+ * Searches multiple locations with priority order and validation
10
+ */
11
+ class ChromiumBinaryLocator {
12
+ cachedPath = undefined;
13
+ /**
14
+ * Find chromium binary with comprehensive search
15
+ */
16
+ findBinary() {
17
+ // 1. Environment variable (highest priority - user override)
18
+ if (process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH) {
19
+ if (this.isExecutable(process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH)) {
20
+ console.log(`[ChromiumManager] Using PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH: ${process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH}`);
21
+ return process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH;
22
+ }
23
+ console.warn(`[ChromiumManager] PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH set but not executable: ${process.env.PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH}`);
24
+ }
25
+ if (process.env.CHROMIUM_BIN) {
26
+ if (this.isExecutable(process.env.CHROMIUM_BIN)) {
27
+ console.log(`[ChromiumManager] Using CHROMIUM_BIN: ${process.env.CHROMIUM_BIN}`);
28
+ return process.env.CHROMIUM_BIN;
29
+ }
30
+ console.warn(`[ChromiumManager] CHROMIUM_BIN set but not executable: ${process.env.CHROMIUM_BIN}`);
31
+ }
32
+ // 2. Nix store - search for chromium directories
33
+ try {
34
+ const nixStorePath = '/nix/store';
35
+ if (existsSync(nixStorePath)) {
36
+ const chromiumPath = this.findChromiumInNixStore(nixStorePath);
37
+ if (chromiumPath) {
38
+ console.log(`[ChromiumManager] Found chromium (nix store): ${chromiumPath}`);
39
+ return chromiumPath;
40
+ }
41
+ }
42
+ }
43
+ catch (error) {
44
+ console.warn(`[ChromiumManager] Error searching nix store:`, error);
45
+ }
46
+ // 3. Nix profile locations (common on Replit, NixOS)
47
+ const homeDir = process.env.HOME;
48
+ if (homeDir) {
49
+ const nixPaths = [
50
+ join(homeDir, '.nix-profile/bin/chromium'),
51
+ join(homeDir, '.nix-profile/bin/chromium-browser'),
52
+ join(homeDir, '.local/state/nix/profiles/profile/bin/chromium'),
53
+ ];
54
+ for (const path of nixPaths) {
55
+ if (this.isExecutable(path)) {
56
+ console.log(`[ChromiumManager] Found chromium (nix profile): ${path}`);
57
+ return path;
58
+ }
59
+ }
60
+ }
61
+ // 4. System-wide nix locations
62
+ const systemNixPaths = [
63
+ '/nix/var/nix/profiles/default/bin/chromium',
64
+ '/run/current-system/sw/bin/chromium',
65
+ ];
66
+ for (const path of systemNixPaths) {
67
+ if (this.isExecutable(path)) {
68
+ console.log(`[ChromiumManager] Found chromium (system nix): ${path}`);
69
+ return path;
70
+ }
71
+ }
72
+ // 5. Standard Chrome/Chromium system paths
73
+ const systemPaths = [
74
+ '/usr/bin/chromium',
75
+ '/usr/bin/chromium-browser',
76
+ '/usr/bin/google-chrome',
77
+ '/usr/bin/google-chrome-stable',
78
+ '/usr/local/bin/chromium',
79
+ '/opt/google/chrome/chrome',
80
+ '/opt/chromium.org/chromium/chromium',
81
+ '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // macOS
82
+ '/Applications/Chromium.app/Contents/MacOS/Chromium', // macOS
83
+ ];
84
+ for (const path of systemPaths) {
85
+ if (this.isExecutable(path)) {
86
+ console.log(`[ChromiumManager] Found chromium (system): ${path}`);
87
+ return path;
88
+ }
89
+ }
90
+ // 6. Check Playwright's cache (where browsers get installed)
91
+ try {
92
+ const playwrightCachePath = this.findPlaywrightCachedChromium();
93
+ if (playwrightCachePath) {
94
+ console.log(`[ChromiumManager] Found chromium (playwright cache): ${playwrightCachePath}`);
95
+ return playwrightCachePath;
96
+ }
97
+ }
98
+ catch (error) {
99
+ console.warn(`[ChromiumManager] Error searching playwright cache:`, error);
100
+ }
101
+ // 7. Return null if nothing found (don't fallback to 'chromium' - be explicit)
102
+ console.warn(`[ChromiumManager] No chromium binary found. Set PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH environment variable or install chromium.`);
103
+ return null;
104
+ }
105
+ /**
106
+ * Search nix store for chromium binaries
107
+ */
108
+ findChromiumInNixStore(nixStorePath) {
109
+ try {
110
+ const entries = readdirSync(nixStorePath);
111
+ // Look for chromium directories (sorted by name to get latest version)
112
+ const chromiumDirs = entries
113
+ .filter(name => name.startsWith('chromium-') || name.includes('chromium'))
114
+ .sort()
115
+ .reverse(); // Get latest version first
116
+ for (const dir of chromiumDirs) {
117
+ const chromiumBin = join(nixStorePath, dir, 'bin/chromium');
118
+ if (this.isExecutable(chromiumBin)) {
119
+ return chromiumBin;
120
+ }
121
+ // Also check for chrome-sandbox and chrome binaries
122
+ const chromeBin = join(nixStorePath, dir, 'bin/chrome');
123
+ if (this.isExecutable(chromeBin)) {
124
+ return chromeBin;
125
+ }
126
+ }
127
+ }
128
+ catch (error) {
129
+ // Directory read error - not a problem, continue searching
130
+ }
131
+ return null;
132
+ }
133
+ /**
134
+ * Find chromium in Playwright's cache directory
135
+ */
136
+ findPlaywrightCachedChromium() {
137
+ const homeDir = process.env.HOME;
138
+ if (!homeDir)
139
+ return null;
140
+ const playwrightPaths = [
141
+ join(homeDir, '.cache/ms-playwright'),
142
+ join(homeDir, 'Library/Caches/ms-playwright'), // macOS
143
+ join(homeDir, 'AppData/Local/ms-playwright'), // Windows
144
+ ];
145
+ for (const cachePath of playwrightPaths) {
146
+ if (!existsSync(cachePath))
147
+ continue;
148
+ try {
149
+ const entries = readdirSync(cachePath);
150
+ const chromiumDirs = entries
151
+ .filter(name => name.startsWith('chromium-'))
152
+ .sort()
153
+ .reverse();
154
+ for (const dir of chromiumDirs) {
155
+ // Linux/Windows
156
+ let chromiumBin = join(cachePath, dir, 'chrome-linux/chrome');
157
+ if (this.isExecutable(chromiumBin)) {
158
+ return chromiumBin;
159
+ }
160
+ // macOS
161
+ chromiumBin = join(cachePath, dir, 'chrome-mac/Chromium.app/Contents/MacOS/Chromium');
162
+ if (this.isExecutable(chromiumBin)) {
163
+ return chromiumBin;
164
+ }
165
+ // Windows
166
+ chromiumBin = join(cachePath, dir, 'chrome-win/chrome.exe');
167
+ if (this.isExecutable(chromiumBin)) {
168
+ return chromiumBin;
169
+ }
170
+ }
171
+ }
172
+ catch (error) {
173
+ // Continue searching
174
+ }
175
+ }
176
+ return null;
177
+ }
178
+ /**
179
+ * Check if path is an executable file
180
+ */
181
+ isExecutable(path) {
182
+ try {
183
+ if (!existsSync(path))
184
+ return false;
185
+ const stats = statSync(path);
186
+ // Check if file and has execute permission
187
+ return stats.isFile() && !!(stats.mode & 0o111);
188
+ }
189
+ catch {
190
+ return false;
191
+ }
192
+ }
193
+ /**
194
+ * Get chromium binary path (cached)
195
+ */
196
+ getBinary() {
197
+ if (this.cachedPath === undefined) {
198
+ this.cachedPath = this.findBinary();
199
+ }
200
+ return this.cachedPath;
201
+ }
202
+ /**
203
+ * Clear cached path (for testing)
204
+ */
205
+ clearCache() {
206
+ this.cachedPath = undefined;
207
+ }
208
+ /**
209
+ * Get browser configuration for Playwright
210
+ */
211
+ getPlaywrightConfig() {
212
+ const binary = this.getBinary();
213
+ if (!binary) {
214
+ throw new Error('Chromium binary not found. Please install chromium or set PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH environment variable.');
215
+ }
216
+ return { executablePath: binary };
217
+ }
218
+ }
219
+ // Singleton instance
220
+ const locator = new ChromiumBinaryLocator();
221
+ /**
222
+ * Get chromium binary path
223
+ */
224
+ export function getChromiumBinary() {
225
+ return locator.getBinary();
226
+ }
227
+ /**
228
+ * Get Playwright browser launch configuration
229
+ */
230
+ export function getPlaywrightConfig() {
231
+ return locator.getPlaywrightConfig();
232
+ }
233
+ /**
234
+ * Clear cached chromium path (for testing)
235
+ */
236
+ export function clearChromiumCache() {
237
+ locator.clearCache();
238
+ }
239
+ /**
240
+ * Export the locator class for advanced usage
241
+ */
242
+ export { ChromiumBinaryLocator };
243
+ //# sourceMappingURL=ChromiumBrowserManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChromiumBrowserManager.js","sourceRoot":"","sources":["../../src/utils/ChromiumBrowserManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAE5B;;;GAGG;AACH,MAAM,qBAAqB;IACjB,UAAU,GAA8B,SAAS,CAAC;IAE1D;;OAEG;IACK,UAAU;QAChB,6DAA6D;QAC7D,IAAI,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,CAAC;YACpD,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,EAAE,CAAC;gBACvE,OAAO,CAAC,GAAG,CAAC,gEAAgE,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,CAAC,CAAC;gBAC/H,OAAO,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC;YACzD,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,iFAAiF,OAAO,CAAC,GAAG,CAAC,mCAAmC,EAAE,CAAC,CAAC;QACnJ,CAAC;QAED,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;YAC7B,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;gBAChD,OAAO,CAAC,GAAG,CAAC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KAAK,CAAC,CAAC;QAClD,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;IAED;;OAEG;IACI,SAAS;QACd,IAAI,IAAI,CAAC,UAAU,KAAK,SAAS,EAAE,CAAC;YAClC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QACtC,CAAC;QACD,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,UAAU;QACf,IAAI,CAAC,UAAU,GAAG,SAAS,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,mBAAmB;QACxB,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;QAChC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CACb,qHAAqH,CACtH,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,CAAC;IACpC,CAAC;CACF;AAED,qBAAqB;AACrB,MAAM,OAAO,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAE5C;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,OAAO,CAAC,SAAS,EAAE,CAAC;AAC7B,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,OAAO,OAAO,CAAC,mBAAmB,EAAE,CAAC;AACvC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,81 @@
1
+ /**
2
+ * File Utilities
3
+ *
4
+ * Common file operations and path handling for tool executors
5
+ */
6
+ import fs from 'fs';
7
+ /**
8
+ * Check if a path is within a root directory
9
+ *
10
+ * @param filePath Path to check
11
+ * @param rootDir Root directory
12
+ * @returns true if path is within root, false otherwise
13
+ */
14
+ export declare function isWithinRoot(filePath: string, rootDir: string): boolean;
15
+ /**
16
+ * Make a path relative to a directory
17
+ *
18
+ * @param filePath Absolute path
19
+ * @param baseDir Base directory
20
+ * @returns Relative path
21
+ */
22
+ export declare function makeRelative(filePath: string, baseDir: string): string;
23
+ /**
24
+ * Shorten a path for display
25
+ *
26
+ * @param filePath Path to shorten
27
+ * @param maxLength Maximum length (default: 60)
28
+ * @returns Shortened path
29
+ */
30
+ export declare function shortenPath(filePath: string, maxLength?: number): string;
31
+ /**
32
+ * Read file content with line range support
33
+ *
34
+ * @param filePath Path to file
35
+ * @param offset Line offset (0-based)
36
+ * @param limit Number of lines to read
37
+ * @returns File content
38
+ */
39
+ export declare function readFileContent(filePath: string, offset?: number, limit?: number): Promise<string>;
40
+ /**
41
+ * Get file statistics
42
+ *
43
+ * @param filePath Path to file
44
+ * @returns File stats
45
+ */
46
+ export declare function getFileStats(filePath: string): Promise<fs.Stats>;
47
+ /**
48
+ * Check if file exists
49
+ *
50
+ * @param filePath Path to file
51
+ * @returns true if exists, false otherwise
52
+ */
53
+ export declare function fileExists(filePath: string): boolean;
54
+ /**
55
+ * Resolve a file path with smart fallback for common model mistakes.
56
+ *
57
+ * When a model passes a relative path that doesn't exist after resolution
58
+ * against the working directory, this tries stripping leading segments that
59
+ * duplicate the working directory name. For example, if workingDirectory is
60
+ * `/home/user/my-project` and the model passes `my-project/src/index.ts`,
61
+ * the naive resolution produces `/home/user/my-project/my-project/src/index.ts`
62
+ * (doesn't exist). The fallback strips the `my-project/` prefix and retries,
63
+ * yielding the correct `/home/user/my-project/src/index.ts`.
64
+ *
65
+ * Only returns a fallback if it (a) exists on disk and (b) passes the
66
+ * security check (within workingDirectory). Otherwise returns the original
67
+ * resolved path so the caller can produce the normal error.
68
+ *
69
+ * @param rawPath The path exactly as the model provided it
70
+ * @param workingDirectory The project root / security boundary
71
+ * @returns The resolved absolute path (fallback-corrected when possible)
72
+ */
73
+ export declare function resolveFilePath(rawPath: string, workingDirectory: string): string;
74
+ /**
75
+ * Format file size for display
76
+ *
77
+ * @param bytes File size in bytes
78
+ * @returns Formatted string (e.g., "1.5 KB")
79
+ */
80
+ export declare function formatFileSize(bytes: number): string;
81
+ //# sourceMappingURL=FileUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileUtils.d.ts","sourceRoot":"","sources":["../../src/utils/FileUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAIvE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,GAAE,MAAW,GAAG,MAAM,CAY5E;AAED;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,MAAM,EACf,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED;;;;;GAKG;AACH,wBAAsB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,EAAE,CAAC,KAAK,CAAC,CAEtE;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAiCjF;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKpD"}
@@ -0,0 +1,148 @@
1
+ /**
2
+ * File Utilities
3
+ *
4
+ * Common file operations and path handling for tool executors
5
+ */
6
+ import fs from 'fs';
7
+ import path from 'path';
8
+ /**
9
+ * Check if a path is within a root directory
10
+ *
11
+ * @param filePath Path to check
12
+ * @param rootDir Root directory
13
+ * @returns true if path is within root, false otherwise
14
+ */
15
+ export function isWithinRoot(filePath, rootDir) {
16
+ const resolved = path.resolve(filePath);
17
+ const root = path.resolve(rootDir);
18
+ return resolved.startsWith(root);
19
+ }
20
+ /**
21
+ * Make a path relative to a directory
22
+ *
23
+ * @param filePath Absolute path
24
+ * @param baseDir Base directory
25
+ * @returns Relative path
26
+ */
27
+ export function makeRelative(filePath, baseDir) {
28
+ return path.relative(baseDir, filePath);
29
+ }
30
+ /**
31
+ * Shorten a path for display
32
+ *
33
+ * @param filePath Path to shorten
34
+ * @param maxLength Maximum length (default: 60)
35
+ * @returns Shortened path
36
+ */
37
+ export function shortenPath(filePath, maxLength = 60) {
38
+ if (filePath.length <= maxLength) {
39
+ return filePath;
40
+ }
41
+ const parts = filePath.split(path.sep);
42
+ if (parts.length <= 2) {
43
+ return filePath;
44
+ }
45
+ // Keep first and last parts, abbreviate middle
46
+ return `${parts[0]}${path.sep}...${path.sep}${parts[parts.length - 1]}`;
47
+ }
48
+ /**
49
+ * Read file content with line range support
50
+ *
51
+ * @param filePath Path to file
52
+ * @param offset Line offset (0-based)
53
+ * @param limit Number of lines to read
54
+ * @returns File content
55
+ */
56
+ export async function readFileContent(filePath, offset, limit) {
57
+ const content = await fs.promises.readFile(filePath, 'utf-8');
58
+ // Return full content if no offset/limit
59
+ if (offset === undefined && limit === undefined) {
60
+ return content;
61
+ }
62
+ // Split into lines
63
+ const lines = content.split('\n');
64
+ // Apply offset and limit
65
+ const startLine = offset || 0;
66
+ const endLine = limit ? startLine + limit : lines.length;
67
+ return lines.slice(startLine, endLine).join('\n');
68
+ }
69
+ /**
70
+ * Get file statistics
71
+ *
72
+ * @param filePath Path to file
73
+ * @returns File stats
74
+ */
75
+ export async function getFileStats(filePath) {
76
+ return fs.promises.stat(filePath);
77
+ }
78
+ /**
79
+ * Check if file exists
80
+ *
81
+ * @param filePath Path to file
82
+ * @returns true if exists, false otherwise
83
+ */
84
+ export function fileExists(filePath) {
85
+ return fs.existsSync(filePath);
86
+ }
87
+ /**
88
+ * Resolve a file path with smart fallback for common model mistakes.
89
+ *
90
+ * When a model passes a relative path that doesn't exist after resolution
91
+ * against the working directory, this tries stripping leading segments that
92
+ * duplicate the working directory name. For example, if workingDirectory is
93
+ * `/home/user/my-project` and the model passes `my-project/src/index.ts`,
94
+ * the naive resolution produces `/home/user/my-project/my-project/src/index.ts`
95
+ * (doesn't exist). The fallback strips the `my-project/` prefix and retries,
96
+ * yielding the correct `/home/user/my-project/src/index.ts`.
97
+ *
98
+ * Only returns a fallback if it (a) exists on disk and (b) passes the
99
+ * security check (within workingDirectory). Otherwise returns the original
100
+ * resolved path so the caller can produce the normal error.
101
+ *
102
+ * @param rawPath The path exactly as the model provided it
103
+ * @param workingDirectory The project root / security boundary
104
+ * @returns The resolved absolute path (fallback-corrected when possible)
105
+ */
106
+ export function resolveFilePath(rawPath, workingDirectory) {
107
+ // Normalize double slashes
108
+ let filePath = rawPath.replace(/\/+/g, '/');
109
+ // Already absolute — nothing to resolve
110
+ if (path.isAbsolute(filePath)) {
111
+ return filePath;
112
+ }
113
+ // Standard resolution against working directory
114
+ const resolved = path.resolve(workingDirectory, filePath);
115
+ // If it exists, great — use it
116
+ if (fs.existsSync(resolved)) {
117
+ return resolved;
118
+ }
119
+ // --- Smart fallback: strip leading segments that match the workingDirectory basename ---
120
+ // Handles: "nexus-cortex/packages/core/..." when workingDirectory already IS nexus-cortex
121
+ const dirName = path.basename(workingDirectory);
122
+ const segments = filePath.split('/');
123
+ if (segments[0] === dirName && segments.length > 1) {
124
+ const stripped = segments.slice(1).join('/');
125
+ const fallback = path.resolve(workingDirectory, stripped);
126
+ if (fs.existsSync(fallback) && isWithinRoot(fallback, workingDirectory)) {
127
+ return fallback;
128
+ }
129
+ }
130
+ // Return original resolution (caller will produce the appropriate error)
131
+ return resolved;
132
+ }
133
+ /**
134
+ * Format file size for display
135
+ *
136
+ * @param bytes File size in bytes
137
+ * @returns Formatted string (e.g., "1.5 KB")
138
+ */
139
+ export function formatFileSize(bytes) {
140
+ if (bytes < 1024)
141
+ return `${bytes} B`;
142
+ if (bytes < 1024 * 1024)
143
+ return `${(bytes / 1024).toFixed(1)} KB`;
144
+ if (bytes < 1024 * 1024 * 1024)
145
+ return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
146
+ return `${(bytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
147
+ }
148
+ //# sourceMappingURL=FileUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileUtils.js","sourceRoot":"","sources":["../../src/utils/FileUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,OAAe;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACnC,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACnC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,OAAe;IAC5D,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,YAAoB,EAAE;IAClE,IAAI,QAAQ,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;QACjC,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvC,IAAI,KA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I,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAClE,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAClF,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,70 @@
1
+ /**
2
+ * GitPolicy — single source of truth for git/PR access control + safe subprocess wiring.
3
+ *
4
+ * Used by PRAgentTool, WorkspaceManagerTool, and the server's /v1/pr/* routes so that
5
+ * repo/action allow-listing, input validation, and token handling are consistent and
6
+ * defined in exactly one place.
7
+ *
8
+ * Security posture:
9
+ * - Validation (repo/branch/prNumber regexes) is ALWAYS enforced — there is no opt-out.
10
+ * Combined with execFile (no shell), this closes the shell/argument-injection class.
11
+ * - The repo/action allow-list is opt-in defense-in-depth. Unset GIT_ALLOWED_REPOS means
12
+ * "allow all" so existing single-user setups keep working after an upgrade;
13
+ * multi-tenant/shared deployments set it to restrict. (No startup warning — the
14
+ * trade-off is documented in .env.example so the TUI/CLI don't print noise on launch.)
15
+ * - The auth token is exposed to gh/git ONLY through the subprocess environment
16
+ * (GH_TOKEN / GITHUB_TOKEN). It is never interpolated into argv or a clone URL.
17
+ *
18
+ * Env vars (see SettingsSchema.ts / .env.example):
19
+ * - GIT_ALLOWED_REPOS comma list of owner/repo, supports `owner/*` and `*`. Default `*`.
20
+ * - GIT_ALLOWED_ACTIONS comma list of actions. Default: all actions allowed.
21
+ * - GIT_AUTH_TOKEN token for gh/git, injected into the subprocess env only.
22
+ * - GIT_HOST GitHub (Enterprise) host, default `github.com`.
23
+ */
24
+ export type GitAction = 'review' | 'list' | 'create' | 'post-review' | 'clone' | 'worktree' | 'diff' | 'cleanup' | 'status';
25
+ export declare const ALL_GIT_ACTIONS: GitAction[];
26
+ export interface GitPolicyConfig {
27
+ /** Raw GIT_ALLOWED_REPOS value (comma list of owner/repo, `owner/*`, or `*`). */
28
+ allowedRepos?: string;
29
+ /** Raw GIT_ALLOWED_ACTIONS value (comma list). Unset → all actions allowed. */
30
+ allowedActions?: string;
31
+ /** GIT_AUTH_TOKEN — injected into subprocess env as GH_TOKEN/GITHUB_TOKEN. */
32
+ token?: string;
33
+ /** GIT_HOST — GitHub Enterprise host. Default `github.com`. */
34
+ host?: string;
35
+ }
36
+ export declare class GitPolicy {
37
+ /** Parsed allow-list patterns: `*`, `owner/*`, or exact `owner/repo`. */
38
+ private readonly repoPatterns;
39
+ /** Allowed actions, or null when all actions are permitted. */
40
+ private readonly actions;
41
+ readonly token?: string;
42
+ readonly host: string;
43
+ constructor(cfg?: GitPolicyConfig);
44
+ /** Build a policy from environment variables (defaults to process.env). */
45
+ static fromEnv(env?: NodeJS.ProcessEnv): GitPolicy;
46
+ /**
47
+ * Validate a repo string: format first (blocks injection), then the allow-list.
48
+ * Returns an error message, or null when the repo is acceptable.
49
+ */
50
+ validateRepo(repo: unknown): string | null;
51
+ /** True if the (already format-valid) repo matches the allow-list. */
52
+ isRepoAllowed(repo: string): boolean;
53
+ /** Validate a branch / ref name. Returns an error message or null. */
54
+ validateBranch(name: unknown): string | null;
55
+ /** Validate a PR number (must be a positive integer). Returns an error message or null. */
56
+ validatePrNumber(n: unknown): string | null;
57
+ /** Coerce a validated PR number to an integer (call only after validatePrNumber passes). */
58
+ prNumber(n: unknown): number;
59
+ isActionAllowed(action: GitAction): boolean;
60
+ /** Returns an error message if the action is blocked, else null. */
61
+ assertAction(action: GitAction): string | null;
62
+ /**
63
+ * Subprocess environment with the auth token + host injected for gh/git.
64
+ * The token rides in env only — never on argv or in a URL.
65
+ */
66
+ subprocessEnv(base?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
67
+ /** HTTPS clone URL for an `owner/repo`, host-aware. No token embedded. */
68
+ cloneUrl(repo: string): string;
69
+ }
70
+ //# sourceMappingURL=GitPolicy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GitPolicy.d.ts","sourceRoot":"","sources":["../../src/utils/GitPolicy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,MAAM,SAAS,GACjB,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,aAAa,GACb,OAAO,GACP,UAAU,GACV,MAAM,GACN,SAAS,GACT,QAAQ,CAAC;AAEb,eAAO,MAAM,eAAe,EAAE,SAAS,EAUtC,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,8EAA8E;IAC9E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+DAA+D;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAUD,qBAAa,SAAS;IACpB,yEAAyE;IACzE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAW;IACxC,+DAA+D;IAC/D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAqB;IAC7C,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAEV,GAAG,GAAE,eAAoB;IA6BrC,2EAA2E;IAC3E,MAAM,CAAC,OAAO,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,SAAS;IAS/D;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI;IAc1C,sEAAsE;IACtE,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAapC,sEAAs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