@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,138 @@
1
+ /**
2
+ * ArtifactRegistry - Unified registry for all artifacts and sessions
3
+ *
4
+ * Consolidates the previous split between:
5
+ * - SandboxRegistry (.addon-tools/registry.json)
6
+ * - SessionPersistence (.cortex/tmux-sessions/metadata/)
7
+ *
8
+ * New unified structure:
9
+ * .cortex/
10
+ * └── artifacts/
11
+ * ├── registry.json # Master registry
12
+ * └── <artifact-id>/ # One directory per artifact
13
+ * ├── metadata.json # Type, runtime, ports, etc.
14
+ * ├── workspace/ # Code files
15
+ * ├── tmux/ # Tmux-specific data (if applicable)
16
+ * └── snapshots/ # Historical captures
17
+ */
18
+ export type ArtifactType = 'web-app' | 'cli-tool' | 'script' | 'service';
19
+ export type ArtifactRuntime = 'tmux+node' | 'tmux+python' | 'tmux+http-server' | 'tmux+rust' | 'tmux+go' | 'tmux+shell' | 'tmux+custom' | 'tmux+other' | 'process' | 'docker';
20
+ export type ArtifactMode = 'oneshot' | 'dev' | 'persistent';
21
+ /**
22
+ * Unified artifact metadata (combines sandbox + tmux session info)
23
+ */
24
+ export interface ArtifactMetadata {
25
+ id: string;
26
+ name: string;
27
+ type: ArtifactType;
28
+ runtime: ArtifactRuntime;
29
+ created: string;
30
+ lastUsed: string;
31
+ workspaceDir: string;
32
+ entryPoint?: string;
33
+ mode: ArtifactMode;
34
+ port?: number;
35
+ url?: string;
36
+ pid?: number;
37
+ tmuxSession?: string;
38
+ description?: string;
39
+ tags?: string[];
40
+ env?: Record<string, string>;
41
+ metadata?: Record<string, any>;
42
+ }
43
+ /**
44
+ * Master registry schema (v2.0.0)
45
+ */
46
+ export interface ArtifactRegistrySchema {
47
+ version: '2.0.0';
48
+ artifacts: Record<string, ArtifactMetadata>;
49
+ }
50
+ /**
51
+ * ArtifactRegistry - Singleton for unified artifact/session management
52
+ */
53
+ export declare class ArtifactRegistry {
54
+ private static instance;
55
+ private registryPath;
56
+ private artifactsDir;
57
+ private registry;
58
+ private initialized;
59
+ private constructor();
60
+ /**
61
+ * Get singleton instance
62
+ */
63
+ static getInstance(projectRoot: string): ArtifactRegistry;
64
+ /**
65
+ * Initialize registry (load from disk or create)
66
+ */
67
+ initialize(): Promise<void>;
68
+ /**
69
+ * Register a new artifact
70
+ */
71
+ register(metadata: ArtifactMetadata): Promise<void>;
72
+ /**
73
+ * Update artifact metadata
74
+ */
75
+ update(id: string, updates: Partial<ArtifactMetadata>): Promise<void>;
76
+ /**
77
+ * Get artifact by ID
78
+ */
79
+ get(id: string): Promise<ArtifactMetadata | null>;
80
+ /**
81
+ * List all artifacts
82
+ */
83
+ list(): Promise<ArtifactMetadata[]>;
84
+ /**
85
+ * Remove artifact
86
+ */
87
+ remove(id: string): Promise<void>;
88
+ /**
89
+ * Get artifact workspace directory
90
+ */
91
+ getWorkspaceDir(id: string): string;
92
+ /**
93
+ * Get artifact tmux directory
94
+ */
95
+ getTmuxDir(id: string): string;
96
+ /**
97
+ * Get artifact snapshots directory
98
+ */
99
+ getSnapshotsDir(id: string): string;
100
+ /**
101
+ * Save registry to disk
102
+ */
103
+ private save;
104
+ /**
105
+ * Migrate from old registry format
106
+ */
107
+ private migrateRegistry;
108
+ /**
109
+ * Find artifacts by type
110
+ */
111
+ findByType(type: ArtifactType): Promise<ArtifactMetadata[]>;
112
+ /**
113
+ * Find artifacts by runtime
114
+ */
115
+ findByRuntime(runtime: ArtifactRuntime): Promise<ArtifactMetadata[]>;
116
+ /**
117
+ * Find artifact by tmux session ID
118
+ */
119
+ findByTmuxSession(sessionId: string): Promise<ArtifactMetadata | null>;
120
+ /**
121
+ * Get all ports currently in use by artifacts
122
+ */
123
+ getUsedPorts(): number[];
124
+ /**
125
+ * Get all artifacts (synchronous version for use in registry queries)
126
+ */
127
+ getAll(): ArtifactMetadata[];
128
+ /**
129
+ * Get registry statistics
130
+ */
131
+ getStats(): Promise<{
132
+ total: number;
133
+ byType: Record<ArtifactType, number>;
134
+ byRuntime: Record<ArtifactRuntime, number>;
135
+ byMode: Record<ArtifactMode, number>;
136
+ }>;
137
+ }
138
+ //# sourceMappingURL=ArtifactRegistry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArtifactRegistry.d.ts","sourceRoot":"","sources":["../../src/utils/ArtifactRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAKH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AACzE,MAAM,MAAM,eAAe,GACvB,WAAW,GACX,aAAa,GACb,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,YAAY,GACZ,aAAa,GACb,YAAY,GACZ,SAAS,GACT,QAAQ,CAAC;AACb,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,KAAK,GAAG,YAAY,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAE/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IAGzB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IAGjB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,YAAY,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IAGb,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE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AEG;YACW,IAAI;IAOlB;;OAEG;YACW,eAAe;IAY7B;;OAEG;IACU,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAKxE;;OAEG;IACU,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAKjF;;OAEG;IACU,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAMnF;;OAEG;IACI,YAAY,IAAI,MAAM,EAAE;IAU/B;;OAEG;IACI,MAAM,IAAI,gBAAgB,EAAE;IAInC;;OAEG;IACU,QAAQ,IAAI,OAAO,CAAC;QAC/B,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QACrC,SAAS,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;QAC3C,MAAM,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;KACtC,CAAC;CAmBH"}
@@ -0,0 +1,259 @@
1
+ /**
2
+ * ArtifactRegistry - Unified registry for all artifacts and sessions
3
+ *
4
+ * Consolidates the previous split between:
5
+ * - SandboxRegistry (.addon-tools/registry.json)
6
+ * - SessionPersistence (.cortex/tmux-sessions/metadata/)
7
+ *
8
+ * New unified structure:
9
+ * .cortex/
10
+ * └── artifacts/
11
+ * ├── registry.json # Master registry
12
+ * └── <artifact-id>/ # One directory per artifact
13
+ * ├── metadata.json # Type, runtime, ports, etc.
14
+ * ├── workspace/ # Code files
15
+ * ├── tmux/ # Tmux-specific data (if applicable)
16
+ * └── snapshots/ # Historical captures
17
+ */
18
+ import { promises as fs } from 'fs';
19
+ import { join } from 'path';
20
+ /**
21
+ * ArtifactRegistry - Singleton for unified artifact/session management
22
+ */
23
+ export class ArtifactRegistry {
24
+ static instance;
25
+ registryPath;
26
+ artifactsDir;
27
+ registry;
28
+ initialized = false;
29
+ constructor(projectRoot) {
30
+ this.artifactsDir = join(projectRoot, '.cortex', 'artifacts');
31
+ this.registryPath = join(this.artifactsDir, 'registry.json');
32
+ this.registry = {
33
+ version: '2.0.0',
34
+ artifacts: {}
35
+ };
36
+ }
37
+ /**
38
+ * Get singleton instance
39
+ */
40
+ static getInstance(projectRoot) {
41
+ if (!ArtifactRegistry.instance) {
42
+ ArtifactRegistry.instance = new ArtifactRegistry(projectRoot);
43
+ }
44
+ return ArtifactRegistry.instance;
45
+ }
46
+ /**
47
+ * Initialize registry (load from disk or create)
48
+ */
49
+ async initialize() {
50
+ if (this.initialized)
51
+ return;
52
+ try {
53
+ // Ensure artifacts directory exists
54
+ await fs.mkdir(this.artifactsDir, { recursive: true });
55
+ // Load existing registry or create new
56
+ try {
57
+ const content = await fs.readFile(this.registryPath, 'utf-8');
58
+ this.registry = JSON.parse(content);
59
+ // Validate version
60
+ if (this.registry.version !== '2.0.0') {
61
+ console.warn(`⚠ Registry version mismatch: ${this.registry.version}. Migrating to 2.0.0...`);
62
+ await this.migrateRegistry();
63
+ }
64
+ }
65
+ catch (error) {
66
+ if (error.code === 'ENOENT') {
67
+ // No registry exists, start fresh. Log to stderr (not stdout) with a
68
+ // text label — stdout must stay clean for --json consumers (e.g. the
69
+ // auto-research Fixer parsing `cortex autoresearch fix --json`), and
70
+ // no emojis in production output.
71
+ await this.save();
72
+ console.error(`[INIT] Created new artifact registry at ${this.registryPath}`);
73
+ }
74
+ else {
75
+ throw error;
76
+ }
77
+ }
78
+ this.initialized = true;
79
+ }
80
+ catch (error) {
81
+ console.error(`Failed to initialize ArtifactRegistry: ${error.message}`);
82
+ throw error;
83
+ }
84
+ }
85
+ /**
86
+ * Register a new artifact
87
+ */
88
+ async register(metadata) {
89
+ if (!this.initialized)
90
+ await this.initialize();
91
+ // Create artifact directory structure
92
+ const artifactDir = join(this.artifactsDir, metadata.id);
93
+ await fs.mkdir(artifactDir, { recursive: true });
94
+ await fs.mkdir(join(artifactDir, 'workspace'), { recursive: true });
95
+ if (metadata.tmuxSession) {
96
+ await fs.mkdir(join(artifactDir, 'tmux'), { recursive: true });
97
+ }
98
+ await fs.mkdir(join(artifactDir, 'snapshots'), { recursive: true });
99
+ // Write metadata file
100
+ await fs.writeFile(join(artifactDir, 'metadata.json'), JSON.stringify(metadata, null, 2));
101
+ // Add to registry
102
+ this.registry.artifacts[metadata.id] = metadata;
103
+ await this.save();
104
+ }
105
+ /**
106
+ * Update artifact metadata
107
+ */
108
+ async update(id, updates) {
109
+ if (!this.initialized)
110
+ await this.initialize();
111
+ const artifact = this.registry.artifacts[id];
112
+ if (!artifact) {
113
+ throw new Error(`Artifact not found: ${id}`);
114
+ }
115
+ // Merge updates
116
+ Object.assign(artifact, updates);
117
+ artifact.lastUsed = new Date().toISOString();
118
+ // Update metadata file
119
+ const artifactDir = join(this.artifactsDir, id);
120
+ await fs.writeFile(join(artifactDir, 'metadata.json'), JSON.stringify(artifact, null, 2));
121
+ // Update registry
122
+ this.registry.artifacts[id] = artifact;
123
+ await this.save();
124
+ }
125
+ /**
126
+ * Get artifact by ID
127
+ */
128
+ async get(id) {
129
+ if (!this.initialized)
130
+ await this.initialize();
131
+ return this.registry.artifacts[id] || null;
132
+ }
133
+ /**
134
+ * List all artifacts
135
+ */
136
+ async list() {
137
+ if (!this.initialized)
138
+ await this.initialize();
139
+ return Object.values(this.registry.artifacts);
140
+ }
141
+ /**
142
+ * Remove artifact
143
+ */
144
+ async remove(id) {
145
+ if (!this.initialized)
146
+ await this.initialize();
147
+ const artifact = this.registry.artifacts[id];
148
+ if (!artifact)
149
+ return;
150
+ // Remove artifact directory
151
+ const artifactDir = join(this.artifactsDir, id);
152
+ await fs.rm(artifactDir, { recursive: true, force: true });
153
+ // Remove from registry
154
+ delete this.registry.artifacts[id];
155
+ await this.save();
156
+ }
157
+ /**
158
+ * Get artifact workspace directory
159
+ */
160
+ getWorkspaceDir(id) {
161
+ return join(this.artifactsDir, id, 'workspace');
162
+ }
163
+ /**
164
+ * Get artifact tmux directory
165
+ */
166
+ getTmuxDir(id) {
167
+ return join(this.artifactsDir, id, 'tmux');
168
+ }
169
+ /**
170
+ * Get artifact snapshots directory
171
+ */
172
+ getSnapshotsDir(id) {
173
+ return join(this.artifactsDir, id, 'snapshots');
174
+ }
175
+ /**
176
+ * Save registry to disk
177
+ */
178
+ async save() {
179
+ await fs.writeFile(this.registryPath, JSON.stringify(this.registry, null, 2));
180
+ }
181
+ /**
182
+ * Migrate from old registry format
183
+ */
184
+ async migrateRegistry() {
185
+ // This will handle migration from v1.0.0 (SandboxRegistry) format
186
+ // For now, just reset to v2.0.0
187
+ console.log('Performing registry migration...');
188
+ this.registry = {
189
+ version: '2.0.0',
190
+ artifacts: {}
191
+ };
192
+ await this.save();
193
+ console.log('[OK] Registry migration complete');
194
+ }
195
+ /**
196
+ * Find artifacts by type
197
+ */
198
+ async findByType(type) {
199
+ if (!this.initialized)
200
+ await this.initialize();
201
+ return Object.values(this.registry.artifacts).filter(a => a.type === type);
202
+ }
203
+ /**
204
+ * Find artifacts by runtime
205
+ */
206
+ async findByRuntime(runtime) {
207
+ if (!this.initialized)
208
+ await this.initialize();
209
+ return Object.values(this.registry.artifacts).filter(a => a.runtime === runtime);
210
+ }
211
+ /**
212
+ * Find artifact by tmux session ID
213
+ */
214
+ async findByTmuxSession(sessionId) {
215
+ if (!this.initialized)
216
+ await this.initialize();
217
+ const artifacts = Object.values(this.registry.artifacts);
218
+ return artifacts.find(a => a.tmuxSession === sessionId) || null;
219
+ }
220
+ /**
221
+ * Get all ports currently in use by artifacts
222
+ */
223
+ getUsedPorts() {
224
+ const ports = [];
225
+ for (const artifact of Object.values(this.registry.artifacts)) {
226
+ if (artifact.port) {
227
+ ports.push(artifact.port);
228
+ }
229
+ }
230
+ return ports;
231
+ }
232
+ /**
233
+ * Get all artifacts (synchronous version for use in registry queries)
234
+ */
235
+ getAll() {
236
+ return Object.values(this.registry.artifacts);
237
+ }
238
+ /**
239
+ * Get registry statistics
240
+ */
241
+ async getStats() {
242
+ if (!this.initialized)
243
+ await this.initialize();
244
+ const artifacts = Object.values(this.registry.artifacts);
245
+ const stats = {
246
+ total: artifacts.length,
247
+ byType: {},
248
+ byRuntime: {},
249
+ byMode: {}
250
+ };
251
+ artifacts.forEach(a => {
252
+ stats.byType[a.type] = (stats.byType[a.type] || 0) + 1;
253
+ stats.byRuntime[a.runtime] = (stats.byRuntime[a.runtime] || 0) + 1;
254
+ stats.byMode[a.mode] = (stats.byMode[a.mode] || 0) + 1;
255
+ });
256
+ return stats;
257
+ }
258
+ }
259
+ //# sourceMappingURL=ArtifactRegistry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArtifactRegistry.js","sourceRoot":"","sources":["../../src/utils/ArtifactRegistry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AA0D5B;;GAEG;AACH,MAAM,OAAO,gBAAgB;IACnB,MAAM,CAAC,QAAQ,CAAmB;IAClC,YAAY,CAAS;IACrB,YAAY,CAAS;IACrB,QAAQ,CAAyB;IACjC,WAAW,GAAY,KAAK,CAAC;IAErC,YAAoB,WAAmB;QACrC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;QAC9D,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;QAC7D,IAAI,CAAC,QAAQ,GAAG;YACd,OAAO,EAAE,OAAO;YAChB,SAAS,EAAE,EAAE;SACd,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,WAAW,CAAC,WAAmB;QAC3C,IAAI,CAAC,gBAAgB,CAAC,QAAQ,EAAE,CAAC;YAC/B,gBAAgB,CAAC,QAAQ,GAAG,IAAI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D,CAAC,CAAC,CAAC;QAEH,OAAO,KAAK,CAAC;IACf,CAAC;CACF"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * ChromiumBinaryLocator - Robust chromium binary discovery
3
+ * Searches multiple locations with priority order and validation
4
+ */
5
+ declare class ChromiumBinaryLocator {
6
+ private cachedPath;
7
+ /**
8
+ * Find chromium binary with comprehensive search
9
+ */
10
+ private findBinary;
11
+ /**
12
+ * Search nix store for chromium binaries
13
+ */
14
+ private findChromiumInNixStore;
15
+ /**
16
+ * Find chromium in Playwright's cache directory
17
+ */
18
+ private findPlaywrightCachedChromium;
19
+ /**
20
+ * Check if path is an executable file
21
+ */
22
+ private isExecutable;
23
+ /**
24
+ * Get chromium binary path (cached)
25
+ */
26
+ getBinary(): string | null;
27
+ /**
28
+ * Clear cached path (for testing)
29
+ */
30
+ clearCache(): void;
31
+ /**
32
+ * Get browser configuration for Playwright
33
+ */
34
+ getPlaywrightConfig(): {
35
+ executablePath?: string;
36
+ };
37
+ }
38
+ /**
39
+ * Get chromium binary path
40
+ */
41
+ export declare function getChromiumBinary(): string | null;
42
+ /**
43
+ * Get Playwright browser launch configuration
44
+ */
45
+ export declare function getPlaywrightConfig(): {
46
+ executablePath?: string;
47
+ };
48
+ /**
49
+ * Clear cached chromium path (for testing)
50
+ */
51
+ export declare function clearChromiumCache(): void;
52
+ /**
53
+ * Export the locator class for advanced usage
54
+ */
55
+ export { ChromiumBinaryLocator };
56
+ //# sourceMappingURL=ChromiumBrowserManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChromiumBrowserManager.d.ts","sourceRoot":"","sources":["../../src/utils/ChromiumBrowserManager.ts"],"names":[],"mappings":"AAOA;;;GAGG;AACH,cAAM,qBAAqB;IACzB,OAAO,CAAC,UAAU,CAAwC;IAE1D;;OAEG;IACH,OAAO,CAAC,UAAU;IAkGlB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6B9B;;OAEG;IACH,OAAO,CAAC,4BAA4B;IA+CpC;;OAEG;IACH,OAAO,CAAC,YAAY;IAWpB;;OAEG;IACI,SAAS,IAAI,MAAM,GAAG,IAAI;IAOjC;;OAEG;IACI,UAAU,IAAI,IAAI;IAIzB;;OAEG;IACI,mBAAmB,IAAI;QAAE,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE;CAS1D;AAKD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,GAAG,IAAI,CAEjD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,CAEjE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED;;GAEG;AACH,OAAO,EAAE,qBAAqB,EAAE,CAAC"}