bump agent (#143), computer-server, computer, mcp-server python version to 3.11

This commit is contained in:
Dillon DuPont
2025-05-28 08:47:33 -04:00
parent afcd6814aa
commit ba68e85ba9
19 changed files with 48 additions and 48 deletions

View File

@@ -56,7 +56,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Update dependencies to latest versions
id: update-deps

View File

@@ -57,7 +57,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
publish:
needs: prepare

View File

@@ -54,7 +54,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Update dependencies to latest versions
id: update-deps

View File

@@ -59,7 +59,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Update dependencies to latest versions
id: update-deps

View File

@@ -52,7 +52,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'
- name: Create root pdm.lock file
run: |
@@ -62,7 +62,7 @@ jobs:
- name: Install PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: '3.10'
python-version: '3.11'
cache: true
- name: Set version

View File

@@ -200,11 +200,11 @@ The formatting configuration is defined in the root `pyproject.toml` file:
```toml
[tool.black]
line-length = 100
target-version = ["py310"]
target-version = ["py311"]
[tool.ruff]
line-length = 100
target-version = "py310"
target-version = "py311"
select = ["E", "F", "B", "I"]
fix = true
@@ -213,7 +213,7 @@ docstring-code-format = true
[tool.mypy]
strict = true
python_version = "3.10"
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
check_untyped_defs = true
@@ -225,7 +225,7 @@ warn_unused_ignores = false
#### Key Formatting Rules
- **Line Length**: Maximum of 100 characters
- **Python Version**: Code should be compatible with Python 3.10+
- **Python Version**: Code should be compatible with Python 3.11+
- **Imports**: Automatically sorted (using Ruff's "I" rule)
- **Type Hints**: Required for all function definitions (strict mypy mode)

View File

@@ -10,7 +10,7 @@ CUA libraries collect minimal anonymous usage data to help improve our software.
- Basic system information:
- Operating system (e.g., 'darwin', 'win32', 'linux')
- Python version (e.g., '3.10.0')
- Python version (e.g., '3.11.0')
- Module initialization events:
- When a module (like 'computer' or 'agent') is imported
- Version of the module being used

View File

@@ -1,10 +1,10 @@
"""Tool-related type definitions."""
from enum import Enum
from enum import StrEnum
from typing import Dict, Any, Optional
from pydantic import BaseModel, ConfigDict
class ToolInvocationState(str, Enum):
class ToolInvocationState(StrEnum):
"""States for tool invocation."""
CALL = 'call'
PARTIAL_CALL = 'partial-call'

View File

@@ -1,18 +1,18 @@
"""Core type definitions."""
from typing import Any, Dict, List, Optional, TypedDict, Union
from enum import Enum, StrEnum, auto
from enum import StrEnum
from dataclasses import dataclass
class AgentLoop(Enum):
class AgentLoop(StrEnum):
"""Enumeration of available loop types."""
ANTHROPIC = auto() # Anthropic implementation
OMNI = auto() # OmniLoop implementation
OPENAI = auto() # OpenAI implementation
OLLAMA = auto() # OLLAMA implementation
UITARS = auto() # UI-TARS implementation
ANTHROPIC = "anthropic" # Anthropic implementation
OMNI = "omni" # OmniLoop implementation
OPENAI = "openai" # OpenAI implementation
OLLAMA = "ollama" # OLLAMA implementation
UITARS = "uitars" # UI-TARS implementation
# Add more loop types as needed

View File

@@ -22,7 +22,7 @@ Supported Agent Loops and Models:
Requirements:
- Mac with Apple Silicon (M1/M2/M3/M4)
- macOS 14 (Sonoma) or newer
- Python 3.10+
- Python 3.11+
- Lume CLI installed (https://github.com/trycua/cua)
- OpenAI or Anthropic API key
"""

View File

@@ -23,7 +23,7 @@ dependencies = [
"cua-core>=0.1.0,<0.2.0",
"certifi>=2024.2.2"
]
requires-python = ">=3.10"
requires-python = ">=3.11"
[project.optional-dependencies]
anthropic = [
@@ -102,11 +102,11 @@ source-includes = ["tests/", "README.md", "LICENSE"]
[tool.black]
line-length = 100
target-version = ["py310"]
target-version = ["py311"]
[tool.ruff]
line-length = 100
target-version = "py310"
target-version = "py311"
select = ["E", "F", "B", "I"]
fix = true
@@ -115,7 +115,7 @@ docstring-code-format = true
[tool.mypy]
strict = true
python_version = "3.10"
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
check_untyped_defs = true

View File

@@ -64,7 +64,7 @@ api = "python -m computer_server"
[tool.ruff]
line-length = 100
target-version = "py310"
target-version = "py311"
select = ["E", "F", "B", "I"]
fix = true
@@ -73,7 +73,7 @@ docstring-code-format = true
[tool.mypy]
strict = true
python_version = "3.10"
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
check_untyped_defs = true

View File

@@ -1,11 +1,11 @@
"""Base provider interface for VM backends."""
import abc
from enum import Enum
from enum import StrEnum
from typing import Dict, List, Optional, Any, AsyncContextManager
class VMProviderType(str, Enum):
class VMProviderType(StrEnum):
"""Enum of supported VM provider types."""
LUME = "lume"
LUMIER = "lumier"

View File

@@ -18,7 +18,7 @@ dependencies = [
"cua-core>=0.1.0,<0.2.0",
"pydantic>=2.11.1"
]
requires-python = ">=3.10"
requires-python = ">=3.11"
[project.optional-dependencies]
lume = [
@@ -46,11 +46,11 @@ source-includes = ["tests/", "README.md", "LICENSE"]
[tool.black]
line-length = 100
target-version = ["py310"]
target-version = ["py311"]
[tool.ruff]
line-length = 100
target-version = "py310"
target-version = "py311"
select = ["E", "F", "B", "I"]
fix = true
@@ -59,7 +59,7 @@ docstring-code-format = true
[tool.mypy]
strict = true
python_version = "3.10"
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
check_untyped_defs = true

View File

@@ -15,7 +15,7 @@ dependencies = [
"httpx>=0.24.0",
"posthog>=3.20.0"
]
requires-python = ">=3.10"
requires-python = ">=3.11"
[tool.pdm]
distribution = true
@@ -26,11 +26,11 @@ source-includes = ["tests/", "README.md", "LICENSE"]
[tool.black]
line-length = 100
target-version = ["py310"]
target-version = ["py311"]
[tool.ruff]
line-length = 100
target-version = "py310"
target-version = "py311"
select = ["E", "F", "B", "I"]
fix = true
@@ -39,7 +39,7 @@ docstring-code-format = true
[tool.mypy]
strict = true
python_version = "3.10"
python_version = "3.11"
ignore_missing_imports = true
disallow_untyped_defs = true
check_untyped_defs = true

View File

@@ -6,7 +6,7 @@ build-backend = "pdm.backend"
name = "cua-mcp-server"
description = "MCP Server for Computer-Use Agent (CUA)"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
version = "0.1.0"
authors = [
{name = "TryCua", email = "gh@trycua.com"}
@@ -31,10 +31,10 @@ dev = [
[tool.black]
line-length = 100
target-version = ["py310"]
target-version = ["py311"]
[tool.ruff]
line-length = 100
target-version = "py310"
target-version = "py311"
select = ["E", "F", "B", "I"]
fix = true

View File

@@ -43,13 +43,13 @@ dev = [
[tool.black]
line-length = 100
target-version = ["py310"]
target-version = ["py311"]
[tool.ruff]
fix = true
line-length = 100
select = ["B", "E", "F", "I"]
target-version = "py310"
target-version = "py311"
[tool.ruff.format]
docstring-code-format = true
@@ -58,7 +58,7 @@ docstring-code-format = true
check_untyped_defs = true
disallow_untyped_defs = true
ignore_missing_imports = true
python_version = "3.10"
python_version = "3.11"
show_error_codes = true
strict = true
warn_return_any = true

View File

@@ -24,7 +24,7 @@ dependencies = [
"typing-extensions>=4.9.0",
"pydantic>=2.6.3"
]
requires-python = ">=3.10"
requires-python = ">=3.11"
readme = "README.md"
license = {text = "MIT"}
keywords = ["computer-vision", "ocr", "ui-analysis", "icon-detection"]

View File

@@ -9,7 +9,7 @@ description = "CUA (Computer Use Agent) mono-repo"
license = { text = "MIT" }
name = "cua-workspace"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
version = "0.1.0"
[project.urls]
@@ -53,13 +53,13 @@ respect-source-order = true
[tool.black]
line-length = 100
target-version = ["py310"]
target-version = ["py311"]
[tool.ruff]
fix = true
line-length = 100
select = ["B", "E", "F", "I"]
target-version = "py310"
target-version = "py311"
[tool.ruff.format]
docstring-code-format = true
@@ -68,7 +68,7 @@ docstring-code-format = true
check_untyped_defs = true
disallow_untyped_defs = true
ignore_missing_imports = true
python_version = "3.10"
python_version = "3.11"
show_error_codes = true
strict = true
warn_return_any = true