@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,370 @@
1
+ /**
2
+ * WorkspaceManager Tool Executor
3
+ *
4
+ * Manages git worktrees for isolated multi-agent parallel development.
5
+ * Supports creating worktrees from local repos, cloning external repos,
6
+ * diffing changes, and cleanup.
7
+ *
8
+ * Security: all git/gh invocations use execFile with an argument array (no shell).
9
+ * Repo/branch inputs are validated through GitPolicy; the auth token rides only in the
10
+ * subprocess environment, never in a clone URL or on argv. See GitPolicy.ts.
11
+ */
12
+ import { BaseTool } from '../../base/index.js';
13
+ import { execFile } from 'child_process';
14
+ import { promisify } from 'util';
15
+ import { existsSync, rmSync } from 'fs';
16
+ import { join } from 'path';
17
+ import { tmpdir } from 'os';
18
+ import { randomUUID } from 'crypto';
19
+ import { GitPolicy } from '../../utils/GitPolicy.js';
20
+ const execFileAsync = promisify(execFile);
21
+ function subprocessError(error) {
22
+ const stderr = (error?.stderr || '').toString().trim();
23
+ return stderr || error?.message || 'unknown subprocess error';
24
+ }
25
+ export class WorkspaceManagerTool extends BaseTool {
26
+ workingDirectory;
27
+ policy;
28
+ constructor(config) {
29
+ super('WorkspaceManager', 'WorkspaceManager', 'Manage isolated git worktrees for multi-agent parallel development', {
30
+ type: 'object',
31
+ properties: {
32
+ mode: {
33
+ type: 'string',
34
+ enum: ['create', 'clone', 'status', 'diff', 'cleanup'],
35
+ description: 'Operation mode',
36
+ },
37
+ repo: { type: 'string', description: 'Repository path or owner/repo' },
38
+ branch: { type: 'string', description: 'Branch name for worktree' },
39
+ baseBranch: { type: 'string', description: 'Base branch for diff (default: main)' },
40
+ worktreePath: { type: 'string', description: 'Path to specific worktree' },
41
+ cloneDir: {
42
+ type: 'string',
43
+ description: 'Clone directory to remove in cleanup (from a prior clone result)',
44
+ },
45
+ maxDiffLines: { type: 'number', description: 'Max diff lines (default: 5000)' },
46
+ },
47
+ required: ['mode'],
48
+ });
49
+ this.workingDirectory = config.workingDirectory || process.cwd();
50
+ this.policy = GitPolicy.fromEnv();
51
+ }
52
+ validateToolParams(params) {
53
+ if (!['create', 'clone', 'status', 'diff', 'cleanup'].includes(params.mode)) {
54
+ return 'mode must be one of: create, clone, status, diff, cleanup';
55
+ }
56
+ // Policy action gate (worktree-family modes map to the 'worktree' action).
57
+ const action = params.mode === 'clone'
58
+ ? 'clone'
59
+ : params.mode === 'status'
60
+ ? 'status'
61
+ : params.mode === 'diff'
62
+ ? 'diff'
63
+ : params.mode === 'cleanup'
64
+ ? 'cleanup'
65
+ : 'worktree';
66
+ const actionErr = this.policy.assertAction(action);
67
+ if (actionErr)
68
+ return actionErr;
69
+ if (params.mode === 'clone' && !params.repo) {
70
+ return 'repo is required for clone mode';
71
+ }
72
+ // For clone, an owner/repo form is validated against the allow-list; explicit
73
+ // URLs / SSH remotes (containing :// or @) bypass the owner/repo regex but are
74
+ // still passed as a discrete argv element to git (no shell).
75
+ if (params.mode === 'clone' && params.repo && !/(:\/\/|@)/.test(params.repo)) {
76
+ const repoErr = this.policy.validateRepo(params.repo);
77
+ if (repoErr)
78
+ return repoErr;
79
+ }
80
+ if (params.branch !== undefined) {
81
+ const branchErr = this.policy.validateBranch(params.branch);
82
+ if (branchErr)
83
+ return branchErr;
84
+ }
85
+ if (params.baseBranch !== undefined) {
86
+ const baseErr = this.policy.validateBranch(params.baseBranch);
87
+ if (baseErr)
88
+ return baseErr;
89
+ }
90
+ if ((params.mode === 'diff' || params.mode === 'cleanup') && !params.worktreePath) {
91
+ return 'worktreePath is required for diff/cleanup mode';
92
+ }
93
+ return null;
94
+ }
95
+ async execute(params, signal) {
96
+ try {
97
+ switch (params.mode) {
98
+ case 'create':
99
+ return await this.createWorktree(params, signal);
100
+ case 'clone':
101
+ return await this.cloneAndWorktree(params, signal);
102
+ case 'status':
103
+ return await this.listWorktrees(params, signal);
104
+ case 'diff':
105
+ return await this.diffWorktree(params, signal);
106
+ case 'cleanup':
107
+ return await this.cleanupWorktree(params, signal);
108
+ default:
109
+ return this.createErrorResult(`Unknown mode: ${params.mode}`);
110
+ }
111
+ }
112
+ catch (error) {
113
+ return this.createErrorResult(`WorkspaceManager error: ${subprocessError(error)}`);
114
+ }
115
+ }
116
+ /** git invocation: execFile (no shell), policy token/host env, AbortSignal. */
117
+ git(args, cwd, signal, timeout) {
118
+ return execFileAsync('git', args, {
119
+ cwd,
120
+ encoding: 'utf-8',
121
+ maxBuffer: 10 * 1024 * 1024,
122
+ signal,
123
+ timeout,
124
+ env: this.policy.subprocessEnv(),
125
+ });
126
+ }
127
+ async createWorktree(params, signal) {
128
+ const repoPath = params.repo || this.workingDirectory;
129
+ const shortId = randomUUID().split('-')[0];
130
+ const branch = params.branch || `workspace-${shortId}`;
131
+ const worktreePath = join(tmpdir(), `workspace-${shortId}`);
132
+ // Ensure the repo path is a git repository
133
+ try {
134
+ await this.git(['rev-parse', '--git-dir'], repoPath, signal);
135
+ }
136
+ catch {
137
+ return this.createErrorResult(`Not a git repository: ${repoPath}`);
138
+ }
139
+ // Create the worktree with a new branch
140
+ const baseBranch = params.baseBranch || 'main';
141
+ try {
142
+ await this.git(['worktree', 'add', worktreePath, '-b', branch, baseBranch], repoPath, signal);
143
+ }
144
+ catch (error) {
145
+ // Try with HEAD if base branch doesn't exist
146
+ try {
147
+ await this.git(['worktree', 'add', worktreePath, '-b', branch, 'HEAD'], repoPath, signal);
148
+ }
149
+ catch (fallbackError) {
150
+ return this.createErrorResult(`Failed to create worktree: ${subprocessError(fallbackError)}`);
151
+ }
152
+ }
153
+ const result = {
154
+ mode: 'create',
155
+ worktreePath,
156
+ branch,
157
+ baseBranch,
158
+ repoPath,
159
+ };
160
+ return this.createSuccessResult(JSON.stringify(result, null, 2), {
161
+ worktreePath,
162
+ branch,
163
+ });
164
+ }
165
+ async cloneAndWorktree(params, signal) {
166
+ const repo = params.repo;
167
+ const shortId = randomUUID().split('-')[0];
168
+ const cloneDir = join(tmpdir(), `repo-${shortId}`);
169
+ const isOwnerRepo = !/(:\/\/|@)/.test(repo);
170
+ // Clone the repository. owner/repo with a token → gh repo clone (native auth/host).
171
+ // Explicit URL / SSH remote, or no gh/token → host-aware git clone.
172
+ try {
173
+ if (isOwnerRepo && (this.policy.token || (await this.ghAvailable(signal)))) {
174
+ await execFileAsync('gh', ['repo', 'clone', repo, cloneDir, '--', '--depth', '50'], {
175
+ encoding: 'utf-8',
176
+ maxBuffer: 10 * 1024 * 1024,
177
+ signal,
178
+ timeout: 120000,
179
+ env: this.policy.subprocessEnv(),
180
+ });
181
+ }
182
+ else {
183
+ const cloneUrl = isOwnerRepo ? this.policy.cloneUrl(repo) : repo;
184
+ await this.git(['clone', '--depth', '50', cloneUrl, cloneDir], undefined, signal, 120000);
185
+ }
186
+ }
187
+ catch (error) {
188
+ return this.createErrorResult(`Failed to clone ${repo}: ${subprocessError(error)}`);
189
+ }
190
+ // Optionally create a worktree branch
191
+ const branch = params.branch;
192
+ let worktreePath = cloneDir;
193
+ if (branch) {
194
+ worktreePath = join(tmpdir(), `workspace-${shortId}`);
195
+ const baseBranch = params.baseBranch || 'main';
196
+ try {
197
+ await this.git(['worktree', 'add', worktreePath, '-b', branch, baseBranch], cloneDir, signal);
198
+ }
199
+ catch {
200
+ // Worktree creation optional — still return the clone dir
201
+ worktreePath = cloneDir;
202
+ }
203
+ }
204
+ const result = {
205
+ mode: 'clone',
206
+ cloneDir,
207
+ worktreePath,
208
+ branch: branch || null,
209
+ repo,
210
+ // Echo back so the model passes both to cleanup and nothing is orphaned.
211
+ cleanupHint: { worktreePath, cloneDir },
212
+ };
213
+ return this.createSuccessResult(JSON.stringify(result, null, 2), {
214
+ worktreePath,
215
+ cloneDir,
216
+ });
217
+ }
218
+ async listWorktrees(params, signal) {
219
+ const repoPath = params.worktreePath || params.repo || this.workingDirectory;
220
+ try {
221
+ const { stdout: output } = await this.git(['worktree', 'list', '--porcelain'], repoPath, signal);
222
+ // Parse porcelain output
223
+ const worktrees = [];
224
+ let current = {};
225
+ for (const line of output.split('\n')) {
226
+ if (line.startsWith('worktree ')) {
227
+ if (current.path)
228
+ worktrees.push(current);
229
+ current = { path: line.replace('worktree ', '') };
230
+ }
231
+ else if (line.startsWith('HEAD ')) {
232
+ current.head = line.replace('HEAD ', '').substring(0, 8);
233
+ }
234
+ else if (line.startsWith('branch ')) {
235
+ current.branch = line.replace('branch refs/heads/', '');
236
+ }
237
+ }
238
+ if (current.path)
239
+ worktrees.push(current);
240
+ const result = {
241
+ mode: 'status',
242
+ worktreeCount: worktrees.length,
243
+ worktrees,
244
+ };
245
+ return this.createSuccessResult(JSON.stringify(result, null, 2));
246
+ }
247
+ catch (error) {
248
+ return this.createErrorResult(`Failed to list worktrees: ${subprocessError(error)}`);
249
+ }
250
+ }
251
+ async diffWorktree(params, signal) {
252
+ const worktreePath = params.worktreePath;
253
+ const baseBranch = params.baseBranch || 'main';
254
+ const maxLines = params.maxDiffLines || 5000;
255
+ if (!existsSync(worktreePath)) {
256
+ return this.createErrorResult(`Worktree path does not exist: ${worktreePath}`);
257
+ }
258
+ try {
259
+ // Get diff against base branch
260
+ const { stdout: diff } = await this.git(['diff', baseBranch, '--', '.'], worktreePath, signal);
261
+ // Get list of changed files
262
+ const { stdout: changedFiles } = await this.git(['diff', '--name-status', baseBranch, '--', '.'], worktreePath, signal);
263
+ // Truncate diff if needed
264
+ const lines = diff.split('\n');
265
+ const truncated = lines.length > maxLines;
266
+ const truncatedDiff = truncated
267
+ ? lines.slice(0, maxLines).join('\n') + '\n... (truncated)'
268
+ : diff;
269
+ const result = {
270
+ mode: 'diff',
271
+ worktreePath,
272
+ baseBranch,
273
+ changedFiles: changedFiles.trim().split('\n').filter(Boolean),
274
+ fileCount: changedFiles.trim().split('\n').filter(Boolean).length,
275
+ diffLines: lines.length,
276
+ truncated,
277
+ diff: truncatedDiff,
278
+ };
279
+ return this.createSuccessResult(JSON.stringify(result, null, 2));
280
+ }
281
+ catch (error) {
282
+ return this.createErrorResult(`Failed to diff worktree: ${subprocessError(error)}`);
283
+ }
284
+ }
285
+ async cleanupWorktree(params, signal) {
286
+ const worktreePath = params.worktreePath;
287
+ const removed = [];
288
+ // Find parent repo for the worktree (so we can also delete the branch it created).
289
+ let repoPath = null;
290
+ let branchName = null;
291
+ try {
292
+ const { stdout } = await this.git(['rev-parse', '--git-common-dir'], worktreePath, signal);
293
+ repoPath = stdout.trim();
294
+ if (repoPath.endsWith('/.git')) {
295
+ repoPath = repoPath.replace(/\/.git$/, '');
296
+ }
297
+ // Capture the branch checked out in this worktree, to delete it after removal.
298
+ try {
299
+ const { stdout: br } = await this.git(['rev-parse', '--abbrev-ref', 'HEAD'], worktreePath, signal);
300
+ const candidate = br.trim();
301
+ if (candidate && candidate !== 'HEAD')
302
+ branchName = candidate;
303
+ }
304
+ catch {
305
+ /* detached or gone — nothing to delete */
306
+ }
307
+ }
308
+ catch {
309
+ // If worktree doesn't exist, just try to clean up the directory
310
+ }
311
+ // Remove the worktree via git
312
+ if (repoPath) {
313
+ try {
314
+ await this.git(['worktree', 'remove', worktreePath, '--force'], repoPath, signal);
315
+ removed.push(worktreePath);
316
+ }
317
+ catch {
318
+ // Force remove the directory if git worktree remove fails
319
+ if (existsSync(worktreePath)) {
320
+ rmSync(worktreePath, { recursive: true, force: true });
321
+ removed.push(worktreePath);
322
+ }
323
+ }
324
+ // Delete the worktree's branch so workspace-* refs don't accumulate.
325
+ if (branchName) {
326
+ try {
327
+ await this.git(['branch', '-D', branchName], repoPath, signal);
328
+ }
329
+ catch {
330
+ /* non-critical */
331
+ }
332
+ }
333
+ // Prune any dangling worktrees
334
+ try {
335
+ await this.git(['worktree', 'prune'], repoPath, signal);
336
+ }
337
+ catch {
338
+ /* Non-critical */
339
+ }
340
+ }
341
+ else if (existsSync(worktreePath)) {
342
+ rmSync(worktreePath, { recursive: true, force: true });
343
+ removed.push(worktreePath);
344
+ }
345
+ // Remove the clone directory too, if this worktree came from a clone (no longer orphaned).
346
+ if (params.cloneDir && params.cloneDir !== worktreePath && existsSync(params.cloneDir)) {
347
+ rmSync(params.cloneDir, { recursive: true, force: true });
348
+ removed.push(params.cloneDir);
349
+ }
350
+ const result = {
351
+ mode: 'cleanup',
352
+ worktreePath,
353
+ branch: branchName,
354
+ removed,
355
+ cloneDirRemoved: Boolean(params.cloneDir && params.cloneDir !== worktreePath),
356
+ };
357
+ return this.createSuccessResult(JSON.stringify(result, null, 2));
358
+ }
359
+ /** Best-effort gh availability probe (used to pick the clone path). */
360
+ async ghAvailable(signal) {
361
+ try {
362
+ await execFileAsync('gh', ['--version'], { signal });
363
+ return true;
364
+ }
365
+ catch {
366
+ return false;
367
+ }
368
+ }
369
+ }
370
+ //# sourceMappingURL=WorkspaceManagerTool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WorkspaceManagerTool.js","sourceRoot":"","sources":["../../../src/implementations/execution/WorkspaceManagerTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AAEhE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,IAAI,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,SAAS,EAAkB,MAAM,0BAA0B,CAAC;AAErE,MAAM,aAAa,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;AAE1C,SAAS,eAAe,CAAC,KAAU;IACjC,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,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CAAC,CAAC;YAC1D,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAChC,CAAC;QAED,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,SAAS;YACf,YAAY;YACZ,MAAM,EAAE,UAAU;YAClB,OAAO;YACP,eAAe,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,QAAQ,KAAK,YAAY,CAAC;SAC9E,CAAC;QAEF,OAAO,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;IAED,uEAAuE;IAC/D,KAAK,CAAC,WAAW,CAAC,MAAmB;QAC3C,IAAI,CAAC;YACH,MAAM,aAAa,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;YACrD,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Execution Tool Implementations
3
+ *
4
+ * Provides shell execution and background process management
5
+ */
6
+ export * from './ShellTool.js';
7
+ export * from './BashOutputTool.js';
8
+ export * from './KillShellTool.js';
9
+ export * from './BackgroundProcessRegistry.js';
10
+ export * from './WorkspaceManagerTool.js';
11
+ export * from './CodeExecuteTool.js';
12
+ export * from './SearchToolsTool.js';
13
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/implementations/execution/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Execution Tool Implementations
3
+ *
4
+ * Provides shell execution and background process management
5
+ */
6
+ export * from './ShellTool.js';
7
+ export * from './BashOutputTool.js';
8
+ export * from './KillShellTool.js';
9
+ export * from './BackgroundProcessRegistry.js';
10
+ export * from './WorkspaceManagerTool.js';
11
+ export * from './CodeExecuteTool.js';
12
+ export * from './SearchToolsTool.js';
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/implementations/execution/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * EndTurn — generative end-of-turn attestation (Stage 1).
3
+ *
4
+ * Why: grounding/verification rules in system messages are ignored by some
5
+ * models (grok-4.3: ~0/6 on line-number fabrication); the SAME models obey
6
+ * tool mechanics (Edit `old_string`: 6/6). Routing the contract through a
7
+ * required tool converts an ignored request into an enforced checkpoint.
8
+ *
9
+ * The params are GENERATIVE, not multiple-choice: the model must re-derive
10
+ * each reference's verbatim source, paste the actual command output it saw,
11
+ * and write a skeptical self-review. A label can be rubber-stamped (Stage-1
12
+ * enum leaked 1/6); producing the evidence cannot — the act of
13
+ * reconstructing it forces the lookup and surfaces missed errors in latent
14
+ * space before the final message. Stage 1 does NOT verify server-side; it
15
+ * echoes the model's own self_review + sources back so it must act on them
16
+ * before finalizing. Server-side cross-check is Stage 2.
17
+ */
18
+ import { BaseTool, type ToolResult } from '../../base/index.js';
19
+ export interface CitationEvidence {
20
+ /** The claim/reference as it appears in the drafted answer. */
21
+ reference: string;
22
+ /** The EXACT token transcribed from THIS turn's tool output that grounds
23
+ * it (verbatim code line, URL from a fetched page, API signature). */
24
+ verbatim_source: string;
25
+ }
26
+ export interface VerificationEvidence {
27
+ /** The command run this turn (build/test/lint). */
28
+ command: string;
29
+ /** The actual result line observed in this turn's tool output. */
30
+ observed_result: string;
31
+ }
32
+ export interface EndTurnParams {
33
+ /** One entry per specific reference in the answer. Empty = none cited. */
34
+ citations: CitationEvidence[];
35
+ /** One entry per verification command actually run. Empty = none asked. */
36
+ verification: VerificationEvidence[];
37
+ /** One sentence: what was delivered this turn. */
38
+ summary: string;
39
+ /** Anything unverified/assumed/incomplete. Empty array if nothing. */
40
+ open_items: string[];
41
+ /** Skeptical re-read of the drafted answer: what was NOT checked, what is
42
+ * assumed/possibly wrong, what one more tool call would verify. */
43
+ self_review: string;
44
+ }
45
+ export declare class EndTurnToolExecutor extends BaseTool<EndTurnParams, ToolResult> {
46
+ constructor();
47
+ /**
48
+ * Coerce a raw attestation into a well-formed shape. Absent arrays become []
49
+ * ("empty = none" per the field docs); malformed array items are dropped
50
+ * rather than rejected. This makes EndTurn non-blocking at the executor level
51
+ * — the strict, MEANINGFUL rejection (a verbatim_source not grounded in this
52
+ * turn's tool output) is enforced by the orchestrator's Stage-2 grounding
53
+ * check when CORTEX_ENDTURN_GATE is on, where it belongs. A blunt
54
+ * validate-and-reject here only produced retry loops that ended in the model
55
+ * giving up with NO attestation at all — strictly worse than a sparse one.
56
+ */
57
+ private normalizeParams;
58
+ validateToolParams(params: EndTurnParams): string | null;
59
+ getDescription(params: EndTurnParams): string;
60
+ execute(rawParams: EndTurnParams, _signal: AbortSignal): Promise<ToolResult>;
61
+ }
62
+ //# sourceMappingURL=EndTurnTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EndTurnTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/extensions/EndTurnTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEhE,MAAM,WAAW,gBAAgB;IAC/B,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB;2EACuE;IACvE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,oBAAoB;IACnC,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,aAAa;IAC5B,0EAA0E;IAC1E,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,2EAA2E;IAC3E,YAAY,EAAE,oBAAoB,EAAE,CAAC;IACrC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB;wEACoE;IACpE,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,mBAAoB,SAAQ,QAAQ,CAAC,aAAa,EAAE,UAAU,CAAC;;IAsE1E;;;;;;;;;OASG;IACH,OAAO,CAAC,eAAe;IAoCvB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,GAAG,IAAI;IAQxD,cAAc,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM;IAMvC,OAAO,CAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;CAmDnF"}