browser

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 13 Imported by: ? 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

Overview

Package browser drives Chromium through the Chrome DevTools Protocol.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrowserUse

type BrowserUse struct {
	Browser  Chromium
	Model    h.Model
	MaxSteps int
	Review   func(context.Context, string) (string, error)
}

BrowserUse registers browse_web(task) on the parent. Each delegation opens a fresh Chromium session. The child has its own history and request budget. Review can inspect the child's proposed answer and return corrective feedback.

func (BrowserUse) Capability

func (b BrowserUse) Capability() h.Capability

type Chromium

type Chromium struct {
	// AllocatorOptions customize Chromium startup for the deployment.
	AllocatorOptions []chromedp.ExecAllocatorOption
	Origins          []string
	Executable       string
	Timeout          time.Duration
	// SavePNG persists screenshots and returns a reference for the model.
	SavePNG func(context.Context, []byte) (string, error)
}

Chromium opens one tab per run and starts the browser on the first action. Origins must enumerate the HTTP(S) origins this tab may request. Configure deployment-level network isolation for the whole browser process. Browser resources close with the run and are recreated after a checkpoint.

func (Chromium) Capability

func (c Chromium) Capability() h.Capability

Capability registers navigation, interaction, reading and optional screenshot tools.

Jump to

Keyboard shortcuts

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