Implement Apex Agent MVP scaffold
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from core.device_manager import DeviceManager
|
||||
from tools._device import get_driver
|
||||
|
||||
|
||||
def swipe(
|
||||
start_x: float,
|
||||
start_y: float,
|
||||
end_x: float,
|
||||
end_y: float,
|
||||
*,
|
||||
duration_ms: int = 500,
|
||||
device_id: str | None = None,
|
||||
manager: DeviceManager | None = None,
|
||||
) -> dict[str, object]:
|
||||
get_driver(device_id, manager=manager).swipe(
|
||||
start_x,
|
||||
start_y,
|
||||
end_x,
|
||||
end_y,
|
||||
duration_ms,
|
||||
)
|
||||
return {
|
||||
"ok": True,
|
||||
"action": "swipe",
|
||||
"start": {"x": start_x, "y": start_y},
|
||||
"end": {"x": end_x, "y": end_y},
|
||||
"duration_ms": duration_ms,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user