Versions in this module Expand all Collapse all v0 v0.9.3 Jul 6, 2026 v0.9.2 Jul 6, 2026 Changes in this version + const ExtensionID + const NativeHostName + var AllowedExtensionIDs = []string + var ErrControlInterrupted = fmt.Errorf("browser control interrupted") + func ChromeVersion(ctx context.Context, path string) string + func FindChrome(configPath string) string + func InstallNativeHost(binPath string) error + func IsLocalOrigin(origin string) bool + func MaybeRunNativeHost(args []string) bool + func OriginOf(raw string) string + func WriteEndpoint(ws, token string) error + type ActRequest struct + Action string + Files []string + Key string + UID string + Value string + X float64 + Y float64 + type Backend interface + AttachTab func(ctx context.Context, id string) (TabConn, error) + Close func() error + Kind func() string + ListTabs func(ctx context.Context) ([]TabInfo, error) + NewTab func(ctx context.Context, url string) (TabConn, error) + func Launch(ctx context.Context, opts LaunchOptions) (Backend, error) + type Bridge struct + func NewBridge() *Bridge + func (b *Bridge) Backend() (Backend, error) + func (b *Bridge) Connected() bool + func (b *Bridge) HandleWS(w http.ResponseWriter, r *http.Request) + func (b *Bridge) IssueToken() string + func (b *Bridge) StableToken() string + type Config struct + Backend string + ChromePath string + DevMode bool + Enabled bool + Headless bool + Viewport string + type Endpoint struct + Token string + WS string + func ReadEndpoint() (Endpoint, error) + type EventHandler func(method string, params json.RawMessage) + type ExtensionInstallState struct + Enabled bool + Installed bool + Path string + Profile string + func CheckExtensionInstalled(profileRoots []string, extDir string) ExtensionInstallState + type LaunchOptions struct + ChromePath string + Headless bool + ProfileDir string + Viewport string + type Manager struct + func NewManager(cfg Config) *Manager + func (m *Manager) Bridge() *Bridge + func (m *Manager) Close() error + func (m *Manager) DevMode() bool + func (m *Manager) GetConfig() Config + func (m *Manager) OpenSession(ctx context.Context) (*Session, error) + func (m *Manager) SaveScreenshot(png []byte) (string, error) + func (m *Manager) ScreenshotPath(id string) string + func (m *Manager) SetConfig(cfg Config) + func (m *Manager) Status(ctx context.Context) Status + type Session struct + func NewSession(backend Backend) *Session + func (s *Session) Act(ctx context.Context, req ActRequest) (string, error) + func (s *Session) BackendKind() string + func (s *Session) ClaimTab(ctx context.Context, tabID string) error + func (s *Session) Close() error + func (s *Session) CloseTab(ctx context.Context, tabID string) error + func (s *Session) CurrentOrigin() string + func (s *Session) Eval(ctx context.Context, expr string) (string, error) + func (s *Session) ListTabs(ctx context.Context) ([]TabInfo, error) + func (s *Session) NewTab(ctx context.Context) (string, error) + func (s *Session) Open(ctx context.Context, url string, newTab bool) (string, error) + func (s *Session) PageText(ctx context.Context, limit int) (string, error) + func (s *Session) Reload(ctx context.Context) (string, error) + func (s *Session) Screenshot(ctx context.Context, fullPage bool) ([]byte, error) + func (s *Session) SelectTab(ctx context.Context, tabID string) error + func (s *Session) Snapshot(ctx context.Context, filter string, maxLines int) (string, error) + type Snapshot struct + Gen int + Text string + UIDs map[string]int64 + type Status struct + Backend string + ChromeFound bool + ChromePath string + ChromeVersion string + DevMode bool + Enabled bool + ExtensionOnline bool + type TabConn interface + Close func(ctx context.Context) error + Detach func(ctx context.Context) error + ID func() string + Send func(ctx context.Context, method string, params any) (json.RawMessage, error) + SetEventHandler func(h EventHandler) + type TabInfo struct + Attached bool + ID string + Title string + URL string + UserTab bool