domain

package
v0.178.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2026 License: Apache-2.0 Imports: 0 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 domain holds the computer-use bounded context's contracts: actions the agent can perform, targets they act on, observations they return, and the capabilities the platform supports. It is pure - stdlib imports only.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Kind      ActionKind
	Target    *Target
	Text      string // type: the text to type
	Combo     string // key: a combo such as "cmd+shift+t"
	Button    string // click kinds: left (default), right, middle
	Direction string // scroll: vertical (default) or horizontal
	Amount    int    // scroll: wheel clicks; negative reverses direction
}

Action is one computer-use request: what to do and, where relevant, on what target and with what input.

type ActionKind

type ActionKind string

ActionKind enumerates what the Computer tool can do.

const (
	ActionScreenshot  ActionKind = "screenshot"
	ActionCursor      ActionKind = "cursor"
	ActionMove        ActionKind = "move"
	ActionClick       ActionKind = "click"
	ActionDoubleClick ActionKind = "double_click"
	ActionTripleClick ActionKind = "triple_click"
	ActionScroll      ActionKind = "scroll"
	ActionType        ActionKind = "type"
	ActionKey         ActionKind = "key"
)

type Image

type Image struct {
	Data     string // base64-encoded
	MimeType string
	Path     string // on-disk copy, reachable by ImageDecode for non-vision models
}

Image is a captured frame.

type Observation

type Observation struct {
	Message string // LLM-facing outcome description
	CursorX int
	CursorY int
	Width   int // frame-space dimensions
	Height  int
	Image   *Image // set by screenshot actions
}

Observation is what the computer reports back after an action.

type Region

type Region struct {
	X      int
	Y      int
	Width  int
	Height int
}

Region is a rectangle in the frame coordinate space.

type Target

type Target struct {
	X int
	Y int
	// Region, on a screenshot action, captures only this rectangle.
	Region *Region
}

Target locates an action on screen, in the frame coordinate space (the same space screenshots and their annotations use).

Jump to

Keyboard shortcuts

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