Replace browser backend with agent-browser#23
Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
tap | c1cfcd1 | May 24 2026, 07:18 AM |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 22c24106f7
ℹ️ 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".
| return err | ||
| } | ||
| ab.SessionName = "" | ||
| _, _, _ = ab.Exec(ctx, "close") |
There was a problem hiding this comment.
Avoid closing external browser on attach clear
tap attach clear is documented to remove attachment metadata only, but this implementation executes agent-browser close first. In the common case where the user attached to an already-running Chrome instance, this can unexpectedly close their live browser session (and active work) instead of just detaching tap, which is a destructive behavior change from the command contract.
Useful? React with 👍 / 👎.
| if url == "" { | ||
| if portFile := cmd.String("port-file"); portFile != "" { | ||
| return fmt.Errorf("port-file auto-discovery not yet implemented with agent-browser") | ||
| } | ||
| debugURL = url | ||
| source = fmt.Sprintf("port file: %s", path) | ||
| } else { | ||
| // Auto-discover | ||
| url, path, err := browser.DiscoverUserChromeDebugURL() | ||
| if err != nil { | ||
| return fmt.Errorf(`could not find a running Chrome with remote debugging enabled. | ||
|
|
||
| To use tap attach chrome, you need: | ||
| 1. Chrome already running with --remote-debugging-port=9222, OR | ||
| 2. Chrome with DevToolsActivePort in a standard location | ||
|
|
||
| Try one of: | ||
| tap attach chrome --browser-url http://localhost:9222 | ||
| google-chrome --remote-debugging-port=9222 & | ||
| tap attach chrome | ||
|
|
||
| Original error: %w`, err) | ||
| } | ||
| debugURL = url | ||
| source = fmt.Sprintf("auto-discovered: %s", path) | ||
| } | ||
|
|
||
| // Resolve to WebSocket URL if HTTP base URL provided | ||
| wsURL, err := browser.ResolveDebugURL(ctx, debugURL) | ||
| if err != nil { | ||
| return fmt.Errorf("resolve debug URL: %w", err) | ||
| return fmt.Errorf("no Chrome URL provided; use --browser-url http://localhost:9222") |
There was a problem hiding this comment.
Restore no-arg attach chrome discovery flow
The chrome attach path now hard-fails unless --browser-url is provided, and --port-file also fails with “not yet implemented.” That removes the advertised no-arg tap attach chrome discovery workflow (DevToolsActivePort auto-discovery) and breaks existing scripts/users relying on default attach behavior.
Useful? React with 👍 / 👎.
|
Browser smoke testing completed against agent-browser 0.27.0. Validated tap → agent-browser command conversion for:
Fixes pushed:
Verification: |
|
Updated per review: tap now embeds agent-browser instead of downloading it at runtime. What changed:
Verification:
|
|
Adjusted embedding strategy: agent-browser binaries are no longer committed to git. What changed:
Verification:
|
|
Added simple first-class Lightpanda support via global Behavior:
Smoke test:
Verification: |
Summary
Verification
Closes #22