browser

package
v0.99.18 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package browser registers chat-agent browser_* tools backed by pkg/agent/browser.

Index

Constants

View Source
const (
	ToolNavigate   = "browser_navigate"
	ToolSnapshot   = "browser_snapshot"
	ToolClick      = "browser_click"
	ToolType       = "browser_type"
	ToolScroll     = "browser_scroll"
	ToolWait       = "browser_wait"
	ToolScreenshot = "browser_screenshot"
)

Variables

This section is empty.

Functions

func ActiveToolNames

func ActiveToolNames() []string

ActiveToolNames returns browser tool names when registered.

func Register

func Register(registry *tool.Registry) error

Register adds browser tools to the registry.

Types

type ClickTool

type ClickTool struct{}

ClickTool clicks a snapshot ref.

func (ClickTool) Description

func (ClickTool) Description() string

Description explains the tool to the model.

func (ClickTool) Execute

Execute clicks the ref.

func (ClickTool) Name

func (ClickTool) Name() string

Name returns the tool identifier.

func (ClickTool) Parameters

func (ClickTool) Parameters() map[string]any

Parameters returns the JSON schema for tool arguments.

type NavigateTool struct{}

NavigateTool loads a URL in the run browser context.

func (NavigateTool) Description() string

Description explains the tool to the model.

Execute navigates to the URL.

func (NavigateTool) Name() string

Name returns the tool identifier.

func (NavigateTool) Parameters() map[string]any

Parameters returns the JSON schema for tool arguments.

type ScreenshotTool

type ScreenshotTool struct{}

ScreenshotTool captures a PNG of the page.

func (ScreenshotTool) Description

func (ScreenshotTool) Description() string

Description explains the tool to the model.

func (ScreenshotTool) Execute

Execute captures a screenshot as image media plus text metadata.

func (ScreenshotTool) Name

func (ScreenshotTool) Name() string

Name returns the tool identifier.

func (ScreenshotTool) Parameters

func (ScreenshotTool) Parameters() map[string]any

Parameters returns the JSON schema for tool arguments.

type ScrollTool

type ScrollTool struct{}

ScrollTool scrolls the page.

func (ScrollTool) Description

func (ScrollTool) Description() string

Description explains the tool to the model.

func (ScrollTool) Execute

Execute scrolls the page.

func (ScrollTool) Name

func (ScrollTool) Name() string

Name returns the tool identifier.

func (ScrollTool) Parameters

func (ScrollTool) Parameters() map[string]any

Parameters returns the JSON schema for tool arguments.

type SnapshotTool

type SnapshotTool struct{}

SnapshotTool returns a compact interactive tree with refs.

func (SnapshotTool) Description

func (SnapshotTool) Description() string

Description explains the tool to the model.

func (SnapshotTool) Execute

Execute returns the snapshot text.

func (SnapshotTool) Name

func (SnapshotTool) Name() string

Name returns the tool identifier.

func (SnapshotTool) Parameters

func (SnapshotTool) Parameters() map[string]any

Parameters returns the JSON schema for tool arguments.

type TypeTool

type TypeTool struct{}

TypeTool types into a snapshot ref.

func (TypeTool) Description

func (TypeTool) Description() string

Description explains the tool to the model.

func (TypeTool) Execute

Execute types into the ref.

func (TypeTool) Name

func (TypeTool) Name() string

Name returns the tool identifier.

func (TypeTool) Parameters

func (TypeTool) Parameters() map[string]any

Parameters returns the JSON schema for tool arguments.

type WaitTool

type WaitTool struct{}

WaitTool waits for a short duration.

func (WaitTool) Description

func (WaitTool) Description() string

Description explains the tool to the model.

func (WaitTool) Execute

Execute waits.

func (WaitTool) Name

func (WaitTool) Name() string

Name returns the tool identifier.

func (WaitTool) Parameters

func (WaitTool) Parameters() map[string]any

Parameters returns the JSON schema for tool arguments.

Jump to

Keyboard shortcuts

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