Skip to content

Claude computer use, by Composer 1#11

Closed
mbijon wants to merge 3 commits intomainfrom
dat-composer
Closed

Claude computer use, by Composer 1#11
mbijon wants to merge 3 commits intomainfrom
dat-composer

Conversation

@mbijon
Copy link
Owner

@mbijon mbijon commented Nov 4, 2025

Introduces a Claude 4.5 computer-use agent to autonomously play Heatseeker, with full docs, tests, packaging, and Docker support


Note

Introduces a Claude 4.5 Sonnet computer-use agent to play Heatseeker via browser automation, packaged with Docker, tests, and documentation.

  • Agent/Automation:
    • Implement ComputerUseAgent (models/claude/src/agent.py) integrating Anthropic Claude 4.5 computer-use tool; drives action loop, executes clicks/keys/typing, returns screenshots.
    • Add BrowserController (models/claude/src/browser.py) for Playwright-based navigation, screenshots, and input; entrypoint src/main.py to run the agent.
  • Packaging & Infra:
    • New Python package claude-heatseeker (pyproject.toml, src/__init__.py).
    • Docker support (Dockerfile, docker-compose.yml) with uv setup and Chromium install; repo ignores (.gitignore, .dockerignore).
  • Testing:
    • Unit tests for agent and browser (models/claude/tests/), including tool-use flow and browser ops.
  • Docs:
    • Add run guide docs/computer_use/claude-4_5-api.md and module README.
  • Cleanup:
    • Remove prior content from claude.md.

Written by Cursor Bugbot for commit 7fea098. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Nov 4, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
heatseeker Ready Ready Preview Comment Nov 4, 2025 4:28pm

@mbijon mbijon changed the title Dat composer Claude computer use, by Composer 1 Nov 4, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +24 to +41
async def test_browser_start():
"""Test starting the browser."""
with patch("src.browser.async_playwright") as mock_playwright:
mock_pw = AsyncMock()
mock_playwright.return_value = mock_pw
mock_browser = MagicMock()
mock_pw.chromium.launch = AsyncMock(return_value=mock_browser)
mock_context = MagicMock()
mock_browser.new_context = AsyncMock(return_value=mock_context)
mock_page = MagicMock()
mock_context.new_page = AsyncMock(return_value=mock_page)

controller = BrowserController(headless=True)
await controller.start()

assert controller.playwright == mock_pw
assert controller.browser == mock_browser
assert controller.context == mock_context

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix async_playwright mock so tests exercise BrowserController

In test_browser_start the chromium.launch mock is attached to mock_pw, but BrowserController.start() awaits async_playwright().start() and uses the return value of start() as the Playwright instance. Because the test never assigns mock_pw.start.return_value to mock_pw, the controller interacts with a different AsyncMock that lacks the configured chromium.launch stub and controller.playwright will never equal mock_pw. The same pattern appears in test_browser_context_manager. As written, these tests will fail (or silently exercise the wrong object). Set mock_pw.start.return_value to an object with the mocked chromium, context, and page to ensure the controller uses the intended mock.

Useful? React with 👍 / 👎.

@mbijon mbijon closed this Nov 21, 2025
@mbijon mbijon deleted the dat-composer branch November 21, 2025 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant