Class ComputerUseCallManager
Manages and executes computer actions that can be called by AI agents.
public class ComputerUseCallManager : ToolCallManager<ComputerUseCall, ComputerUseOutput>, IComputerUseCallExecutor, IToolCallExecutor<ComputerUseCall, ComputerUseOutput>, IComputerUseActionHandler
- Inheritance
-
objectComputerUseCallManager
- Implements
- Inherited Members
Fields
onInputEventReceived
public UnityEvent<Event> onInputEventReceived
Field Value
- UnityEvent<Event>
onKeyboardTyped
public UnityEvent<string> onKeyboardTyped
Field Value
- UnityEvent<string>
Properties
Api
public Api Api { get; set; }
Property Value
ScreenshotPathType
public ScreenshotPathType ScreenshotPathType { get; }
Property Value
Methods
CanExecute(string)
public bool CanExecute(string toolName)
Parameters
toolNamestring
Returns
- bool
ExecuteAsync(ComputerUseCall, CancellationToken)
public override UniTask<ComputerUseOutput> ExecuteAsync(ComputerUseCall call, CancellationToken ct)
Parameters
callComputerUseCallctCancellationToken
Returns
- UniTask<ComputerUseOutput>
OnKeyboardKeysPressedAsync(List<string>, CancellationToken)
public UniTask OnKeyboardKeysPressedAsync(List<string> keys, CancellationToken ct)
Parameters
keysList<string>ctCancellationToken
Returns
- UniTask
OnKeyboardTypedAsync(string, CancellationToken)
public UniTask OnKeyboardTypedAsync(string text, CancellationToken ct)
Parameters
textstringctCancellationToken
Returns
- UniTask
OnMouseClickAsync(MouseButton, Vector2, CancellationToken)
public UniTask OnMouseClickAsync(MouseButton button, Vector2 position, CancellationToken ct)
Parameters
buttonMouseButtonpositionVector2ctCancellationToken
Returns
- UniTask
OnMouseDoubleClickAsync(Vector2, CancellationToken)
public UniTask OnMouseDoubleClickAsync(Vector2 position, CancellationToken ct)
Parameters
positionVector2ctCancellationToken
Returns
- UniTask
OnMouseDragAsync(List<Vector2>, CancellationToken)
public UniTask OnMouseDragAsync(List<Vector2> path, CancellationToken ct)
Parameters
pathList<Vector2>ctCancellationToken
Returns
- UniTask
OnMouseMoveAsync(Vector2, CancellationToken)
public UniTask OnMouseMoveAsync(Vector2 position, CancellationToken ct)
Parameters
positionVector2ctCancellationToken
Returns
- UniTask
OnMouseScrollAsync(Vector2, Vector2, CancellationToken)
public UniTask OnMouseScrollAsync(Vector2 position, Vector2 scroll, CancellationToken ct)
Parameters
positionVector2scrollVector2ctCancellationToken
Returns
- UniTask
OnTakeScreenshotAsync(CancellationToken)
Takes a screenshot and provides
- The uploaded file ID if ScreenshotPathType is FileId
- Your own URL if ScreenshotPathType is Url
public UniTask<string> OnTakeScreenshotAsync(CancellationToken ct)
Parameters
ctCancellationToken
Returns
- UniTask<string>
OnWaitAsync(CancellationToken)
public UniTask OnWaitAsync(CancellationToken ct)
Parameters
ctCancellationToken
Returns
- UniTask
SetSafetyCheckService(IComputerUseSafetyCheckService)
public void SetSafetyCheckService(IComputerUseSafetyCheckService service)
Parameters
serviceIComputerUseSafetyCheckService
ValidateCall(ComputerUseCall)
protected override void ValidateCall(ComputerUseCall call)
Parameters
callComputerUseCall