-
Notifications
You must be signed in to change notification settings - Fork 54
Closed
Description
Decouple Shell Process Tracking from backgroundTools
Description
Currently, the backgroundTools tracker is used to track shell processes, browser sessions, and agents in a single implementation. This creates unnecessary coupling between these different types of tools. This issue proposes to refactor the shell process tracking into its own dedicated tracker.
Proposed Changes
- Create a new
ShellTrackerclass inpackages/agent/src/tools/system/shellTracker.tsthat will be responsible for tracking shell processes - Move shell-specific tracking logic from
backgroundTools.tsto this new class - Implement a new
listShellstool that uses the dedicatedShellTracker - Update
shellStart.tsandshellMessage.tsto use the new tracker instead ofbackgroundTools - Remove shell-related code from
backgroundTools.ts
Technical Details
- The new
ShellTrackershould maintain a registry of shell processes similar to howprocessStatesworks now - It should provide methods for registering, updating, and retrieving shell processes
- The
listShellstool should have similar filtering capabilities aslistBackgroundToolsbut focused only on shell processes - The implementation should maintain backward compatibility where possible
Benefits
- Reduced coupling between different tool types
- More focused and maintainable code
- Easier to extend or modify shell-specific functionality
- Clearer separation of concerns
Acceptance Criteria
-
ShellTrackerclass is implemented -
listShellstool is implemented -
shellStartandshellMessageare updated to use the new tracker - Shell-specific code is removed from
backgroundTools.ts - All tests pass
- Documentation is updated
Metadata
Metadata
Assignees
Labels
No labels