infrastructure

package
v0.178.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSession

func NewSession(cfg *config.BrowserUseConfig) *browserSession

Types

type ExtensionBridge

type ExtensionBridge struct {
	// contains filtered or unexported fields
}

ExtensionBridge hosts the localhost WebSocket endpoint the opentask browser extension dials into. It implements browserdomain.BrowserDriver by forwarding the browser-use verbs to the connected extension, and it mirrors the chat conversation to the extension (AG-UI event stream out, user messages in).

ponytail: one connection, one implied tab - multi-tab / multi-CLI routing when someone actually needs it.

func NewExtensionBridge

func NewExtensionBridge(cfg *config.BrowserUseConfig, notifier agentdomain.UINotifier, repo convdomain.ConversationRepository, events agentdomain.EventBridge, skills agentdomain.SkillsService, sessionID, artifactsDir string) *ExtensionBridge

NewExtensionBridge builds the bridge. notifier, repo, events, and skills may be nil (the matching feature is then skipped); cfg must not be nil. artifactsDir, when non-empty, is served read-only at /artifacts/ so the panel can display generated images the agent saved locally.

func (*ExtensionBridge) Addr

func (b *ExtensionBridge) Addr() string

Addr returns the actual listen address (useful with port 0 in tests).

func (*ExtensionBridge) Click

Click implements browserdomain.BrowserDriver.

func (*ExtensionBridge) ClickAt

ClickAt implements browserdomain.BrowserDriver. The extension bridge drives clicks through chrome.scripting (untrusted synthetic events), which have no reliable viewport-coordinate form - that needs chrome.debugger/CDP. Fail clearly.

func (*ExtensionBridge) Close

func (b *ExtensionBridge) Close()

Close implements browserdomain.BrowserDriver: shuts the server and any connection.

func (*ExtensionBridge) Navigate

Navigate implements browserdomain.BrowserDriver.

func (*ExtensionBridge) Read

Read implements browserdomain.BrowserDriver.

func (*ExtensionBridge) Screenshot

Screenshot implements browserdomain.BrowserDriver via the extension's captureVisibleTab.

func (*ExtensionBridge) Start

func (b *ExtensionBridge) Start() error

Start listens on 127.0.0.1:<port> and serves the /ws endpoint. Errors are also stored so later tool calls surface them instead of a silent no-op.

func (*ExtensionBridge) Tabs

Tabs implements browserdomain.BrowserDriver via the extension's chrome.tabs query.

func (*ExtensionBridge) Type

func (b *ExtensionBridge) Type(ctx context.Context, selector, text string, pressEnter bool) (browserdomain.BrowserToolResult, error)

Type implements browserdomain.BrowserDriver.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL