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 ¶
const (
// SessionVariable names the overlay session a helper launch joins.
SessionVariable = "AGENT_DESKTOP_SESSION"
)
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 Executable ¶
Executable returns the execution Node's packaged helper.
func PrepareHome ¶
PrepareHome makes the helper home a private directory inside the package data directory.
func Session ¶
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 ¶
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 ¶
Retain ends the sessions of packages that no longer allow the overlay: those of one package, or of every package when pack is empty.
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 (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.