Skip to content

Fix: Improve resource trackers and fix tests #307

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Mar 18, 2025

Conversation

bhouston
Copy link
Member

Improve resource trackers and fix tests

Description

This PR builds on PR #306 to improve the resource tracker implementation and fix the failing tests. It addresses the issues identified in the review of the original PR.

Changes

  • Standardize file naming by renaming ShellTracker.ts to shellTracker.ts for consistency with other tracker files
  • Fix tests to use toolContext.shellTracker instead of local instances
  • Update test assertions to work with the new tracker structure
  • Fix test for piped commands to be more reliable

Benefits

  • Consistent file naming across the codebase
  • All tests now pass with the new resource tracker implementation
  • Better test reliability

Related PRs

This commit replaces the global background tools approach with individual
resource trackers (AgentTracker, ShellTracker, and BrowserTracker) that are
scoped to each agent instance. This improves encapsulation and resource
management by ensuring that each agent is responsible for its own resources.

- Remove backgroundTools.ts and related files
- Refactor resource trackers to be scoped to the agent
- Add cleanup methods to each tracker
- Update tool implementations to use the new trackers

Closes #305
- Standardize file naming by renaming ShellTracker.ts to shellTracker.ts
- Fix tests to use toolContext.shellTracker instead of local instances
- Update test assertions to work with the new tracker structure
- Fix test for piped commands to be more reliable
@bhouston bhouston merged commit b8bf908 into main Mar 18, 2025
1 check passed
Copy link

🎉 This PR is included in version mycoder-agent-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link

🎉 This PR is included in version mycoder-v1.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant