Skip to content

Implementation of Issue #291: Decouple Browser Session Tracking from backgroundTools #293

@bhouston

Description

@bhouston

Implementation of Issue #291: Decouple Browser Session Tracking from backgroundTools

Changes Made

  1. Created a new BrowserTracker class in packages/agent/src/tools/browser/browserTracker.ts that is responsible for tracking browser sessions
  2. Moved browser-specific tracking logic from backgroundTools.ts to this new class
  3. Implemented a new listBrowsers tool that uses the dedicated BrowserTracker
  4. Updated browseStart.ts and browseMessage.ts to use the new tracker instead of backgroundTools
  5. Removed browser-related code from backgroundTools.ts

Implementation Details

  • The new BrowserTracker works alongside the existing browserSessions map to provide status tracking
  • It provides methods for registering, updating, and retrieving browser sessions
  • The listBrowsers tool has similar filtering capabilities as listBackgroundTools but focused only on browser sessions
  • The implementation maintains backward compatibility

Testing

The changes need to be tested to ensure:

  • Browser sessions can be created and tracked correctly
  • The listBrowsers tool works as expected
  • The browseStart and browseMessage tools work with the new tracker
  • The backgroundTools class no longer tracks browser sessions
  • All tests pass

Related Issues

Resolves #291

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions