autoglm-gui 0.4.11__py3-none-any.whl → 0.4.12__py3-none-any.whl
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/__init__.py +8 -0
- AutoGLM_GUI/__main__.py +29 -34
- AutoGLM_GUI/adb_plus/__init__.py +6 -0
- AutoGLM_GUI/adb_plus/device.py +50 -0
- AutoGLM_GUI/adb_plus/ip.py +78 -0
- AutoGLM_GUI/adb_plus/serial.py +35 -0
- AutoGLM_GUI/api/__init__.py +8 -0
- AutoGLM_GUI/api/agents.py +76 -67
- AutoGLM_GUI/api/devices.py +96 -6
- AutoGLM_GUI/api/media.py +12 -235
- AutoGLM_GUI/config_manager.py +538 -97
- AutoGLM_GUI/exceptions.py +7 -0
- AutoGLM_GUI/platform_utils.py +19 -0
- AutoGLM_GUI/schemas.py +35 -2
- AutoGLM_GUI/scrcpy_protocol.py +46 -0
- AutoGLM_GUI/scrcpy_stream.py +192 -307
- AutoGLM_GUI/server.py +7 -2
- AutoGLM_GUI/socketio_server.py +125 -0
- AutoGLM_GUI/static/assets/{about-wSo3UgQ-.js → about-kgOkkOWe.js} +1 -1
- AutoGLM_GUI/static/assets/chat-CZV3RByK.js +149 -0
- AutoGLM_GUI/static/assets/{index-B5u1xtK1.js → index-BPYHsweG.js} +1 -1
- AutoGLM_GUI/static/assets/index-Beu9cbSy.css +1 -0
- AutoGLM_GUI/static/assets/index-DfI_Z1Cx.js +10 -0
- AutoGLM_GUI/static/assets/worker-D6BRitjy.js +1 -0
- AutoGLM_GUI/static/index.html +2 -2
- {autoglm_gui-0.4.11.dist-info → autoglm_gui-0.4.12.dist-info}/METADATA +2 -1
- autoglm_gui-0.4.12.dist-info/RECORD +56 -0
- AutoGLM_GUI/resources/apks/ADBKeyBoard.LICENSE.txt +0 -339
- AutoGLM_GUI/resources/apks/ADBKeyBoard.README.txt +0 -1
- AutoGLM_GUI/resources/apks/ADBKeyboard.apk +0 -0
- AutoGLM_GUI/static/assets/chat-BcY2K0yj.js +0 -25
- AutoGLM_GUI/static/assets/index-CHrYo3Qj.css +0 -1
- AutoGLM_GUI/static/assets/index-D5BALRbT.js +0 -10
- autoglm_gui-0.4.11.dist-info/RECORD +0 -52
- {autoglm_gui-0.4.11.dist-info → autoglm_gui-0.4.12.dist-info}/WHEEL +0 -0
- {autoglm_gui-0.4.11.dist-info → autoglm_gui-0.4.12.dist-info}/entry_points.txt +0 -0
- {autoglm_gui-0.4.11.dist-info → autoglm_gui-0.4.12.dist-info}/licenses/LICENSE +0 -0
AutoGLM_GUI/schemas.py
CHANGED
|
@@ -132,8 +132,18 @@ class ConfigResponse(BaseModel):
|
|
|
132
132
|
|
|
133
133
|
base_url: str
|
|
134
134
|
model_name: str
|
|
135
|
-
api_key: str #
|
|
136
|
-
source: str # "
|
|
135
|
+
api_key: str # 返回实际值(明文)
|
|
136
|
+
source: str # "CLI arguments" | "environment variables" | "config file (...)" | "default"
|
|
137
|
+
conflicts: list[dict] | None = None # 配置冲突信息(可选)
|
|
138
|
+
# conflicts 示例:
|
|
139
|
+
# [
|
|
140
|
+
# {
|
|
141
|
+
# "field": "base_url",
|
|
142
|
+
# "file_value": "http://localhost:8080/v1",
|
|
143
|
+
# "override_value": "https://api.example.com",
|
|
144
|
+
# "override_source": "CLI arguments"
|
|
145
|
+
# }
|
|
146
|
+
# ]
|
|
137
147
|
|
|
138
148
|
|
|
139
149
|
class ConfigSaveRequest(BaseModel):
|
|
@@ -142,3 +152,26 @@ class ConfigSaveRequest(BaseModel):
|
|
|
142
152
|
base_url: str
|
|
143
153
|
model_name: str = "autoglm-phone-9b"
|
|
144
154
|
api_key: str | None = None
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class WiFiConnectRequest(BaseModel):
|
|
158
|
+
device_id: str | None = None
|
|
159
|
+
port: int = 5555
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class WiFiConnectResponse(BaseModel):
|
|
163
|
+
success: bool
|
|
164
|
+
message: str
|
|
165
|
+
device_id: str | None = None
|
|
166
|
+
address: str | None = None
|
|
167
|
+
error: str | None = None
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class WiFiDisconnectRequest(BaseModel):
|
|
171
|
+
device_id: str
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
class WiFiDisconnectResponse(BaseModel):
|
|
175
|
+
success: bool
|
|
176
|
+
message: str
|
|
177
|
+
error: str | None = None
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"""Scrcpy protocol helpers aligned with ya-webadb implementations."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from dataclasses import dataclass
|
|
6
|
+
from typing import Optional
|
|
7
|
+
|
|
8
|
+
SCRCPY_CODEC_H264 = 0x68323634
|
|
9
|
+
SCRCPY_CODEC_H265 = 0x68323635
|
|
10
|
+
SCRCPY_CODEC_AV1 = 0x00617631
|
|
11
|
+
|
|
12
|
+
SCRCPY_CODEC_NAME_TO_ID: dict[str, int] = {
|
|
13
|
+
"h264": SCRCPY_CODEC_H264,
|
|
14
|
+
"h265": SCRCPY_CODEC_H265,
|
|
15
|
+
"av1": SCRCPY_CODEC_AV1,
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
SCRCPY_KNOWN_CODECS = set(SCRCPY_CODEC_NAME_TO_ID.values())
|
|
19
|
+
|
|
20
|
+
PTS_CONFIG = 1 << 63
|
|
21
|
+
PTS_KEYFRAME = 1 << 62
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
@dataclass
|
|
25
|
+
class ScrcpyVideoStreamMetadata:
|
|
26
|
+
device_name: Optional[str]
|
|
27
|
+
width: Optional[int]
|
|
28
|
+
height: Optional[int]
|
|
29
|
+
codec: int
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
@dataclass
|
|
33
|
+
class ScrcpyMediaStreamPacket:
|
|
34
|
+
type: str
|
|
35
|
+
data: bytes
|
|
36
|
+
keyframe: Optional[bool] = None
|
|
37
|
+
pts: Optional[int] = None
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
@dataclass
|
|
41
|
+
class ScrcpyVideoStreamOptions:
|
|
42
|
+
send_device_meta: bool = True
|
|
43
|
+
send_codec_meta: bool = True
|
|
44
|
+
send_frame_meta: bool = True
|
|
45
|
+
send_dummy_byte: bool = True
|
|
46
|
+
video_codec: str = "h264"
|