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.