@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,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EndTurn — generative end-of-turn attestation (Stage 1).
|
|
3
|
+
*
|
|
4
|
+
* Why: grounding/verification rules in system messages are ignored by some
|
|
5
|
+
* models (grok-4.3: ~0/6 on line-number fabrication); the SAME models obey
|
|
6
|
+
* tool mechanics (Edit `old_string`: 6/6). Routing the contract through a
|
|
7
|
+
* required tool converts an ignored request into an enforced checkpoint.
|
|
8
|
+
*
|
|
9
|
+
* The params are GENERATIVE, not multiple-choice: the model must re-derive
|
|
10
|
+
* each reference's verbatim source, paste the actual command output it saw,
|
|
11
|
+
* and write a skeptical self-review. A label can be rubber-stamped (Stage-1
|
|
12
|
+
* enum leaked 1/6); producing the evidence cannot — the act of
|
|
13
|
+
* reconstructing it forces the lookup and surfaces missed errors in latent
|
|
14
|
+
* space before the final message. Stage 1 does NOT verify server-side; it
|
|
15
|
+
* echoes the model's own self_review + sources back so it must act on them
|
|
16
|
+
* before finalizing. Server-side cross-check is Stage 2.
|
|
17
|
+
*/
|
|
18
|
+
import { BaseTool } from '../../base/index.js';
|
|
19
|
+
export class EndTurnToolExecutor extends BaseTool {
|
|
20
|
+
constructor() {
|
|
21
|
+
super('EndTurn', 'End Turn', 'Mandatory final step before your user-facing answer. You must RECONSTRUCT the evidence for your work (not tick boxes): list each reference with the verbatim source you copied it from, paste real command output, and write a skeptical self-review.', {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
citations: {
|
|
25
|
+
type: 'array',
|
|
26
|
+
description: "Every specific reference in your drafted answer (file:line, line numbers, URLs, API/function signatures, quotes). For EACH, give the exact token you transcribed from THIS turn's tool output. If you cannot produce the verbatim source, the reference is unverified — remove it from your answer and do not list it. Empty array = you cited none.",
|
|
27
|
+
items: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
reference: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'The claim/reference as it appears in your answer.',
|
|
33
|
+
},
|
|
34
|
+
verbatim_source: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: "The EXACT text copied from this turn's tool output that grounds it (a quoted code line, a URL from a fetched page). Character-for-character, like an edit old_string.",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
required: ['reference', 'verbatim_source'],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
verification: {
|
|
43
|
+
type: 'array',
|
|
44
|
+
description: 'Every verification command (build/test/lint) the task asked for that you actually ran THIS turn. Empty array = none asked. Do not list a command you did not run.',
|
|
45
|
+
items: {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
command: { type: 'string', description: 'The command you ran.' },
|
|
49
|
+
observed_result: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'The actual result line you saw in this turn\'s tool output.',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
required: ['command', 'observed_result'],
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
summary: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'One sentence: what you delivered this turn.',
|
|
60
|
+
},
|
|
61
|
+
open_items: {
|
|
62
|
+
type: 'array',
|
|
63
|
+
items: { type: 'string' },
|
|
64
|
+
description: 'Anything unverified, assumed, or incomplete. Empty array if nothing. Do not hide gaps.',
|
|
65
|
+
},
|
|
66
|
+
self_review: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'Re-read your drafted answer as a skeptical reviewer. What did you NOT check? What is assumed or possibly wrong? What surface might you have missed? If you had one more tool call, what would you verify? Be specific — this pass exists to catch your own mistakes before they ship.',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
// Only the two cheap, always-producible generative fields are required.
|
|
72
|
+
// The evidence arrays are legitimately empty on many turns ("empty =
|
|
73
|
+
// none"), so requiring them caused well-formed sparse attestations to
|
|
74
|
+
// loop-reject. Absent arrays normalize to [] in normalizeParams().
|
|
75
|
+
required: ['summary', 'self_review'],
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Coerce a raw attestation into a well-formed shape. Absent arrays become []
|
|
80
|
+
* ("empty = none" per the field docs); malformed array items are dropped
|
|
81
|
+
* rather than rejected. This makes EndTurn non-blocking at the executor level
|
|
82
|
+
* — the strict, MEANINGFUL rejection (a verbatim_source not grounded in this
|
|
83
|
+
* turn's tool output) is enforced by the orchestrator's Stage-2 grounding
|
|
84
|
+
* check when CORTEX_ENDTURN_GATE is on, where it belongs. A blunt
|
|
85
|
+
* validate-and-reject here only produced retry loops that ended in the model
|
|
86
|
+
* giving up with NO attestation at all — strictly worse than a sparse one.
|
|
87
|
+
*/
|
|
88
|
+
normalizeParams(params) {
|
|
89
|
+
const p = (params && typeof params === 'object' ? params : {});
|
|
90
|
+
// A citation is a (reference, verbatim_source) pair — drop any item missing
|
|
91
|
+
// either half (ungrounded evidence is not a citation). Same for verification.
|
|
92
|
+
const citations = (Array.isArray(p.citations) ? p.citations : [])
|
|
93
|
+
.filter((c) => c &&
|
|
94
|
+
typeof c.reference === 'string' &&
|
|
95
|
+
c.reference.trim() !== '' &&
|
|
96
|
+
typeof c.verbatim_source === 'string' &&
|
|
97
|
+
c.verbatim_source.trim() !== '')
|
|
98
|
+
.map((c) => ({ reference: c.reference, verbatim_source: c.verbatim_source }));
|
|
99
|
+
const verification = (Array.isArray(p.verification) ? p.verification : [])
|
|
100
|
+
.filter((v) => v &&
|
|
101
|
+
typeof v.command === 'string' &&
|
|
102
|
+
v.command.trim() !== '' &&
|
|
103
|
+
typeof v.observed_result === 'string' &&
|
|
104
|
+
v.observed_result.trim() !== '')
|
|
105
|
+
.map((v) => ({ command: v.command, observed_result: v.observed_result }));
|
|
106
|
+
const open_items = (Array.isArray(p.open_items) ? p.open_items : []).filter((o) => typeof o === 'string' && o.trim() !== '');
|
|
107
|
+
return {
|
|
108
|
+
citations,
|
|
109
|
+
verification,
|
|
110
|
+
summary: typeof p.summary === 'string' ? p.summary : '',
|
|
111
|
+
open_items,
|
|
112
|
+
self_review: typeof p.self_review === 'string' ? p.self_review : '',
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
validateToolParams(params) {
|
|
116
|
+
// Non-blocking: any object is acceptable. Missing/empty fields normalize
|
|
117
|
+
// (absent arrays → [], "empty = none"). The only thing worth a hard reject
|
|
118
|
+
// is a payload that isn't an object at all.
|
|
119
|
+
if (!params || typeof params !== 'object')
|
|
120
|
+
return 'params object required';
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
getDescription(params) {
|
|
124
|
+
const nCit = Array.isArray(params?.citations) ? params.citations.length : 0;
|
|
125
|
+
const nVer = Array.isArray(params?.verification) ? params.verification.length : 0;
|
|
126
|
+
return `EndTurn attestation (${nCit} citation(s), ${nVer} verification(s))`;
|
|
127
|
+
}
|
|
128
|
+
async execute(rawParams, _signal) {
|
|
129
|
+
const validationError = this.validateToolParams(rawParams);
|
|
130
|
+
if (validationError) {
|
|
131
|
+
return {
|
|
132
|
+
llmContent: `EndTurn rejected: ${validationError}. Fix the attestation and call EndTurn again.`,
|
|
133
|
+
success: false,
|
|
134
|
+
error: validationError,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
// Normalize: absent arrays → [], malformed items dropped, missing strings → ''.
|
|
138
|
+
const params = this.normalizeParams(rawParams);
|
|
139
|
+
const cites = params.citations.length > 0
|
|
140
|
+
? params.citations
|
|
141
|
+
.map((c) => ` - "${c.reference}" ⇐ ${c.verbatim_source}`)
|
|
142
|
+
.join('\n')
|
|
143
|
+
: ' (none cited)';
|
|
144
|
+
const vers = params.verification.length > 0
|
|
145
|
+
? params.verification
|
|
146
|
+
.map((v) => ` - \`${v.command}\` ⇒ ${v.observed_result}`)
|
|
147
|
+
.join('\n')
|
|
148
|
+
: ' (none)';
|
|
149
|
+
const open = params.open_items.length > 0
|
|
150
|
+
? params.open_items.map((o) => ` - ${o}`).join('\n')
|
|
151
|
+
: ' (none)';
|
|
152
|
+
// Echo the model's OWN reconstruction + skeptical review back at it. The
|
|
153
|
+
// model must now read its own self_review and act on it before
|
|
154
|
+
// finalizing — the reflection loop closes in its own context (no
|
|
155
|
+
// server-side verification in Stage 1).
|
|
156
|
+
const llmContent = `Attestation recorded — read your own review before finalizing:\n\n` +
|
|
157
|
+
`CITATIONS (each must be grounded in the verbatim source you gave):\n${cites}\n\n` +
|
|
158
|
+
`VERIFICATION:\n${vers}\n\n` +
|
|
159
|
+
`OPEN ITEMS:\n${open}\n\n` +
|
|
160
|
+
`YOUR SELF-REVIEW:\n ${params.self_review}\n\n` +
|
|
161
|
+
`SUMMARY: ${params.summary}\n\n` +
|
|
162
|
+
`Now act on your own self-review: if it identified anything missed, wrong, or unverified, FIX it before answering — re-read or re-run as needed. ` +
|
|
163
|
+
`Your final answer MUST NOT contain any reference not backed by a verbatim_source above; if you can't ground it, quote the code/source instead of asserting a coordinate. ` +
|
|
164
|
+
`Then produce your final answer (the user-facing response) as plain text. Do not call any more tools.`;
|
|
165
|
+
return {
|
|
166
|
+
llmContent,
|
|
167
|
+
returnDisplay: `EndTurn: ${params.citations.length} cited, ${params.verification.length} verified`,
|
|
168
|
+
success: true,
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=EndTurnTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EndTurnTool.js","sourceRoot":"","sources":["../../../src/implementations/extensions/EndTurnTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AA+BhE,MAAM,OAAO,mBAAoB,SAAQ,QAAmC;IAC1E;QACE,KAAK,CACH,SAAS,EACT,UAAU,EACV,uPAAuP,EACvP;YACE,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,OAAO;oBACb,WAAW,EACT,sVAAsV;oBACxV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,SAAS,EAAE;gCACT,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,mDAAmD;6BACjE;4BACD,eAAe,EAAE;gCACf,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,uKAAuK;6BAC1K;yBACF;wBACD,QAAQ,EAAE,CAAC,WAAW,EAAE,iBAAiB,CAAC;qBAC3C;iBACF;gBACD,YAAY,EAAE;oBACZ,IAAI,EAAE,OAAO;oBACb,WAAW,EACT,mKAAmK;oBACrK,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,sBAAsB,EAAE;4BAChE,eAAe,EAAE;gCACf,IAAI,EAAE,QAAQ;gCACd,WAAW,EAAE,6DAA6D;6BAC3E;yBACF;wBACD,QAAQ,EAAE,CAAC,SAAS,EAAE,iBAAiB,CAAC;qBACzC;iBACF;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,6C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AC,CAAC,SAAS,CAAC;QAChB,MAAM,IAAI,GACR,MAAM,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC;YAC1B,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;YACpD,CAAC,CAAC,SAAS,CAAC;QAEhB,yEAAyE;QACzE,+DAA+D;QAC/D,iEAAiE;QACjE,wCAAwC;QACxC,MAAM,UAAU,GACd,oEAAoE;YACpE,uEAAuE,KAAK,MAAM;YAClF,kBAAkB,IAAI,MAAM;YAC5B,gBAAgB,IAAI,MAAM;YAC1B,wBAAwB,MAAM,CAAC,WAAW,MAAM;YAChD,YAAY,MAAM,CAAC,OAAO,MAAM;YAChC,kJAAkJ;YAClJ,2KAA2K;YAC3K,sGAAsG,CAAC;QAEzG,OAAO;YACL,UAAU;YACV,aAAa,EAAE,YAAY,MAAM,CAAC,SAAS,CAAC,MAAM,WAAW,MAAM,CAAC,YAAY,CAAC,MAAM,WAAW;YAClG,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ResearchBacklog tool — agent-facing interface to the recursive auto-research
|
|
3
|
+
* deficiency lifecycle (core `ResearchBacklog`). During benchmarking, the harness
|
|
4
|
+
* AUTO-ADDS every deficiency it finds, triages it (priority computed on add), and
|
|
5
|
+
* walks it through open → triaged → in_progress → fixed → verified → closed.
|
|
6
|
+
*
|
|
7
|
+
* OVERFITTING GUARD: `fixed` (passes the discovery task) is NOT `verified`
|
|
8
|
+
* (also holds on held-out tasks). Only call `verified` after held-out confirmation.
|
|
9
|
+
*/
|
|
10
|
+
import { BaseTool, type ToolResult } from '../../base/index.js';
|
|
11
|
+
import { type Severity } from '@nexus-cortex/core';
|
|
12
|
+
export interface ResearchBacklogParams {
|
|
13
|
+
action: 'add' | 'triage' | 'list' | 'next' | 'in_progress' | 'fixed' | 'verified' | 'close' | 'wont_fix' | 'regressed';
|
|
14
|
+
title?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
bugClass?: string;
|
|
17
|
+
severity?: Severity;
|
|
18
|
+
impact?: number;
|
|
19
|
+
effort?: number;
|
|
20
|
+
confidence?: number;
|
|
21
|
+
discoveredRound?: string;
|
|
22
|
+
affectedModels?: string[];
|
|
23
|
+
id?: string;
|
|
24
|
+
experimentTag?: string;
|
|
25
|
+
ref?: string;
|
|
26
|
+
status?: string;
|
|
27
|
+
}
|
|
28
|
+
export declare class ResearchBacklogToolExecutor extends BaseTool<ResearchBacklogParams, ToolResult> {
|
|
29
|
+
private backlog;
|
|
30
|
+
constructor(config: {
|
|
31
|
+
workingDirectory: string;
|
|
32
|
+
});
|
|
33
|
+
validateToolParams(p: ResearchBacklogParams): string | null;
|
|
34
|
+
execute(params: ResearchBacklogParams): Promise<ToolResult>;
|
|
35
|
+
private resultOr;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=ResearchBacklogTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResearchBacklogTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/extensions/ResearchBacklogTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAmB,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,UAAU,GAAG,WAAW,CAAC;IAEvH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,2BAA4B,SAAQ,QAAQ,CAAC,qBAAqB,EAAE,UAAU,CAAC;IAC1F,OAAO,CAAC,OAAO,CAAkB;gBAErB,MAAM,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAA;KAAE;IA4BhD,kBAAkB,CAAC,CAAC,EAAE,qBAAqB,GAAG,MAAM,GAAG,IAAI;IASrD,OAAO,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC;IA4CjE,OAAO,CAAC,QAAQ;CAKjB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ResearchBacklog tool — agent-facing interface to the recursive auto-research
|
|
3
|
+
* deficiency lifecycle (core `ResearchBacklog`). During benchmarking, the harness
|
|
4
|
+
* AUTO-ADDS every deficiency it finds, triages it (priority computed on add), and
|
|
5
|
+
* walks it through open → triaged → in_progress → fixed → verified → closed.
|
|
6
|
+
*
|
|
7
|
+
* OVERFITTING GUARD: `fixed` (passes the discovery task) is NOT `verified`
|
|
8
|
+
* (also holds on held-out tasks). Only call `verified` after held-out confirmation.
|
|
9
|
+
*/
|
|
10
|
+
import { BaseTool } from '../../base/index.js';
|
|
11
|
+
import { ResearchBacklog } from '@nexus-cortex/core';
|
|
12
|
+
export class ResearchBacklogToolExecutor extends BaseTool {
|
|
13
|
+
backlog;
|
|
14
|
+
constructor(config) {
|
|
15
|
+
super('ResearchBacklog', 'ResearchBacklog', 'Track & triage harness deficiencies for recursive auto-research', {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
action: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
enum: ['add', 'triage', 'list', 'next', 'in_progress', 'fixed', 'verified', 'close', 'wont_fix', 'regressed'],
|
|
21
|
+
description: "add (auto-triages on add) | triage | list | next (highest-priority open item) | in_progress | fixed (passes discovery task) | verified (held-out confirmed — overfitting-cleared) | close | wont_fix | regressed",
|
|
22
|
+
},
|
|
23
|
+
title: { type: 'string', description: 'add: short deficiency title (also the dedupe key)' },
|
|
24
|
+
description: { type: 'string', description: 'add: what is wrong + how it was found' },
|
|
25
|
+
bugClass: { type: 'string', description: 'Adapter | Streaming | Caching | Loop control | Routing | Config | Model card | State | Infrastructure | TUI | Other' },
|
|
26
|
+
severity: { type: 'string', enum: ['low', 'medium', 'high', 'critical'] },
|
|
27
|
+
impact: { type: 'number', description: '1-5: how much it degrades the harness' },
|
|
28
|
+
effort: { type: 'number', description: '1-5: estimated fix cost' },
|
|
29
|
+
confidence: { type: 'number', description: '0-1: how sure it is a real deficiency (not model noise)' },
|
|
30
|
+
discoveredRound: { type: 'string' },
|
|
31
|
+
affectedModels: { type: 'array', items: { type: 'string' } },
|
|
32
|
+
id: { type: 'string', description: 'target deficiency id (for triage/lifecycle ops)' },
|
|
33
|
+
experimentTag: { type: 'string', description: 'in_progress: the worktree experiment tag' },
|
|
34
|
+
ref: { type: 'string', description: 'fixed: commit SHA · verified: held-out round · wont_fix: reason' },
|
|
35
|
+
status: { type: 'string', description: 'list: filter by status' },
|
|
36
|
+
},
|
|
37
|
+
required: ['action'],
|
|
38
|
+
});
|
|
39
|
+
this.backlog = new ResearchBacklog(config.workingDirectory || process.env.PROJECT_ROOT || process.cwd());
|
|
40
|
+
}
|
|
41
|
+
validateToolParams(p) {
|
|
42
|
+
if (!p.action)
|
|
43
|
+
return 'action is required';
|
|
44
|
+
if (p.action === 'add' && (!p.title || !p.description))
|
|
45
|
+
return 'add requires title and description';
|
|
46
|
+
if (['triage', 'in_progress', 'fixed', 'verified', 'close', 'wont_fix', 'regressed'].includes(p.action) && !p.id) {
|
|
47
|
+
return `${p.action} requires an id (use action:list to find it)`;
|
|
48
|
+
}
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
async execute(params) {
|
|
52
|
+
const err = this.validateToolParams(params);
|
|
53
|
+
if (err)
|
|
54
|
+
return this.createErrorResult(err);
|
|
55
|
+
try {
|
|
56
|
+
const fmt = (r) => JSON.stringify(r, null, 2);
|
|
57
|
+
switch (params.action) {
|
|
58
|
+
case 'add':
|
|
59
|
+
return this.createSuccessResult(fmt(this.backlog.add({
|
|
60
|
+
title: params.title, description: params.description, bugClass: params.bugClass,
|
|
61
|
+
severity: params.severity, impact: params.impact, effort: params.effort, confidence: params.confidence,
|
|
62
|
+
discoveredRound: params.discoveredRound, affectedModels: params.affectedModels,
|
|
63
|
+
})));
|
|
64
|
+
case 'triage':
|
|
65
|
+
return this.resultOr(this.backlog.triage(params.id, {
|
|
66
|
+
severity: params.severity, impact: params.impact, effort: params.effort, confidence: params.confidence,
|
|
67
|
+
}), params.id);
|
|
68
|
+
case 'list': {
|
|
69
|
+
const items = this.backlog.list({ status: params.status });
|
|
70
|
+
return this.createSuccessResult(`${items.length} deficiencies (by priority):\n${fmt(items)}`);
|
|
71
|
+
}
|
|
72
|
+
case 'next': {
|
|
73
|
+
const n = this.backlog.next();
|
|
74
|
+
return this.createSuccessResult(n ? fmt(n) : 'No open/triaged deficiencies in the backlog.');
|
|
75
|
+
}
|
|
76
|
+
case 'in_progress':
|
|
77
|
+
return this.resultOr(this.backlog.markInProgress(params.id, params.experimentTag ?? 'untagged'), params.id);
|
|
78
|
+
case 'fixed':
|
|
79
|
+
return this.resultOr(this.backlog.markFixed(params.id, params.ref ?? ''), params.id);
|
|
80
|
+
case 'verified':
|
|
81
|
+
return this.resultOr(this.backlog.markVerified(params.id, params.ref ?? ''), params.id);
|
|
82
|
+
case 'close':
|
|
83
|
+
return this.resultOr(this.backlog.close(params.id), params.id);
|
|
84
|
+
case 'wont_fix':
|
|
85
|
+
return this.resultOr(this.backlog.wontFix(params.id, params.ref ?? 'no reason given'), params.id);
|
|
86
|
+
case 'regressed':
|
|
87
|
+
return this.resultOr(this.backlog.reopenRegressed(params.id), params.id);
|
|
88
|
+
default:
|
|
89
|
+
return this.createErrorResult(`Unknown action: ${params.action}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
return this.createErrorResult(e instanceof Error ? e : String(e));
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
resultOr(rec, id) {
|
|
97
|
+
return rec
|
|
98
|
+
? this.createSuccessResult(JSON.stringify(rec, null, 2))
|
|
99
|
+
: this.createErrorResult(`No deficiency with id "${id}" (use action:list).`);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=ResearchBacklogTool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResearchBacklogTool.js","sourceRoot":"","sources":["../../../src/implementations/extensions/ResearchBacklogTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAmB,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,eAAe,EAAiB,MAAM,oBAAoB,CAAC;AAsBpE,MAAM,OAAO,2BAA4B,SAAQ,QAA2C;IAClF,OAAO,CAAkB;IAEjC,YAAY,MAAoC;QAC9C,KAAK,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,iEAAiE,EAAE;YAC7G,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,UA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Y,EAAE,EAAU;QACvC,OAAO,GAAG;YACR,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;YACxD,CAAC,CAAC,IAAI,CAAC,iBAAiB,CAAC,0BAA0B,EAAE,sBAAsB,CAAC,CAAC;IACjF,CAAC;CACF"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill Tool - Invoke specialized skills from .agents/skills/ or .cortex/skills/
|
|
3
|
+
*
|
|
4
|
+
* Loads and invokes skills defined as directories containing SKILL.md files
|
|
5
|
+
* with YAML frontmatter. Skills are model-invoked capabilities that extend
|
|
6
|
+
* the agent's functionality.
|
|
7
|
+
*
|
|
8
|
+
* Search order: .agents/skills/ → .cortex/skills/ → ~/.cortex/skills/
|
|
9
|
+
*/
|
|
10
|
+
import { BaseTool, type ToolResult } from '../../base/index.js';
|
|
11
|
+
/**
|
|
12
|
+
* Parameters for the Skill tool
|
|
13
|
+
*/
|
|
14
|
+
export interface SkillParams {
|
|
15
|
+
/** The skill name (no arguments), e.g., "pdf" or "xlsx" */
|
|
16
|
+
command: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Skill Tool Executor
|
|
20
|
+
*
|
|
21
|
+
* Invokes specialized skills from skill directories.
|
|
22
|
+
* Skills are model-invoked capabilities defined in SKILL.md files.
|
|
23
|
+
*
|
|
24
|
+
* Example skill directory structure:
|
|
25
|
+
* ```
|
|
26
|
+
* .agents/skills/pdf-documents/
|
|
27
|
+
* ├── SKILL.md # Required: skill definition
|
|
28
|
+
* ├── sections/ # Optional: spoke files referenced by hub
|
|
29
|
+
* ├── reference.md # Optional: reference docs
|
|
30
|
+
* └── scripts/ # Optional: helper scripts
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* Search order (first match wins — cwd-specific overrides/extends central):
|
|
34
|
+
* 1. Project `.agents/skills/` (cwd-specific overlay — cross-harness convention)
|
|
35
|
+
* 2. Project `.cortex/skills/` (cwd-specific overlay — nexus-cortex native)
|
|
36
|
+
* 3. Central `~/.agents/skills/` (the universal master list, shared across cwds)
|
|
37
|
+
* 4. Personal `~/.cortex/skills/` (nexus-cortex personal skills)
|
|
38
|
+
*
|
|
39
|
+
* Skills are mostly universal, so they live centrally in `~/.agents/skills/`
|
|
40
|
+
* and are reachable from any cwd; a project may add cwd-specific skills (or
|
|
41
|
+
* override a central one) by name in its own `.agents/skills/`, searched first.
|
|
42
|
+
*
|
|
43
|
+
* Usage: Skill({ command: "pdf-documents" })
|
|
44
|
+
*/
|
|
45
|
+
export declare class SkillToolExecutor extends BaseTool<SkillParams, ToolResult> {
|
|
46
|
+
private skillsCache;
|
|
47
|
+
private skillsDirs;
|
|
48
|
+
constructor(config: {
|
|
49
|
+
workingDirectory: string;
|
|
50
|
+
});
|
|
51
|
+
validateToolParams(params: SkillParams): string | null;
|
|
52
|
+
getDescription(params: SkillParams): string;
|
|
53
|
+
execute(params: SkillParams, signal: AbortSignal, updateOutput?: (output: string) => void): Promise<ToolResult>;
|
|
54
|
+
/**
|
|
55
|
+
* Load skill definition from .cortex/skills/ directories
|
|
56
|
+
* Searches project skills first, then personal skills
|
|
57
|
+
*/
|
|
58
|
+
private loadSkill;
|
|
59
|
+
/**
|
|
60
|
+
* Load all skill definitions from project and personal directories.
|
|
61
|
+
* First match wins — earlier dirs in skillsDirs take precedence.
|
|
62
|
+
*/
|
|
63
|
+
private loadAllSkills;
|
|
64
|
+
/**
|
|
65
|
+
* Load skills from a specific directory
|
|
66
|
+
*/
|
|
67
|
+
private loadSkillsFromDirectory;
|
|
68
|
+
/**
|
|
69
|
+
* Parse skill definition from SKILL.md file
|
|
70
|
+
*
|
|
71
|
+
* Format:
|
|
72
|
+
* ```markdown
|
|
73
|
+
* ---
|
|
74
|
+
* name: skill-name
|
|
75
|
+
* description: What this skill does
|
|
76
|
+
* allowed-tools: Read, Write, Grep # Optional
|
|
77
|
+
* ---
|
|
78
|
+
*
|
|
79
|
+
* # Skill Name
|
|
80
|
+
*
|
|
81
|
+
* ## Instructions
|
|
82
|
+
* Step-by-step guidance...
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
private parseSkillFile;
|
|
86
|
+
/**
|
|
87
|
+
* Simple YAML frontmatter parser
|
|
88
|
+
* Handles basic key: value pairs
|
|
89
|
+
*/
|
|
90
|
+
private parseFrontmatter;
|
|
91
|
+
/**
|
|
92
|
+
* Format skill output for display
|
|
93
|
+
*/
|
|
94
|
+
private formatSkillOutput;
|
|
95
|
+
/**
|
|
96
|
+
* Format a readable listing of all available skills
|
|
97
|
+
*/
|
|
98
|
+
private formatSkillListing;
|
|
99
|
+
/**
|
|
100
|
+
* Get list of available skills (for error messages)
|
|
101
|
+
*/
|
|
102
|
+
private getAvailableSkills;
|
|
103
|
+
/**
|
|
104
|
+
* Clear the skills cache (useful for testing or reloading)
|
|
105
|
+
*/
|
|
106
|
+
clearCache(): void;
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=SkillTool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkillTool.d.ts","sourceRoot":"","sources":["../../../src/implementations/extensions/SkillTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAMhE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;CACjB;AAcD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ,CAAC,WAAW,EAAE,UAAU,CAAC;IACtE,OAAO,CAAC,WAAW,CAA6C;IAChE,OAAO,CAAC,UAAU,CAA+E;gBAErF,MAAM,EAAE;QAAE,gBAAgB,EAAE,MAAM,CAAA;KAAE;IA6BhD,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI;IAmBtD,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM;IAKrC,OAAO,CACX,MAAM,EAAE,WAAW,EACnB,MAAM,EAAE,WAAW,EACnB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GACtC,OAAO,CAAC,UAAU,CAAC;IA6EtB;;;OAGG;YACW,SAAS;IAgBvB;;;OAGG;YACW,aAAa;IAQ3B;;OAEG;YACW,uBAAuB;IA4CrC;;;;;;;;;;;;;;;;OAgBG;YACW,cAAc;IAkD5B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAgBxB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAuBzB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAkB1B;;OAEG;YACW,kBAAkB;IAchC;;OAEG;IACH,UAAU,IAAI,IAAI;CAGnB"}
|