Commit Graph
5 Commits
Author SHA1 Message Date
Sammy Farida ff57b466c4 fix: address code review issues #1, #2, #3, #7, #11 (#69)
- Fix SSH client exception handling to catch only KeyError/AttributeError (Issue #1)
- Fix DNS cache race condition with 1-second grace period (Issue #2)
- Fix cleanup thread to support graceful shutdown and log exceptions (Issue #3)
- Improve type hints for _ctx_log payload parameter (Issue #7)
- Increase command hash length from 12 to 16 characters for better collision resistance (Issue #11)

BREAKING CHANGE: Command hash length increased from 12 to 16 characters.
External tools parsing command hashes may need updates.

Added comprehensive unit tests for all fixes (11 new tests).
All 280 tests pass.
2025-11-18 11:41:57 -05:00
Sammy Farida 0e8a71020f Adopt MCP context notifications for async tasks (#40) 2025-11-07 17:31:13 -05:00
Sammy Farida 7a31c5f266 style: Apply Black code formatting
- Format utilities.py, mcp_server.py, and test_async_task_manager.py
- Ensure compliance with Black's 88-character line limit
- Improve code readability with proper line breaks
- Fix multi-line function calls and parameter formatting
- Consistent string quote usage

All Black formatting checks now pass
2025-10-25 23:45:48 -04:00
Sammy Farida 34b3243328 fix: Resolve test failures and linting issues
- Fix AsyncTaskManager tests to expect dictionaries instead of JSON strings
- Fix error message assertions in server tool tests
- Remove unused variables and fix whitespace issues
- All 74 tests now pass with 55% code coverage
- All linting issues resolved
2025-10-25 17:47:27 -04:00
Sammy Farida 9908f00009 feat: Add SEP-1686 compliant async task support
- Add AsyncTaskManager with thread-safe task execution
- Implement 5 new MCP tools: ssh_run_async, ssh_get_task_status, ssh_get_task_result, ssh_get_task_output, ssh_cancel_async_task
- Add MCP notifications for task events (created, progress, completed, failed, cancelled)
- Add policy configuration for task TTL and progress intervals
- Update documentation with async task examples and benefits
- Add comprehensive test coverage for async functionality
- Bump version to 0.2.0

This resolves the issue of repeated SSH connections during long-running operations
by providing non-blocking execution with real-time progress monitoring.
2025-10-25 17:36:11 -04:00