autoglm-gui 1.4.1__py3-none-any.whl → 1.5.1__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 +11 -0
- AutoGLM_GUI/__main__.py +26 -4
- AutoGLM_GUI/actions/__init__.py +6 -0
- phone_agent/actions/handler_ios.py → AutoGLM_GUI/actions/handler.py +30 -112
- AutoGLM_GUI/actions/types.py +15 -0
- {phone_agent → AutoGLM_GUI}/adb/__init__.py +25 -23
- {phone_agent → AutoGLM_GUI}/adb/connection.py +5 -40
- {phone_agent → AutoGLM_GUI}/adb/device.py +12 -94
- {phone_agent → AutoGLM_GUI}/adb/input.py +6 -47
- AutoGLM_GUI/adb/screenshot.py +11 -0
- {phone_agent/config → AutoGLM_GUI/adb}/timing.py +1 -1
- AutoGLM_GUI/adb_plus/keyboard_installer.py +4 -2
- AutoGLM_GUI/adb_plus/screenshot.py +22 -1
- AutoGLM_GUI/adb_plus/serial.py +38 -20
- AutoGLM_GUI/adb_plus/touch.py +4 -9
- AutoGLM_GUI/agents/__init__.py +43 -12
- AutoGLM_GUI/agents/events.py +19 -0
- AutoGLM_GUI/agents/factory.py +31 -38
- AutoGLM_GUI/agents/glm/__init__.py +7 -0
- AutoGLM_GUI/agents/glm/agent.py +297 -0
- AutoGLM_GUI/agents/glm/message_builder.py +81 -0
- AutoGLM_GUI/agents/glm/parser.py +110 -0
- {phone_agent/config → AutoGLM_GUI/agents/glm}/prompts_en.py +7 -9
- {phone_agent/config → AutoGLM_GUI/agents/glm}/prompts_zh.py +18 -25
- AutoGLM_GUI/agents/mai/__init__.py +28 -0
- AutoGLM_GUI/agents/mai/agent.py +408 -0
- AutoGLM_GUI/agents/mai/parser.py +254 -0
- AutoGLM_GUI/agents/mai/prompts.py +103 -0
- AutoGLM_GUI/agents/mai/traj_memory.py +91 -0
- AutoGLM_GUI/agents/protocols.py +12 -8
- AutoGLM_GUI/agents/stream_runner.py +193 -0
- AutoGLM_GUI/api/__init__.py +40 -21
- AutoGLM_GUI/api/agents.py +181 -239
- AutoGLM_GUI/api/control.py +9 -6
- AutoGLM_GUI/api/devices.py +102 -12
- AutoGLM_GUI/api/history.py +104 -0
- AutoGLM_GUI/api/layered_agent.py +67 -15
- AutoGLM_GUI/api/media.py +64 -1
- AutoGLM_GUI/api/scheduled_tasks.py +98 -0
- AutoGLM_GUI/config.py +81 -0
- AutoGLM_GUI/config_manager.py +68 -51
- AutoGLM_GUI/device_manager.py +248 -29
- AutoGLM_GUI/device_protocol.py +1 -1
- AutoGLM_GUI/devices/adb_device.py +5 -10
- AutoGLM_GUI/devices/mock_device.py +4 -2
- AutoGLM_GUI/devices/remote_device.py +8 -3
- AutoGLM_GUI/history_manager.py +164 -0
- AutoGLM_GUI/model/__init__.py +5 -0
- AutoGLM_GUI/model/message_builder.py +69 -0
- AutoGLM_GUI/model/types.py +24 -0
- AutoGLM_GUI/models/__init__.py +10 -0
- AutoGLM_GUI/models/history.py +140 -0
- AutoGLM_GUI/models/scheduled_task.py +71 -0
- AutoGLM_GUI/parsers/__init__.py +22 -0
- AutoGLM_GUI/parsers/base.py +50 -0
- AutoGLM_GUI/parsers/phone_parser.py +58 -0
- AutoGLM_GUI/phone_agent_manager.py +62 -396
- AutoGLM_GUI/platform_utils.py +26 -0
- AutoGLM_GUI/prompt_config.py +15 -0
- AutoGLM_GUI/prompts/__init__.py +32 -0
- AutoGLM_GUI/scheduler_manager.py +350 -0
- AutoGLM_GUI/schemas.py +246 -72
- AutoGLM_GUI/scrcpy_stream.py +142 -24
- AutoGLM_GUI/socketio_server.py +100 -27
- AutoGLM_GUI/static/assets/{about-_XNhzQZX.js → about-CfwX1Cmc.js} +1 -1
- AutoGLM_GUI/static/assets/alert-dialog-CtGlN2IJ.js +1 -0
- AutoGLM_GUI/static/assets/chat-BYa-foUI.js +129 -0
- AutoGLM_GUI/static/assets/circle-alert-t08bEMPO.js +1 -0
- AutoGLM_GUI/static/assets/dialog-FNwZJFwk.js +45 -0
- AutoGLM_GUI/static/assets/eye-D0UPWCWC.js +1 -0
- AutoGLM_GUI/static/assets/history-CRo95B7i.js +1 -0
- AutoGLM_GUI/static/assets/{index-Cy8TmmHV.js → index-BaLMSqd3.js} +1 -1
- AutoGLM_GUI/static/assets/index-CTHbFvKl.js +11 -0
- AutoGLM_GUI/static/assets/index-CV7jGxGm.css +1 -0
- AutoGLM_GUI/static/assets/label-DJFevVmr.js +1 -0
- AutoGLM_GUI/static/assets/logs-RW09DyYY.js +1 -0
- AutoGLM_GUI/static/assets/popover--JTJrE5v.js +1 -0
- AutoGLM_GUI/static/assets/scheduled-tasks-DTRKsQXF.js +1 -0
- AutoGLM_GUI/static/assets/square-pen-CPK_K680.js +1 -0
- AutoGLM_GUI/static/assets/textarea-PRmVnWq5.js +1 -0
- AutoGLM_GUI/static/assets/workflows-CdcsAoaT.js +1 -0
- AutoGLM_GUI/static/index.html +2 -2
- AutoGLM_GUI/types.py +17 -0
- {autoglm_gui-1.4.1.dist-info → autoglm_gui-1.5.1.dist-info}/METADATA +179 -130
- autoglm_gui-1.5.1.dist-info/RECORD +118 -0
- AutoGLM_GUI/agents/mai_adapter.py +0 -627
- AutoGLM_GUI/api/dual_model.py +0 -317
- AutoGLM_GUI/device_adapter.py +0 -263
- AutoGLM_GUI/dual_model/__init__.py +0 -53
- AutoGLM_GUI/dual_model/decision_model.py +0 -664
- AutoGLM_GUI/dual_model/dual_agent.py +0 -917
- AutoGLM_GUI/dual_model/protocols.py +0 -354
- AutoGLM_GUI/dual_model/vision_model.py +0 -442
- AutoGLM_GUI/mai_ui_adapter/agent_wrapper.py +0 -291
- AutoGLM_GUI/phone_agent_patches.py +0 -147
- AutoGLM_GUI/static/assets/chat-DwJpiAWf.js +0 -126
- AutoGLM_GUI/static/assets/dialog-B3uW4T8V.js +0 -45
- AutoGLM_GUI/static/assets/index-Cpv2gSF1.css +0 -1
- AutoGLM_GUI/static/assets/index-UYYauTly.js +0 -12
- AutoGLM_GUI/static/assets/workflows-Du_de-dt.js +0 -1
- autoglm_gui-1.4.1.dist-info/RECORD +0 -117
- mai_agent/base.py +0 -137
- mai_agent/mai_grounding_agent.py +0 -263
- mai_agent/mai_naivigation_agent.py +0 -526
- mai_agent/prompt.py +0 -148
- mai_agent/unified_memory.py +0 -67
- mai_agent/utils.py +0 -73
- phone_agent/__init__.py +0 -12
- phone_agent/actions/__init__.py +0 -5
- phone_agent/actions/handler.py +0 -400
- phone_agent/adb/screenshot.py +0 -108
- phone_agent/agent.py +0 -253
- phone_agent/agent_ios.py +0 -277
- phone_agent/config/__init__.py +0 -53
- phone_agent/config/apps_harmonyos.py +0 -256
- phone_agent/config/apps_ios.py +0 -339
- phone_agent/config/prompts.py +0 -80
- phone_agent/device_factory.py +0 -166
- phone_agent/hdc/__init__.py +0 -53
- phone_agent/hdc/connection.py +0 -384
- phone_agent/hdc/device.py +0 -269
- phone_agent/hdc/input.py +0 -145
- phone_agent/hdc/screenshot.py +0 -127
- phone_agent/model/__init__.py +0 -5
- phone_agent/model/client.py +0 -290
- phone_agent/xctest/__init__.py +0 -47
- phone_agent/xctest/connection.py +0 -379
- phone_agent/xctest/device.py +0 -472
- phone_agent/xctest/input.py +0 -311
- phone_agent/xctest/screenshot.py +0 -226
- {phone_agent/config → AutoGLM_GUI/adb}/apps.py +0 -0
- {phone_agent/config → AutoGLM_GUI}/i18n.py +0 -0
- {autoglm_gui-1.4.1.dist-info → autoglm_gui-1.5.1.dist-info}/WHEEL +0 -0
- {autoglm_gui-1.4.1.dist-info → autoglm_gui-1.5.1.dist-info}/entry_points.txt +0 -0
- {autoglm_gui-1.4.1.dist-info → autoglm_gui-1.5.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
"""HarmonyOS application package name mappings.
|
|
2
|
-
|
|
3
|
-
Maps user-friendly app names to HarmonyOS bundle names.
|
|
4
|
-
These bundle names are used with the 'hdc shell aa start -b <bundle>' command.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
# Custom ability names for apps that don't use the default "EntryAbility"
|
|
8
|
-
# Maps bundle_name -> ability_name
|
|
9
|
-
# Generated by: python test/find_abilities.py
|
|
10
|
-
APP_ABILITIES: dict[str, str] = {
|
|
11
|
-
# Third-party apps
|
|
12
|
-
"cn.wps.mobileoffice.hap": "DocumentAbility",
|
|
13
|
-
"com.ccb.mobilebank.hm": "CcbMainAbility",
|
|
14
|
-
"com.dewu.hos": "HomeAbility",
|
|
15
|
-
"com.larus.nova.hm": "MainAbility",
|
|
16
|
-
"com.luna.hm.music": "MainAbility",
|
|
17
|
-
"com.meitu.meitupic": "MainAbility",
|
|
18
|
-
"com.ss.hm.article.news": "MainAbility",
|
|
19
|
-
"com.ss.hm.ugc.aweme": "MainAbility",
|
|
20
|
-
"com.taobao.taobao4hmos": "Taobao_mainAbility",
|
|
21
|
-
"com.tencent.videohm": "AppAbility",
|
|
22
|
-
"com.ximalaya.ting.xmharmony": "MainBundleAbility",
|
|
23
|
-
"com.zhihu.hmos": "PhoneAbility",
|
|
24
|
-
# Huawei system apps
|
|
25
|
-
"com.huawei.hmos.browser": "MainAbility",
|
|
26
|
-
"com.huawei.hmos.calculator": "com.huawei.hmos.calculator.CalculatorAbility",
|
|
27
|
-
"com.huawei.hmos.calendar": "MainAbility",
|
|
28
|
-
"com.huawei.hmos.camera": "com.huawei.hmos.camera.MainAbility",
|
|
29
|
-
"com.huawei.hmos.clock": "com.huawei.hmos.clock.phone",
|
|
30
|
-
"com.huawei.hmos.clouddrive": "MainAbility",
|
|
31
|
-
"com.huawei.hmos.email": "ApplicationAbility",
|
|
32
|
-
"com.huawei.hmos.filemanager": "MainAbility",
|
|
33
|
-
"com.huawei.hmos.health": "Activity_card_entryAbility",
|
|
34
|
-
"com.huawei.hmos.notepad": "MainAbility",
|
|
35
|
-
"com.huawei.hmos.photos": "MainAbility",
|
|
36
|
-
"com.huawei.hmos.screenrecorder": "com.huawei.hmos.screenrecorder.ServiceExtAbility",
|
|
37
|
-
"com.huawei.hmos.screenshot": "com.huawei.hmos.screenshot.ServiceExtAbility",
|
|
38
|
-
"com.huawei.hmos.settings": "com.huawei.hmos.settings.MainAbility",
|
|
39
|
-
"com.huawei.hmos.soundrecorder": "MainAbility",
|
|
40
|
-
"com.huawei.hmos.vassistant": "AiCaptionServiceExtAbility",
|
|
41
|
-
"com.huawei.hmos.wallet": "MainAbility",
|
|
42
|
-
# Huawei services
|
|
43
|
-
"com.huawei.hmsapp.appgallery": "MainAbility",
|
|
44
|
-
"com.huawei.hmsapp.books": "MainAbility",
|
|
45
|
-
"com.huawei.hmsapp.himovie": "MainAbility",
|
|
46
|
-
"com.huawei.hmsapp.hisearch": "MainAbility",
|
|
47
|
-
"com.huawei.hmsapp.music": "MainAbility",
|
|
48
|
-
"com.huawei.hmsapp.thememanager": "MainAbility",
|
|
49
|
-
"com.huawei.hmsapp.totemweather": "com.huawei.hmsapp.totemweather.MainAbility",
|
|
50
|
-
# OHOS system apps
|
|
51
|
-
"com.ohos.callui": "com.ohos.callui.ServiceAbility",
|
|
52
|
-
"com.ohos.contacts": "com.ohos.contacts.MainAbility",
|
|
53
|
-
"com.ohos.mms": "com.ohos.mms.MainAbility",
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
APP_PACKAGES: dict[str, str] = {
|
|
57
|
-
# Social & Messaging
|
|
58
|
-
"微信": "com.tencent.wechat",
|
|
59
|
-
"QQ": "com.tencent.mqq",
|
|
60
|
-
"微博": "com.sina.weibo.stage",
|
|
61
|
-
# E-commerce
|
|
62
|
-
"淘宝": "com.taobao.taobao4hmos",
|
|
63
|
-
"京东": "com.jd.hm.mall",
|
|
64
|
-
"拼多多": "com.xunmeng.pinduoduo.hos",
|
|
65
|
-
"淘宝闪购": "com.taobao.taobao4hmos",
|
|
66
|
-
"京东秒送": "com.jd.hm.mall",
|
|
67
|
-
# Lifestyle & Social
|
|
68
|
-
"小红书": "com.xingin.xhs_hos",
|
|
69
|
-
"知乎": "com.zhihu.hmos",
|
|
70
|
-
# "豆瓣": "com.douban.frodo", # 未在 hdc 列表中找到
|
|
71
|
-
# Maps & Navigation
|
|
72
|
-
"高德地图": "com.amap.hmapp",
|
|
73
|
-
"百度地图": "com.baidu.hmmap",
|
|
74
|
-
# Food & Services
|
|
75
|
-
"美团": "com.sankuai.hmeituan",
|
|
76
|
-
"美团外卖": "com.meituan.takeaway",
|
|
77
|
-
"大众点评": "com.sankuai.dianping",
|
|
78
|
-
# "肯德基": "com.yek.android.kfc.activitys", # 未在 hdc 列表中找到
|
|
79
|
-
# Travel
|
|
80
|
-
# "携程": "ctrip.android.view", # 未在 hdc 列表中找到
|
|
81
|
-
"铁路12306": "com.chinarailway.ticketingHM",
|
|
82
|
-
"12306": "com.chinarailway.ticketingHM",
|
|
83
|
-
# "去哪儿": "com.Qunar", # 未在 hdc 列表中找到
|
|
84
|
-
# "去哪儿旅行": "com.Qunar", # 未在 hdc 列表中找到
|
|
85
|
-
"滴滴出行": "com.sdu.didi.hmos.psnger",
|
|
86
|
-
# Video & Entertainment
|
|
87
|
-
"bilibili": "yylx.danmaku.bili",
|
|
88
|
-
"抖音": "com.ss.hm.ugc.aweme",
|
|
89
|
-
"快手": "com.kuaishou.hmapp",
|
|
90
|
-
"腾讯视频": "com.tencent.videohm",
|
|
91
|
-
"爱奇艺": "com.qiyi.video.hmy",
|
|
92
|
-
"芒果TV": "com.mgtv.phone",
|
|
93
|
-
# "优酷视频": "com.youku.phone", # 未在 hdc 列表中找到
|
|
94
|
-
# "红果短剧": "com.phoenix.read", # 未在 hdc 列表中找到
|
|
95
|
-
# Music & Audio
|
|
96
|
-
# "网易云音乐": "com.netease.cloudmusic", # 未在 hdc 列表中找到
|
|
97
|
-
"QQ音乐": "com.tencent.hm.qqmusic",
|
|
98
|
-
"汽水音乐": "com.luna.hm.music",
|
|
99
|
-
"喜马拉雅": "com.ximalaya.ting.xmharmony",
|
|
100
|
-
# Reading
|
|
101
|
-
# "番茄小说": "com.dragon.read", # 未在 hdc 列表中找到
|
|
102
|
-
# "番茄免费小说": "com.dragon.read", # 未在 hdc 列表中找到
|
|
103
|
-
# "七猫免费小说": "com.kmxs.reader", # 未在 hdc 列表中找到
|
|
104
|
-
# Productivity
|
|
105
|
-
"飞书": "com.ss.feishu",
|
|
106
|
-
# "QQ邮箱": "com.tencent.androidqqmail", # 未在 hdc 列表中找到
|
|
107
|
-
# AI & Tools
|
|
108
|
-
"豆包": "com.larus.nova.hm",
|
|
109
|
-
# Health & Fitness
|
|
110
|
-
# "keep": "com.gotokeep.keep", # 未在 hdc 列表中找到
|
|
111
|
-
# "美柚": "com.lingan.seeyou", # 未在 hdc 列表中找到
|
|
112
|
-
# News & Information
|
|
113
|
-
# "腾讯新闻": "com.tencent.news", # 未在 hdc 列表中找到
|
|
114
|
-
"今日头条": "com.ss.hm.article.news",
|
|
115
|
-
# Real Estate
|
|
116
|
-
# "贝壳找房": "com.lianjia.beike", # 未在 hdc 列表中找到
|
|
117
|
-
# "安居客": "com.anjuke.android.app", # 未在 hdc 列表中找到
|
|
118
|
-
# Finance
|
|
119
|
-
# "同花顺": "com.hexin.plat.android", # 未在 hdc 列表中找到
|
|
120
|
-
# Games
|
|
121
|
-
# "星穹铁道": "com.miHoYo.hkrpg", # 未在 hdc 列表中找到
|
|
122
|
-
# "崩坏:星穹铁道": "com.miHoYo.hkrpg", # 未在 hdc 列表中找到
|
|
123
|
-
# "恋与深空": "com.papegames.lysk.cn", # 未在 hdc 列表中找到
|
|
124
|
-
# HarmonyOS 第三方应用
|
|
125
|
-
"百度": "com.baidu.baiduapp",
|
|
126
|
-
"阿里巴巴": "com.alibaba.wireless_hmos",
|
|
127
|
-
"WPS": "cn.wps.mobileoffice.hap",
|
|
128
|
-
"企业微信": "com.tencent.wework.hmos",
|
|
129
|
-
"同程": "com.tongcheng.hmos",
|
|
130
|
-
"同程旅行": "com.tongcheng.hmos",
|
|
131
|
-
"唯品会": "com.vip.hosapp",
|
|
132
|
-
"支付宝": "com.alipay.mobile.client",
|
|
133
|
-
"UC浏览器": "com.uc.mobile",
|
|
134
|
-
"闲鱼": "com.taobao.idlefish4ohos",
|
|
135
|
-
"转转": "com.zhuanzhuan.hmoszz",
|
|
136
|
-
"迅雷": "com.xunlei.thunder",
|
|
137
|
-
"搜狗输入法": "com.sogou.input",
|
|
138
|
-
"扫描全能王": "com.intsig.camscanner.hap",
|
|
139
|
-
"美图秀秀": "com.meitu.meitupic",
|
|
140
|
-
"58同城": "com.wuba.life",
|
|
141
|
-
"得物": "com.dewu.hos",
|
|
142
|
-
"海底捞": "com.haidilao.haros",
|
|
143
|
-
"中国移动": "com.droi.tong",
|
|
144
|
-
"中国联通": "com.sinovatech.unicom.ha",
|
|
145
|
-
"国家税务总局": "cn.gov.chinatax.gt4.hm",
|
|
146
|
-
"建设银行": "com.ccb.mobilebank.hm",
|
|
147
|
-
"快手极速版": "com.kuaishou.hmnebula",
|
|
148
|
-
# HarmonyOS 系统应用 - 工具类
|
|
149
|
-
"浏览器": "com.huawei.hmos.browser",
|
|
150
|
-
"计算器": "com.huawei.hmos.calculator",
|
|
151
|
-
"日历": "com.huawei.hmos.calendar",
|
|
152
|
-
"相机": "com.huawei.hmos.camera",
|
|
153
|
-
"时钟": "com.huawei.hmos.clock",
|
|
154
|
-
"云盘": "com.huawei.hmos.clouddrive",
|
|
155
|
-
"云空间": "com.huawei.hmos.clouddrive",
|
|
156
|
-
"邮件": "com.huawei.hmos.email",
|
|
157
|
-
"文件管理器": "com.huawei.hmos.filemanager",
|
|
158
|
-
"文件": "com.huawei.hmos.files",
|
|
159
|
-
"查找设备": "com.huawei.hmos.finddevice",
|
|
160
|
-
"查找手机": "com.huawei.hmos.finddevice",
|
|
161
|
-
"录音机": "com.huawei.hmos.soundrecorder",
|
|
162
|
-
"录音": "com.huawei.hmos.soundrecorder",
|
|
163
|
-
"录屏": "com.huawei.hmos.screenrecorder",
|
|
164
|
-
"截屏": "com.huawei.hmos.screenshot",
|
|
165
|
-
"笔记": "com.huawei.hmos.notepad",
|
|
166
|
-
"备忘录": "com.huawei.hmos.notepad",
|
|
167
|
-
# HarmonyOS 系统应用 - 媒体类
|
|
168
|
-
"相册": "com.huawei.hmos.photos",
|
|
169
|
-
"图库": "com.huawei.hmos.photos",
|
|
170
|
-
# "视频": "com.huawei.hmos.mediaplayer", # 未在 hdc 列表中找到,但有 com.huawei.hmsapp.himovie
|
|
171
|
-
# HarmonyOS 系统应用 - 通讯类
|
|
172
|
-
"联系人": "com.ohos.contacts",
|
|
173
|
-
"通讯录": "com.ohos.contacts",
|
|
174
|
-
"短信": "com.ohos.mms",
|
|
175
|
-
"信息": "com.ohos.mms",
|
|
176
|
-
"电话": "com.ohos.callui",
|
|
177
|
-
"拨号": "com.ohos.callui",
|
|
178
|
-
# HarmonyOS 系统应用 - 设置类
|
|
179
|
-
"设置": "com.huawei.hmos.settings",
|
|
180
|
-
"系统设置": "com.huawei.hmos.settings",
|
|
181
|
-
"AndroidSystemSettings": "com.huawei.hmos.settings",
|
|
182
|
-
"Android System Settings": "com.huawei.hmos.settings",
|
|
183
|
-
"Android System Settings": "com.huawei.hmos.settings",
|
|
184
|
-
"Android-System-Settings": "com.huawei.hmos.settings",
|
|
185
|
-
"Settings": "com.huawei.hmos.settings",
|
|
186
|
-
# HarmonyOS 系统应用 - 生活服务
|
|
187
|
-
"健康": "com.huawei.hmos.health",
|
|
188
|
-
"运动健康": "com.huawei.hmos.health",
|
|
189
|
-
"地图": "com.huawei.hmos.maps.app",
|
|
190
|
-
"华为地图": "com.huawei.hmos.maps.app",
|
|
191
|
-
"钱包": "com.huawei.hmos.wallet",
|
|
192
|
-
"华为钱包": "com.huawei.hmos.wallet",
|
|
193
|
-
"智慧生活": "com.huawei.hmos.ailife",
|
|
194
|
-
"智能助手": "com.huawei.hmos.vassistant",
|
|
195
|
-
"小艺": "com.huawei.hmos.vassistant",
|
|
196
|
-
# HarmonyOS 服务
|
|
197
|
-
"应用市场": "com.huawei.hmsapp.appgallery",
|
|
198
|
-
"华为应用市场": "com.huawei.hmsapp.appgallery",
|
|
199
|
-
"音乐": "com.huawei.hmsapp.music",
|
|
200
|
-
"华为音乐": "com.huawei.hmsapp.music",
|
|
201
|
-
"主题": "com.huawei.hmsapp.thememanager",
|
|
202
|
-
"主题管理": "com.huawei.hmsapp.thememanager",
|
|
203
|
-
"天气": "com.huawei.hmsapp.totemweather",
|
|
204
|
-
"华为天气": "com.huawei.hmsapp.totemweather",
|
|
205
|
-
"视频": "com.huawei.hmsapp.himovie",
|
|
206
|
-
"华为视频": "com.huawei.hmsapp.himovie",
|
|
207
|
-
"阅读": "com.huawei.hmsapp.books",
|
|
208
|
-
"华为阅读": "com.huawei.hmsapp.books",
|
|
209
|
-
"游戏中心": "com.huawei.hmsapp.gamecenter",
|
|
210
|
-
"华为游戏中心": "com.huawei.hmsapp.gamecenter",
|
|
211
|
-
"搜索": "com.huawei.hmsapp.hisearch",
|
|
212
|
-
"华为搜索": "com.huawei.hmsapp.hisearch",
|
|
213
|
-
"指南针": "com.huawei.hmsapp.compass",
|
|
214
|
-
"会员中心": "com.huawei.hmos.myhuawei",
|
|
215
|
-
"我的华为": "com.huawei.hmos.myhuawei",
|
|
216
|
-
"华为会员": "com.huawei.hmos.myhuawei",
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
def get_package_name(app_name: str) -> str | None:
|
|
221
|
-
"""
|
|
222
|
-
Get the package name for an app.
|
|
223
|
-
|
|
224
|
-
Args:
|
|
225
|
-
app_name: The display name of the app.
|
|
226
|
-
|
|
227
|
-
Returns:
|
|
228
|
-
The HarmonyOS bundle name, or None if not found.
|
|
229
|
-
"""
|
|
230
|
-
return APP_PACKAGES.get(app_name)
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
def get_app_name(package_name: str) -> str | None:
|
|
234
|
-
"""
|
|
235
|
-
Get the app name from a package name.
|
|
236
|
-
|
|
237
|
-
Args:
|
|
238
|
-
package_name: The HarmonyOS bundle name.
|
|
239
|
-
|
|
240
|
-
Returns:
|
|
241
|
-
The display name of the app, or None if not found.
|
|
242
|
-
"""
|
|
243
|
-
for name, package in APP_PACKAGES.items():
|
|
244
|
-
if package == package_name:
|
|
245
|
-
return name
|
|
246
|
-
return None
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
def list_supported_apps() -> list[str]:
|
|
250
|
-
"""
|
|
251
|
-
Get a list of all supported app names.
|
|
252
|
-
|
|
253
|
-
Returns:
|
|
254
|
-
List of app names.
|
|
255
|
-
"""
|
|
256
|
-
return list(APP_PACKAGES.keys())
|
phone_agent/config/apps_ios.py
DELETED
|
@@ -1,339 +0,0 @@
|
|
|
1
|
-
"""App name to iOS bundle ID mapping for supported applications.
|
|
2
|
-
|
|
3
|
-
Based on iOS app bundle ID conventions and common iOS applications.
|
|
4
|
-
Bundle IDs are in the format: com.company.appName
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
APP_PACKAGES_IOS: dict[str, str] = {
|
|
8
|
-
# Tencent Apps (腾讯系)
|
|
9
|
-
"微信": "com.tencent.xin",
|
|
10
|
-
"企业微信": "com.tencent.ww",
|
|
11
|
-
"微信读书": "com.tencent.weread",
|
|
12
|
-
"微信听书": "com.tencent.wehear",
|
|
13
|
-
"QQ": "com.tencent.mqq",
|
|
14
|
-
"QQ音乐": "com.tencent.QQMusic",
|
|
15
|
-
"QQ阅读": "com.tencent.qqreaderiphone",
|
|
16
|
-
"QQ邮箱": "com.tencent.qqmail",
|
|
17
|
-
"QQ浏览器": "com.tencent.mttlite",
|
|
18
|
-
"TIM": "com.tencent.tim",
|
|
19
|
-
"微视": "com.tencent.microvision",
|
|
20
|
-
"腾讯新闻": "com.tencent.info",
|
|
21
|
-
"腾讯视频": "com.tencent.live4iphone",
|
|
22
|
-
"腾讯动漫": "com.tencent.ied.app.comic",
|
|
23
|
-
"腾讯微云": "com.tencent.weiyun",
|
|
24
|
-
"腾讯体育": "com.tencent.sportskbs",
|
|
25
|
-
"腾讯文档": "com.tencent.txdocs",
|
|
26
|
-
"腾讯翻译君": "com.tencent.qqtranslator",
|
|
27
|
-
"腾讯课堂": "com.tencent.edu",
|
|
28
|
-
"腾讯地图": "com.tencent.sosomap",
|
|
29
|
-
"小鹅拼拼": "com.tencent.dwdcoco",
|
|
30
|
-
"全民k歌": "com.tencent.QQKSong",
|
|
31
|
-
# Alibaba Apps (阿里系)
|
|
32
|
-
"支付宝": "com.alipay.iphoneclient",
|
|
33
|
-
"钉钉": "com.laiwang.DingTalk",
|
|
34
|
-
"闲鱼": "com.taobao.fleamarket",
|
|
35
|
-
"淘宝": "com.taobao.taobao4iphone",
|
|
36
|
-
"斗鱼": "tv.douyu.live",
|
|
37
|
-
"天猫": "com.taobao.tmall",
|
|
38
|
-
"口碑": "com.taobao.kbmeishi",
|
|
39
|
-
"饿了么": "me.ele.ios.eleme",
|
|
40
|
-
"高德地图": "com.autonavi.amap",
|
|
41
|
-
"UC浏览器": "com.ucweb.iphone.lowversion",
|
|
42
|
-
"一淘": "com.taobao.etaocoupon",
|
|
43
|
-
"飞猪": "com.taobao.travel",
|
|
44
|
-
"虾米音乐": "com.xiami.spark",
|
|
45
|
-
"淘票票": "com.taobao.movie.MoviePhoneClient",
|
|
46
|
-
"优酷": "com.youku.YouKu",
|
|
47
|
-
"菜鸟裹裹": "com.cainiao.cnwireless",
|
|
48
|
-
"土豆视频": "com.tudou.tudouiphone",
|
|
49
|
-
# ByteDance Apps (字节系)
|
|
50
|
-
"抖音": "com.ss.iphone.ugc.Aweme",
|
|
51
|
-
"抖音极速版": "com.ss.iphone.ugc.aweme.lite",
|
|
52
|
-
"抖音火山版": "com.ss.iphone.ugc.Live",
|
|
53
|
-
"Tiktok": "com.zhiliaoapp.musically",
|
|
54
|
-
"飞书": "com.bytedance.ee.lark",
|
|
55
|
-
"今日头条": "com.ss.iphone.article.News",
|
|
56
|
-
"西瓜视频": "com.ss.iphone.article.Video",
|
|
57
|
-
"皮皮虾": "com.bd.iphone.super",
|
|
58
|
-
# Meituan Apps (美团系)
|
|
59
|
-
"美团": "com.meituan.imeituan",
|
|
60
|
-
"美团外卖": "com.meituan.itakeaway",
|
|
61
|
-
"大众点评": "com.dianping.dpscope",
|
|
62
|
-
"美团优选": "com.meituan.iyouxuan",
|
|
63
|
-
"美团优选团长": "com.meituan.igrocery.gh",
|
|
64
|
-
"美团骑手": "com.meituan.banma.homebrew",
|
|
65
|
-
"美团开店宝": "com.meituan.imerchantbiz",
|
|
66
|
-
"美团拍店": "com.meituan.pai",
|
|
67
|
-
"美团众包": "com.meituan.banma.crowdsource",
|
|
68
|
-
"美团买菜": "com.baobaoaichi.imaicai",
|
|
69
|
-
# JD Apps (京东系)
|
|
70
|
-
"京东": "com.360buy.jdmobile",
|
|
71
|
-
"京东读书": "com.jd.reader",
|
|
72
|
-
# NetEase Apps (网易系)
|
|
73
|
-
"网易新闻": "com.netease.news",
|
|
74
|
-
"网易云音乐": "com.netease.cloudmusic",
|
|
75
|
-
"网易邮箱大师": "com.netease.macmail",
|
|
76
|
-
"网易严选": "com.netease.yanxuan",
|
|
77
|
-
"网易公开课": "com.netease.videoHD",
|
|
78
|
-
"网易有道词典": "youdaoPro",
|
|
79
|
-
"有道云笔记": "com.youdao.note.YoudaoNoteMac",
|
|
80
|
-
# Baidu Apps (百度系)
|
|
81
|
-
"百度": "com.baidu.BaiduMobile",
|
|
82
|
-
"百度网盘": "com.baidu.netdisk",
|
|
83
|
-
"百度贴吧": "com.baidu.tieba",
|
|
84
|
-
"百度地图": "com.baidu.map",
|
|
85
|
-
"百度阅读": "com.baidu.yuedu",
|
|
86
|
-
"百度翻译": "com.baidu.translate",
|
|
87
|
-
"百度文库": "com.baidu.Wenku",
|
|
88
|
-
"百度视频": "com.baidu.videoiphone",
|
|
89
|
-
"百度输入法": "com.baidu.inputMethod",
|
|
90
|
-
# Kuaishou Apps (快手系)
|
|
91
|
-
"快手": "com.jiangjia.gif",
|
|
92
|
-
"快手极速版": "com.kuaishou.nebula",
|
|
93
|
-
# Other Popular Apps
|
|
94
|
-
"哔哩哔哩": "tv.danmaku.bilianime",
|
|
95
|
-
"芒果TV": "com.hunantv.imgotv",
|
|
96
|
-
"苏宁易购": "SuningEMall",
|
|
97
|
-
"微博": "com.sina.weibo",
|
|
98
|
-
"微博极速版": "com.sina.weibolite",
|
|
99
|
-
"微博国际": "com.weibo.international",
|
|
100
|
-
"墨客": "com.moke.moke.iphone",
|
|
101
|
-
"豆瓣": "com.douban.frodo",
|
|
102
|
-
"知乎": "com.zhihu.ios",
|
|
103
|
-
"小红书": "com.xingin.discover",
|
|
104
|
-
"喜马拉雅": "com.gemd.iting",
|
|
105
|
-
"得到": "com.luojilab.LuoJiFM-IOS",
|
|
106
|
-
"得物": "com.siwuai.duapp",
|
|
107
|
-
"起点读书": "m.qidian.QDReaderAppStore",
|
|
108
|
-
"番茄小说": "com.dragon.read",
|
|
109
|
-
"书旗小说": "com.shuqicenter.reader",
|
|
110
|
-
"拼多多": "com.xunmeng.pinduoduo",
|
|
111
|
-
"多点": "com.dmall.dmall",
|
|
112
|
-
"便利蜂": "com.bianlifeng.customer.ios",
|
|
113
|
-
"亿通行": "com.ruubypay.yitongxing",
|
|
114
|
-
"云闪付": "com.unionpay.chsp",
|
|
115
|
-
"大都会Metro": "com.DDH.SHSubway",
|
|
116
|
-
"爱奇艺视频": "com.qiyi.iphone",
|
|
117
|
-
"搜狐视频": "com.sohu.iPhoneVideo",
|
|
118
|
-
"搜狐新闻": "com.sohu.newspaper",
|
|
119
|
-
"搜狗浏览器": "com.sogou.SogouExplorerMobile",
|
|
120
|
-
"虎牙": "com.yy.kiwi",
|
|
121
|
-
"比心": "com.yitan.bixin",
|
|
122
|
-
"转转": "com.wuba.zhuanzhuan",
|
|
123
|
-
"YY": "yyvoice",
|
|
124
|
-
"绿洲": "com.sina.oasis",
|
|
125
|
-
"陌陌": "com.wemomo.momoappdemo1",
|
|
126
|
-
"什么值得买": "com.smzdm.client.ios",
|
|
127
|
-
"美团秀秀": "com.meitu.mtxx",
|
|
128
|
-
"唯品会": "com.vipshop.iphone",
|
|
129
|
-
"唱吧": "com.changba.ktv",
|
|
130
|
-
"酷狗音乐": "com.kugou.kugou1002",
|
|
131
|
-
"CSDN": "net.csdn.CsdnPlus",
|
|
132
|
-
"多抓鱼": "com.duozhuyu.dejavu",
|
|
133
|
-
"自如": "com.ziroom.ZiroomProject",
|
|
134
|
-
"携程": "ctrip.com",
|
|
135
|
-
"去哪儿旅行": "com.qunar.iphoneclient8",
|
|
136
|
-
"Xmind": "net.xmind.brownieapp",
|
|
137
|
-
"印象笔记": "com.yinxiang.iPhone",
|
|
138
|
-
"欧陆词典": "eusoft.eudic.pro",
|
|
139
|
-
"115": "com.115.personal",
|
|
140
|
-
"名片全能王": "com.intsig.camcard.lite",
|
|
141
|
-
"中国银行": "com.boc.BOCMBCI",
|
|
142
|
-
"58同城": "com.taofang.iphone",
|
|
143
|
-
# International Apps
|
|
144
|
-
"Google Chrome": "com.google.chrome.ios",
|
|
145
|
-
"Gmail": "com.google.Gmail",
|
|
146
|
-
"Facebook": "com.facebook.Facebook",
|
|
147
|
-
"Firefox": "org.mozilla.ios.Firefox",
|
|
148
|
-
"Messenger": "com.facebook.Messenger",
|
|
149
|
-
"Instagram": "com.burbn.instagram",
|
|
150
|
-
"Starbucks": "com.starbucks.mystarbucks",
|
|
151
|
-
"Luckin Coffee": "com.bjlc.luckycoffee",
|
|
152
|
-
"Line": "jp.naver.line",
|
|
153
|
-
"Linkedin": "com.linkedin.LinkedIn",
|
|
154
|
-
"Dcard": "com.dcard.app.Dcard",
|
|
155
|
-
"Youtube": "com.google.ios.youtube",
|
|
156
|
-
"Spotify": "com.spotify.client",
|
|
157
|
-
"Netflix": "com.netflix.Netflix",
|
|
158
|
-
"Twitter": "com.atebits.Tweetie2",
|
|
159
|
-
"WhatsApp": "net.whatsapp.WhatsApp",
|
|
160
|
-
# Apple Native Apps (Apple 原生应用)
|
|
161
|
-
"Safari": "com.apple.mobilesafari",
|
|
162
|
-
"App Store": "com.apple.AppStore",
|
|
163
|
-
"设置": "com.apple.Preferences",
|
|
164
|
-
"相机": "com.apple.camera",
|
|
165
|
-
"照片": "com.apple.mobileslideshow",
|
|
166
|
-
"时钟": "com.apple.mobiletimer",
|
|
167
|
-
"闹钟": "com.apple.mobiletimer",
|
|
168
|
-
"备忘录": "com.apple.mobilenotes",
|
|
169
|
-
"提醒事项": "com.apple.reminders",
|
|
170
|
-
"快捷指令": "com.apple.shortcuts",
|
|
171
|
-
"天气": "com.apple.weather",
|
|
172
|
-
"日历": "com.apple.mobilecal",
|
|
173
|
-
"地图": "com.apple.Maps",
|
|
174
|
-
"电话": "com.apple.mobilephone",
|
|
175
|
-
"通讯录": "com.apple.MobileAddressBook",
|
|
176
|
-
"信息": "com.apple.MobileSMS",
|
|
177
|
-
"Facetime": "com.apple.facetime",
|
|
178
|
-
"FaceTime": "com.apple.facetime",
|
|
179
|
-
"计算器": "com.apple.calculator",
|
|
180
|
-
"家庭": "com.apple.Home",
|
|
181
|
-
"健康": "com.apple.Health",
|
|
182
|
-
"钱包": "com.apple.Passbook",
|
|
183
|
-
"股市": "com.apple.stocks",
|
|
184
|
-
"图书": "com.apple.iBooks",
|
|
185
|
-
"新闻": "com.apple.news",
|
|
186
|
-
"视频": "com.apple.tv",
|
|
187
|
-
"文件": "com.apple.DocumentsApp",
|
|
188
|
-
"邮件": "com.apple.mobilemail",
|
|
189
|
-
"查找": "com.apple.findmy",
|
|
190
|
-
"翻译": "com.apple.Translate",
|
|
191
|
-
"音乐": "com.apple.Music",
|
|
192
|
-
"播客": "com.apple.podcasts",
|
|
193
|
-
"库乐队": "com.apple.mobilegarageband",
|
|
194
|
-
"语音备忘录": "com.apple.VoiceMemos",
|
|
195
|
-
"iMovie": "com.apple.iMovie",
|
|
196
|
-
"Watch": "com.apple.Bridge",
|
|
197
|
-
"Apple Store": "com.apple.store.Jolly",
|
|
198
|
-
"TestFlight": "com.apple.TestFlight",
|
|
199
|
-
"Keynote": "com.apple.Keynote",
|
|
200
|
-
"Keynote 讲演": "com.apple.Keynote",
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
def get_bundle_id(app_name: str) -> str | None:
|
|
205
|
-
"""
|
|
206
|
-
Get the iOS bundle ID for an app.
|
|
207
|
-
|
|
208
|
-
Args:
|
|
209
|
-
app_name: The display name of the app.
|
|
210
|
-
|
|
211
|
-
Returns:
|
|
212
|
-
The iOS bundle ID, or None if not found.
|
|
213
|
-
"""
|
|
214
|
-
return APP_PACKAGES_IOS.get(app_name)
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
def get_app_name(bundle_id: str) -> str | None:
|
|
218
|
-
"""
|
|
219
|
-
Get the app name from an iOS bundle ID.
|
|
220
|
-
|
|
221
|
-
Args:
|
|
222
|
-
bundle_id: The iOS bundle ID.
|
|
223
|
-
|
|
224
|
-
Returns:
|
|
225
|
-
The display name of the app, or None if not found.
|
|
226
|
-
"""
|
|
227
|
-
for name, bid in APP_PACKAGES_IOS.items():
|
|
228
|
-
if bid == bundle_id:
|
|
229
|
-
return name
|
|
230
|
-
return None
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
def list_supported_apps() -> list[str]:
|
|
234
|
-
"""
|
|
235
|
-
Get a list of all supported iOS app names.
|
|
236
|
-
|
|
237
|
-
Returns:
|
|
238
|
-
List of app names.
|
|
239
|
-
"""
|
|
240
|
-
return list(APP_PACKAGES_IOS.keys())
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
def check_app_installed(app_name: str, wda_url: str = "http://localhost:8100") -> bool:
|
|
244
|
-
"""
|
|
245
|
-
Check if an app is installed on the iOS device.
|
|
246
|
-
|
|
247
|
-
Args:
|
|
248
|
-
app_name: The display name of the app.
|
|
249
|
-
wda_url: WebDriverAgent URL.
|
|
250
|
-
|
|
251
|
-
Returns:
|
|
252
|
-
True if app is installed, False otherwise.
|
|
253
|
-
|
|
254
|
-
Note:
|
|
255
|
-
This uses the iTunes API to get app information. For actual
|
|
256
|
-
installation check on device, you would need to use WDA's
|
|
257
|
-
app listing capabilities or URL scheme checking.
|
|
258
|
-
"""
|
|
259
|
-
bundle_id = get_bundle_id(app_name)
|
|
260
|
-
if not bundle_id:
|
|
261
|
-
return False
|
|
262
|
-
|
|
263
|
-
try:
|
|
264
|
-
import requests
|
|
265
|
-
|
|
266
|
-
# Query iTunes API for app info
|
|
267
|
-
url = f"https://itunes.apple.com/lookup?bundleId={bundle_id}"
|
|
268
|
-
response = requests.get(url, timeout=10)
|
|
269
|
-
|
|
270
|
-
if response.status_code == 200:
|
|
271
|
-
data = response.json()
|
|
272
|
-
return data.get("resultCount", 0) > 0
|
|
273
|
-
|
|
274
|
-
except ImportError:
|
|
275
|
-
print("Error: requests library required. Install: pip install requests")
|
|
276
|
-
except Exception as e:
|
|
277
|
-
print(f"Error checking app installation: {e}")
|
|
278
|
-
|
|
279
|
-
return False
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
def get_app_info_from_itunes(bundle_id: str) -> dict | None:
|
|
283
|
-
"""
|
|
284
|
-
Get app information from iTunes API using bundle ID.
|
|
285
|
-
|
|
286
|
-
Args:
|
|
287
|
-
bundle_id: The iOS bundle ID.
|
|
288
|
-
|
|
289
|
-
Returns:
|
|
290
|
-
Dictionary with app info (name, version, etc.) or None if not found.
|
|
291
|
-
"""
|
|
292
|
-
try:
|
|
293
|
-
import requests
|
|
294
|
-
|
|
295
|
-
url = f"https://itunes.apple.com/lookup?bundleId={bundle_id}"
|
|
296
|
-
response = requests.get(url, timeout=10)
|
|
297
|
-
|
|
298
|
-
if response.status_code == 200:
|
|
299
|
-
data = response.json()
|
|
300
|
-
results = data.get("results", [])
|
|
301
|
-
if results:
|
|
302
|
-
return results[0]
|
|
303
|
-
|
|
304
|
-
except ImportError:
|
|
305
|
-
print("Error: requests library required. Install: pip install requests")
|
|
306
|
-
except Exception as e:
|
|
307
|
-
print(f"Error fetching app info: {e}")
|
|
308
|
-
|
|
309
|
-
return None
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
def get_app_info_by_id(app_store_id: str) -> dict | None:
|
|
313
|
-
"""
|
|
314
|
-
Get app information from iTunes API using App Store ID.
|
|
315
|
-
|
|
316
|
-
Args:
|
|
317
|
-
app_store_id: The numeric App Store ID (e.g., "414478124" for WeChat).
|
|
318
|
-
|
|
319
|
-
Returns:
|
|
320
|
-
Dictionary with app info or None if not found.
|
|
321
|
-
"""
|
|
322
|
-
try:
|
|
323
|
-
import requests
|
|
324
|
-
|
|
325
|
-
url = f"https://itunes.apple.com/lookup?id={app_store_id}"
|
|
326
|
-
response = requests.get(url, timeout=10)
|
|
327
|
-
|
|
328
|
-
if response.status_code == 200:
|
|
329
|
-
data = response.json()
|
|
330
|
-
results = data.get("results", [])
|
|
331
|
-
if results:
|
|
332
|
-
return results[0]
|
|
333
|
-
|
|
334
|
-
except ImportError:
|
|
335
|
-
print("Error: requests library required. Install: pip install requests")
|
|
336
|
-
except Exception as e:
|
|
337
|
-
print(f"Error fetching app info by ID: {e}")
|
|
338
|
-
|
|
339
|
-
return None
|