-
Notifications
You must be signed in to change notification settings - Fork 53
Closed
Description
Decouple Browser Session 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 browser session tracking into its own dedicated tracker.
Proposed Changes
- Create a new
BrowserTrackerclass inpackages/agent/src/tools/browser/browserTracker.tsthat will be responsible for tracking browser sessions - Move browser-specific tracking logic from
backgroundTools.tsto this new class - Implement a new
listBrowserstool that uses the dedicatedBrowserTracker - Update
browseStart.tsandbrowseMessage.tsto use the new tracker instead ofbackgroundTools - Remove browser-related code from
backgroundTools.ts
Technical Details
- The new
BrowserTrackershould work alongside the existingbrowserSessionsmap to provide status tracking - It should provide methods for registering, updating, and retrieving browser sessions
- The
listBrowserstool should have similar filtering capabilities aslistBackgroundToolsbut focused only on browser sessions - 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 browser-specific functionality
- Clearer separation of concerns
Acceptance Criteria
-
BrowserTrackerclass is implemented -
listBrowserstool is implemented -
browseStartandbrowseMessageare updated to use the new tracker - Browser-specific code is removed from
backgroundTools.ts - All tests pass
- Documentation is updated
Metadata
Metadata
Assignees
Labels
No labels