autoglm-gui 0.4.14__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.
Files changed (75) hide show
  1. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/devices.py +49 -0
  2. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/schemas.py +16 -0
  3. autoglm_gui-0.4.14/AutoGLM_GUI/static/assets/about-29B5FDM8.js → autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/about-BOnRPlKQ.js +1 -1
  4. autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/chat-CGW6uMKB.js +149 -0
  5. autoglm_gui-0.4.14/AutoGLM_GUI/static/assets/index-mVNV0VwM.js → autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/index-CRFVU0eu.js +1 -1
  6. autoglm_gui-0.4.14/AutoGLM_GUI/static/assets/index-wu8Wjf12.js → autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/index-DH-Dl4tK.js +5 -5
  7. autoglm_gui-1.0.1/AutoGLM_GUI/static/assets/index-DzUQ89YC.css +1 -0
  8. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/static/index.html +2 -2
  9. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/PKG-INFO +3 -3
  10. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/README.md +2 -2
  11. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/__init__.py +3 -2
  12. autoglm_gui-1.0.1/phone_agent/actions/handler.py +400 -0
  13. autoglm_gui-0.4.14/phone_agent/actions/handler.py → autoglm_gui-1.0.1/phone_agent/actions/handler_ios.py +43 -72
  14. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/adb/connection.py +14 -5
  15. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/adb/device.py +47 -16
  16. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/agent.py +8 -8
  17. autoglm_gui-1.0.1/phone_agent/agent_ios.py +277 -0
  18. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/config/__init__.py +18 -0
  19. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/config/apps.py +1 -1
  20. autoglm_gui-1.0.1/phone_agent/config/apps_harmonyos.py +256 -0
  21. autoglm_gui-1.0.1/phone_agent/config/apps_ios.py +339 -0
  22. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/config/i18n.py +8 -0
  23. autoglm_gui-1.0.1/phone_agent/config/timing.py +167 -0
  24. autoglm_gui-1.0.1/phone_agent/device_factory.py +166 -0
  25. autoglm_gui-1.0.1/phone_agent/hdc/__init__.py +53 -0
  26. autoglm_gui-1.0.1/phone_agent/hdc/connection.py +384 -0
  27. autoglm_gui-1.0.1/phone_agent/hdc/device.py +269 -0
  28. autoglm_gui-1.0.1/phone_agent/hdc/input.py +145 -0
  29. autoglm_gui-1.0.1/phone_agent/hdc/screenshot.py +127 -0
  30. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/model/client.py +104 -4
  31. autoglm_gui-1.0.1/phone_agent/xctest/__init__.py +47 -0
  32. autoglm_gui-1.0.1/phone_agent/xctest/connection.py +379 -0
  33. autoglm_gui-1.0.1/phone_agent/xctest/device.py +472 -0
  34. autoglm_gui-1.0.1/phone_agent/xctest/input.py +311 -0
  35. autoglm_gui-1.0.1/phone_agent/xctest/screenshot.py +226 -0
  36. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/pyproject.toml +1 -1
  37. autoglm_gui-0.4.14/AutoGLM_GUI/static/assets/chat-DTN2oKtA.js +0 -149
  38. autoglm_gui-0.4.14/AutoGLM_GUI/static/assets/index-Dy550Qqg.css +0 -1
  39. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/.gitignore +0 -0
  40. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/__init__.py +0 -0
  41. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/__main__.py +0 -0
  42. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/__init__.py +0 -0
  43. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/device.py +0 -0
  44. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/ip.py +0 -0
  45. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/keyboard_installer.py +0 -0
  46. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/screenshot.py +0 -0
  47. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/serial.py +0 -0
  48. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/adb_plus/touch.py +0 -0
  49. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/__init__.py +0 -0
  50. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/agents.py +0 -0
  51. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/control.py +0 -0
  52. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/media.py +0 -0
  53. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/api/version.py +0 -0
  54. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/config.py +0 -0
  55. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/config_manager.py +0 -0
  56. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/exceptions.py +0 -0
  57. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/logger.py +0 -0
  58. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/platform_utils.py +0 -0
  59. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/scrcpy_protocol.py +0 -0
  60. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/scrcpy_stream.py +0 -0
  61. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/server.py +0 -0
  62. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/socketio_server.py +0 -0
  63. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/state.py +0 -0
  64. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/static/assets/worker-D6BRitjy.js +0 -0
  65. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/AutoGLM_GUI/version.py +0 -0
  66. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/LICENSE +0 -0
  67. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/actions/__init__.py +0 -0
  68. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/adb/__init__.py +0 -0
  69. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/adb/input.py +0 -0
  70. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/adb/screenshot.py +0 -0
  71. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/config/prompts.py +0 -0
  72. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/config/prompts_en.py +0 -0
  73. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/config/prompts_zh.py +0 -0
  74. {autoglm_gui-0.4.14 → autoglm_gui-1.0.1}/phone_agent/model/__init__.py +0 -0
  75. {autoglm_gui-0.4.14 → 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-wu8Wjf12.js";function t(){return o.jsx("div",{className:"p-2",children:o.jsx("h3",{children:"About"})})}export{t as component};
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};