autoglm-gui 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/devices.py +49 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/schemas.py +16 -0
- autoglm_gui-1.0.0/AutoGLM_GUI/static/assets/about-29B5FDM8.js → autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/about-BOnRPlKQ.js +1 -1
- autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/chat-CGW6uMKB.js +149 -0
- autoglm_gui-1.0.0/AutoGLM_GUI/static/assets/index-mVNV0VwM.js → autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/index-CRFVU0eu.js +1 -1
- autoglm_gui-1.0.0/AutoGLM_GUI/static/assets/index-wu8Wjf12.js → autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/index-DH-Dl4tK.js +5 -5
- autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/index-DzUQ89YC.css +1 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/static/index.html +2 -2
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/PKG-INFO +3 -3
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/README.md +2 -2
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/__init__.py +3 -2
- autoglm_gui-1.0.1/phone_agent/actions/handler.py +400 -0
- autoglm_gui-1.0.0/phone_agent/actions/handler.py → autoglm_gui-1.0.1/phone_agent/actions/handler_ios.py +43 -72
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/adb/connection.py +14 -5
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/adb/device.py +47 -16
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/agent.py +8 -8
- autoglm_gui-1.0.1/phone_agent/agent_ios.py +277 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/config/__init__.py +18 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/config/apps.py +1 -1
- autoglm_gui-1.0.1/phone_agent/config/apps_harmonyos.py +256 -0
- autoglm_gui-1.0.1/phone_agent/config/apps_ios.py +339 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/config/i18n.py +8 -0
- autoglm_gui-1.0.1/phone_agent/config/timing.py +167 -0
- autoglm_gui-1.0.1/phone_agent/device_factory.py +166 -0
- autoglm_gui-1.0.1/phone_agent/hdc/__init__.py +53 -0
- autoglm_gui-1.0.1/phone_agent/hdc/connection.py +384 -0
- autoglm_gui-1.0.1/phone_agent/hdc/device.py +269 -0
- autoglm_gui-1.0.1/phone_agent/hdc/input.py +145 -0
- autoglm_gui-1.0.1/phone_agent/hdc/screenshot.py +127 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/model/client.py +104 -4
- autoglm_gui-1.0.1/phone_agent/xctest/__init__.py +47 -0
- autoglm_gui-1.0.1/phone_agent/xctest/connection.py +379 -0
- autoglm_gui-1.0.1/phone_agent/xctest/device.py +472 -0
- autoglm_gui-1.0.1/phone_agent/xctest/input.py +311 -0
- autoglm_gui-1.0.1/phone_agent/xctest/screenshot.py +226 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/pyproject.toml +1 -1
- autoglm_gui-1.0.0/AutoGLM_GUI/static/assets/chat-DTN2oKtA.js +0 -149
- autoglm_gui-1.0.0/AutoGLM_GUI/static/assets/index-Dy550Qqg.css +0 -1
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/.gitignore +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/__init__.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/__main__.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/__init__.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/device.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/ip.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/keyboard_installer.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/screenshot.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/serial.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/touch.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/__init__.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/agents.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/control.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/media.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/version.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/config.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/config_manager.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/exceptions.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/logger.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/platform_utils.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/scrcpy_protocol.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/scrcpy_stream.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/server.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/socketio_server.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/state.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/static/assets/worker-D6BRitjy.js +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/AutoGLM_GUI/version.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/LICENSE +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/actions/__init__.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/adb/__init__.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/adb/input.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/adb/screenshot.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/config/prompts.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/config/prompts_en.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/config/prompts_zh.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/phone_agent/model/__init__.py +0 -0
- {autoglm_gui-1.0.0 → autoglm_gui-1.0.1}/scrcpy-server-v3.3.3 +0 -0
|
@@ -10,6 +10,8 @@ from AutoGLM_GUI.schemas import (
|
|
|
10
10
|
WiFiConnectResponse,
|
|
11
11
|
WiFiDisconnectRequest,
|
|
12
12
|
WiFiDisconnectResponse,
|
|
13
|
+
WiFiManualConnectRequest,
|
|
14
|
+
WiFiManualConnectResponse,
|
|
13
15
|
)
|
|
14
16
|
from AutoGLM_GUI.state import agents
|
|
15
17
|
|
|
@@ -117,3 +119,50 @@ def disconnect_wifi(request: WiFiDisconnectRequest) -> WiFiDisconnectResponse:
|
|
|
117
119
|
message=msg,
|
|
118
120
|
error=None if ok else "disconnect_failed",
|
|
119
121
|
)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
@router.post(
|
|
125
|
+
"/api/devices/connect_wifi_manual", response_model=WiFiManualConnectResponse
|
|
126
|
+
)
|
|
127
|
+
def connect_wifi_manual(
|
|
128
|
+
request: WiFiManualConnectRequest,
|
|
129
|
+
) -> WiFiManualConnectResponse:
|
|
130
|
+
"""手动连接到 WiFi 设备 (直接连接,无需 USB)."""
|
|
131
|
+
import re
|
|
132
|
+
|
|
133
|
+
from phone_agent.adb import ADBConnection
|
|
134
|
+
|
|
135
|
+
# IP 格式验证
|
|
136
|
+
ip_pattern = r"^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$"
|
|
137
|
+
if not re.match(ip_pattern, request.ip):
|
|
138
|
+
return WiFiManualConnectResponse(
|
|
139
|
+
success=False,
|
|
140
|
+
message="Invalid IP address format",
|
|
141
|
+
error="invalid_ip",
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
# 端口范围验证
|
|
145
|
+
if not (1 <= request.port <= 65535):
|
|
146
|
+
return WiFiManualConnectResponse(
|
|
147
|
+
success=False,
|
|
148
|
+
message="Port must be between 1 and 65535",
|
|
149
|
+
error="invalid_port",
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
conn = ADBConnection()
|
|
153
|
+
address = f"{request.ip}:{request.port}"
|
|
154
|
+
|
|
155
|
+
# 直接连接
|
|
156
|
+
ok, msg = conn.connect(address)
|
|
157
|
+
if not ok:
|
|
158
|
+
return WiFiManualConnectResponse(
|
|
159
|
+
success=False,
|
|
160
|
+
message=msg or f"Failed to connect to {address}",
|
|
161
|
+
error="connect_failed",
|
|
162
|
+
)
|
|
163
|
+
|
|
164
|
+
return WiFiManualConnectResponse(
|
|
165
|
+
success=True,
|
|
166
|
+
message=f"Successfully connected to {address}",
|
|
167
|
+
device_id=address,
|
|
168
|
+
)
|
|
@@ -177,6 +177,22 @@ class WiFiDisconnectResponse(BaseModel):
|
|
|
177
177
|
error: str | None = None
|
|
178
178
|
|
|
179
179
|
|
|
180
|
+
class WiFiManualConnectRequest(BaseModel):
|
|
181
|
+
"""手动连接 WiFi 请求 (无需 USB)."""
|
|
182
|
+
|
|
183
|
+
ip: str # IP 地址
|
|
184
|
+
port: int = 5555 # 端口,默认 5555
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class WiFiManualConnectResponse(BaseModel):
|
|
188
|
+
"""手动连接 WiFi 响应."""
|
|
189
|
+
|
|
190
|
+
success: bool
|
|
191
|
+
message: str
|
|
192
|
+
device_id: str | None = None # 连接后的设备 ID (ip:port)
|
|
193
|
+
error: str | None = None
|
|
194
|
+
|
|
195
|
+
|
|
180
196
|
class VersionCheckResponse(BaseModel):
|
|
181
197
|
"""Version update check response."""
|
|
182
198
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o}from"./index-
|
|
1
|
+
import{j as o}from"./index-DH-Dl4tK.js";function t(){return o.jsx("div",{className:"p-2",children:o.jsx("h3",{children:"About"})})}export{t as component};
|