Repository navigation
refactor(agui): host the extension socket behind a Request seam and fail pending requests fast - #1406
Merged
Merged
Conversation
Move the opentask bridge (listener, origin check, browser_hello token handshake, one-active-connection replacement, pings, /artifacts/ route and the panel units) from browser/infrastructure into protocols/agui, and add bridge.Request(ctx, id, frame) as the command/result RPC. The browser capability keeps a thin ExtensionDriver that builds browser_command frames, owns the per-action timeout and maps results, wired by the container through the injected ExtensionRequest so browser never imports protocols/agui. The depguard rule becomes websocket-only-in-agui-and-web and every frame on the wire keeps its shape, so the extension works unchanged.
inference-gateway-maintainer
Bot
marked this pull request as ready for review
September 29, 2026 00:23
inference-gateway-maintainer
Bot
requested a review
from a team
as a code owner
September 29, 2026 00:23
7 tasks
… config Request now returns at once when the extension disconnects, is replaced or the write fails, instead of waiting out the deadline. The bridge takes only the extension port and token, and a test drives the real ExtensionDriver over the bridge.
Wrap the browser_result decode error with the action, default the screenshot mime type with cmp.Or and fix two stale doc comments. The driver tests share one config helper, and the bridge tests share one retry-until-connected helper. The disconnect test now runs under a 2s deadline, so a regression fails instead of hanging. A depguard rule keeps internal/browser from importing protocols/agui.
Contributor
|
🎉 This PR is included in version 0.219.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #1395
Summary
The opentask browser-extension bridge was a protocol living inside a browser adapter. This moves the extension socket, the Origin check, the browser_hello token handshake, one-active-connection replacement, pings, the /artifacts/ route and the panel units into internal/protocols/agui, and leaves internal/browser as a thin ExtensionDriver adapter. The container injects bridge.Request into browserinfra.NewExtensionDriver, so browser never imports protocols/agui. Every frame on the wire keeps its shape, so the extension works unchanged.
The move also picks up two small hardening changes on the same seam. Request fails fast when the connection goes away, and the bridge takes only the extension config it uses.
no docs ticket: internal-only refactor (no public-facing behavior or protocol change)
Changes
Verification