pub struct ComputerUseActionDto {
pub action: ComputerUseActionDtoAction,
pub include_cursor_position: bool,
pub include_screen_shot: bool,
}Expand description
ComputerUseActionDto
JSON schema
{
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"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"
}
}
},
"includeCursorPosition": {
"description": "Whether to include the cursor position after action in the response",
"default": true,
"type": "boolean"
},
"includeScreenShot": {
"description": "Whether to include the screenshot url after action in the response",
"default": true,
"type": "boolean"
}
}
}Fields§
§action: ComputerUseActionDtoAction§include_cursor_position: boolWhether to include the cursor position after action in the response
include_screen_shot: boolWhether to include the screenshot url after action in the response
Trait Implementations§
Source§impl Clone for ComputerUseActionDto
impl Clone for ComputerUseActionDto
Source§fn clone(&self) -> ComputerUseActionDto
fn clone(&self) -> ComputerUseActionDto
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputerUseActionDto
impl Debug for ComputerUseActionDto
Source§impl<'de> Deserialize<'de> for ComputerUseActionDto
impl<'de> Deserialize<'de> for ComputerUseActionDto
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&ComputerUseActionDto> for ComputerUseActionDto
impl From<&ComputerUseActionDto> for ComputerUseActionDto
Source§fn from(value: &ComputerUseActionDto) -> Self
fn from(value: &ComputerUseActionDto) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ComputerUseActionDto
impl RefUnwindSafe for ComputerUseActionDto
impl Send for ComputerUseActionDto
impl Sync for ComputerUseActionDto
impl Unpin for ComputerUseActionDto
impl UnsafeUnpin for ComputerUseActionDto
impl UnwindSafe for ComputerUseActionDto
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more