@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.
- package/LICENSE +202 -0
- package/NOTICE +2 -0
- package/README.md +13 -0
- package/dist/ExecutorRegistry.d.ts +89 -0
- package/dist/ExecutorRegistry.d.ts.map +1 -0
- package/dist/ExecutorRegistry.js +219 -0
- package/dist/ExecutorRegistry.js.map +1 -0
- package/dist/base/BaseTool.d.ts +108 -0
- package/dist/base/BaseTool.d.ts.map +1 -0
- package/dist/base/BaseTool.js +111 -0
- package/dist/base/BaseTool.js.map +1 -0
- package/dist/base/ToolRegistry.d.ts +141 -0
- package/dist/base/ToolRegistry.d.ts.map +1 -0
- package/dist/base/ToolRegistry.js +241 -0
- package/dist/base/ToolRegistry.js.map +1 -0
- package/dist/base/ToolResult.d.ts +63 -0
- package/dist/base/ToolResult.d.ts.map +1 -0
- package/dist/base/ToolResult.js +8 -0
- package/dist/base/ToolResult.js.map +1 -0
- package/dist/base/index.d.ts +10 -0
- package/dist/base/index.d.ts.map +1 -0
- package/dist/base/index.js +8 -0
- package/dist/base/index.js.map +1 -0
- package/dist/implementations/addon/CreateArtifactTool.d.ts +221 -0
- package/dist/implementations/addon/CreateArtifactTool.d.ts.map +1 -0
- package/dist/implementations/addon/CreateArtifactTool.js +1042 -0
- package/dist/implementations/addon/CreateArtifactTool.js.map +1 -0
- package/dist/implementations/addon/FrameDiffCache.d.ts +166 -0
- package/dist/implementations/addon/FrameDiffCache.d.ts.map +1 -0
- package/dist/implementations/addon/FrameDiffCache.js +395 -0
- package/dist/implementations/addon/FrameDiffCache.js.map +1 -0
- package/dist/implementations/addon/H264StreamEncoder.d.ts +84 -0
- package/dist/implementations/addon/H264StreamEncoder.d.ts.map +1 -0
- package/dist/implementations/addon/H264StreamEncoder.js +203 -0
- package/dist/implementations/addon/H264StreamEncoder.js.map +1 -0
- package/dist/implementations/addon/HybridScreenshotManager.d.ts +197 -0
- package/dist/implementations/addon/HybridScreenshotManager.d.ts.map +1 -0
- package/dist/implementations/addon/HybridScreenshotManager.js +415 -0
- package/dist/implementations/addon/HybridScreenshotManager.js.map +1 -0
- package/dist/implementations/addon/InspectSandboxTool.d.ts +54 -0
- package/dist/implementations/addon/InspectSandboxTool.d.ts.map +1 -0
- package/dist/implementations/addon/InspectSandboxTool.js +226 -0
- package/dist/implementations/addon/InspectSandboxTool.js.map +1 -0
- package/dist/implementations/addon/InteractWithSandboxTool.d.ts +90 -0
- package/dist/implementations/addon/InteractWithSandboxTool.d.ts.map +1 -0
- package/dist/implementations/addon/InteractWithSandboxTool.js +367 -0
- package/dist/implementations/addon/InteractWithSandboxTool.js.map +1 -0
- package/dist/implementations/addon/KeyframeDetector.d.ts +140 -0
- package/dist/implementations/addon/KeyframeDetector.d.ts.map +1 -0
- package/dist/implementations/addon/KeyframeDetector.js +390 -0
- package/dist/implementations/addon/KeyframeDetector.js.map +1 -0
- package/dist/implementations/addon/ModifySandboxTool.d.ts +62 -0
- package/dist/implementations/addon/ModifySandboxTool.d.ts.map +1 -0
- package/dist/implementations/addon/ModifySandboxTool.js +266 -0
- package/dist/implementations/addon/ModifySandboxTool.js.map +1 -0
- package/dist/implementations/addon/ReactArtifactBuilder.d.ts +27 -0
- package/dist/implementations/addon/ReactArtifactBuilder.d.ts.map +1 -0
- package/dist/implementations/addon/ReactArtifactBuilder.js +198 -0
- package/dist/implementations/addon/ReactArtifactBuilder.js.map +1 -0
- package/dist/implementations/addon/SandboxEventBroadcaster.d.ts +143 -0
- package/dist/implementations/addon/SandboxEventBroadcaster.d.ts.map +1 -0
- package/dist/implementations/addon/SandboxEventBroadcaster.js +258 -0
- package/dist/implementations/addon/SandboxEventBroadcaster.js.map +1 -0
- package/dist/implementations/addon/SandboxIntrospectionTools.d.ts +77 -0
- package/dist/implementations/addon/SandboxIntrospectionTools.d.ts.map +1 -0
- package/dist/implementations/addon/SandboxIntrospectionTools.js +292 -0
- package/dist/implementations/addon/SandboxIntrospectionTools.js.map +1 -0
- package/dist/implementations/addon/SandboxViewServer.d.ts +127 -0
- package/dist/implementations/addon/SandboxViewServer.d.ts.map +1 -0
- package/dist/implementations/addon/SandboxViewServer.js +775 -0
- package/dist/implementations/addon/SandboxViewServer.js.map +1 -0
- package/dist/implementations/addon/ScreenStream.d.ts +149 -0
- package/dist/implementations/addon/ScreenStream.d.ts.map +1 -0
- package/dist/implementations/addon/ScreenStream.js +306 -0
- package/dist/implementations/addon/ScreenStream.js.map +1 -0
- package/dist/implementations/addon/StopSandboxTool.d.ts +61 -0
- package/dist/implementations/addon/StopSandboxTool.d.ts.map +1 -0
- package/dist/implementations/addon/StopSandboxTool.js +252 -0
- package/dist/implementations/addon/StopSandboxTool.js.map +1 -0
- package/dist/implementations/addon/TerminalSandbox.d.ts +111 -0
- package/dist/implementations/addon/TerminalSandbox.d.ts.map +1 -0
- package/dist/implementations/addon/TerminalSandbox.js +345 -0
- package/dist/implementations/addon/TerminalSandbox.js.map +1 -0
- package/dist/implementations/addon/VisualFeedbackBridge.d.ts +367 -0
- package/dist/implementations/addon/VisualFeedbackBridge.d.ts.map +1 -0
- package/dist/implementations/addon/VisualFeedbackBridge.js +888 -0
- package/dist/implementations/addon/VisualFeedbackBridge.js.map +1 -0
- package/dist/implementations/addon/WindowManager.d.ts +138 -0
- package/dist/implementations/addon/WindowManager.d.ts.map +1 -0
- package/dist/implementations/addon/WindowManager.js +276 -0
- package/dist/implementations/addon/WindowManager.js.map +1 -0
- package/dist/implementations/addon/index.d.ts +29 -0
- package/dist/implementations/addon/index.d.ts.map +1 -0
- package/dist/implementations/addon/index.js +29 -0
- package/dist/implementations/addon/index.js.map +1 -0
- package/dist/implementations/addon/injectables/reactIntrospection.d.ts +57 -0
- package/dist/implementations/addon/injectables/reactIntrospection.d.ts.map +1 -0
- package/dist/implementations/addon/injectables/reactIntrospection.js +480 -0
- package/dist/implementations/addon/injectables/reactIntrospection.js.map +1 -0
- package/dist/implementations/addon/terminal-client.html +253 -0
- package/dist/implementations/agent/PRAgentTool.d.ts +37 -0
- package/dist/implementations/agent/PRAgentTool.d.ts.map +1 -0
- package/dist/implementations/agent/PRAgentTool.js +257 -0
- package/dist/implementations/agent/PRAgentTool.js.map +1 -0
- package/dist/implementations/agent/TaskTool.d.ts +76 -0
- package/dist/implementations/agent/TaskTool.d.ts.map +1 -0
- package/dist/implementations/agent/TaskTool.js +424 -0
- package/dist/implementations/agent/TaskTool.js.map +1 -0
- package/dist/implementations/agent/index.d.ts +5 -0
- package/dist/implementations/agent/index.d.ts.map +1 -0
- package/dist/implementations/agent/index.js +3 -0
- package/dist/implementations/agent/index.js.map +1 -0
- package/dist/implementations/execution/BackgroundProcessRegistry.d.ts +68 -0
- package/dist/implementations/execution/BackgroundProcessRegistry.d.ts.map +1 -0
- package/dist/implementations/execution/BackgroundProcessRegistry.js +146 -0
- package/dist/implementations/execution/BackgroundProcessRegistry.js.map +1 -0
- package/dist/implementations/execution/BashOutputTool.d.ts +42 -0
- package/dist/implementations/execution/BashOutputTool.d.ts.map +1 -0
- package/dist/implementations/execution/BashOutputTool.js +168 -0
- package/dist/implementations/execution/BashOutputTool.js.map +1 -0
- package/dist/implementations/execution/CodeExecuteTool.d.ts +31 -0
- package/dist/implementations/execution/CodeExecuteTool.d.ts.map +1 -0
- package/dist/implementations/execution/CodeExecuteTool.js +127 -0
- package/dist/implementations/execution/CodeExecuteTool.js.map +1 -0
- package/dist/implementations/execution/KillShellTool.d.ts +37 -0
- package/dist/implementations/execution/KillShellTool.d.ts.map +1 -0
- package/dist/implementations/execution/KillShellTool.js +144 -0
- package/dist/implementations/execution/KillShellTool.js.map +1 -0
- package/dist/implementations/execution/SearchToolsTool.d.ts +32 -0
- package/dist/implementations/execution/SearchToolsTool.d.ts.map +1 -0
- package/dist/implementations/execution/SearchToolsTool.js +109 -0
- package/dist/implementations/execution/SearchToolsTool.js.map +1 -0
- package/dist/implementations/execution/ShellTool.d.ts +108 -0
- package/dist/implementations/execution/ShellTool.d.ts.map +1 -0
- package/dist/implementations/execution/ShellTool.js +546 -0
- package/dist/implementations/execution/ShellTool.js.map +1 -0
- package/dist/implementations/execution/WorkspaceManagerTool.d.ts +40 -0
- package/dist/implementations/execution/WorkspaceManagerTool.d.ts.map +1 -0
- package/dist/implementations/execution/WorkspaceManagerTool.js +370 -0
- package/dist/implementations/execution/WorkspaceManagerTool.js.map +1 -0
- package/dist/implementations/execution/index.d.ts +13 -0
- package/dist/implementations/execution/index.d.ts.map +1 -0
- package/dist/implementations/execution/index.js +13 -0
- package/dist/implementations/execution/index.js.map +1 -0
- package/dist/implementations/extensions/EndTurnTool.d.ts +62 -0
- package/dist/implementations/extensions/EndTurnTool.d.ts.map +1 -0
- package/dist/implementations/extensions/EndTurnTool.js +172 -0
- package/dist/implementations/extensions/EndTurnTool.js.map +1 -0
- package/dist/implementations/extensions/ResearchBacklogTool.d.ts +37 -0
- package/dist/implementations/extensions/ResearchBacklogTool.d.ts.map +1 -0
- package/dist/implementations/extensions/ResearchBacklogTool.js +102 -0
- package/dist/implementations/extensions/ResearchBacklogTool.js.map +1 -0
- package/dist/implementations/extensions/SkillTool.d.ts +108 -0
- package/dist/implementations/extensions/SkillTool.d.ts.map +1 -0
- package/dist/implementations/extensions/SkillTool.js +351 -0
- package/dist/implementations/extensions/SkillTool.js.map +1 -0
- package/dist/implementations/extensions/SlashCommandTool.d.ts +112 -0
- package/dist/implementations/extensions/SlashCommandTool.d.ts.map +1 -0
- package/dist/implementations/extensions/SlashCommandTool.js +315 -0
- package/dist/implementations/extensions/SlashCommandTool.js.map +1 -0
- package/dist/implementations/extensions/index.d.ts +14 -0
- package/dist/implementations/extensions/index.d.ts.map +1 -0
- package/dist/implementations/extensions/index.js +10 -0
- package/dist/implementations/extensions/index.js.map +1 -0
- package/dist/implementations/file/EditTool.d.ts +232 -0
- package/dist/implementations/file/EditTool.d.ts.map +1 -0
- package/dist/implementations/file/EditTool.js +707 -0
- package/dist/implementations/file/EditTool.js.map +1 -0
- package/dist/implementations/file/ReadFileTool.d.ts +49 -0
- package/dist/implementations/file/ReadFileTool.d.ts.map +1 -0
- package/dist/implementations/file/ReadFileTool.js +225 -0
- package/dist/implementations/file/ReadFileTool.js.map +1 -0
- package/dist/implementations/file/WriteBinaryTool.d.ts +21 -0
- package/dist/implementations/file/WriteBinaryTool.d.ts.map +1 -0
- package/dist/implementations/file/WriteBinaryTool.js +153 -0
- package/dist/implementations/file/WriteBinaryTool.js.map +1 -0
- package/dist/implementations/file/WriteFileTool.d.ts +41 -0
- package/dist/implementations/file/WriteFileTool.d.ts.map +1 -0
- package/dist/implementations/file/WriteFileTool.js +220 -0
- package/dist/implementations/file/WriteFileTool.js.map +1 -0
- package/dist/implementations/file/index.d.ts +8 -0
- package/dist/implementations/file/index.d.ts.map +1 -0
- package/dist/implementations/file/index.js +8 -0
- package/dist/implementations/file/index.js.map +1 -0
- package/dist/implementations/historical/GetConversationSegmentTool.d.ts +44 -0
- package/dist/implementations/historical/GetConversationSegmentTool.d.ts.map +1 -0
- package/dist/implementations/historical/GetConversationSegmentTool.js +220 -0
- package/dist/implementations/historical/GetConversationSegmentTool.js.map +1 -0
- package/dist/implementations/historical/ListCompactionBoundariesTool.d.ts +36 -0
- package/dist/implementations/historical/ListCompactionBoundariesTool.d.ts.map +1 -0
- package/dist/implementations/historical/ListCompactionBoundariesTool.js +174 -0
- package/dist/implementations/historical/ListCompactionBoundariesTool.js.map +1 -0
- package/dist/implementations/historical/ListSessionsTool.d.ts +38 -0
- package/dist/implementations/historical/ListSessionsTool.d.ts.map +1 -0
- package/dist/implementations/historical/ListSessionsTool.js +140 -0
- package/dist/implementations/historical/ListSessionsTool.js.map +1 -0
- package/dist/implementations/historical/LoadSessionTool.d.ts +39 -0
- package/dist/implementations/historical/LoadSessionTool.d.ts.map +1 -0
- package/dist/implementations/historical/LoadSessionTool.js +171 -0
- package/dist/implementations/historical/LoadSessionTool.js.map +1 -0
- package/dist/implementations/historical/RequestHistoricalContextTool.d.ts +46 -0
- package/dist/implementations/historical/RequestHistoricalContextTool.d.ts.map +1 -0
- package/dist/implementations/historical/RequestHistoricalContextTool.js +224 -0
- package/dist/implementations/historical/RequestHistoricalContextTool.js.map +1 -0
- package/dist/implementations/historical/SearchConversationHistoryTool.d.ts +51 -0
- package/dist/implementations/historical/SearchConversationHistoryTool.d.ts.map +1 -0
- package/dist/implementations/historical/SearchConversationHistoryTool.js +306 -0
- package/dist/implementations/historical/SearchConversationHistoryTool.js.map +1 -0
- package/dist/implementations/historical/index.d.ts +12 -0
- package/dist/implementations/historical/index.d.ts.map +1 -0
- package/dist/implementations/historical/index.js +12 -0
- package/dist/implementations/historical/index.js.map +1 -0
- package/dist/implementations/index.d.ts +16 -0
- package/dist/implementations/index.d.ts.map +1 -0
- package/dist/implementations/index.js +28 -0
- package/dist/implementations/index.js.map +1 -0
- package/dist/implementations/mcp/DiscoveredMcpTool.d.ts +58 -0
- package/dist/implementations/mcp/DiscoveredMcpTool.d.ts.map +1 -0
- package/dist/implementations/mcp/DiscoveredMcpTool.js +269 -0
- package/dist/implementations/mcp/DiscoveredMcpTool.js.map +1 -0
- package/dist/implementations/mcp/index.d.ts +9 -0
- package/dist/implementations/mcp/index.d.ts.map +1 -0
- package/dist/implementations/mcp/index.js +8 -0
- package/dist/implementations/mcp/index.js.map +1 -0
- package/dist/implementations/notebook/NotebookEditTool.d.ts +96 -0
- package/dist/implementations/notebook/NotebookEditTool.d.ts.map +1 -0
- package/dist/implementations/notebook/NotebookEditTool.js +390 -0
- package/dist/implementations/notebook/NotebookEditTool.js.map +1 -0
- package/dist/implementations/notebook/index.d.ts +7 -0
- package/dist/implementations/notebook/index.d.ts.map +1 -0
- package/dist/implementations/notebook/index.js +7 -0
- package/dist/implementations/notebook/index.js.map +1 -0
- package/dist/implementations/search/GlobTool.d.ts +73 -0
- package/dist/implementations/search/GlobTool.d.ts.map +1 -0
- package/dist/implementations/search/GlobTool.js +213 -0
- package/dist/implementations/search/GlobTool.js.map +1 -0
- package/dist/implementations/search/GrepTool.d.ts +102 -0
- package/dist/implementations/search/GrepTool.d.ts.map +1 -0
- package/dist/implementations/search/GrepTool.js +754 -0
- package/dist/implementations/search/GrepTool.js.map +1 -0
- package/dist/implementations/search/index.d.ts +6 -0
- package/dist/implementations/search/index.d.ts.map +1 -0
- package/dist/implementations/search/index.js +6 -0
- package/dist/implementations/search/index.js.map +1 -0
- package/dist/implementations/tmux/TmuxSessionTool.d.ts +82 -0
- package/dist/implementations/tmux/TmuxSessionTool.d.ts.map +1 -0
- package/dist/implementations/tmux/TmuxSessionTool.js +371 -0
- package/dist/implementations/tmux/TmuxSessionTool.js.map +1 -0
- package/dist/implementations/tmux/TmuxViewServer.d.ts +86 -0
- package/dist/implementations/tmux/TmuxViewServer.d.ts.map +1 -0
- package/dist/implementations/tmux/TmuxViewServer.js +480 -0
- package/dist/implementations/tmux/TmuxViewServer.js.map +1 -0
- package/dist/implementations/tmux/index.d.ts +6 -0
- package/dist/implementations/tmux/index.d.ts.map +1 -0
- package/dist/implementations/tmux/index.js +6 -0
- package/dist/implementations/tmux/index.js.map +1 -0
- package/dist/implementations/ui/AskUserQuestionTool.d.ts +77 -0
- package/dist/implementations/ui/AskUserQuestionTool.d.ts.map +1 -0
- package/dist/implementations/ui/AskUserQuestionTool.js +241 -0
- package/dist/implementations/ui/AskUserQuestionTool.js.map +1 -0
- package/dist/implementations/ui/ExitPlanModeTool.d.ts +44 -0
- package/dist/implementations/ui/ExitPlanModeTool.d.ts.map +1 -0
- package/dist/implementations/ui/ExitPlanModeTool.js +150 -0
- package/dist/implementations/ui/ExitPlanModeTool.js.map +1 -0
- package/dist/implementations/ui/TodoWriteTool.d.ts +59 -0
- package/dist/implementations/ui/TodoWriteTool.d.ts.map +1 -0
- package/dist/implementations/ui/TodoWriteTool.js +315 -0
- package/dist/implementations/ui/TodoWriteTool.js.map +1 -0
- package/dist/implementations/ui/index.d.ts +9 -0
- package/dist/implementations/ui/index.d.ts.map +1 -0
- package/dist/implementations/ui/index.js +9 -0
- package/dist/implementations/ui/index.js.map +1 -0
- package/dist/implementations/web/BrowseTool.d.ts +43 -0
- package/dist/implementations/web/BrowseTool.d.ts.map +1 -0
- package/dist/implementations/web/BrowseTool.js +181 -0
- package/dist/implementations/web/BrowseTool.js.map +1 -0
- package/dist/implementations/web/SandboxTransferTool.d.ts +30 -0
- package/dist/implementations/web/SandboxTransferTool.d.ts.map +1 -0
- package/dist/implementations/web/SandboxTransferTool.js +261 -0
- package/dist/implementations/web/SandboxTransferTool.js.map +1 -0
- package/dist/implementations/web/WebFetchTool.d.ts +93 -0
- package/dist/implementations/web/WebFetchTool.d.ts.map +1 -0
- package/dist/implementations/web/WebFetchTool.js +484 -0
- package/dist/implementations/web/WebFetchTool.js.map +1 -0
- package/dist/implementations/web/WebSearchTool.d.ts +53 -0
- package/dist/implementations/web/WebSearchTool.d.ts.map +1 -0
- package/dist/implementations/web/WebSearchTool.js +227 -0
- package/dist/implementations/web/WebSearchTool.js.map +1 -0
- package/dist/implementations/web/escalateDirective.d.ts +11 -0
- package/dist/implementations/web/escalateDirective.d.ts.map +1 -0
- package/dist/implementations/web/escalateDirective.js +20 -0
- package/dist/implementations/web/escalateDirective.js.map +1 -0
- package/dist/implementations/web/index.d.ts +10 -0
- package/dist/implementations/web/index.d.ts.map +1 -0
- package/dist/implementations/web/index.js +10 -0
- package/dist/implementations/web/index.js.map +1 -0
- package/dist/implementations/web/webBackends.d.ts +65 -0
- package/dist/implementations/web/webBackends.d.ts.map +1 -0
- package/dist/implementations/web/webBackends.js +430 -0
- package/dist/implementations/web/webBackends.js.map +1 -0
- package/dist/implementations/web/webFetchRequestInit.d.ts +9 -0
- package/dist/implementations/web/webFetchRequestInit.d.ts.map +1 -0
- package/dist/implementations/web/webFetchRequestInit.js +21 -0
- package/dist/implementations/web/webFetchRequestInit.js.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/ArtifactRegistry.d.ts +138 -0
- package/dist/utils/ArtifactRegistry.d.ts.map +1 -0
- package/dist/utils/ArtifactRegistry.js +259 -0
- package/dist/utils/ArtifactRegistry.js.map +1 -0
- package/dist/utils/ChromiumBrowserManager.d.ts +56 -0
- package/dist/utils/ChromiumBrowserManager.d.ts.map +1 -0
- package/dist/utils/ChromiumBrowserManager.js +243 -0
- package/dist/utils/ChromiumBrowserManager.js.map +1 -0
- package/dist/utils/FileUtils.d.ts +81 -0
- package/dist/utils/FileUtils.d.ts.map +1 -0
- package/dist/utils/FileUtils.js +148 -0
- package/dist/utils/FileUtils.js.map +1 -0
- package/dist/utils/GitPolicy.d.ts +70 -0
- package/dist/utils/GitPolicy.d.ts.map +1 -0
- package/dist/utils/GitPolicy.js +166 -0
- package/dist/utils/GitPolicy.js.map +1 -0
- package/dist/utils/GitUtils.d.ts +18 -0
- package/dist/utils/GitUtils.d.ts.map +1 -0
- package/dist/utils/GitUtils.js +62 -0
- package/dist/utils/GitUtils.js.map +1 -0
- package/dist/utils/SandboxRegistry.d.ts +110 -0
- package/dist/utils/SandboxRegistry.d.ts.map +1 -0
- package/dist/utils/SandboxRegistry.js +220 -0
- package/dist/utils/SandboxRegistry.js.map +1 -0
- package/dist/utils/SchemaValidator.d.ts +21 -0
- package/dist/utils/SchemaValidator.d.ts.map +1 -0
- package/dist/utils/SchemaValidator.js +67 -0
- package/dist/utils/SchemaValidator.js.map +1 -0
- package/dist/utils/SessionLock.d.ts +96 -0
- package/dist/utils/SessionLock.d.ts.map +1 -0
- package/dist/utils/SessionLock.js +276 -0
- package/dist/utils/SessionLock.js.map +1 -0
- package/dist/utils/SessionPersistence.d.ts +89 -0
- package/dist/utils/SessionPersistence.d.ts.map +1 -0
- package/dist/utils/SessionPersistence.js +244 -0
- package/dist/utils/SessionPersistence.js.map +1 -0
- package/dist/utils/TextUtils.d.ts +77 -0
- package/dist/utils/TextUtils.d.ts.map +1 -0
- package/dist/utils/TextUtils.js +112 -0
- package/dist/utils/TextUtils.js.map +1 -0
- package/dist/utils/TmuxCapture.d.ts +94 -0
- package/dist/utils/TmuxCapture.d.ts.map +1 -0
- package/dist/utils/TmuxCapture.js +131 -0
- package/dist/utils/TmuxCapture.js.map +1 -0
- package/dist/utils/TmuxManager.d.ts +65 -0
- package/dist/utils/TmuxManager.d.ts.map +1 -0
- package/dist/utils/TmuxManager.js +304 -0
- package/dist/utils/TmuxManager.js.map +1 -0
- package/dist/utils/autoResearchPlanGate.d.ts +10 -0
- package/dist/utils/autoResearchPlanGate.d.ts.map +1 -0
- package/dist/utils/autoResearchPlanGate.js +57 -0
- package/dist/utils/autoResearchPlanGate.js.map +1 -0
- package/dist/utils/index.d.ts +19 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +13 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +83 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { BaseTool } from '../../base/BaseTool.js';
|
|
2
|
+
import { CreateArtifactToolExecutor } from './CreateArtifactTool.js';
|
|
3
|
+
import { visualBridge } from './VisualFeedbackBridge.js';
|
|
4
|
+
/**
|
|
5
|
+
* InspectSandboxTool - Get current state of a running sandbox
|
|
6
|
+
*
|
|
7
|
+
* This tool allows the model to observe sandbox state at any time:
|
|
8
|
+
* - Visual snapshot (screenshot, DOM, console, network)
|
|
9
|
+
* - Process status (running, stopped, error)
|
|
10
|
+
* - Performance metrics
|
|
11
|
+
* - Extracted structured data
|
|
12
|
+
*
|
|
13
|
+
* Use Cases:
|
|
14
|
+
* 1. After editing code - verify changes took effect
|
|
15
|
+
* 2. During debugging - see console errors
|
|
16
|
+
* 3. Performance analysis - check load times
|
|
17
|
+
* 4. Data extraction - pull structured data from UI
|
|
18
|
+
*
|
|
19
|
+
* Example:
|
|
20
|
+
* ```typescript
|
|
21
|
+
* // After model edits code
|
|
22
|
+
* await inspectSandbox({
|
|
23
|
+
* sandboxId: "abc-123",
|
|
24
|
+
* captureScreenshot: true
|
|
25
|
+
* });
|
|
26
|
+
* // Model sees updated UI
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export class InspectSandboxExecutor extends BaseTool {
|
|
30
|
+
constructor() {
|
|
31
|
+
const schema = {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
sandboxId: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: 'Unique ID of the sandbox to inspect'
|
|
37
|
+
},
|
|
38
|
+
captureScreenshot: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
description: 'Capture fresh screenshot (default: true)'
|
|
41
|
+
},
|
|
42
|
+
captureDOM: {
|
|
43
|
+
type: 'boolean',
|
|
44
|
+
description: 'Capture DOM structure (default: true)'
|
|
45
|
+
},
|
|
46
|
+
captureConsole: {
|
|
47
|
+
type: 'boolean',
|
|
48
|
+
description: 'Capture console logs (default: true)'
|
|
49
|
+
},
|
|
50
|
+
captureNetwork: {
|
|
51
|
+
type: 'boolean',
|
|
52
|
+
description: 'Capture network requests (default: true)'
|
|
53
|
+
},
|
|
54
|
+
captureAccessibility: {
|
|
55
|
+
type: 'boolean',
|
|
56
|
+
description: 'Capture accessibility tree (default: true)'
|
|
57
|
+
},
|
|
58
|
+
extractData: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
description: 'Extract structured data from page (default: false)'
|
|
61
|
+
},
|
|
62
|
+
dataSelector: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'CSS selector to extract data from (if extractData is true)'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
required: ['sandboxId']
|
|
68
|
+
};
|
|
69
|
+
super('InspectSandbox', 'InspectSandbox', 'Get current visual and runtime state of a running sandbox', schema);
|
|
70
|
+
}
|
|
71
|
+
validateToolParams(params) {
|
|
72
|
+
if (!params.sandboxId || params.sandboxId.trim().length === 0) {
|
|
73
|
+
return 'sandboxId is required';
|
|
74
|
+
}
|
|
75
|
+
if (!/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(params.sandboxId)) {
|
|
76
|
+
return 'sandboxId must be a valid UUID';
|
|
77
|
+
}
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
async execute(params, signal) {
|
|
81
|
+
const startTime = Date.now();
|
|
82
|
+
const validationError = this.validateToolParams(params);
|
|
83
|
+
if (validationError) {
|
|
84
|
+
return this.createErrorResult(validationError);
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
// Get sandbox session
|
|
88
|
+
const session = CreateArtifactToolExecutor.getActiveSandbox(params.sandboxId);
|
|
89
|
+
if (!session) {
|
|
90
|
+
return this.createErrorResult(`Sandbox not found: ${params.sandboxId}. It may have been stopped or never existed.`);
|
|
91
|
+
}
|
|
92
|
+
// Check if process is still running
|
|
93
|
+
const isRunning = session.process && !session.process.killed;
|
|
94
|
+
if (!isRunning) {
|
|
95
|
+
return {
|
|
96
|
+
...this.createErrorResult('Sandbox process is not running'),
|
|
97
|
+
metadata: {
|
|
98
|
+
sandboxId: params.sandboxId,
|
|
99
|
+
status: 'stopped',
|
|
100
|
+
lastActivity: session.lastActivity
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
// Determine what to capture (defaults)
|
|
105
|
+
const captureScreenshot = params.captureScreenshot ?? true;
|
|
106
|
+
const captureDOM = params.captureDOM ?? true;
|
|
107
|
+
const captureConsole = params.captureConsole ?? true;
|
|
108
|
+
const captureNetwork = params.captureNetwork ?? true;
|
|
109
|
+
const captureAccessibility = params.captureAccessibility ?? true;
|
|
110
|
+
// Capture fresh snapshot if requested
|
|
111
|
+
let snapshot = session.visualSnapshot;
|
|
112
|
+
if (captureScreenshot || captureDOM || captureConsole || captureNetwork || captureAccessibility) {
|
|
113
|
+
if (!session.url) {
|
|
114
|
+
return this.createErrorResult('Sandbox has no URL (not a web server)');
|
|
115
|
+
}
|
|
116
|
+
try {
|
|
117
|
+
// Initialize bridge if needed
|
|
118
|
+
await visualBridge.initialize();
|
|
119
|
+
// Capture full snapshot
|
|
120
|
+
snapshot = await visualBridge.captureSnapshot(session.url);
|
|
121
|
+
// Update session
|
|
122
|
+
session.visualSnapshot = snapshot;
|
|
123
|
+
session.lastActivity = new Date();
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
return this.createErrorResult(`Failed to capture visual snapshot: ${error.message}`);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
// Extract structured data if requested
|
|
130
|
+
let extractedData = null;
|
|
131
|
+
if (params.extractData) {
|
|
132
|
+
try {
|
|
133
|
+
await visualBridge.initialize();
|
|
134
|
+
extractedData = await visualBridge.extractData(params.dataSelector);
|
|
135
|
+
}
|
|
136
|
+
catch (error) {
|
|
137
|
+
console.warn(`Failed to extract data: ${error}`);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// Format output
|
|
141
|
+
const output = this.formatInspectionOutput(session, snapshot, extractedData, {
|
|
142
|
+
captureScreenshot,
|
|
143
|
+
captureDOM,
|
|
144
|
+
captureConsole,
|
|
145
|
+
captureNetwork,
|
|
146
|
+
captureAccessibility,
|
|
147
|
+
extractData: params.extractData || false
|
|
148
|
+
});
|
|
149
|
+
return {
|
|
150
|
+
...this.createSuccessResult(output),
|
|
151
|
+
metadata: {
|
|
152
|
+
executionTime: Date.now() - startTime,
|
|
153
|
+
sandboxId: params.sandboxId,
|
|
154
|
+
sandboxName: session.name,
|
|
155
|
+
url: session.url,
|
|
156
|
+
status: 'running',
|
|
157
|
+
uptime: Date.now() - session.startTime.getTime(),
|
|
158
|
+
hasVisualSnapshot: !!snapshot,
|
|
159
|
+
hasExtractedData: !!extractedData
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
catch (error) {
|
|
164
|
+
return this.createErrorResult(`Failed to inspect sandbox: ${error.message}`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Format inspection output for model consumption
|
|
169
|
+
*/
|
|
170
|
+
formatInspectionOutput(session, snapshot, extractedData, options) {
|
|
171
|
+
const lines = [];
|
|
172
|
+
lines.push(`# Sandbox Inspection: ${session.name}`);
|
|
173
|
+
lines.push('');
|
|
174
|
+
lines.push(`**Sandbox ID**: ${session.id}`);
|
|
175
|
+
lines.push(`**Status**: Running`);
|
|
176
|
+
lines.push(`**URL**: ${session.url}`);
|
|
177
|
+
lines.push(`**Mode**: ${session.mode}`);
|
|
178
|
+
lines.push(`**Uptime**: ${this.formatUptime(Date.now() - session.startTime.getTime())}`);
|
|
179
|
+
lines.push('');
|
|
180
|
+
if (snapshot) {
|
|
181
|
+
lines.push('---');
|
|
182
|
+
lines.push('');
|
|
183
|
+
lines.push('## Visual Snapshot');
|
|
184
|
+
lines.push('');
|
|
185
|
+
// Use VisualFeedbackBridge's formatter
|
|
186
|
+
lines.push(visualBridge.formatForModel(snapshot));
|
|
187
|
+
lines.push('');
|
|
188
|
+
}
|
|
189
|
+
if (extractedData && options.extractData) {
|
|
190
|
+
lines.push('---');
|
|
191
|
+
lines.push('');
|
|
192
|
+
lines.push('## Extracted Data');
|
|
193
|
+
lines.push('');
|
|
194
|
+
lines.push('```json');
|
|
195
|
+
lines.push(JSON.stringify(extractedData, null, 2));
|
|
196
|
+
lines.push('```');
|
|
197
|
+
lines.push('');
|
|
198
|
+
}
|
|
199
|
+
lines.push('---');
|
|
200
|
+
lines.push('');
|
|
201
|
+
lines.push('**Note**: This is the current state of the sandbox. You can:');
|
|
202
|
+
lines.push('- Edit code (Use write tool) → Hot reload will trigger automatically');
|
|
203
|
+
lines.push('- Interact with UI (Use interact_with_sandbox tool)');
|
|
204
|
+
lines.push('- Re-inspect anytime (Call inspect_sandbox again)');
|
|
205
|
+
lines.push('- Stop sandbox (Use stop_sandbox tool)');
|
|
206
|
+
return lines.join('\n');
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Format uptime in human-readable format
|
|
210
|
+
*/
|
|
211
|
+
formatUptime(ms) {
|
|
212
|
+
const seconds = Math.floor(ms / 1000);
|
|
213
|
+
const minutes = Math.floor(seconds / 60);
|
|
214
|
+
const hours = Math.floor(minutes / 60);
|
|
215
|
+
if (hours > 0) {
|
|
216
|
+
return `${hours}h ${minutes % 60}m`;
|
|
217
|
+
}
|
|
218
|
+
else if (minutes > 0) {
|
|
219
|
+
return `${minutes}m ${seconds % 60}s`;
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
return `${seconds}s`;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=InspectSandboxTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InspectSandboxTool.js","sourceRoot":"","sources":["../../../src/implementations/addon/InspectSandboxTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EAAE,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAgBzD;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAO,sBAAuB,SAAQ,QAA0C;IACpF;QACE,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,QAAiB;YACvB,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAiB;oBACvB,WAAW,EAAE,qCAAqC;iBACnD;gBACD,iBAAiB,EAAE;oBACjB,IAAI,EAAE,SAAkB;oBACxB,WAAW,EAAE,0CAA0C;iBACxD;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,SAAkB;oBACxB,WAAW,EAAE,uCAAuC;iBACrD;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,SAAkB;oBACxB,WAAW,EAAE,sCAAsC;iBACpD;gBACD,cAAc,EAAE;oBACd,IAAI,EAAE,SAAkB;oBACxB,WAAW,EAAE,0CAA0C;iBACxD;g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YACd,OAAO,GAAG,KAAK,KAAK,OAAO,GAAG,EAAE,GAAG,CAAC;QACtC,CAAC;aAAM,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;YACvB,OAAO,GAAG,OAAO,KAAK,OAAO,GAAG,EAAE,GAAG,CAAC;QACxC,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,OAAO,GAAG,CAAC;QACvB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { BaseTool } from '../../base/BaseTool.js';
|
|
2
|
+
import type { ToolResult } from '../../base/ToolResult.js';
|
|
3
|
+
/**
|
|
4
|
+
* Parameters for InteractWithSandbox tool
|
|
5
|
+
*/
|
|
6
|
+
export interface InteractWithSandboxParams {
|
|
7
|
+
sandboxId: string;
|
|
8
|
+
actions: Array<{
|
|
9
|
+
type: 'click' | 'type' | 'navigate' | 'scroll' | 'hover' | 'select' | 'wait' | 'keypress' | 'zoom';
|
|
10
|
+
selector?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
coordinates?: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
duration?: number;
|
|
17
|
+
key?: string;
|
|
18
|
+
modifiers?: string[];
|
|
19
|
+
zoomLevel?: number;
|
|
20
|
+
deltaX?: number;
|
|
21
|
+
deltaY?: number;
|
|
22
|
+
}>;
|
|
23
|
+
captureAfterEachAction?: boolean;
|
|
24
|
+
returnFinalSnapshot?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* InteractWithSandboxTool - Interact with sandbox UI via Playwright
|
|
28
|
+
*
|
|
29
|
+
* This tool allows the model to interact with the sandbox UI programmatically:
|
|
30
|
+
* - Click buttons, links, elements
|
|
31
|
+
* - Type into inputs, textareas
|
|
32
|
+
* - Navigate to different URLs
|
|
33
|
+
* - Scroll, hover, select
|
|
34
|
+
* - Wait for animations/updates
|
|
35
|
+
* - Press keyboard shortcuts (Ctrl+V, Ctrl+S, etc.)
|
|
36
|
+
* - Zoom in/out
|
|
37
|
+
*
|
|
38
|
+
* Use Cases:
|
|
39
|
+
* 1. Testing - Click buttons to verify functionality
|
|
40
|
+
* 2. Form filling - Type into inputs to test forms
|
|
41
|
+
* 3. Navigation - Test multi-page flows
|
|
42
|
+
* 4. Data entry - Populate UI with test data
|
|
43
|
+
* 5. Visual regression - Capture UI states during interactions
|
|
44
|
+
* 6. Code pasting - Paste code snippets with Ctrl+V
|
|
45
|
+
* 7. Visual inspection - Zoom to see details
|
|
46
|
+
*
|
|
47
|
+
* Example:
|
|
48
|
+
* ```typescript
|
|
49
|
+
* // Model tests a form
|
|
50
|
+
* await interactWithSandbox({
|
|
51
|
+
* sandboxId: "abc-123",
|
|
52
|
+
* actions: [
|
|
53
|
+
* { type: "type", selector: "#username", value: "testuser" },
|
|
54
|
+
* { type: "type", selector: "#password", value: "pass123" },
|
|
55
|
+
* { type: "click", selector: "#submit-btn" },
|
|
56
|
+
* { type: "wait", duration: 1000 }
|
|
57
|
+
* ],
|
|
58
|
+
* returnFinalSnapshot: true
|
|
59
|
+
* });
|
|
60
|
+
*
|
|
61
|
+
* // Model pastes code into editor
|
|
62
|
+
* await interactWithSandbox({
|
|
63
|
+
* sandboxId: "abc-123",
|
|
64
|
+
* actions: [
|
|
65
|
+
* { type: "click", selector: "#code-editor" },
|
|
66
|
+
* { type: "keypress", key: "Ctrl+V" }, // Paste from clipboard
|
|
67
|
+
* { type: "keypress", key: "Ctrl+S" }, // Save
|
|
68
|
+
* { type: "zoom", zoomLevel: 1.5 } // Zoom 150%
|
|
69
|
+
* ]
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
export declare class InteractWithSandboxExecutor extends BaseTool<InteractWithSandboxParams, ToolResult> {
|
|
74
|
+
constructor();
|
|
75
|
+
validateToolParams(params: InteractWithSandboxParams): string | null;
|
|
76
|
+
execute(params: InteractWithSandboxParams, signal: AbortSignal): Promise<ToolResult>;
|
|
77
|
+
/**
|
|
78
|
+
* Execute a single interaction action
|
|
79
|
+
*/
|
|
80
|
+
private executeAction;
|
|
81
|
+
/**
|
|
82
|
+
* Wait helper
|
|
83
|
+
*/
|
|
84
|
+
private wait;
|
|
85
|
+
/**
|
|
86
|
+
* Format interaction output for model consumption
|
|
87
|
+
*/
|
|
88
|
+
private formatInteractionOutput;
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=InteractWithSandboxTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InteractWithSandboxTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/addon/InteractWithSandboxTool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAK3D;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,CAAC;QACnG,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;QACrB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,O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