Replaces the separate Vue/Vite `console/` SPA with a same-origin, server-rendered console built on a module-level Jinja2 Environment with select_autoescape(["html","xml"]). - Add api/console_web.py with /ui/ routes (dashboard, tasks, task detail/timeline, config) and a _status_fragment polled every 10s. - Refactor api/console.py into a typed ConsoleService shared by the JSON and HTML routers so validation/persistence cannot drift. - Remove RUNTIME_CONSOLE_STATIC_DIR, SpaStaticFiles, and the wildcard CORS middleware from api/rest.py; GET / now redirects to /ui/. - Delete the top-level console/ project; add jinja2 and python-multipart as direct dependencies and ship templates/CSS/JS via package-data. - Add 31 tests (XSS probes, PRG flows, fragment refresh, no-static-dir and no-CORS regressions, wheel-packaging smoke test). /console/* JSON endpoints remain unchanged. The console keeps the trusted-network-only boundary; auth/CSRF is intentionally deferred. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
71 lines
1.5 KiB
TOML
71 lines
1.5 KiB
TOML
[project]
|
|
name = "device-agent-runtime"
|
|
version = "0.1.0"
|
|
description = "Device-agnostic runtime for LLM-driven automation, with iPhone/WDA as the first driver."
|
|
requires-python = ">=3.13,<3.14"
|
|
dependencies = [
|
|
"anthropic>=0.69.0",
|
|
"Appium-Python-Client>=5.1.1",
|
|
"fastapi>=0.115.0",
|
|
"httpx>=0.27.0",
|
|
"jinja2>=3.1",
|
|
"mcp>=1.27,<2",
|
|
"openai>=1.0.0",
|
|
"paddlepaddle>=3.0.0",
|
|
"paddleocr>=3.0.0",
|
|
"python-multipart>=0.0.20",
|
|
"uvicorn[standard]>=0.30.0",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=69"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.3.0",
|
|
]
|
|
|
|
[tool.uv]
|
|
# Aliyun PyPI mirror for CN networks. Override locally with UV_INDEX_URL
|
|
# (e.g. `UV_INDEX_URL=https://pypi.org/simple uv sync`).
|
|
index-url = "https://mirrors.aliyun.com/pypi/simple"
|
|
|
|
[tool.uv.workspace]
|
|
members = [
|
|
"apps/cloud-api",
|
|
"apps/device-host-agent",
|
|
"packages/cloud-platform",
|
|
]
|
|
|
|
[tool.setuptools.packages.find]
|
|
include = [
|
|
"agents*",
|
|
"api*",
|
|
"core*",
|
|
"device*",
|
|
"driver*",
|
|
"perception*",
|
|
"runtime*",
|
|
"semantic*",
|
|
"skills_learning*",
|
|
"storage*",
|
|
"tools*",
|
|
"world*",
|
|
"workflow*",
|
|
]
|
|
|
|
[tool.setuptools.package-data]
|
|
api = [
|
|
"templates/runtime_console/*.html",
|
|
"static/runtime_console/*.css",
|
|
"static/runtime_console/*.js",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
addopts = "-ra --import-mode=importlib"
|
|
markers = [
|
|
"integration: tests requiring external hardware or services",
|
|
]
|