autoglm-gui 1.5.0__py3-none-any.whl → 1.5.2__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 +1 -1
- AutoGLM_GUI/__main__.py +11 -2
- AutoGLM_GUI/adb_plus/qr_pair.py +3 -3
- AutoGLM_GUI/agents/__init__.py +7 -2
- AutoGLM_GUI/agents/factory.py +46 -6
- AutoGLM_GUI/agents/glm/agent.py +8 -3
- AutoGLM_GUI/agents/glm/async_agent.py +515 -0
- AutoGLM_GUI/agents/glm/parser.py +4 -2
- AutoGLM_GUI/agents/mai/agent.py +3 -0
- AutoGLM_GUI/agents/protocols.py +111 -1
- AutoGLM_GUI/agents/stream_runner.py +11 -7
- AutoGLM_GUI/api/__init__.py +3 -1
- AutoGLM_GUI/api/agents.py +103 -37
- AutoGLM_GUI/api/devices.py +72 -0
- AutoGLM_GUI/api/history.py +27 -1
- AutoGLM_GUI/api/layered_agent.py +9 -8
- AutoGLM_GUI/api/mcp.py +6 -4
- AutoGLM_GUI/config_manager.py +38 -1
- AutoGLM_GUI/device_manager.py +28 -4
- AutoGLM_GUI/device_metadata_manager.py +174 -0
- AutoGLM_GUI/devices/mock_device.py +8 -1
- AutoGLM_GUI/models/history.py +45 -1
- AutoGLM_GUI/phone_agent_manager.py +145 -32
- AutoGLM_GUI/scheduler_manager.py +52 -6
- AutoGLM_GUI/schemas.py +101 -0
- AutoGLM_GUI/scrcpy_stream.py +2 -1
- AutoGLM_GUI/static/assets/{about-BQm96DAl.js → about-D7r9gCvG.js} +1 -1
- AutoGLM_GUI/static/assets/{alert-dialog-B42XxGPR.js → alert-dialog-BKM-yRiQ.js} +1 -1
- AutoGLM_GUI/static/assets/chat-k6TTD7PW.js +129 -0
- AutoGLM_GUI/static/assets/{circle-alert-D4rSJh37.js → circle-alert-sohSDLhl.js} +1 -1
- AutoGLM_GUI/static/assets/{dialog-DZ78cEcj.js → dialog-BgtPh0d5.js} +1 -1
- AutoGLM_GUI/static/assets/eye-DLqKbQmg.js +1 -0
- AutoGLM_GUI/static/assets/history-Bv1lfGUU.js +1 -0
- AutoGLM_GUI/static/assets/index-CV7jGxGm.css +1 -0
- AutoGLM_GUI/static/assets/index-CxWwh1VO.js +1 -0
- AutoGLM_GUI/static/assets/{index-CssG-3TH.js → index-SysdKciY.js} +5 -5
- AutoGLM_GUI/static/assets/label-DTUnzN4B.js +1 -0
- AutoGLM_GUI/static/assets/{logs-eoFxn5of.js → logs-BIhnDizW.js} +1 -1
- AutoGLM_GUI/static/assets/{popover-DLsuV5Sx.js → popover-CikYqu2P.js} +1 -1
- AutoGLM_GUI/static/assets/scheduled-tasks-B-KBsGbl.js +1 -0
- AutoGLM_GUI/static/assets/{textarea-BX6y7uM5.js → textarea-knJZrz77.js} +1 -1
- AutoGLM_GUI/static/assets/workflows-DzcSYwLZ.js +1 -0
- AutoGLM_GUI/static/index.html +2 -2
- {autoglm_gui-1.5.0.dist-info → autoglm_gui-1.5.2.dist-info}/METADATA +58 -7
- autoglm_gui-1.5.2.dist-info/RECORD +119 -0
- AutoGLM_GUI/device_adapter.py +0 -263
- AutoGLM_GUI/static/assets/chat-C0L2gQYG.js +0 -129
- AutoGLM_GUI/static/assets/history-DFBv7TGc.js +0 -1
- AutoGLM_GUI/static/assets/index-Bzyv2yQ2.css +0 -1
- AutoGLM_GUI/static/assets/index-CmZSnDqc.js +0 -1
- AutoGLM_GUI/static/assets/label-BCUzE_nm.js +0 -1
- AutoGLM_GUI/static/assets/scheduled-tasks-MyqGJvy_.js +0 -1
- AutoGLM_GUI/static/assets/square-pen-zGWYrdfj.js +0 -1
- AutoGLM_GUI/static/assets/workflows-CYFs6ssC.js +0 -1
- autoglm_gui-1.5.0.dist-info/RECORD +0 -157
- 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/actions/handler_ios.py +0 -278
- phone_agent/adb/__init__.py +0 -51
- phone_agent/adb/connection.py +0 -358
- phone_agent/adb/device.py +0 -253
- phone_agent/adb/input.py +0 -108
- 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.py +0 -227
- phone_agent/config/apps_harmonyos.py +0 -256
- phone_agent/config/apps_ios.py +0 -339
- phone_agent/config/i18n.py +0 -81
- phone_agent/config/prompts.py +0 -80
- phone_agent/config/prompts_en.py +0 -79
- phone_agent/config/prompts_zh.py +0 -82
- phone_agent/config/timing.py +0 -167
- 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
- {autoglm_gui-1.5.0.dist-info → autoglm_gui-1.5.2.dist-info}/WHEEL +0 -0
- {autoglm_gui-1.5.0.dist-info → autoglm_gui-1.5.2.dist-info}/entry_points.txt +0 -0
- {autoglm_gui-1.5.0.dist-info → autoglm_gui-1.5.2.dist-info}/licenses/LICENSE +0 -0
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
|
phone_agent/config/i18n.py
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"""Internationalization (i18n) module for Phone Agent UI messages."""
|
|
2
|
-
|
|
3
|
-
# Chinese messages
|
|
4
|
-
MESSAGES_ZH = {
|
|
5
|
-
"thinking": "思考过程",
|
|
6
|
-
"action": "执行动作",
|
|
7
|
-
"task_completed": "任务完成",
|
|
8
|
-
"done": "完成",
|
|
9
|
-
"starting_task": "开始执行任务",
|
|
10
|
-
"final_result": "最终结果",
|
|
11
|
-
"task_result": "任务结果",
|
|
12
|
-
"confirmation_required": "需要确认",
|
|
13
|
-
"continue_prompt": "是否继续?(y/n)",
|
|
14
|
-
"manual_operation_required": "需要人工操作",
|
|
15
|
-
"manual_operation_hint": "请手动完成操作...",
|
|
16
|
-
"press_enter_when_done": "完成后按回车继续",
|
|
17
|
-
"connection_failed": "连接失败",
|
|
18
|
-
"connection_successful": "连接成功",
|
|
19
|
-
"step": "步骤",
|
|
20
|
-
"task": "任务",
|
|
21
|
-
"result": "结果",
|
|
22
|
-
"performance_metrics": "性能指标",
|
|
23
|
-
"time_to_first_token": "首 Token 延迟 (TTFT)",
|
|
24
|
-
"time_to_thinking_end": "思考完成延迟",
|
|
25
|
-
"total_inference_time": "总推理时间",
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
# English messages
|
|
29
|
-
MESSAGES_EN = {
|
|
30
|
-
"thinking": "Thinking",
|
|
31
|
-
"action": "Action",
|
|
32
|
-
"task_completed": "Task Completed",
|
|
33
|
-
"done": "Done",
|
|
34
|
-
"starting_task": "Starting task",
|
|
35
|
-
"final_result": "Final Result",
|
|
36
|
-
"task_result": "Task Result",
|
|
37
|
-
"confirmation_required": "Confirmation Required",
|
|
38
|
-
"continue_prompt": "Continue? (y/n)",
|
|
39
|
-
"manual_operation_required": "Manual Operation Required",
|
|
40
|
-
"manual_operation_hint": "Please complete the operation manually...",
|
|
41
|
-
"press_enter_when_done": "Press Enter when done",
|
|
42
|
-
"connection_failed": "Connection Failed",
|
|
43
|
-
"connection_successful": "Connection Successful",
|
|
44
|
-
"step": "Step",
|
|
45
|
-
"task": "Task",
|
|
46
|
-
"result": "Result",
|
|
47
|
-
"performance_metrics": "Performance Metrics",
|
|
48
|
-
"time_to_first_token": "Time to First Token (TTFT)",
|
|
49
|
-
"time_to_thinking_end": "Time to Thinking End",
|
|
50
|
-
"total_inference_time": "Total Inference Time",
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def get_messages(lang: str = "cn") -> dict:
|
|
55
|
-
"""
|
|
56
|
-
Get UI messages dictionary by language.
|
|
57
|
-
|
|
58
|
-
Args:
|
|
59
|
-
lang: Language code, 'cn' for Chinese, 'en' for English.
|
|
60
|
-
|
|
61
|
-
Returns:
|
|
62
|
-
Dictionary of UI messages.
|
|
63
|
-
"""
|
|
64
|
-
if lang == "en":
|
|
65
|
-
return MESSAGES_EN
|
|
66
|
-
return MESSAGES_ZH
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def get_message(key: str, lang: str = "cn") -> str:
|
|
70
|
-
"""
|
|
71
|
-
Get a single UI message by key and language.
|
|
72
|
-
|
|
73
|
-
Args:
|
|
74
|
-
key: Message key.
|
|
75
|
-
lang: Language code, 'cn' for Chinese, 'en' for English.
|
|
76
|
-
|
|
77
|
-
Returns:
|
|
78
|
-
Message string.
|
|
79
|
-
"""
|
|
80
|
-
messages = get_messages(lang)
|
|
81
|
-
return messages.get(key, key)
|
phone_agent/config/prompts.py
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
"""System prompts for the AI agent."""
|
|
2
|
-
|
|
3
|
-
from datetime import datetime
|
|
4
|
-
|
|
5
|
-
today = datetime.today()
|
|
6
|
-
# NOTE: Do NOT use strftime with Chinese characters in format string!
|
|
7
|
-
# On some Windows systems with non-UTF-8 locale (e.g., GBK/CP936),
|
|
8
|
-
# strftime("%Y年%m月%d日") raises UnicodeEncodeError because the C library's
|
|
9
|
-
# strftime uses locale encoding, not Python's UTF-8 mode.
|
|
10
|
-
# Use f-string instead to avoid this issue completely.
|
|
11
|
-
formatted_date = f"{today.year}年{today.month:02d}月{today.day:02d}日"
|
|
12
|
-
|
|
13
|
-
SYSTEM_PROMPT = (
|
|
14
|
-
"今天的日期是: "
|
|
15
|
-
+ formatted_date
|
|
16
|
-
+ """
|
|
17
|
-
你是一个智能体分析专家,可以根据操作历史和当前状态图执行一系列操作来完成任务。
|
|
18
|
-
你必须严格按照要求输出以下格式:
|
|
19
|
-
<think>{think}</think>
|
|
20
|
-
<answer>{action}</answer>
|
|
21
|
-
|
|
22
|
-
其中:
|
|
23
|
-
- {think} 是对你为什么选择这个操作的简短推理说明。
|
|
24
|
-
- {action} 是本次执行的具体操作指令,必须严格遵循下方定义的指令格式。
|
|
25
|
-
|
|
26
|
-
操作指令及其作用如下:
|
|
27
|
-
- do(action="Launch", app="xxx")
|
|
28
|
-
Launch是启动目标app的操作,这比通过主屏幕导航更快。此操作完成后,您将自动收到结果状态的截图。
|
|
29
|
-
- do(action="Tap", element=[x,y])
|
|
30
|
-
Tap是点击操作,点击屏幕上的特定点。可用此操作点击按钮、选择项目、从主屏幕打开应用程序,或与任何可点击的用户界面元素进行交互。坐标系统从左上角 (0,0) 开始到右下角(999,999)结束。此操作完成后,您将自动收到结果状态的截图。
|
|
31
|
-
- do(action="Tap", element=[x,y], message="重要操作")
|
|
32
|
-
基本功能同Tap,点击涉及财产、支付、隐私等敏感按钮时触发。
|
|
33
|
-
- do(action="Type", text="xxx")
|
|
34
|
-
Type是输入操作,在当前聚焦的输入框中输入文本。使用此操作前,请确保输入框已被聚焦(先点击它)。输入的文本将像使用键盘输入一样输入。重要提示:手机可能正在使用 ADB 键盘,该键盘不会像普通键盘那样占用屏幕空间。要确认键盘已激活,请查看屏幕底部是否显示 'ADB Keyboard {ON}' 类似的文本,或者检查输入框是否处于激活/高亮状态。不要仅仅依赖视觉上的键盘显示。自动清除文本:当你使用输入操作时,输入框中现有的任何文本(包括占位符文本和实际输入)都会在输入新文本前自动清除。你无需在输入前手动清除文本——直接使用输入操作输入所需文本即可。操作完成后,你将自动收到结果状态的截图。
|
|
35
|
-
- do(action="Type_Name", text="xxx")
|
|
36
|
-
Type_Name是输入人名的操作,基本功能同Type。
|
|
37
|
-
- do(action="Interact")
|
|
38
|
-
Interact是当有多个满足条件的选项时而触发的交互操作,询问用户如何选择。
|
|
39
|
-
- do(action="Swipe", start=[x1,y1], end=[x2,y2])
|
|
40
|
-
Swipe是滑动操作,通过从起始坐标拖动到结束坐标来执行滑动手势。可用于滚动内容、在屏幕之间导航、下拉通知栏以及项目栏或进行基于手势的导航。坐标系统从左上角 (0,0) 开始到右下角(999,999)结束。滑动持续时间会自动调整以实现自然的移动。此操作完成后,您将自动收到结果状态的截图。
|
|
41
|
-
- do(action="Note", message="True")
|
|
42
|
-
记录当前页面内容以便后续总结。
|
|
43
|
-
- do(action="Call_API", instruction="xxx")
|
|
44
|
-
总结或评论当前页面或已记录的内容。
|
|
45
|
-
- do(action="Long Press", element=[x,y])
|
|
46
|
-
Long Pres是长按操作,在屏幕上的特定点长按指定时间。可用于触发上下文菜单、选择文本或激活长按交互。坐标系统从左上角 (0,0) 开始到右下角(999,999)结束。此操作完成后,您将自动收到结果状态的屏幕截图。
|
|
47
|
-
- do(action="Double Tap", element=[x,y])
|
|
48
|
-
Double Tap在屏幕上的特定点快速连续点按两次。使用此操作可以激活双击交互,如缩放、选择文本或打开项目。坐标系统从左上角 (0,0) 开始到右下角(999,999)结束。此操作完成后,您将自动收到结果状态的截图。
|
|
49
|
-
- do(action="Take_over", message="xxx")
|
|
50
|
-
Take_over是接管操作,表示在登录和验证阶段需要用户协助。
|
|
51
|
-
- do(action="Back")
|
|
52
|
-
导航返回到上一个屏幕或关闭当前对话框。相当于按下 Android 的返回按钮。使用此操作可以从更深的屏幕返回、关闭弹出窗口或退出当前上下文。此操作完成后,您将自动收到结果状态的截图。
|
|
53
|
-
- do(action="Home")
|
|
54
|
-
Home是回到系统桌面的操作,相当于按下 Android 主屏幕按钮。使用此操作可退出当前应用并返回启动器,或从已知状态启动新任务。此操作完成后,您将自动收到结果状态的截图。
|
|
55
|
-
- do(action="Wait", duration="x seconds")
|
|
56
|
-
等待页面加载,x为需要等待多少秒。
|
|
57
|
-
- finish(message="xxx")
|
|
58
|
-
finish是结束任务的操作,表示准确完整完成任务,message是终止信息。
|
|
59
|
-
|
|
60
|
-
必须遵循的规则:
|
|
61
|
-
1. 在执行任何操作前,先检查当前app是否是目标app,如果不是,先执行 Launch。
|
|
62
|
-
2. 如果进入到了无关页面,先执行 Back。如果执行Back后页面没有变化,请点击页面左上角的返回键进行返回,或者右上角的X号关闭。
|
|
63
|
-
3. 如果页面未加载出内容,最多连续 Wait 三次,否则执行 Back重新进入。
|
|
64
|
-
4. 如果页面显示网络问题,需要重新加载,请点击重新加载。
|
|
65
|
-
5. 如果当前页面找不到目标联系人、商品、店铺等信息,可以尝试 Swipe 滑动查找。
|
|
66
|
-
6. 遇到价格区间、时间区间等筛选条件,如果没有完全符合的,可以放宽要求。
|
|
67
|
-
7. 在做小红书总结类任务时一定要筛选图文笔记。
|
|
68
|
-
8. 购物车全选后再点击全选可以把状态设为全不选,在做购物车任务时,如果购物车里已经有商品被选中时,你需要点击全选后再点击取消全选,再去找需要购买或者删除的商品。
|
|
69
|
-
9. 在做外卖任务时,如果相应店铺购物车里已经有其他商品你需要先把购物车清空再去购买用户指定的外卖。
|
|
70
|
-
10. 在做点外卖任务时,如果用户需要点多个外卖,请尽量在同一店铺进行购买,如果无法找到可以下单,并说明某个商品未找到。
|
|
71
|
-
11. 请严格遵循用户意图执行任务,用户的特殊要求可以执行多次搜索,滑动查找。比如(i)用户要求点一杯咖啡,要咸的,你可以直接搜索咸咖啡,或者搜索咖啡后滑动查找咸的咖啡,比如海盐咖啡。(ii)用户要找到XX群,发一条消息,你可以先搜索XX群,找不到结果后,将"群"字去掉,搜索XX重试。(iii)用户要找到宠物友好的餐厅,你可以搜索餐厅,找到筛选,找到设施,选择可带宠物,或者直接搜索可带宠物,必要时可以使用AI搜索。
|
|
72
|
-
12. 在选择日期时,如果原滑动方向与预期日期越来越远,请向反方向滑动查找。
|
|
73
|
-
13. 执行任务过程中如果有多个可选择的项目栏,请逐个查找每个项目栏,直到完成任务,一定不要在同一项目栏多次查找,从而陷入死循环。
|
|
74
|
-
14. 在执行下一步操作前请一定要检查上一步的操作是否生效,如果点击没生效,可能因为app反应较慢,请先稍微等待一下,如果还是不生效请调整一下点击位置重试,如果仍然不生效请跳过这一步继续任务,并在finish message说明点击不生效。
|
|
75
|
-
15. 在执行任务中如果遇到滑动不生效的情况,请调整一下起始点位置,增大滑动距离重试,如果还是不生效,有可能是已经滑到底了,请继续向反方向滑动,直到顶部或底部,如果仍然没有符合要求的结果,请跳过这一步继续任务,并在finish message说明但没找到要求的项目。
|
|
76
|
-
16. 在做游戏任务时如果在战斗页面如果有自动战斗一定要开启自动战斗,如果多轮历史状态相似要检查自动战斗是否开启。
|
|
77
|
-
17. 如果没有合适的搜索结果,可能是因为搜索页面不对,请返回到搜索页面的上一级尝试重新搜索,如果尝试三次返回上一级搜索后仍然没有符合要求的结果,执行 finish(message="原因")。
|
|
78
|
-
18. 在结束任务前请一定要仔细检查任务是否完整准确的完成,如果出现错选、漏选、多选的情况,请返回之前的步骤进行纠正。
|
|
79
|
-
"""
|
|
80
|
-
)
|
phone_agent/config/prompts_en.py
DELETED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"""System prompts for the AI agent."""
|
|
2
|
-
|
|
3
|
-
from datetime import datetime
|
|
4
|
-
|
|
5
|
-
today = datetime.today()
|
|
6
|
-
formatted_date = today.strftime("%Y-%m-%d, %A")
|
|
7
|
-
|
|
8
|
-
SYSTEM_PROMPT = (
|
|
9
|
-
"The current date: "
|
|
10
|
-
+ formatted_date
|
|
11
|
-
+ """
|
|
12
|
-
# Setup
|
|
13
|
-
You are a professional Android operation agent assistant that can fulfill the user's high-level instructions. Given a screenshot of the Android interface at each step, you first analyze the situation, then plan the best course of action using Python-style pseudo-code.
|
|
14
|
-
|
|
15
|
-
# More details about the code
|
|
16
|
-
Your response format must be structured as follows:
|
|
17
|
-
|
|
18
|
-
Think first: Use <think>...</think> to analyze the current screen, identify key elements, and determine the most efficient action.
|
|
19
|
-
Provide the action: Use <answer>...</answer> to return a single line of pseudo-code representing the operation.
|
|
20
|
-
|
|
21
|
-
Your output should STRICTLY follow the format:
|
|
22
|
-
<think>
|
|
23
|
-
[Your thought]
|
|
24
|
-
</think>
|
|
25
|
-
<answer>
|
|
26
|
-
[Your operation code]
|
|
27
|
-
</answer>
|
|
28
|
-
|
|
29
|
-
- **Tap**
|
|
30
|
-
Perform a tap action on a specified screen area. The element is a list of 2 integers, representing the coordinates of the tap point.
|
|
31
|
-
**Example**:
|
|
32
|
-
<answer>
|
|
33
|
-
do(action="Tap", element=[x,y])
|
|
34
|
-
</answer>
|
|
35
|
-
- **Type**
|
|
36
|
-
Enter text into the currently focused input field.
|
|
37
|
-
**Example**:
|
|
38
|
-
<answer>
|
|
39
|
-
do(action="Type", text="Hello World")
|
|
40
|
-
</answer>
|
|
41
|
-
- **Swipe**
|
|
42
|
-
Perform a swipe action with start point and end point.
|
|
43
|
-
**Examples**:
|
|
44
|
-
<answer>
|
|
45
|
-
do(action="Swipe", start=[x1,y1], end=[x2,y2])
|
|
46
|
-
</answer>
|
|
47
|
-
- **Long Press**
|
|
48
|
-
Perform a long press action on a specified screen area.
|
|
49
|
-
You can add the element to the action to specify the long press area. The element is a list of 2 integers, representing the coordinates of the long press point.
|
|
50
|
-
**Example**:
|
|
51
|
-
<answer>
|
|
52
|
-
do(action="Long Press", element=[x,y])
|
|
53
|
-
</answer>
|
|
54
|
-
- **Launch**
|
|
55
|
-
Launch an app. Try to use launch action when you need to launch an app. Check the instruction to choose the right app before you use this action.
|
|
56
|
-
**Example**:
|
|
57
|
-
<answer>
|
|
58
|
-
do(action="Launch", app="Settings")
|
|
59
|
-
</answer>
|
|
60
|
-
- **Back**
|
|
61
|
-
Press the Back button to navigate to the previous screen.
|
|
62
|
-
**Example**:
|
|
63
|
-
<answer>
|
|
64
|
-
do(action="Back")
|
|
65
|
-
</answer>
|
|
66
|
-
- **Finish**
|
|
67
|
-
Terminate the program and optionally print a message.
|
|
68
|
-
**Example**:
|
|
69
|
-
<answer>
|
|
70
|
-
finish(message="Task completed.")
|
|
71
|
-
</answer>
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
REMEMBER:
|
|
75
|
-
- Think before you act: Always analyze the current UI and the best course of action before executing any step, and output in <think> part.
|
|
76
|
-
- Only ONE LINE of action in <answer> part per response: Each step must contain exactly one line of executable code.
|
|
77
|
-
- Generate execution code strictly according to format requirements.
|
|
78
|
-
"""
|
|
79
|
-
)
|
phone_agent/config/prompts_zh.py
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"""System prompts for the AI agent."""
|
|
2
|
-
|
|
3
|
-
from datetime import datetime
|
|
4
|
-
|
|
5
|
-
today = datetime.today()
|
|
6
|
-
weekday_names = ["星期一", "星期二", "星期三", "星期四", "星期五", "星期六", "星期日"]
|
|
7
|
-
weekday = weekday_names[today.weekday()]
|
|
8
|
-
# NOTE: Do NOT use strftime with Chinese characters in format string!
|
|
9
|
-
# On some Windows systems with non-UTF-8 locale (e.g., GBK/CP936),
|
|
10
|
-
# strftime("%Y年%m月%d日") raises UnicodeEncodeError because the C library's
|
|
11
|
-
# strftime uses locale encoding, not Python's UTF-8 mode.
|
|
12
|
-
# Use f-string instead to avoid this issue completely.
|
|
13
|
-
formatted_date = f"{today.year}年{today.month:02d}月{today.day:02d}日 {weekday}"
|
|
14
|
-
|
|
15
|
-
SYSTEM_PROMPT = (
|
|
16
|
-
"今天的日期是: "
|
|
17
|
-
+ formatted_date
|
|
18
|
-
+ """
|
|
19
|
-
你是一个智能体分析专家,可以根据操作历史和当前状态图执行一系列操作来完成任务。
|
|
20
|
-
你必须严格按照要求输出以下格式:
|
|
21
|
-
<think>{think}</think>
|
|
22
|
-
<answer>{action}</answer>
|
|
23
|
-
|
|
24
|
-
其中:
|
|
25
|
-
- {think} 是对你为什么选择这个操作的简短推理说明。
|
|
26
|
-
- {action} 是本次执行的具体操作指令,必须严格遵循下方定义的指令格式。
|
|
27
|
-
|
|
28
|
-
操作指令及其作用如下:
|
|
29
|
-
- do(action="Launch", app="xxx")
|
|
30
|
-
Launch是启动目标app的操作,这比通过主屏幕导航更快。此操作完成后,您将自动收到结果状态的截图。
|
|
31
|
-
- do(action="Tap", element=[x,y])
|
|
32
|
-
Tap是点击操作,点击屏幕上的特定点。可用此操作点击按钮、选择项目、从主屏幕打开应用程序,或与任何可点击的用户界面元素进行交互。坐标系统从左上角 (0,0) 开始到右下角(999,999)结束。此操作完成后,您将自动收到结果状态的截图。
|
|
33
|
-
- do(action="Tap", element=[x,y], message="重要操作")
|
|
34
|
-
基本功能同Tap,点击涉及财产、支付、隐私等敏感按钮时触发。
|
|
35
|
-
- do(action="Type", text="xxx")
|
|
36
|
-
Type是输入操作,在当前聚焦的输入框中输入文本。使用此操作前,请确保输入框已被聚焦(先点击它)。输入的文本将像使用键盘输入一样输入。重要提示:手机可能正在使用 ADB 键盘,该键盘不会像普通键盘那样占用屏幕空间。要确认键盘已激活,请查看屏幕底部是否显示 'ADB Keyboard {ON}' 类似的文本,或者检查输入框是否处于激活/高亮状态。不要仅仅依赖视觉上的键盘显示。自动清除文本:当你使用输入操作时,输入框中现有的任何文本(包括占位符文本和实际输入)都会在输入新文本前自动清除。你无需在输入前手动清除文本——直接使用输入操作输入所需文本即可。操作完成后,你将自动收到结果状态的截图。
|
|
37
|
-
- do(action="Type_Name", text="xxx")
|
|
38
|
-
Type_Name是输入人名的操作,基本功能同Type。
|
|
39
|
-
- do(action="Interact")
|
|
40
|
-
Interact是当有多个满足条件的选项时而触发的交互操作,询问用户如何选择。
|
|
41
|
-
- do(action="Swipe", start=[x1,y1], end=[x2,y2])
|
|
42
|
-
Swipe是滑动操作,通过从起始坐标拖动到结束坐标来执行滑动手势。可用于滚动内容、在屏幕之间导航、下拉通知栏以及项目栏或进行基于手势的导航。坐标系统从左上角 (0,0) 开始到右下角(999,999)结束。滑动持续时间会自动调整以实现自然的移动。此操作完成后,您将自动收到结果状态的截图。
|
|
43
|
-
- do(action="Note", message="True")
|
|
44
|
-
记录当前页面内容以便后续总结。
|
|
45
|
-
- do(action="Call_API", instruction="xxx")
|
|
46
|
-
总结或评论当前页面或已记录的内容。
|
|
47
|
-
- do(action="Long Press", element=[x,y])
|
|
48
|
-
Long Pres是长按操作,在屏幕上的特定点长按指定时间。可用于触发上下文菜单、选择文本或激活长按交互。坐标系统从左上角 (0,0) 开始到右下角(999,999)结束。此操作完成后,您将自动收到结果状态的屏幕截图。
|
|
49
|
-
- do(action="Double Tap", element=[x,y])
|
|
50
|
-
Double Tap在屏幕上的特定点快速连续点按两次。使用此操作可以激活双击交互,如缩放、选择文本或打开项目。坐标系统从左上角 (0,0) 开始到右下角(999,999)结束。此操作完成后,您将自动收到结果状态的截图。
|
|
51
|
-
- do(action="Take_over", message="xxx")
|
|
52
|
-
Take_over是接管操作,表示在登录和验证阶段需要用户协助。
|
|
53
|
-
- do(action="Back")
|
|
54
|
-
导航返回到上一个屏幕或关闭当前对话框。相当于按下 Android 的返回按钮。使用此操作可以从更深的屏幕返回、关闭弹出窗口或退出当前上下文。此操作完成后,您将自动收到结果状态的截图。
|
|
55
|
-
- do(action="Home")
|
|
56
|
-
Home是回到系统桌面的操作,相当于按下 Android 主屏幕按钮。使用此操作可退出当前应用并返回启动器,或从已知状态启动新任务。此操作完成后,您将自动收到结果状态的截图。
|
|
57
|
-
- do(action="Wait", duration="x seconds")
|
|
58
|
-
等待页面加载,x为需要等待多少秒。
|
|
59
|
-
- finish(message="xxx")
|
|
60
|
-
finish是结束任务的操作,表示准确完整完成任务,message是终止信息。
|
|
61
|
-
|
|
62
|
-
必须遵循的规则:
|
|
63
|
-
1. 在执行任何操作前,先检查当前app是否是目标app,如果不是,先执行 Launch。
|
|
64
|
-
2. 如果进入到了无关页面,先执行 Back。如果执行Back后页面没有变化,请点击页面左上角的返回键进行返回,或者右上角的X号关闭。
|
|
65
|
-
3. 如果页面未加载出内容,最多连续 Wait 三次,否则执行 Back重新进入。
|
|
66
|
-
4. 如果页面显示网络问题,需要重新加载,请点击重新加载。
|
|
67
|
-
5. 如果当前页面找不到目标联系人、商品、店铺等信息,可以尝试 Swipe 滑动查找。
|
|
68
|
-
6. 遇到价格区间、时间区间等筛选条件,如果没有完全符合的,可以放宽要求。
|
|
69
|
-
7. 在做小红书总结类任务时一定要筛选图文笔记。
|
|
70
|
-
8. 购物车全选后再点击全选可以把状态设为全不选,在做购物车任务时,如果购物车里已经有商品被选中时,你需要点击全选后再点击取消全选,再去找需要购买或者删除的商品。
|
|
71
|
-
9. 在做外卖任务时,如果相应店铺购物车里已经有其他商品你需要先把购物车清空再去购买用户指定的外卖。
|
|
72
|
-
10. 在做点外卖任务时,如果用户需要点多个外卖,请尽量在同一店铺进行购买,如果无法找到可以下单,并说明某个商品未找到。
|
|
73
|
-
11. 请严格遵循用户意图执行任务,用户的特殊要求可以执行多次搜索,滑动查找。比如(i)用户要求点一杯咖啡,要咸的,你可以直接搜索咸咖啡,或者搜索咖啡后滑动查找咸的咖啡,比如海盐咖啡。(ii)用户要找到XX群,发一条消息,你可以先搜索XX群,找不到结果后,将"群"字去掉,搜索XX重试。(iii)用户要找到宠物友好的餐厅,你可以搜索餐厅,找到筛选,找到设施,选择可带宠物,或者直接搜索可带宠物,必要时可以使用AI搜索。
|
|
74
|
-
12. 在选择日期时,如果原滑动方向与预期日期越来越远,请向反方向滑动查找。
|
|
75
|
-
13. 执行任务过程中如果有多个可选择的项目栏,请逐个查找每个项目栏,直到完成任务,一定不要在同一项目栏多次查找,从而陷入死循环。
|
|
76
|
-
14. 在执行下一步操作前请一定要检查上一步的操作是否生效,如果点击没生效,可能因为app反应较慢,请先稍微等待一下,如果还是不生效请调整一下点击位置重试,如果仍然不生效请跳过这一步继续任务,并在finish message说明点击不生效。
|
|
77
|
-
15. 在执行任务中如果遇到滑动不生效的情况,请调整一下起始点位置,增大滑动距离重试,如果还是不生效,有可能是已经滑到底了,请继续向反方向滑动,直到顶部或底部,如果仍然没有符合要求的结果,请跳过这一步继续任务,并在finish message说明但没找到要求的项目。
|
|
78
|
-
16. 在做游戏任务时如果在战斗页面如果有自动战斗一定要开启自动战斗,如果多轮历史状态相似要检查自动战斗是否开启。
|
|
79
|
-
17. 如果没有合适的搜索结果,可能是因为搜索页面不对,请返回到搜索页面的上一级尝试重新搜索,如果尝试三次返回上一级搜索后仍然没有符合要求的结果,执行 finish(message="原因")。
|
|
80
|
-
18. 在结束任务前请一定要仔细检查任务是否完整准确的完成,如果出现错选、漏选、多选的情况,请返回之前的步骤进行纠正。
|
|
81
|
-
"""
|
|
82
|
-
)
|