tools

package
v0.16.397 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: AGPL-3.0 Imports: 20 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

Overview

Package tools supplies the conversation-scoped browser tools shared by MCP and the CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SecretStore

type SecretStore interface {
	Lookup(name, project string) (secrets.View, error)
	Reveal(names []string, use secrets.Use) (map[string]string, error)
}

SecretStore is the part of the machine's safe the browser tools use: a project's view of a secret and its value.

type Service

type Service struct {
	Manager *agentbrowser.Manager
	// Secrets and Identity are runtime-owned; tool arguments cannot supply project authority.
	Secrets       SecretStore
	Identity      func(string) (secrets.Use, error)
	RequestSecret func(context.Context, string, string, string, string) (string, error)
	Access        *agentbrowser.ProfileAccess
	// contains filtered or unexported fields
}

Service keeps snapshots and bounded recordings across stateless MCP requests. Close releases subscriptions before the browser manager is closed.

func (*Service) Close

func (s *Service) Close()

Close stops all event consumers without stopping the persistent browser hosts.

type Tools

type Tools struct {
	S                *Service
	Caller, Cwd, Why string
}

Tools binds a call to the connection's conversation, never an argument supplied by the agent.

func (Tools) Call

func (t Tools) Call(ctx context.Context, name string, args *jsvalue.Object) (result *jsvalue.Object)

Call returns native MCP content, including screenshots, through the common tool path.

func (Tools) Has

func (t Tools) Has(name string) bool

Has accepts only this enabled group's declared names.

func (Tools) Instructions

func (t Tools) Instructions() string

Instructions tells agents that browser setup and passwords are not their responsibility.

func (Tools) Tools

func (t Tools) Tools() []any

Tools hides the complete group when the browser is disabled.

Jump to

Keyboard shortcuts

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