refactor: simplify to see/interact/exec and split server modules
All checks were successful
python-syntax / syntax-check (push) Successful in 6s

This commit is contained in:
2026-05-03 20:07:12 +02:00
parent aced5be25e
commit 1c03cab457
8 changed files with 911 additions and 1928 deletions

View File

@@ -15,24 +15,25 @@ if TOKEN:
def main():
health = requests.get(f"{BASE_URL}/health", headers=headers, timeout=10)
health.raise_for_status()
print("health ok:", health.json().get("ok"))
print("health:", health.json()["data"])
observe = requests.post(
f"{BASE_URL}/v2/observe",
see = requests.post(
f"{BASE_URL}/see",
headers=headers,
params={"screen": SCREEN},
json={
"mode": "screen",
"include_image": False,
"ocr_mode": "none",
"screen": SCREEN,
"with_grid": True,
"grid_rows": 12,
"grid_cols": 12,
"image_format": "jpeg",
"jpeg_quality": 70,
},
timeout=20,
timeout=30,
)
observe.raise_for_status()
payload = observe.json()["data"]
print("observation_id:", payload["observation_id"])
print("region:", payload["region"])
print("timing_ms:", payload["timing_ms"])
see.raise_for_status()
payload = see.json()["data"]
print("region:", payload["meta"]["region"])
print("grid:", payload["meta"].get("grid", {}))
if __name__ == "__main__":