github trycua/cua computer-v0.2.10
cua-computer v0.2.10

latest releases: agent-v0.4.25, computer-v0.4.5, computer-server-v0.1.22...
2 months ago

cua-computer v0.2.10

Computer control library for the Computer Universal Automation (CUA) project

Dependencies

  • pylume: latest

Installation

pip install cua-computer==0.2.10

What's Changed

  • Removed warning when calling start_vm on the CloudProvider
  • Add disconnect() method for Computer
  • Fixed file_exists and directory_exists not being implemented in the computer-server
  • Added keyboard/mouse primitives ( mouse_up, mouse_down, key_up, key_down )
  • Added file system commands to computer interface
  • Added file system interface pytests
  • Improved computer interface accessibility tree output on macOS, now includes menubar and dock items, along with preserving z-ordering
  • Increased timeout for web socket commands due to a TimeoutError if the accessibility tree takes longer than 30 seconds to crawl

Changes reference:

# ... old actions haven't changed

# Disconnect from computer interface / cleanup websocket resources
await computer.disconnect()

# New mouse actions
await computer.interface.mouse_down(x, y, button="left")  # Press and hold a mouse button
await computer.interface.mouse_up(x, y, button="left")    # Release a mouse button

# New keyboard actions
await computer.interface.key_down("command")    # Press and hold a key
await computer.interface.key_up("command")      # Release a key

# New scrolling actions
await computer.interface.scroll(x, y)           # Scroll the mouse wheel

# New file-system commands
# Fixed: await computer.interface.file_exists(path)      # Check if file exists
# Fixed: await computer.interface.directory_exists(path) # Check if directory exists
await computer.interface.read_text(path)        # Read file content
await computer.interface.write_text(path, content) # Write file content
await computer.interface.read_bytes(path)       # Read file content as bytes
await computer.interface.write_bytes(path, content) # Write file content as bytes
await computer.interface.delete_file(path)      # Delete file
await computer.interface.create_dir(path)       # Create directory
await computer.interface.delete_dir(path)       # Delete directory
await computer.interface.list_dir(path)         # List directory contents

Full Changelog: agent-v0.2.7...computer-v0.2.10

Don't miss a new cua release

NewReleases is sending notifications on new releases.