-
Couldn't load subscription status.
- Fork 62
Open
Description
Overview
Currently, the SSH command execution waits for the entire command to complete before returning the output. This can be problematic for long-running commands or when real-time feedback is needed. We need to implement streaming output functionality for remote SSH command execution.
Current Implementation
The current implementation in SSHManager.execute():
- Uses Paramiko's
exec_command() - Waits for command completion
- Returns complete output as a single string
- No progress visibility during execution
Proposed Changes
-
Core SSH Manager Updates
- Modify
execute()to support streaming mode - Implement generator-based output streaming
- Add buffer size configuration
- Handle both stdout and stderr streams
- Modify
-
API Changes
- Add streaming parameter to
RemoteShellInput - Update return type to support both string and generator modes
- Implement progress callbacks
- Add timeout configuration
- Add streaming parameter to
-
UI/UX Improvements
- Real-time output display in terminal
- Progress indication for long-running commands
- Color-coded output (stdout vs stderr)
- Support for command interruption
-
Langchain Integration
- Update
HyperbolicToolto support streaming outputs - Implement Langchain streaming callbacks
- Integrate with Langchain's streaming interfaces
- Support async execution in Langchain agent
- Add streaming support to
HyperbolicAgentkitWrapper
- Update
Success Criteria
- Real-time output streaming for remote commands
- Minimal latency between command execution and output display
- Proper error handling and status reporting
- Backward compatibility with existing code
- Documentation for new streaming features
Testing Requirements
-
Unit Tests
- Test streaming functionality
- Verify error handling
- Check timeout behavior
- Test large output handling
-
Integration Tests
- Test with various command types
- Verify real-world performance
- Test interruption handling
Metadata
Metadata
Assignees
Labels
No labels