computer

package
v2.10.3 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: MIT Imports: 9 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 computer runs the actions of Anthropic's computer-use tool on this machine. It drives a virtual display through the desktop driver that Lectern already uses for remote browsers, so the same xdotool and screenshot code runs here.

Index

Constants

View Source
const (
	Width  = 1024
	Height = 768
)

Display size. It matches the size the Anthropic adapter declares.

View Source
const ToolName = "computer"

ToolName is the name Anthropic's computer-use tool is called by.

Variables

This section is empty.

Functions

This section is empty.

Types

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

Runner executes computer-use actions. It starts its display the first time an action needs one, and keeps it until Close.

func New

func New() *Runner

New returns a Runner that runs its commands on this machine.

func (*Runner) Close

func (r *Runner) Close(ctx context.Context) error

Close stops the display if one is running. The app calls it when the session closes.

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, host tools.Host, args json.RawMessage) tools.Result

Run performs one computer-use call. host is asked before any action that changes the screen or types; screenshots and waits never ask.

Jump to

Keyboard shortcuts

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