@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,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AskUserQuestion Tool Executor
|
|
3
|
+
*
|
|
4
|
+
* Present multiple-choice questions to users during execution.
|
|
5
|
+
* Allows agent to gather user preferences, clarify ambiguous instructions,
|
|
6
|
+
* and get decisions on implementation choices.
|
|
7
|
+
*/
|
|
8
|
+
import { BaseTool } from '../../base/index.js';
|
|
9
|
+
import { SchemaValidator } from '../../utils/SchemaValidator.js';
|
|
10
|
+
/**
|
|
11
|
+
* AskUserQuestion Tool Executor
|
|
12
|
+
*
|
|
13
|
+
* Features:
|
|
14
|
+
* - Present 1-4 multiple choice questions
|
|
15
|
+
* - Each question has 2-4 options
|
|
16
|
+
* - Support for single or multi-select
|
|
17
|
+
* - Clear formatting for user interaction
|
|
18
|
+
*/
|
|
19
|
+
export class AskUserQuestionTool extends BaseTool {
|
|
20
|
+
config;
|
|
21
|
+
constructor(config) {
|
|
22
|
+
super('AskUserQuestion', 'AskUserQuestion', `Use this tool when you need to ask the user questions during execution. This allows you to:
|
|
23
|
+
1. Gather user preferences or requirements
|
|
24
|
+
2. Clarify ambiguous instructions
|
|
25
|
+
3. Get decisions on implementation choices as you work
|
|
26
|
+
4. Offer choices to the user about what direction to take.
|
|
27
|
+
|
|
28
|
+
Usage notes:
|
|
29
|
+
- Users will always be able to select "Other" to provide custom text input
|
|
30
|
+
- Use multiSelect: true to allow multiple answers to be selected for a question`, {
|
|
31
|
+
type: 'object',
|
|
32
|
+
properties: {
|
|
33
|
+
questions: {
|
|
34
|
+
type: 'array',
|
|
35
|
+
minItems: 1,
|
|
36
|
+
maxItems: 4,
|
|
37
|
+
items: {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {
|
|
40
|
+
question: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'The complete question to ask the user. Should be clear, specific, and end with a question mark.',
|
|
43
|
+
minLength: 5,
|
|
44
|
+
},
|
|
45
|
+
header: {
|
|
46
|
+
type: 'string',
|
|
47
|
+
maxLength: 12,
|
|
48
|
+
description: 'Very short label displayed as a chip/tag (max 12 chars). Examples: "Auth method", "Library", "Approach".',
|
|
49
|
+
minLength: 1,
|
|
50
|
+
},
|
|
51
|
+
options: {
|
|
52
|
+
type: 'array',
|
|
53
|
+
minItems: 2,
|
|
54
|
+
maxItems: 4,
|
|
55
|
+
items: {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {
|
|
58
|
+
label: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'The display text for this option (1-5 words)',
|
|
61
|
+
minLength: 1,
|
|
62
|
+
},
|
|
63
|
+
description: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'Explanation of what this option means or what will happen if chosen',
|
|
66
|
+
minLength: 1,
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
required: ['label', 'description'],
|
|
70
|
+
},
|
|
71
|
+
description: 'Available choices (2-4 options)',
|
|
72
|
+
},
|
|
73
|
+
multiSelect: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
description: 'Set to true to allow multiple selections. Default: false',
|
|
76
|
+
default: false,
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
required: ['question', 'header', 'options', 'multiSelect'],
|
|
80
|
+
},
|
|
81
|
+
description: 'Questions to ask the user (1-4 questions)',
|
|
82
|
+
},
|
|
83
|
+
answers: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
description: 'User answers collected by the permission component (filled by client)',
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
required: ['questions'],
|
|
89
|
+
});
|
|
90
|
+
this.config = config;
|
|
91
|
+
}
|
|
92
|
+
validateToolParams(params) {
|
|
93
|
+
// Schema validation
|
|
94
|
+
const schemaError = SchemaValidator.validate(this.parameterSchema, params);
|
|
95
|
+
if (schemaError) {
|
|
96
|
+
return schemaError;
|
|
97
|
+
}
|
|
98
|
+
// Validate questions array
|
|
99
|
+
if (!params.questions || params.questions.length === 0) {
|
|
100
|
+
return 'Questions array cannot be empty.';
|
|
101
|
+
}
|
|
102
|
+
if (params.questions.length > 4) {
|
|
103
|
+
return `Too many questions. Maximum: 4, provided: ${params.questions.length}`;
|
|
104
|
+
}
|
|
105
|
+
// Validate each question
|
|
106
|
+
for (let i = 0; i < params.questions.length; i++) {
|
|
107
|
+
const q = params.questions[i];
|
|
108
|
+
if (!q) {
|
|
109
|
+
return `Question ${i + 1} is undefined.`;
|
|
110
|
+
}
|
|
111
|
+
// Validate question text
|
|
112
|
+
if (!q.question || q.question.trim().length < 5) {
|
|
113
|
+
return `Question ${i + 1}: Question text must be at least 5 characters.`;
|
|
114
|
+
}
|
|
115
|
+
// Validate header
|
|
116
|
+
if (!q.header || q.header.trim().length === 0) {
|
|
117
|
+
return `Question ${i + 1}: Header cannot be empty.`;
|
|
118
|
+
}
|
|
119
|
+
if (q.header.length > 12) {
|
|
120
|
+
return `Question ${i + 1}: Header too long (${q.header.length} chars, max 12).`;
|
|
121
|
+
}
|
|
122
|
+
// Validate options
|
|
123
|
+
if (!q.options || q.options.length < 2) {
|
|
124
|
+
return `Question ${i + 1}: Must have at least 2 options.`;
|
|
125
|
+
}
|
|
126
|
+
if (q.options.length > 4) {
|
|
127
|
+
return `Question ${i + 1}: Too many options (${q.options.length}, max 4).`;
|
|
128
|
+
}
|
|
129
|
+
// Validate each option
|
|
130
|
+
for (let j = 0; j < q.options.length; j++) {
|
|
131
|
+
const opt = q.options[j];
|
|
132
|
+
if (!opt) {
|
|
133
|
+
return `Question ${i + 1}, Option ${j + 1} is undefined.`;
|
|
134
|
+
}
|
|
135
|
+
if (!opt.label || opt.label.trim().length === 0) {
|
|
136
|
+
return `Question ${i + 1}, Option ${j + 1}: Label cannot be empty.`;
|
|
137
|
+
}
|
|
138
|
+
if (!opt.description || opt.description.trim().length === 0) {
|
|
139
|
+
return `Question ${i + 1}, Option ${j + 1}: Description cannot be empty.`;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// Validate multiSelect is boolean
|
|
143
|
+
if (typeof q.multiSelect !== 'boolean') {
|
|
144
|
+
return `Question ${i + 1}: multiSelect must be a boolean.`;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
getDescription(params) {
|
|
150
|
+
const count = params.questions.length;
|
|
151
|
+
return `Asking ${count} question${count > 1 ? 's' : ''}`;
|
|
152
|
+
}
|
|
153
|
+
async execute(params, signal, updateOutput) {
|
|
154
|
+
const startTime = Date.now();
|
|
155
|
+
try {
|
|
156
|
+
// Check for abort
|
|
157
|
+
if (signal.aborted) {
|
|
158
|
+
return {
|
|
159
|
+
...this.createErrorResult('Question prompt was cancelled'),
|
|
160
|
+
metadata: {
|
|
161
|
+
executionTime: Date.now() - startTime,
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
// Validate parameters
|
|
166
|
+
const validationError = this.validateToolParams(params);
|
|
167
|
+
if (validationError) {
|
|
168
|
+
return {
|
|
169
|
+
...this.createErrorResult(validationError),
|
|
170
|
+
metadata: {
|
|
171
|
+
executionTime: Date.now() - startTime,
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
// Format questions for display
|
|
176
|
+
const formattedOutput = this.formatQuestions(params.questions);
|
|
177
|
+
return {
|
|
178
|
+
...this.createSuccessResult(formattedOutput),
|
|
179
|
+
metadata: {
|
|
180
|
+
executionTime: Date.now() - startTime,
|
|
181
|
+
questionCount: params.questions.length,
|
|
182
|
+
questions: params.questions.map((q) => ({
|
|
183
|
+
header: q.header,
|
|
184
|
+
question: q.question,
|
|
185
|
+
optionCount: q.options.length,
|
|
186
|
+
multiSelect: q.multiSelect,
|
|
187
|
+
})),
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
// Check for abort
|
|
193
|
+
if (signal.aborted) {
|
|
194
|
+
return {
|
|
195
|
+
...this.createErrorResult('Question prompt was cancelled'),
|
|
196
|
+
metadata: {
|
|
197
|
+
executionTime: Date.now() - startTime,
|
|
198
|
+
},
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
const errorMessage = error.message || String(error);
|
|
202
|
+
return {
|
|
203
|
+
...this.createErrorResult(`Error presenting questions: ${errorMessage}`),
|
|
204
|
+
metadata: {
|
|
205
|
+
executionTime: Date.now() - startTime,
|
|
206
|
+
error: errorMessage,
|
|
207
|
+
},
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Format questions for user display
|
|
213
|
+
*/
|
|
214
|
+
formatQuestions(questions) {
|
|
215
|
+
const lines = [];
|
|
216
|
+
lines.push('=== User Questions ===\n\n');
|
|
217
|
+
questions.forEach((q, i) => {
|
|
218
|
+
// Header
|
|
219
|
+
lines.push(`[${q.header}]\n`);
|
|
220
|
+
// Question
|
|
221
|
+
lines.push(`${q.question}\n`);
|
|
222
|
+
// Multi-select indicator
|
|
223
|
+
if (q.multiSelect) {
|
|
224
|
+
lines.push('(You can select multiple options)\n');
|
|
225
|
+
}
|
|
226
|
+
lines.push('\n');
|
|
227
|
+
// Options
|
|
228
|
+
q.options.forEach((opt, j) => {
|
|
229
|
+
lines.push(`${j + 1}. ${opt.label}\n`);
|
|
230
|
+
lines.push(` ${opt.description}\n\n`);
|
|
231
|
+
});
|
|
232
|
+
// Separator between questions
|
|
233
|
+
if (i < questions.length - 1) {
|
|
234
|
+
lines.push('---\n\n');
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
lines.push('\nNote: The client will present these as interactive choices.\n');
|
|
238
|
+
return lines.join('');
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
//# sourceMappingURL=AskUserQuestionTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AskUserQuestionTool.js","sourceRoot":"","sources":["../../../src/implementations/ui/AskUserQuestionTool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AA0DjE;;;;;;;;GAQG;AACH,MAAM,OAAO,mBAAoB,SAAQ,QAGxC;IACqB;IAApB,YAAoB,MAAsB;QACxC,KAAK,CACH,iBAAiB,EACjB,iBAAiB,EACjB;;;;;;;;gFAQ0E,EAC1E;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,OAAO;oBACb,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE,CAAC;oBACX,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,QAAQ,EAAE;gCACR,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,iGAAiG;gCACnG,SAAS,EAAE,CAAC;6BACb;4BACD,MAAM,EAAE;gCACN,IAAI,EAAE,QAAQ;gCACd,SAAS,EAAE,EAAE;gCACb,WAAW,EACT,0GAA0G;gCAC5G,SAAS,EAAE,CAAC;6BACb;4BACD,OAAO,EAAE;gCACP,I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AAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,WAAW,MAAM,CAAC,CAAC;YACxC,CAAC,CAAC,CAAC;YAEH,8BAA8B;YAC9B,IAAI,CAAC,GAAG,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC7B,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;YACxB,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,KAAK,CAAC,IAAI,CACR,iEAAiE,CAClE,CAAC;QAEF,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExitPlanMode Tool Executor
|
|
3
|
+
*
|
|
4
|
+
* Signals transition from planning mode to execution mode.
|
|
5
|
+
* Used when agent has finished planning and is ready to implement.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseTool, type ToolResult } from '../../base/index.js';
|
|
8
|
+
import type { ExecutorConfig } from '../../base/ToolRegistry.js';
|
|
9
|
+
/**
|
|
10
|
+
* Parameters for the ExitPlanMode tool
|
|
11
|
+
*/
|
|
12
|
+
export interface ExitPlanModeToolParams {
|
|
13
|
+
/**
|
|
14
|
+
* The plan to present to the user for approval
|
|
15
|
+
* Supports markdown formatting
|
|
16
|
+
*/
|
|
17
|
+
plan: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* ExitPlanMode Tool Executor
|
|
21
|
+
*
|
|
22
|
+
* Features:
|
|
23
|
+
* - Present finalized plan to user
|
|
24
|
+
* - Signal mode transition
|
|
25
|
+
* - Wait for user approval before execution
|
|
26
|
+
*
|
|
27
|
+
* Usage:
|
|
28
|
+
* - ONLY use when task requires planning implementation steps
|
|
29
|
+
* - For research tasks (gathering info, searching files) - do NOT use
|
|
30
|
+
* - Plan should be clear and unambiguous
|
|
31
|
+
* - If multiple approaches exist, use AskUserQuestion first to clarify
|
|
32
|
+
*/
|
|
33
|
+
export declare class ExitPlanModeTool extends BaseTool<ExitPlanModeToolParams, ToolResult> {
|
|
34
|
+
private config;
|
|
35
|
+
constructor(config: ExecutorConfig);
|
|
36
|
+
validateToolParams(params: ExitPlanModeToolParams): string | null;
|
|
37
|
+
getDescription(params: ExitPlanModeToolParams): string;
|
|
38
|
+
execute(params: ExitPlanModeToolParams, signal: AbortSignal, updateOutput?: (output: string) => void): Promise<ToolResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Format plan for user presentation
|
|
41
|
+
*/
|
|
42
|
+
private formatPlan;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=ExitPlanModeTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExitPlanModeTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/ui/ExitPlanModeTool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGjE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,gBAAiB,SAAQ,QAAQ,CAC5C,sBAAsB,EACtB,UAAU,CACX;IACa,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IA6B1C,kBAAkB,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM,GAAG,IAAI;IA0BjE,cAAc,CAAC,MAAM,EAAE,sBAAsB,GAAG,MAAM;IAKhD,OAAO,CACX,MAAM,EAAE,sBAAsB,EAC9B,MAAM,EAAE,WAAW,EACnB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GACtC,OAAO,CAAC,UAAU,CAAC;IAyEtB;;OAEG;IACH,OAAO,CAAC,UAAU;CAanB"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExitPlanMode Tool Executor
|
|
3
|
+
*
|
|
4
|
+
* Signals transition from planning mode to execution mode.
|
|
5
|
+
* Used when agent has finished planning and is ready to implement.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseTool } from '../../base/index.js';
|
|
8
|
+
import { SchemaValidator } from '../../utils/SchemaValidator.js';
|
|
9
|
+
import { markAutoResearchPlanMode } from '../../utils/autoResearchPlanGate.js';
|
|
10
|
+
/**
|
|
11
|
+
* ExitPlanMode Tool Executor
|
|
12
|
+
*
|
|
13
|
+
* Features:
|
|
14
|
+
* - Present finalized plan to user
|
|
15
|
+
* - Signal mode transition
|
|
16
|
+
* - Wait for user approval before execution
|
|
17
|
+
*
|
|
18
|
+
* Usage:
|
|
19
|
+
* - ONLY use when task requires planning implementation steps
|
|
20
|
+
* - For research tasks (gathering info, searching files) - do NOT use
|
|
21
|
+
* - Plan should be clear and unambiguous
|
|
22
|
+
* - If multiple approaches exist, use AskUserQuestion first to clarify
|
|
23
|
+
*/
|
|
24
|
+
export class ExitPlanModeTool extends BaseTool {
|
|
25
|
+
config;
|
|
26
|
+
constructor(config) {
|
|
27
|
+
super('ExitPlanMode', 'ExitPlanMode', `Use this tool when you are in plan mode and have finished presenting your plan and are ready to code. This will prompt the user to exit plan mode.
|
|
28
|
+
|
|
29
|
+
IMPORTANT: Only use this tool when the task requires planning the implementation steps of a task that requires writing code. For research tasks where you're gathering information, searching files, reading files or in general trying to understand the codebase - do NOT use this tool.
|
|
30
|
+
|
|
31
|
+
## Handling Ambiguity in Plans
|
|
32
|
+
Before using this tool, ensure your plan is clear and unambiguous. If there are multiple valid approaches or unclear requirements:
|
|
33
|
+
1. Use the AskUserQuestion tool to clarify with the user
|
|
34
|
+
2. Ask about specific implementation choices (e.g., architectural patterns, which library to use)
|
|
35
|
+
3. Clarify any assumptions that could affect the implementation
|
|
36
|
+
4. Only proceed with ExitPlanMode after resolving ambiguities`, {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
plan: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description: 'The plan you came up with, that you want to run by the user for approval. Supports markdown. The plan should be pretty concise.',
|
|
42
|
+
minLength: 10,
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: ['plan'],
|
|
46
|
+
});
|
|
47
|
+
this.config = config;
|
|
48
|
+
}
|
|
49
|
+
validateToolParams(params) {
|
|
50
|
+
// Schema validation
|
|
51
|
+
const schemaError = SchemaValidator.validate(this.parameterSchema, params);
|
|
52
|
+
if (schemaError) {
|
|
53
|
+
return schemaError;
|
|
54
|
+
}
|
|
55
|
+
// Validate plan is not empty
|
|
56
|
+
if (!params.plan || !params.plan.trim()) {
|
|
57
|
+
return 'Plan cannot be empty.';
|
|
58
|
+
}
|
|
59
|
+
// Validate minimum length (should be a meaningful plan)
|
|
60
|
+
if (params.plan.trim().length < 10) {
|
|
61
|
+
return 'Plan is too short. Please provide a meaningful plan (at least 10 characters).';
|
|
62
|
+
}
|
|
63
|
+
// Warn if plan is very long (should be concise)
|
|
64
|
+
if (params.plan.length > 5000) {
|
|
65
|
+
// Don't error, just note in metadata
|
|
66
|
+
// Plan can be long if needed, but typically should be concise
|
|
67
|
+
}
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
getDescription(params) {
|
|
71
|
+
const wordCount = params.plan.split(/\s+/).length;
|
|
72
|
+
return `Presenting plan for approval (~${wordCount} words)`;
|
|
73
|
+
}
|
|
74
|
+
async execute(params, signal, updateOutput) {
|
|
75
|
+
const startTime = Date.now();
|
|
76
|
+
try {
|
|
77
|
+
// Check for abort
|
|
78
|
+
if (signal.aborted) {
|
|
79
|
+
return {
|
|
80
|
+
...this.createErrorResult('Plan presentation was cancelled'),
|
|
81
|
+
metadata: {
|
|
82
|
+
executionTime: Date.now() - startTime,
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
// Validate parameters
|
|
87
|
+
const validationError = this.validateToolParams(params);
|
|
88
|
+
if (validationError) {
|
|
89
|
+
return {
|
|
90
|
+
...this.createErrorResult(validationError),
|
|
91
|
+
metadata: {
|
|
92
|
+
executionTime: Date.now() - startTime,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
// A valid plan was presented — satisfies the interactive auto-research plan-gate.
|
|
97
|
+
markAutoResearchPlanMode();
|
|
98
|
+
// Format the plan for presentation
|
|
99
|
+
const formattedOutput = this.formatPlan(params.plan);
|
|
100
|
+
// Calculate plan metrics
|
|
101
|
+
const wordCount = params.plan.split(/\s+/).length;
|
|
102
|
+
const lineCount = params.plan.split('\n').length;
|
|
103
|
+
const hasMarkdown = params.plan.includes('**') ||
|
|
104
|
+
params.plan.includes('##') ||
|
|
105
|
+
params.plan.includes('- ');
|
|
106
|
+
return {
|
|
107
|
+
...this.createSuccessResult(formattedOutput),
|
|
108
|
+
metadata: {
|
|
109
|
+
executionTime: Date.now() - startTime,
|
|
110
|
+
planLength: params.plan.length,
|
|
111
|
+
wordCount,
|
|
112
|
+
lineCount,
|
|
113
|
+
hasMarkdown,
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
// Check for abort
|
|
119
|
+
if (signal.aborted) {
|
|
120
|
+
return {
|
|
121
|
+
...this.createErrorResult('Plan presentation was cancelled'),
|
|
122
|
+
metadata: {
|
|
123
|
+
executionTime: Date.now() - startTime,
|
|
124
|
+
},
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
const errorMessage = error.message || String(error);
|
|
128
|
+
return {
|
|
129
|
+
...this.createErrorResult(`Error presenting plan: ${errorMessage}`),
|
|
130
|
+
metadata: {
|
|
131
|
+
executionTime: Date.now() - startTime,
|
|
132
|
+
error: errorMessage,
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Format plan for user presentation
|
|
139
|
+
*/
|
|
140
|
+
formatPlan(plan) {
|
|
141
|
+
const lines = [];
|
|
142
|
+
lines.push('=== Plan Ready for Execution ===\n\n');
|
|
143
|
+
lines.push(plan);
|
|
144
|
+
lines.push('\n\n---\n');
|
|
145
|
+
lines.push('Ready to exit plan mode and begin implementation.\n');
|
|
146
|
+
lines.push('Waiting for user approval...\n');
|
|
147
|
+
return lines.join('');
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=ExitPlanModeTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExitPlanModeTool.js","sourceRoot":"","sources":["../../../src/implementations/ui/ExitPlanModeTool.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAa/E;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,gBAAiB,SAAQ,QAGrC;IACqB;IAApB,YAAoB,MAAsB;QACxC,KAAK,CACH,cAAc,EACd,cAAc,EACd;;;;;;;;;8DASwD,EACxD;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,iIAAiI;oBACnI,SAAS,EAAE,EAAE;iBACd;aACF;YACD,QAAQ,EAAE,CAAC,MAAM,CAAC;SACnB,CACF,CAAC;QA1BgB,WAAM,GAAN,MAAM,CAAgB;IA2B1C,CAAC;IAED,kBAAkB,CAAC,MAA8B;QAC/C,oBAAoB;QACpB,MAAM,WAAW,GAAG,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;QAC3E,IAAI,WAAW,EAAE,CAAC;YAChB,OAAO,WAAW,CAAC;QACrB,CAAC;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AAE;oBACR,aAAa,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS;oBACrC,KAAK,EAAE,YAAY;iBACpB;aACF,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;OAEG;IACK,UAAU,CAAC,IAAY;QAC7B,MAAM,KAAK,GAAa,EAAE,CAAC;QAE3B,KAAK,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;QACnD,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACxB,KAAK,CAAC,IAAI,CACR,qDAAqD,CACtD,CAAC;QACF,KAAK,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QAE7C,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC;CACF"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Split-Tool Todo Executors — TodoCreate, TodoUpdate, TodoList
|
|
3
|
+
*
|
|
4
|
+
* Three targeted tools matching the TaskCreate/TaskUpdate/TaskList.
|
|
5
|
+
* Key design decisions:
|
|
6
|
+
* - TodoCreate/TodoUpdate return ONLY the affected task (compact output)
|
|
7
|
+
* - TodoList returns the full list (use it when you need the overview)
|
|
8
|
+
* - TodoUpdate accepts multiple taskIds for batch status changes
|
|
9
|
+
* - Shared in-memory state via module-level Map
|
|
10
|
+
*/
|
|
11
|
+
import { BaseTool, type ToolResult } from '../../base/index.js';
|
|
12
|
+
import type { ExecutorConfig } from '../../base/ToolRegistry.js';
|
|
13
|
+
export type TodoStatus = 'pending' | 'in_progress' | 'completed';
|
|
14
|
+
export interface TodoItem {
|
|
15
|
+
id: string;
|
|
16
|
+
content: string;
|
|
17
|
+
description: string;
|
|
18
|
+
activeForm: string;
|
|
19
|
+
status: TodoStatus;
|
|
20
|
+
createdAt: number;
|
|
21
|
+
updatedAt: number;
|
|
22
|
+
}
|
|
23
|
+
/** Reset state (for testing) */
|
|
24
|
+
export declare function resetTodoState(): void;
|
|
25
|
+
/** Get current todos (for SystemReminderInjector) */
|
|
26
|
+
export declare function getCurrentTodos(): TodoItem[];
|
|
27
|
+
export interface TodoCreateParams {
|
|
28
|
+
content: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
activeForm?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class TodoCreateTool extends BaseTool<TodoCreateParams, ToolResult> {
|
|
33
|
+
constructor(config: ExecutorConfig);
|
|
34
|
+
validateToolParams(params: TodoCreateParams): string | null;
|
|
35
|
+
getDescription(params: TodoCreateParams): string;
|
|
36
|
+
execute(params: TodoCreateParams, signal: AbortSignal): Promise<ToolResult>;
|
|
37
|
+
}
|
|
38
|
+
export interface TodoUpdateParams {
|
|
39
|
+
taskId: string;
|
|
40
|
+
status?: TodoStatus;
|
|
41
|
+
content?: string;
|
|
42
|
+
description?: string;
|
|
43
|
+
activeForm?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare class TodoUpdateTool extends BaseTool<TodoUpdateParams, ToolResult> {
|
|
46
|
+
constructor(config: ExecutorConfig);
|
|
47
|
+
validateToolParams(params: TodoUpdateParams): string | null;
|
|
48
|
+
getDescription(params: TodoUpdateParams): string;
|
|
49
|
+
execute(params: TodoUpdateParams, signal: AbortSignal): Promise<ToolResult>;
|
|
50
|
+
}
|
|
51
|
+
export interface TodoListParams {
|
|
52
|
+
}
|
|
53
|
+
export declare class TodoListTool extends BaseTool<TodoListParams, ToolResult> {
|
|
54
|
+
constructor(config: ExecutorConfig);
|
|
55
|
+
validateToolParams(_params: TodoListParams): string | null;
|
|
56
|
+
getDescription(_params: TodoListParams): string;
|
|
57
|
+
execute(_params: TodoListParams, signal: AbortSignal): Promise<ToolResult>;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=TodoWriteTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TodoWriteTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/ui/Todo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