Features: - Web Dashboard: FastAPI-based dashboard with Vue.js frontend - Multi-device support (ADB, HDC, iOS) - Real-time WebSocket updates for task progress - Device management with status tracking - Task queue with execution controls (start/stop/re-execute) - Detailed task information display (thinking, actions, completion messages) - Screenshot viewing per device - LAN deployment support with configurable CORS - Callback Hooks: Interrupt and modify task execution - step_callback: Called after each step with StepResult - before_action_callback: Called before executing action - Support for task interruption and dynamic task switching - Example scripts demonstrating callback usage - Configuration: Environment-based configuration - .env file support for all settings - .env.example template with documentation - Model API configuration (base URL, model name, API key) - Dashboard configuration (host, port, CORS, device type) - Phone agent configuration (delays, max steps, language) Technical improvements: - Fixed forward reference issue with StepResult - Added package exports for callback types and configs - Enhanced dependencies with FastAPI, WebSocket support - Thread-safe task execution with device locking - Async WebSocket broadcasting from sync thread pool Co-Authored-By: Claude <noreply@anthropic.com>
61 lines
1.8 KiB
Python
61 lines
1.8 KiB
Python
#!/usr/bin/env python3
|
|
"""Setup script for Phone Agent."""
|
|
|
|
from setuptools import find_packages, setup
|
|
|
|
with open("README.md", "r", encoding="utf-8") as f:
|
|
long_description = f.read()
|
|
|
|
setup(
|
|
name="phone-agent",
|
|
version="0.1.0",
|
|
author="Zhipu AI",
|
|
author_email="",
|
|
description="AI-powered phone automation framework",
|
|
long_description=long_description,
|
|
long_description_content_type="text/markdown",
|
|
url="https://github.com/yourusername/phone-agent",
|
|
packages=find_packages(),
|
|
classifiers=[
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: Apache Software License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
],
|
|
python_requires=">=3.10",
|
|
install_requires=[
|
|
"Pillow>=12.0.0",
|
|
"openai>=2.9.0",
|
|
"python-dotenv>=1.0.0",
|
|
"requests>=2.31.0",
|
|
],
|
|
extras_require={
|
|
"dev": [
|
|
"pytest>=7.0.0",
|
|
"black>=23.0.0",
|
|
"mypy>=1.0.0",
|
|
"ruff>=0.1.0",
|
|
],
|
|
"dashboard": [
|
|
"fastapi>=0.104.0",
|
|
"uvicorn[standard]>=0.24.0",
|
|
"websockets>=12.0",
|
|
"pydantic>=2.5.0",
|
|
"python-multipart>=0.0.6",
|
|
"aiofiles>=23.2.0",
|
|
],
|
|
},
|
|
entry_points={
|
|
"console_scripts": [
|
|
"phone-agent=main:main",
|
|
"autoglm-dashboard=dashboard.main:main",
|
|
],
|
|
},
|
|
)
|