pub enum ComputerUseActionDtoAction {
Show 15 variants
Variant0 {
button: f64,
call_id: Option<String>,
hold_key: Option<String>,
relative: Option<bool>,
type_: ComputerUseActionDtoActionVariant0Type,
x: ComputerUseActionDtoActionVariant0X,
y: ComputerUseActionDtoActionVariant0Y,
},
Variant1 {
button: f64,
call_id: Option<String>,
hold_key: Option<String>,
relative: Option<bool>,
type_: ComputerUseActionDtoActionVariant1Type,
x: ComputerUseActionDtoActionVariant1X,
y: ComputerUseActionDtoActionVariant1Y,
},
Variant2 {
button: f64,
call_id: Option<String>,
hold_key: Option<String>,
relative: Option<bool>,
type_: ComputerUseActionDtoActionVariant2Type,
x: ComputerUseActionDtoActionVariant2X,
y: ComputerUseActionDtoActionVariant2Y,
},
Variant3 {
call_id: Option<String>,
hold_key: Option<String>,
relative: Option<bool>,
type_: ComputerUseActionDtoActionVariant3Type,
x: ComputerUseActionDtoActionVariant3X,
y: ComputerUseActionDtoActionVariant3Y,
},
Variant4 {
call_id: Option<String>,
hold_key: Option<String>,
relative: Option<bool>,
step_horizontal: f64,
step_vertical: f64,
type_: ComputerUseActionDtoActionVariant4Type,
x: ComputerUseActionDtoActionVariant4X,
y: ComputerUseActionDtoActionVariant4Y,
},
Variant5 {
button: Option<f64>,
call_id: Option<String>,
end_relative: Option<bool>,
end_x: ComputerUseActionDtoActionVariant5EndX,
end_y: ComputerUseActionDtoActionVariant5EndY,
hold_key: Option<String>,
start_relative: Option<bool>,
start_x: ComputerUseActionDtoActionVariant5StartX,
start_y: ComputerUseActionDtoActionVariant5StartY,
type_: ComputerUseActionDtoActionVariant5Type,
},
Variant6 {
call_id: Option<String>,
content: String,
treat_new_line_as_enter: Option<bool>,
type_: ComputerUseActionDtoActionVariant6Type,
},
Variant7 {
call_id: Option<String>,
duration: Option<f64>,
keys: String,
type_: ComputerUseActionDtoActionVariant7Type,
},
Variant8 {
call_id: Option<String>,
type_: ComputerUseActionDtoActionVariant8Type,
},
Variant9 {
call_id: Option<String>,
duration: f64,
type_: ComputerUseActionDtoActionVariant9Type,
},
Variant10 {
call_id: Option<String>,
message: Option<String>,
type_: ComputerUseActionDtoActionVariant10Type,
},
Variant11 {
call_id: Option<String>,
message: Option<String>,
type_: ComputerUseActionDtoActionVariant11Type,
},
Variant12 {
call_id: Option<String>,
type_: ComputerUseActionDtoActionVariant12Type,
},
Variant13 {
call_id: Option<String>,
key: String,
type_: ComputerUseActionDtoActionVariant13Type,
},
Variant14 {
call_id: Option<String>,
key: String,
type_: ComputerUseActionDtoActionVariant14Type,
},
}Expand description
All possible computer use actions, with optional callId
JSON schema
{
"description": "All possible computer use actions, with optional callId",
"oneOf": [
{
"description": "Click the mouse at the specified coordinates",
"type": "object",
"required": [
"button",
"type",
"x",
"y"
],
"properties": {
"button": {
"description": "Mouse button flag combination. 1: left, 2: right, 4: middle, 8: back, 16: forward; add them together to press multiple buttons at once.",
"type": "number"
},
"holdKey": {
"description": "Key to hold down during click, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
"type": "string"
},
"relative": {
"description": "Whether the coordinates are relative to the current mouse position.",
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"mouse:click"
]
},
"x": {
"description": "X coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"y": {
"description": "Y coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
}
}
},
{
"description": "Double click the mouse at the specified coordinates",
"type": "object",
"required": [
"button",
"type",
"x",
"y"
],
"properties": {
"button": {
"description": "Mouse button index",
"type": "number"
},
"holdKey": {
"description": "Key to hold down during double click, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
"type": "string"
},
"relative": {
"description": "Whether the coordinates are relative to the current mouse position.",
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"mouse:doubleClick"
]
},
"x": {
"description": "X coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"y": {
"description": "Y coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
}
}
},
{
"description": "Triple click the mouse at the specified coordinates",
"type": "object",
"required": [
"button",
"type",
"x",
"y"
],
"properties": {
"button": {
"description": "Mouse button index",
"type": "number"
},
"holdKey": {
"description": "Key to hold down during triple click, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
"type": "string"
},
"relative": {
"description": "Whether the coordinates are relative to the current mouse position.",
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"mouse:tripleClick"
]
},
"x": {
"description": "X coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"y": {
"description": "Y coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
}
}
},
{
"description": "Move the mouse to the specified coordinates",
"type": "object",
"required": [
"type",
"x",
"y"
],
"properties": {
"holdKey": {
"description": "Key to hold down during move, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
"type": "string"
},
"relative": {
"description": "Whether the coordinates are relative to the current mouse position.",
"type": "boolean"
},
"type": {
"type": "string",
"enum": [
"mouse:move"
]
},
"x": {
"description": "X coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"y": {
"description": "Y coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
}
}
},
{
"description": "Scroll the mouse",
"type": "object",
"required": [
"stepHorizontal",
"stepVertical",
"type",
"x",
"y"
],
"properties": {
"holdKey": {
"description": "Key to hold down during scroll, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
"type": "string"
},
"relative": {
"description": "Whether the coordinates are relative to the current mouse position.",
"type": "boolean"
},
"stepHorizontal": {
"description": "Horizontal scroll steps",
"type": "number"
},
"stepVertical": {
"description": "Vertical scroll steps",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"mouse:scroll"
]
},
"x": {
"description": "X coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"y": {
"description": "Y coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
}
}
},
{
"description": "Drag the mouse from start to end coordinates",
"type": "object",
"required": [
"endX",
"endY",
"startX",
"startY",
"type"
],
"properties": {
"button": {
"description": "Mouse button index",
"type": "number"
},
"endRelative": {
"description": "Whether the coordinates are relative to the current mouse position.",
"type": "boolean"
},
"endX": {
"description": "End X coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"endY": {
"description": "End Y coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"holdKey": {
"description": "Key to hold down during drag, in xdotool key syntax. Example: \"ctrl\", \"alt\", \"alt+shift\".",
"type": "string"
},
"startRelative": {
"description": "Whether the coordinates are relative to the current mouse position.",
"type": "boolean"
},
"startX": {
"description": "Start X coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"startY": {
"description": "Start Y coordinate",
"oneOf": [
{
"description": "Length in pixels",
"type": "object",
"required": [
"type",
"value"
],
"properties": {
"type": {
"description": "Indicates the unit is pixel",
"type": "string",
"enum": [
"px"
]
},
"value": {
"description": "Length in pixels",
"type": "number"
}
}
},
{
"description": "Length as a fraction",
"type": "object",
"required": [
"denominator",
"numerator",
"type"
],
"properties": {
"denominator": {
"description": "Denominator of the fraction",
"type": "number"
},
"numerator": {
"description": "Numerator of the fraction",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"/"
]
}
}
}
]
},
"type": {
"type": "string",
"enum": [
"mouse:drag"
]
}
}
},
{
"description": "Type text content",
"type": "object",
"required": [
"content",
"treatNewLineAsEnter",
"type"
],
"properties": {
"content": {
"description": "Text content to type",
"type": "string"
},
"treatNewLineAsEnter": {
"description": "Whether to treat line breaks as enter. If true, any line breaks(\\n) in content will be treated as enter key press, and content will be split into multiple lines.",
"default": false,
"type": [
"boolean",
"null"
]
},
"type": {
"type": "string",
"enum": [
"keyboard:type"
]
}
}
},
{
"description": "Press a keyboard hotkey",
"type": "object",
"required": [
"keys",
"type"
],
"properties": {
"duration": {
"description": "Duration in milliseconds. If specified, the hotkey will be held for a while and then released.",
"type": "number",
"maximum": 5000.0,
"minimum": 1.0
},
"keys": {
"description": "Hotkey combination, in xdotool key syntax. Examples: \"a\", \"Return\", \"alt+Tab\", \"ctrl+s\", \"Up\", \"KP_0\" (for the numpad 0 key).",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"keyboard:hotkey"
]
}
}
},
{
"description": "Take a screenshot of the current screen",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"screenshot"
]
}
}
},
{
"description": "Wait for a specified duration",
"type": "object",
"required": [
"duration",
"type"
],
"properties": {
"duration": {
"description": "Duration in milliseconds",
"type": "number"
},
"type": {
"type": "string",
"enum": [
"wait"
]
}
}
},
{
"description": "Indicates the action has finished",
"type": "object",
"required": [
"type"
],
"properties": {
"message": {
"description": "Completion message",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"finished"
]
}
}
},
{
"description": "Indicates the action has failed",
"type": "object",
"required": [
"type"
],
"properties": {
"message": {
"description": "Failure message",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"failed"
]
}
}
},
{
"description": "Indicates the human user should take over the control",
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"client:user-takeover"
]
}
}
},
{
"description": "Press ONE key down, in xdotool key syntax. Only use this action if hotkey or type cannot satisfy your needs.",
"type": "object",
"required": [
"key",
"type"
],
"properties": {
"key": {
"description": "Key to press",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"key:down"
]
}
}
},
{
"description": "Release ONE key, in xdotool key syntax. Only use this action if keydown cannot satisfy your needs and only after a key down.",
"type": "object",
"required": [
"key",
"type"
],
"properties": {
"key": {
"description": "Key to release",
"type": "string"
},
"type": {
"type": "string",
"enum": [
"key:up"
]
}
}
}
],
"properties": {
"callId": {
"description": "Optional call identifier",
"type": "string"
}
}
}Variants§
Variant0
Fields
hold_key: Option<String>Key to hold down during click, in xdotool key syntax. Example: “ctrl”, “alt”, “alt+shift”.
x: ComputerUseActionDtoActionVariant0XX coordinate
y: ComputerUseActionDtoActionVariant0YY coordinate
Variant1
Fields
hold_key: Option<String>Key to hold down during double click, in xdotool key syntax. Example: “ctrl”, “alt”, “alt+shift”.
x: ComputerUseActionDtoActionVariant1XX coordinate
y: ComputerUseActionDtoActionVariant1YY coordinate
Variant2
Fields
hold_key: Option<String>Key to hold down during triple click, in xdotool key syntax. Example: “ctrl”, “alt”, “alt+shift”.
x: ComputerUseActionDtoActionVariant2XX coordinate
y: ComputerUseActionDtoActionVariant2YY coordinate
Variant3
Fields
hold_key: Option<String>Key to hold down during move, in xdotool key syntax. Example: “ctrl”, “alt”, “alt+shift”.
x: ComputerUseActionDtoActionVariant3XX coordinate
y: ComputerUseActionDtoActionVariant3YY coordinate
Variant4
Fields
hold_key: Option<String>Key to hold down during scroll, in xdotool key syntax. Example: “ctrl”, “alt”, “alt+shift”.
x: ComputerUseActionDtoActionVariant4XX coordinate
y: ComputerUseActionDtoActionVariant4YY coordinate
Variant5
Fields
end_x: ComputerUseActionDtoActionVariant5EndXEnd X coordinate
end_y: ComputerUseActionDtoActionVariant5EndYEnd Y coordinate
hold_key: Option<String>Key to hold down during drag, in xdotool key syntax. Example: “ctrl”, “alt”, “alt+shift”.
start_x: ComputerUseActionDtoActionVariant5StartXStart X coordinate
start_y: ComputerUseActionDtoActionVariant5StartYStart Y coordinate
Variant6
Fields
Variant7
Fields
Variant8
Fields
Variant9
Fields
Variant10
Fields
Variant11
Fields
Variant12
Fields
Variant13
Fields
Variant14
Trait Implementations§
Source§impl Clone for ComputerUseActionDtoAction
impl Clone for ComputerUseActionDtoAction
Source§fn clone(&self) -> ComputerUseActionDtoAction
fn clone(&self) -> ComputerUseActionDtoAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more