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"`
// Assumes names the variables the act's instruction names that its
// recorded actions never use, such as an item its list already showed:
// pinned, the steps leave each as a run finds it, whatever its value.
Assumes []string `json:"assumes,omitempty"`
// AssumesUnknown marks an act recorded before recordings noted those
// variables, whose steps may leave some of them alone.
AssumesUnknown bool `json:"assumes_unknown,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.
Click to show internal directories.
Click to hide internal directories.