computer

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 17 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 locates the bundled computer-use helper, reads the execution device's helper grants and owns the helper's cursor-overlay sessions. The helper is never searched on PATH and never downloaded.

Index

Constants

View Source
const (

	// SessionVariable names the overlay session a helper launch joins.
	SessionVariable = "AGENT_DESKTOP_SESSION"
)
View Source
const Token = "${SAILRY_COMPUTER_USE}"

Token is the stdio MCP command a package declares to launch the helper.

Variables

This section is empty.

Functions

func Disclaim

func Disclaim(command string, args []string) (string, []string)

Disclaim leaves a helper launch unchanged outside macOS.

func Executable

func Executable() (string, error)

Executable returns the execution Node's packaged helper.

func PrepareHome

func PrepareHome(data, home string) error

PrepareHome makes the helper home a private directory inside the package data directory.

func Session

func Session(env map[string]string)

Session passes the Node's graphical session to the Linux helper; declared values take precedence.

func Trampoline

func Trampoline()

Trampoline is a macOS concern: other systems grant nothing per application.

func Unconfigured

func Unconfigured() error

Unconfigured reports a permission command without a captured helper.

Types

type Invocation

type Invocation struct {
	Command     string
	Directory   string
	Env         map[string]string
	Environment []string
}

Invocation is the captured helper launch a diagnostic command reuses: the helper, its directory, the declared variables and the Node's environment.

type Overlay

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

Overlay owns one cursor-overlay session per helper home. The overlay never moves the physical pointer. A failed step leaves the launch headless.

func (*Overlay) Attach

func (overlay *Overlay) Attach(pack string, allowed bool, launch Invocation) (string, bool)

Attach returns the session an allowed package's helper launch joins. It keeps a session the launch already declares and starts none for a launch without a helper home.

func (*Overlay) Retain

func (overlay *Overlay) Retain(pack string, allowed []string)

Retain ends the sessions of packages that no longer allow the overlay: those of one package, or of every package when pack is empty.

func (*Overlay) RetainSuffix

func (overlay *Overlay) RetainSuffix(suffix string)

RetainSuffix ends every tracked session whose owner ends with suffix.

func (*Overlay) Shutdown

func (overlay *Overlay) Shutdown()

Shutdown interrupts a pending start and ends every session.

func (*Overlay) Tracks

func (overlay *Overlay) Tracks(pack string) bool

Tracks reports whether a package has an overlay session.

type Probe

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

Probe reads the helper's own grants on the execution device. Diagnostics reuse the captured helper configuration of the MCP launch.

func NewProbe

func NewProbe() Probe

NewProbe runs `agent-desktop permissions` on this platform.

func (Probe) Gated

func (probe Probe) Gated() bool

Gated reports whether this platform gates the helper behind system grants.

func (Probe) Read

func (probe Probe) Read(ctx context.Context, node, caller protocol.NodeID, launch *Invocation) (protocol.ComputerPermissions, error)

Read reports the helper's grants. Only macOS gates them; other platforms report no requirement without starting the helper.

func (Probe) Request

func (probe Probe) Request(ctx context.Context, node, caller protocol.NodeID, permission protocol.ComputerPermission, launch *Invocation) (protocol.ComputerPermissions, error)

Request raises the helper's system prompts for a missing grant and reads the result from a fresh process, because Screen Recording state is fixed at process launch.

Jump to

Keyboard shortcuts

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