computer

package
v2.22.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: GPL-3.0 Imports: 36 Imported by: 0

Documentation

Overview

Package computer implements the computer.extract and computer.run actions, which operate the desktop of the worker's user session.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PinnedOperation

type PinnedOperation struct {
	// Op is the operation's position in with.do, counted from 1.
	Op int `json:"op"`
	// Kind is act or extract.
	Kind string `json:"kind"`
	// System is the system the recording was made on, windows or macos.
	System string `json:"system,omitempty"`
	// SavedAt is when the run that made the recording ran; it is zero for a
	// recording that does not say.
	SavedAt time.Time `json:"saved_at,omitzero"`
	// Recorded holds an act's pinned steps, set only when every recorded
	// action has a pinned form.
	Recorded []pinnedStep `json:"recorded,omitempty"`
	// Fields holds an extract's pinned fields by output name.
	Fields map[string]pinnedField `json:"fields,omitempty"`
	// Unpinnable lists an act's recorded actions that have no pinned form.
	Unpinnable []UnpinnableAction `json:"unpinnable,omitempty"`
}

PinnedOperation is a device's recording of one operation in the form a step pins it, for a person to review and write into the step under recorded.<system> or fields.<system>.

func PinRecording

func PinRecording(entry json.RawMessage) (PinnedOperation, bool)

PinRecording converts one entry of a step's replay cache into its pinned form. It reports false for an entry that is not a recording of the current format, or one that recorded nothing.

type UnpinnableAction

type UnpinnableAction struct {
	// Turn is the recorded turn the action belongs to, counted from 1.
	Turn   int    `json:"turn"`
	Action string `json:"action"`
	Code   string `json:"code"`
	Reason string `json:"reason"`
}

UnpinnableAction is a recorded action with no pinned form and why: Code for a program to act on, and Reason for a person to read.

Jump to

Keyboard shortcuts

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