android-midscene-automation 1.1.10 → 2.0.0

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 (739) hide show
  1. package/README.md +11 -1773
  2. package/bin/android-midscene-automation.js +2 -104
  3. package/package.json +6 -76
  4. package/AI/350/257/206/345/210/253/346/223/215/344/275/234/350/257/264/346/230/216.md +0 -442
  5. package/CHANGELOG.md +0 -284
  6. package/FAQ.md +0 -105
  7. package/USAGE.md +0 -1085
  8. package/artemis-main/.dockerignore +0 -15
  9. package/artemis-main/.env.example +0 -34
  10. package/artemis-main/CONTRIBUTING.md +0 -35
  11. package/artemis-main/Dockerfile +0 -68
  12. package/artemis-main/LICENSE +0 -202
  13. package/artemis-main/Makefile +0 -115
  14. package/artemis-main/README.md +0 -322
  15. package/artemis-main/README_CN.md +0 -320
  16. package/artemis-main/apps/__init__.py +0 -15
  17. package/artemis-main/apps/admin_console/__init__.py +0 -19
  18. package/artemis-main/apps/admin_console/core/__init__.py +0 -13
  19. package/artemis-main/apps/admin_console/core/config.py +0 -43
  20. package/artemis-main/apps/admin_console/core/security.py +0 -178
  21. package/artemis-main/apps/admin_console/core/state.py +0 -243
  22. package/artemis-main/apps/admin_console/database/__init__.py +0 -13
  23. package/artemis-main/apps/admin_console/database/connection.py +0 -60
  24. package/artemis-main/apps/admin_console/database/repositories/__init__.py +0 -13
  25. package/artemis-main/apps/admin_console/database/repositories/session_repository.py +0 -564
  26. package/artemis-main/apps/admin_console/database/repositories/step_repository.py +0 -512
  27. package/artemis-main/apps/admin_console/database/repositories/trace_repository.py +0 -133
  28. package/artemis-main/apps/admin_console/index.html +0 -3787
  29. package/artemis-main/apps/admin_console/replay_manager.py +0 -2585
  30. package/artemis-main/apps/admin_console/routers/__init__.py +0 -13
  31. package/artemis-main/apps/admin_console/routers/media.py +0 -198
  32. package/artemis-main/apps/admin_console/routers/replay.py +0 -91
  33. package/artemis-main/apps/admin_console/routers/sessions.py +0 -239
  34. package/artemis-main/apps/admin_console/routers/steps.py +0 -109
  35. package/artemis-main/apps/admin_console/routers/stream.py +0 -56
  36. package/artemis-main/apps/admin_console/routers/system.py +0 -761
  37. package/artemis-main/apps/admin_console/routers/tasks.py +0 -517
  38. package/artemis-main/apps/admin_console/schemas/__init__.py +0 -13
  39. package/artemis-main/apps/admin_console/schemas/task_schema.py +0 -47
  40. package/artemis-main/apps/admin_console/server.py +0 -541
  41. package/artemis-main/apps/admin_console/services/__init__.py +0 -13
  42. package/artemis-main/apps/admin_console/services/device_stream_service.py +0 -137
  43. package/artemis-main/apps/admin_console/services/ipc_service.py +0 -262
  44. package/artemis-main/apps/admin_console/services/media_service.py +0 -623
  45. package/artemis-main/apps/admin_console/services/model_service.py +0 -148
  46. package/artemis-main/apps/admin_console/services/task_preset_catalog.py +0 -514
  47. package/artemis-main/apps/admin_console/services/task_queue_service.py +0 -1719
  48. package/artemis-main/apps/admin_console/services/worker_process_io.py +0 -144
  49. package/artemis-main/apps/showcase_ui/README.md +0 -31
  50. package/artemis-main/apps/showcase_ui/angular.json +0 -132
  51. package/artemis-main/apps/showcase_ui/package-lock.json +0 -9472
  52. package/artemis-main/apps/showcase_ui/package.json +0 -39
  53. package/artemis-main/apps/showcase_ui/proxy.conf.json +0 -23
  54. package/artemis-main/apps/showcase_ui/public/favicon.ico +0 -0
  55. package/artemis-main/apps/showcase_ui/public/logo.png +0 -0
  56. package/artemis-main/apps/showcase_ui/public/logo.svg +0 -56
  57. package/artemis-main/apps/showcase_ui/src/app/app.component.html +0 -24
  58. package/artemis-main/apps/showcase_ui/src/app/app.component.scss +0 -49
  59. package/artemis-main/apps/showcase_ui/src/app/app.component.spec.ts +0 -42
  60. package/artemis-main/apps/showcase_ui/src/app/app.component.ts +0 -32
  61. package/artemis-main/apps/showcase_ui/src/app/app.config.ts +0 -29
  62. package/artemis-main/apps/showcase_ui/src/app/app.routes.ts +0 -27
  63. package/artemis-main/apps/showcase_ui/src/app/components/agent-stream/agent-stream-startup.spec.ts +0 -108
  64. package/artemis-main/apps/showcase_ui/src/app/components/agent-stream/agent-stream.component.html +0 -1436
  65. package/artemis-main/apps/showcase_ui/src/app/components/agent-stream/agent-stream.component.scss +0 -3973
  66. package/artemis-main/apps/showcase_ui/src/app/components/agent-stream/agent-stream.component.ts +0 -2235
  67. package/artemis-main/apps/showcase_ui/src/app/components/chat-interface/chat-interface.component.html +0 -380
  68. package/artemis-main/apps/showcase_ui/src/app/components/chat-interface/chat-interface.component.scss +0 -1171
  69. package/artemis-main/apps/showcase_ui/src/app/components/chat-interface/chat-interface.component.ts +0 -270
  70. package/artemis-main/apps/showcase_ui/src/app/components/floating-video-player/floating-video-player.component.html +0 -433
  71. package/artemis-main/apps/showcase_ui/src/app/components/floating-video-player/floating-video-player.component.scss +0 -987
  72. package/artemis-main/apps/showcase_ui/src/app/components/floating-video-player/floating-video-player.component.ts +0 -632
  73. package/artemis-main/apps/showcase_ui/src/app/components/legacy-agent-stream/legacy-agent-stream.component.html +0 -130
  74. package/artemis-main/apps/showcase_ui/src/app/components/legacy-agent-stream/legacy-agent-stream.component.scss +0 -406
  75. package/artemis-main/apps/showcase_ui/src/app/components/legacy-agent-stream/legacy-agent-stream.component.ts +0 -74
  76. package/artemis-main/apps/showcase_ui/src/app/components/nav-switcher/nav-switcher.component.scss +0 -115
  77. package/artemis-main/apps/showcase_ui/src/app/components/nav-switcher/nav-switcher.component.ts +0 -52
  78. package/artemis-main/apps/showcase_ui/src/app/core/data/smart-tasks.data.ts +0 -334
  79. package/artemis-main/apps/showcase_ui/src/app/core/i18n/language.service.spec.ts +0 -55
  80. package/artemis-main/apps/showcase_ui/src/app/core/i18n/language.service.ts +0 -61
  81. package/artemis-main/apps/showcase_ui/src/app/core/i18n/translate.pipe.ts +0 -11
  82. package/artemis-main/apps/showcase_ui/src/app/core/i18n/zh-cn.ts +0 -651
  83. package/artemis-main/apps/showcase_ui/src/app/core/models/markdown.model.ts +0 -43
  84. package/artemis-main/apps/showcase_ui/src/app/core/models/pro-tuning.model.spec.ts +0 -47
  85. package/artemis-main/apps/showcase_ui/src/app/core/models/pro-tuning.model.ts +0 -165
  86. package/artemis-main/apps/showcase_ui/src/app/core/models/session.model.ts +0 -85
  87. package/artemis-main/apps/showcase_ui/src/app/core/models/stream.model.ts +0 -246
  88. package/artemis-main/apps/showcase_ui/src/app/core/models/system.model.ts +0 -118
  89. package/artemis-main/apps/showcase_ui/src/app/core/services/task-recommendation.service.ts +0 -111
  90. package/artemis-main/apps/showcase_ui/src/app/pages/home/home.component.html +0 -2130
  91. package/artemis-main/apps/showcase_ui/src/app/pages/home/home.component.scss +0 -5204
  92. package/artemis-main/apps/showcase_ui/src/app/pages/home/home.component.ts +0 -1189
  93. package/artemis-main/apps/showcase_ui/src/app/pages/legacy-workspace/legacy-workspace.component.html +0 -39
  94. package/artemis-main/apps/showcase_ui/src/app/pages/legacy-workspace/legacy-workspace.component.scss +0 -151
  95. package/artemis-main/apps/showcase_ui/src/app/pages/legacy-workspace/legacy-workspace.component.ts +0 -58
  96. package/artemis-main/apps/showcase_ui/src/app/pages/workspace/workspace.component.html +0 -201
  97. package/artemis-main/apps/showcase_ui/src/app/pages/workspace/workspace.component.scss +0 -886
  98. package/artemis-main/apps/showcase_ui/src/app/pages/workspace/workspace.component.ts +0 -324
  99. package/artemis-main/apps/showcase_ui/src/app/services/agent.service.spec.ts +0 -418
  100. package/artemis-main/apps/showcase_ui/src/app/services/agent.service.ts +0 -2012
  101. package/artemis-main/apps/showcase_ui/src/app/services/system.service.spec.ts +0 -173
  102. package/artemis-main/apps/showcase_ui/src/app/services/system.service.ts +0 -620
  103. package/artemis-main/apps/showcase_ui/src/app/utils/action-formatter.util.spec.ts +0 -513
  104. package/artemis-main/apps/showcase_ui/src/app/utils/action-formatter.util.ts +0 -1015
  105. package/artemis-main/apps/showcase_ui/src/app/utils/image-overlay.util.spec.ts +0 -85
  106. package/artemis-main/apps/showcase_ui/src/app/utils/image-overlay.util.ts +0 -662
  107. package/artemis-main/apps/showcase_ui/src/app/utils/markdown-parser.util.spec.ts +0 -70
  108. package/artemis-main/apps/showcase_ui/src/app/utils/markdown-parser.util.ts +0 -383
  109. package/artemis-main/apps/showcase_ui/src/app/utils/recording-timeline.util.spec.ts +0 -107
  110. package/artemis-main/apps/showcase_ui/src/app/utils/recording-timeline.util.ts +0 -123
  111. package/artemis-main/apps/showcase_ui/src/app/utils/run-info.util.spec.ts +0 -92
  112. package/artemis-main/apps/showcase_ui/src/app/utils/run-info.util.ts +0 -116
  113. package/artemis-main/apps/showcase_ui/src/app/utils/stream-aggregator.util.spec.ts +0 -640
  114. package/artemis-main/apps/showcase_ui/src/app/utils/stream-aggregator.util.ts +0 -1021
  115. package/artemis-main/apps/showcase_ui/src/app/utils/tool-formatter.util.spec.ts +0 -375
  116. package/artemis-main/apps/showcase_ui/src/app/utils/tool-formatter.util.ts +0 -1419
  117. package/artemis-main/apps/showcase_ui/src/index.html +0 -37
  118. package/artemis-main/apps/showcase_ui/src/main.ts +0 -22
  119. package/artemis-main/apps/showcase_ui/src/styles.scss +0 -60
  120. package/artemis-main/apps/showcase_ui/tsconfig.app.json +0 -23
  121. package/artemis-main/apps/showcase_ui/tsconfig.json +0 -27
  122. package/artemis-main/apps/showcase_ui/tsconfig.spec.json +0 -23
  123. package/artemis-main/artemis/__init__.py +0 -44
  124. package/artemis-main/artemis/__main__.py +0 -18
  125. package/artemis-main/artemis/_legacy_imports.py +0 -94
  126. package/artemis-main/artemis/_version.py +0 -30
  127. package/artemis-main/artemis/agents/__init__.py +0 -17
  128. package/artemis-main/artemis/agents/checker/checker.json +0 -9
  129. package/artemis-main/artemis/agents/checker/checker.py +0 -859
  130. package/artemis-main/artemis/agents/diagnoser/diagnoser.json +0 -23
  131. package/artemis-main/artemis/agents/diagnoser/diagnoser.py +0 -608
  132. package/artemis-main/artemis/agents/explorer/constants.py +0 -52
  133. package/artemis-main/artemis/agents/explorer/explorer.json +0 -57
  134. package/artemis-main/artemis/agents/explorer/explorer.py +0 -473
  135. package/artemis-main/artemis/agents/explorer/geometry.py +0 -73
  136. package/artemis-main/artemis/agents/explorer/native_runner.py +0 -878
  137. package/artemis-main/artemis/agents/explorer/perception_tools.py +0 -632
  138. package/artemis-main/artemis/agents/explorer/run_setup.py +0 -403
  139. package/artemis-main/artemis/agents/explorer/screen_index.py +0 -266
  140. package/artemis-main/artemis/agents/explorer/tiers.py +0 -110
  141. package/artemis-main/artemis/agents/explorer/tool_declarations.py +0 -394
  142. package/artemis-main/artemis/agents/explorer/universal_runner.py +0 -317
  143. package/artemis-main/artemis/agents/flash/context_compressor.py +0 -452
  144. package/artemis-main/artemis/agents/flash/flash_runner.md +0 -51
  145. package/artemis-main/artemis/agents/flash/flash_summarizer.md +0 -53
  146. package/artemis-main/artemis/agents/flash/flash_summarizer_single.md +0 -54
  147. package/artemis-main/artemis/agents/flash/runner.py +0 -1167
  148. package/artemis-main/artemis/agents/flash/summarizer.py +0 -511
  149. package/artemis-main/artemis/agents/history_analyzer/history_analyzer.md +0 -8
  150. package/artemis-main/artemis/agents/history_analyzer/history_analyzer.py +0 -182
  151. package/artemis-main/artemis/agents/image_processor/image_processor.md +0 -74
  152. package/artemis-main/artemis/agents/image_processor/image_processor.py +0 -322
  153. package/artemis-main/artemis/agents/log_analyzer/log_analyzer.md +0 -15
  154. package/artemis-main/artemis/agents/log_analyzer/log_analyzer.py +0 -403
  155. package/artemis-main/artemis/agents/log_analyzer/log_reader_sub_agent.md +0 -8
  156. package/artemis-main/artemis/agents/log_analyzer/output_analyzer.md +0 -11
  157. package/artemis-main/artemis/agents/log_analyzer/output_analyzer.py +0 -163
  158. package/artemis-main/artemis/agents/object_detector/object_detector.json +0 -9
  159. package/artemis-main/artemis/agents/object_detector/object_detector.py +0 -211
  160. package/artemis-main/artemis/agents/operator/operator.json +0 -3
  161. package/artemis-main/artemis/agents/operator/operator.py +0 -1394
  162. package/artemis-main/artemis/agents/operator/prompts.py +0 -1064
  163. package/artemis-main/artemis/agents/outputter/outputter.md +0 -36
  164. package/artemis-main/artemis/agents/outputter/outputter.py +0 -552
  165. package/artemis-main/artemis/agents/planner/planner.json +0 -32
  166. package/artemis-main/artemis/agents/planner/planner.py +0 -436
  167. package/artemis-main/artemis/agents/prompt_assembly.py +0 -79
  168. package/artemis-main/artemis/agents/summarizer/summarizer.py +0 -190
  169. package/artemis-main/artemis/agents/validator/action_execution.py +0 -98
  170. package/artemis-main/artemis/agents/validator/categories.py +0 -33
  171. package/artemis-main/artemis/agents/validator/execution_loop.py +0 -488
  172. package/artemis-main/artemis/agents/validator/incidents.py +0 -120
  173. package/artemis-main/artemis/agents/validator/pixel_safety_net.md +0 -15
  174. package/artemis-main/artemis/agents/validator/precondition_pixel.py +0 -320
  175. package/artemis-main/artemis/agents/validator/precondition_xml.py +0 -672
  176. package/artemis-main/artemis/agents/validator/tool_declarations.py +0 -332
  177. package/artemis-main/artemis/agents/validator/validator.py +0 -188
  178. package/artemis-main/artemis/agents/video_analyzer/__init__.py +0 -15
  179. package/artemis-main/artemis/agents/video_analyzer/audio_native.py +0 -543
  180. package/artemis-main/artemis/agents/video_analyzer/blackboard.py +0 -821
  181. package/artemis-main/artemis/agents/video_analyzer/chunk_agentic.py +0 -455
  182. package/artemis-main/artemis/agents/video_analyzer/chunk_conversation.py +0 -491
  183. package/artemis-main/artemis/agents/video_analyzer/chunk_native.py +0 -437
  184. package/artemis-main/artemis/agents/video_analyzer/conflict_resolution.py +0 -137
  185. package/artemis-main/artemis/agents/video_analyzer/gemini_files.py +0 -162
  186. package/artemis-main/artemis/agents/video_analyzer/native_coordinator.py +0 -541
  187. package/artemis-main/artemis/agents/video_analyzer/reliability.py +0 -128
  188. package/artemis-main/artemis/agents/video_analyzer/universal_engine.py +0 -487
  189. package/artemis-main/artemis/agents/video_analyzer/universal_tools.py +0 -323
  190. package/artemis-main/artemis/agents/video_analyzer/video_analyzer.md +0 -51
  191. package/artemis-main/artemis/agents/video_analyzer/video_analyzer.py +0 -875
  192. package/artemis-main/artemis/agents/video_analyzer/video_sub_agent.md +0 -15
  193. package/artemis-main/artemis/agents/video_analyzer/video_sub_agent_audio.md +0 -12
  194. package/artemis-main/artemis/clients/accessibility_client.py +0 -438
  195. package/artemis-main/artemis/clients/screen_client_factory.py +0 -403
  196. package/artemis-main/artemis/config/__init__.py +0 -309
  197. package/artemis-main/artemis/config/agent.py +0 -1098
  198. package/artemis-main/artemis/config/constants.py +0 -151
  199. package/artemis-main/artemis/config/core/__init__.py +0 -24
  200. package/artemis-main/artemis/config/core/engine.py +0 -118
  201. package/artemis-main/artemis/config/core/interpolator.py +0 -78
  202. package/artemis-main/artemis/config/llm.py +0 -267
  203. package/artemis-main/artemis/config/paths.py +0 -244
  204. package/artemis-main/artemis/config/runtime.py +0 -197
  205. package/artemis-main/artemis/config/settings.py +0 -315
  206. package/artemis-main/artemis/constants.py +0 -47
  207. package/artemis-main/artemis/context.py +0 -289
  208. package/artemis-main/artemis/controllers/__init__.py +0 -41
  209. package/artemis-main/artemis/controllers/controller_factory.py +0 -41
  210. package/artemis-main/artemis/controllers/device_controller.py +0 -29
  211. package/artemis-main/artemis/controllers/types.py +0 -37
  212. package/artemis-main/artemis/controllers/unified_controller.py +0 -649
  213. package/artemis-main/artemis/core/__init__.py +0 -21
  214. package/artemis-main/artemis/core/diagnostics/__init__.py +0 -90
  215. package/artemis-main/artemis/core/diagnostics/adb_keys.py +0 -270
  216. package/artemis-main/artemis/core/diagnostics/adb_server_connection.py +0 -330
  217. package/artemis-main/artemis/core/diagnostics/device_smoke.py +0 -364
  218. package/artemis-main/artemis/core/diagnostics/emulator_manager.py +0 -501
  219. package/artemis-main/artemis/core/diagnostics/engine.py +0 -438
  220. package/artemis-main/artemis/core/diagnostics/hierarchy_parity.py +0 -216
  221. package/artemis-main/artemis/core/diagnostics/probes/adb_probe.py +0 -887
  222. package/artemis-main/artemis/core/diagnostics/probes/base.py +0 -45
  223. package/artemis-main/artemis/core/diagnostics/probes/credentials_probe.py +0 -296
  224. package/artemis-main/artemis/core/diagnostics/probes/host_probe.py +0 -427
  225. package/artemis-main/artemis/core/diagnostics/probes/runtime_probe.py +0 -169
  226. package/artemis-main/artemis/core/diagnostics/probes/toolchain_probe.py +0 -139
  227. package/artemis-main/artemis/core/diagnostics/readiness.py +0 -83
  228. package/artemis-main/artemis/core/diagnostics/schema.py +0 -118
  229. package/artemis-main/artemis/core/tool_declaration.py +0 -43
  230. package/artemis-main/artemis/core/tool_failure.py +0 -56
  231. package/artemis-main/artemis/data_engine/context_vars.py +0 -24
  232. package/artemis-main/artemis/data_engine/engine.py +0 -1615
  233. package/artemis-main/artemis/data_engine/history_reader.py +0 -142
  234. package/artemis-main/artemis/data_engine/models.py +0 -131
  235. package/artemis-main/artemis/data_engine/storage.py +0 -1245
  236. package/artemis-main/artemis/data_engine/trace.py +0 -727
  237. package/artemis-main/artemis/drivers/__init__.py +0 -48
  238. package/artemis-main/artemis/drivers/android/adb_driver.py +0 -507
  239. package/artemis-main/artemis/drivers/android/hierarchy.py +0 -64
  240. package/artemis-main/artemis/drivers/android/input_ime.py +0 -120
  241. package/artemis-main/artemis/drivers/android/recorder.py +0 -57
  242. package/artemis-main/artemis/drivers/base.py +0 -290
  243. package/artemis-main/artemis/drivers/cloud/cloud_driver.py +0 -117
  244. package/artemis-main/artemis/drivers/factory.py +0 -80
  245. package/artemis-main/artemis/drivers/mock/mock_driver.py +0 -198
  246. package/artemis-main/artemis/drivers/types.py +0 -67
  247. package/artemis-main/artemis/graph/checkpoints.py +0 -1243
  248. package/artemis-main/artemis/graph/graph.py +0 -1055
  249. package/artemis-main/artemis/graph/perception.py +0 -234
  250. package/artemis-main/artemis/graph/state.py +0 -151
  251. package/artemis-main/artemis/graph/visibility.py +0 -238
  252. package/artemis-main/artemis/interfaces/cli/__init__.py +0 -19
  253. package/artemis-main/artemis/interfaces/cli/commands/__init__.py +0 -15
  254. package/artemis-main/artemis/interfaces/cli/commands/batch.py +0 -278
  255. package/artemis-main/artemis/interfaces/cli/commands/doctor.py +0 -468
  256. package/artemis-main/artemis/interfaces/cli/commands/helper.py +0 -226
  257. package/artemis-main/artemis/interfaces/cli/commands/init.py +0 -193
  258. package/artemis-main/artemis/interfaces/cli/commands/mcp.py +0 -862
  259. package/artemis-main/artemis/interfaces/cli/commands/run.py +0 -463
  260. package/artemis-main/artemis/interfaces/cli/commands/server.py +0 -151
  261. package/artemis-main/artemis/interfaces/cli/commands/server_lifecycle.py +0 -328
  262. package/artemis-main/artemis/interfaces/cli/commands/trace.py +0 -111
  263. package/artemis-main/artemis/interfaces/cli/commands/ui.py +0 -404
  264. package/artemis-main/artemis/interfaces/cli/main.py +0 -109
  265. package/artemis-main/artemis/interfaces/sdk/__init__.py +0 -31
  266. package/artemis-main/artemis/interfaces/sdk/client.py +0 -19
  267. package/artemis-main/artemis/interfaces/sdk/task.py +0 -72
  268. package/artemis-main/artemis/llm/__init__.py +0 -25
  269. package/artemis-main/artemis/llm/fake_model.py +0 -179
  270. package/artemis-main/artemis/llm/google/__init__.py +0 -57
  271. package/artemis-main/artemis/llm/google/provider.py +0 -185
  272. package/artemis-main/artemis/llm/google/usage.py +0 -148
  273. package/artemis-main/artemis/llm/parser.py +0 -32
  274. package/artemis-main/artemis/llm/reliability.py +0 -267
  275. package/artemis-main/artemis/llm/router.py +0 -389
  276. package/artemis-main/artemis/llm/schemas.py +0 -36
  277. package/artemis-main/artemis/llm/structured.py +0 -196
  278. package/artemis-main/artemis/main.py +0 -58
  279. package/artemis-main/artemis/mcp/__init__.py +0 -20
  280. package/artemis-main/artemis/mcp/action_executor.py +0 -760
  281. package/artemis-main/artemis/mcp/action_manifest.py +0 -320
  282. package/artemis-main/artemis/mcp/action_names.py +0 -172
  283. package/artemis-main/artemis/mcp/action_server.py +0 -202
  284. package/artemis-main/artemis/mcp/action_session.py +0 -245
  285. package/artemis-main/artemis/mcp/action_specs.py +0 -868
  286. package/artemis-main/artemis/mcp/action_types.py +0 -86
  287. package/artemis-main/artemis/mcp/actuators/__init__.py +0 -21
  288. package/artemis-main/artemis/mcp/actuators/adb.py +0 -414
  289. package/artemis-main/artemis/mcp/actuators/base.py +0 -113
  290. package/artemis-main/artemis/mcp/actuators/mock.py +0 -70
  291. package/artemis-main/artemis/mcp/adb_server.py +0 -490
  292. package/artemis-main/artemis/mcp/observation.py +0 -133
  293. package/artemis-main/artemis/mcp/xml_search_server.py +0 -297
  294. package/artemis-main/artemis/memory/__init__.py +0 -90
  295. package/artemis-main/artemis/memory/chunking.py +0 -1843
  296. package/artemis-main/artemis/memory/context_policy.py +0 -226
  297. package/artemis-main/artemis/memory/step_capsule.md +0 -73
  298. package/artemis-main/artemis/memory/step_memory.py +0 -281
  299. package/artemis-main/artemis/memory/transcript.py +0 -798
  300. package/artemis-main/artemis/platform/__init__.py +0 -61
  301. package/artemis-main/artemis/platform/base.py +0 -104
  302. package/artemis-main/artemis/platform/darwin.py +0 -184
  303. package/artemis-main/artemis/platform/linux.py +0 -207
  304. package/artemis-main/artemis/platform/windows.py +0 -193
  305. package/artemis-main/artemis/resources/__init__.py +0 -46
  306. package/artemis-main/artemis/runtime/__init__.py +0 -108
  307. package/artemis-main/artemis/runtime/adb_endpoint.py +0 -173
  308. package/artemis-main/artemis/runtime/awake_lease.py +0 -283
  309. package/artemis-main/artemis/runtime/awake_service.py +0 -343
  310. package/artemis-main/artemis/runtime/cancel_requests.py +0 -254
  311. package/artemis-main/artemis/runtime/daemon_client.py +0 -422
  312. package/artemis-main/artemis/runtime/device_lock.py +0 -1013
  313. package/artemis-main/artemis/runtime/device_pool.py +0 -478
  314. package/artemis-main/artemis/runtime/helper_manager.py +0 -1030
  315. package/artemis-main/artemis/runtime/process_probe.py +0 -98
  316. package/artemis-main/artemis/runtime/server_lifecycle.py +0 -435
  317. package/artemis-main/artemis/runtime/supervisor.py +0 -121
  318. package/artemis-main/artemis/runtime/trace_store.py +0 -375
  319. package/artemis-main/artemis/sdk/__init__.py +0 -26
  320. package/artemis-main/artemis/sdk/agent.py +0 -485
  321. package/artemis-main/artemis/sdk/builders/__init__.py +0 -29
  322. package/artemis-main/artemis/sdk/builders/agent_config_builder.py +0 -474
  323. package/artemis-main/artemis/sdk/constants.py +0 -15
  324. package/artemis-main/artemis/sdk/run_outcome.py +0 -58
  325. package/artemis-main/artemis/sdk/types/__init__.py +0 -61
  326. package/artemis-main/artemis/sdk/types/agent.py +0 -89
  327. package/artemis-main/artemis/sdk/utils.py +0 -28
  328. package/artemis-main/artemis/services/llm.py +0 -1040
  329. package/artemis-main/artemis/services/token_meter.py +0 -267
  330. package/artemis-main/artemis/telemetry/__init__.py +0 -35
  331. package/artemis-main/artemis/telemetry/models.py +0 -64
  332. package/artemis-main/artemis/telemetry/replay.py +0 -34
  333. package/artemis-main/artemis/telemetry/storage/json_storage.py +0 -47
  334. package/artemis-main/artemis/telemetry/tracer.py +0 -85
  335. package/artemis-main/artemis/toolchain/__init__.py +0 -52
  336. package/artemis-main/artemis/toolchain/descriptors.py +0 -92
  337. package/artemis-main/artemis/toolchain/resolver.py +0 -185
  338. package/artemis-main/artemis/tools/base.py +0 -232
  339. package/artemis-main/artemis/tools/command_tool.py +0 -1240
  340. package/artemis-main/artemis/tools/committee_prompts.json +0 -5
  341. package/artemis-main/artemis/tools/committee_tool.py +0 -422
  342. package/artemis-main/artemis/tools/diagnoser_submit_answer_tool.py +0 -87
  343. package/artemis-main/artemis/tools/diagnostic_tool.py +0 -120
  344. package/artemis-main/artemis/tools/explorer_tool.py +0 -581
  345. package/artemis-main/artemis/tools/history/__init__.py +0 -398
  346. package/artemis-main/artemis/tools/history/replay.py +0 -120
  347. package/artemis-main/artemis/tools/history/screenshot.py +0 -139
  348. package/artemis-main/artemis/tools/history/search.py +0 -563
  349. package/artemis-main/artemis/tools/image_processor_tool.py +0 -124
  350. package/artemis-main/artemis/tools/index.py +0 -47
  351. package/artemis-main/artemis/tools/log_tool.py +0 -108
  352. package/artemis-main/artemis/tools/mobile/launch_app.py +0 -132
  353. package/artemis-main/artemis/tools/mobile/log_utils.py +0 -138
  354. package/artemis-main/artemis/tools/mobile/ocr.py +0 -202
  355. package/artemis-main/artemis/tools/mobile/read_hierarchy.py +0 -108
  356. package/artemis-main/artemis/tools/mobile/read_logs.py +0 -116
  357. package/artemis-main/artemis/tools/mobile/search_logs.py +0 -260
  358. package/artemis-main/artemis/tools/object_detection_tool.py +0 -244
  359. package/artemis-main/artemis/tools/scratchpad.py +0 -819
  360. package/artemis-main/artemis/tools/system/adb_shell.py +0 -31
  361. package/artemis-main/artemis/tools/tool_wrapper.py +0 -270
  362. package/artemis-main/artemis/tools/video_tool.py +0 -261
  363. package/artemis-main/artemis/tools/wait_tool.py +0 -97
  364. package/artemis-main/artemis/utils/app_launch_utils.py +0 -207
  365. package/artemis-main/artemis/utils/coordinates.py +0 -606
  366. package/artemis-main/artemis/utils/credentials_validator.py +0 -201
  367. package/artemis-main/artemis/utils/cv_canvas.py +0 -189
  368. package/artemis-main/artemis/utils/cython_compat.py +0 -45
  369. package/artemis-main/artemis/utils/element_hit_test.py +0 -80
  370. package/artemis-main/artemis/utils/image_diff.py +0 -335
  371. package/artemis-main/artemis/utils/image_hash.py +0 -80
  372. package/artemis-main/artemis/utils/notes.py +0 -470
  373. package/artemis-main/artemis/utils/ocr_api.py +0 -105
  374. package/artemis-main/artemis/utils/ocr_xml_fusion.py +0 -318
  375. package/artemis-main/artemis/utils/plan_grammar.py +0 -513
  376. package/artemis-main/artemis/utils/python_executor.py +0 -213
  377. package/artemis-main/artemis/utils/startup_progress.py +0 -60
  378. package/artemis-main/artemis/utils/task_tree.py +0 -1174
  379. package/artemis-main/artemis/utils/text.py +0 -37
  380. package/artemis-main/artemis/utils/ui_filter.py +0 -651
  381. package/artemis-main/artemis/utils/video.py +0 -685
  382. package/artemis-main/artemis/utils/visualization.py +0 -802
  383. package/artemis-main/config/artemis.example.jsonc +0 -12
  384. package/artemis-main/mcp_server/README.md +0 -111
  385. package/artemis-main/mcp_server/__init__.py +0 -21
  386. package/artemis-main/mcp_server/__main__.py +0 -20
  387. package/artemis-main/mcp_server/background/__init__.py +0 -15
  388. package/artemis-main/mcp_server/background/task_runner.py +0 -453
  389. package/artemis-main/mcp_server/base.py +0 -49
  390. package/artemis-main/mcp_server/notifiers/__init__.py +0 -74
  391. package/artemis-main/mcp_server/notifiers/agentapi.py +0 -289
  392. package/artemis-main/mcp_server/notifiers/base.py +0 -45
  393. package/artemis-main/mcp_server/notifiers/composite.py +0 -87
  394. package/artemis-main/mcp_server/notifiers/desktop.py +0 -108
  395. package/artemis-main/mcp_server/notifiers/file.py +0 -69
  396. package/artemis-main/mcp_server/notifiers/script.py +0 -90
  397. package/artemis-main/mcp_server/notifiers/webhook.py +0 -87
  398. package/artemis-main/mcp_server/rules.md +0 -68
  399. package/artemis-main/mcp_server/server.py +0 -106
  400. package/artemis-main/mcp_server/tools/__init__.py +0 -29
  401. package/artemis-main/mcp_server/tools/device_state.py +0 -107
  402. package/artemis-main/mcp_server/tools/diagnose.py +0 -1249
  403. package/artemis-main/mcp_server/tools/inspect_trace.py +0 -394
  404. package/artemis-main/mcp_server/tools/task_manager.py +0 -627
  405. package/artemis-main/mcp_server/tools/task_runner.py +0 -548
  406. package/artemis-main/mcp_server/utils/__init__.py +0 -15
  407. package/artemis-main/mcp_server/utils/device_utils.py +0 -180
  408. package/artemis-main/mcp_server/utils/env_utils.py +0 -65
  409. package/artemis-main/packages/artemis-accessibility-helper/ArtemisAccessibilityHelper.apk +0 -0
  410. package/artemis-main/packages/artemis-accessibility-helper/app/build.gradle.kts +0 -35
  411. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/AndroidManifest.xml +0 -49
  412. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/A11yNode.java +0 -274
  413. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/ArtemisAccessibilityService.java +0 -227
  414. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/CommandServer.java +0 -463
  415. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/DisplayUtils.java +0 -111
  416. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/GestureController.java +0 -232
  417. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/HierarchyDumper.java +0 -832
  418. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/TokenReceiver.java +0 -36
  419. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/TokenStore.java +0 -38
  420. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/java/com/artemis/helper/XmlUtils.java +0 -102
  421. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/res/values/strings.xml +0 -4
  422. package/artemis-main/packages/artemis-accessibility-helper/app/src/main/res/xml/accessibility_service_config.xml +0 -10
  423. package/artemis-main/packages/artemis-accessibility-helper/build.gradle.kts +0 -3
  424. package/artemis-main/packages/artemis-accessibility-helper/build_apk.sh +0 -215
  425. package/artemis-main/packages/artemis-accessibility-helper/debug.keystore +0 -0
  426. package/artemis-main/packages/artemis-accessibility-helper/gradle.properties +0 -2
  427. package/artemis-main/packages/artemis-accessibility-helper/helper_manifest.json +0 -7
  428. package/artemis-main/packages/artemis-accessibility-helper/settings.gradle.kts +0 -17
  429. package/artemis-main/packages/artemis-client/DESIGN.md +0 -89
  430. package/artemis-main/packages/artemis-client/README.md +0 -112
  431. package/artemis-main/packages/artemis-client/examples/basic.py +0 -30
  432. package/artemis-main/packages/artemis-client/pyproject.toml +0 -36
  433. package/artemis-main/packages/artemis-client/src/artemis_client/__init__.py +0 -45
  434. package/artemis-main/packages/artemis-client/src/artemis_client/client.py +0 -401
  435. package/artemis-main/packages/artemis-client/src/artemis_client/errors.py +0 -66
  436. package/artemis-main/packages/artemis-client/src/artemis_client/models.py +0 -212
  437. package/artemis-main/packages/artemis-client/src/artemis_client/py.typed +0 -1
  438. package/artemis-main/packages/artemis-client/src/artemis_client/transport.py +0 -134
  439. package/artemis-main/packages/artemis-client/tests/test_client.py +0 -289
  440. package/artemis-main/packages/artemis-client/tests/test_transport.py +0 -85
  441. package/artemis-main/pyproject.toml +0 -259
  442. package/artemis-main/pyright-core.json +0 -17
  443. package/artemis-main/scripts/check_dependency_sources.py +0 -68
  444. package/artemis-main/scripts/install_deps.ps1 +0 -520
  445. package/artemis-main/scripts/install_deps.sh +0 -533
  446. package/artemis-main/scripts/quality_ratchet.py +0 -97
  447. package/artemis-main/scripts/real_device_video_acceptance.py +0 -483
  448. package/artemis-main/scripts/run_edge_case_part.py +0 -327
  449. package/artemis-main/scripts/run_ui.py +0 -242
  450. package/artemis-main/scripts/start.ps1 +0 -500
  451. package/artemis-main/scripts/test_all_edge_cases.py +0 -269
  452. package/artemis-main/scripts/verify_concurrency_and_devices.py +0 -385
  453. package/artemis-main/setup.py +0 -164
  454. package/artemis-main/start.bat +0 -35
  455. package/artemis-main/start.sh +0 -423
  456. package/artemis-main/third_party/mobile_use/LICENSE +0 -190
  457. package/artemis-main/third_party/mobile_use/METADATA +0 -27
  458. package/artemis-main/third_party/mobile_use/NOTICE +0 -12
  459. package/artemis-main/third_party/mobile_use/__init__.py +0 -19
  460. package/artemis-main/third_party/mobile_use/agents/__init__.py +0 -13
  461. package/artemis-main/third_party/mobile_use/agents/hopper/__init__.py +0 -13
  462. package/artemis-main/third_party/mobile_use/agents/hopper/hopper.md +0 -22
  463. package/artemis-main/third_party/mobile_use/agents/hopper/hopper.py +0 -80
  464. package/artemis-main/third_party/mobile_use/clients/__init__.py +0 -13
  465. package/artemis-main/third_party/mobile_use/clients/ui_automator_client.py +0 -482
  466. package/artemis-main/third_party/mobile_use/config/__init__.py +0 -13
  467. package/artemis-main/third_party/mobile_use/config/llm.py +0 -183
  468. package/artemis-main/third_party/mobile_use/config/output.py +0 -184
  469. package/artemis-main/third_party/mobile_use/context.py +0 -119
  470. package/artemis-main/third_party/mobile_use/controllers/__init__.py +0 -13
  471. package/artemis-main/third_party/mobile_use/controllers/platform_specific_commands_controller.py +0 -151
  472. package/artemis-main/third_party/mobile_use/controllers/types.py +0 -92
  473. package/artemis-main/third_party/mobile_use/controllers/unified_controller.py +0 -183
  474. package/artemis-main/third_party/mobile_use/graph.py +0 -54
  475. package/artemis-main/third_party/mobile_use/llm_service.py +0 -193
  476. package/artemis-main/third_party/mobile_use/main.py +0 -130
  477. package/artemis-main/third_party/mobile_use/sdk/__init__.py +0 -13
  478. package/artemis-main/third_party/mobile_use/sdk/agent.py +0 -1060
  479. package/artemis-main/third_party/mobile_use/sdk/builders/__init__.py +0 -13
  480. package/artemis-main/third_party/mobile_use/sdk/builders/agent_config_builder.py +0 -225
  481. package/artemis-main/third_party/mobile_use/sdk/builders/index.py +0 -33
  482. package/artemis-main/third_party/mobile_use/sdk/builders/task_request_builder.py +0 -243
  483. package/artemis-main/third_party/mobile_use/sdk/types/__init__.py +0 -13
  484. package/artemis-main/third_party/mobile_use/sdk/types/agent.py +0 -98
  485. package/artemis-main/third_party/mobile_use/sdk/types/exceptions.py +0 -109
  486. package/artemis-main/third_party/mobile_use/sdk/types/task.py +0 -234
  487. package/artemis-main/third_party/mobile_use/testing.py +0 -59
  488. package/artemis-main/third_party/mobile_use/tools/__init__.py +0 -13
  489. package/artemis-main/third_party/mobile_use/tools/index.py +0 -44
  490. package/artemis-main/third_party/mobile_use/tools/mobile/__init__.py +0 -13
  491. package/artemis-main/third_party/mobile_use/tools/mobile/launch_app.py +0 -89
  492. package/artemis-main/third_party/mobile_use/tools/tool_wrapper.py +0 -52
  493. package/artemis-main/third_party/mobile_use/utils/__init__.py +0 -13
  494. package/artemis-main/third_party/mobile_use/utils/app_launch_utils.py +0 -217
  495. package/artemis-main/third_party/mobile_use/utils/cli_helpers.py +0 -60
  496. package/artemis-main/third_party/mobile_use/utils/decorators.py +0 -158
  497. package/artemis-main/third_party/mobile_use/utils/file.py +0 -31
  498. package/artemis-main/third_party/mobile_use/utils/logger.py +0 -216
  499. package/artemis-main/third_party/mobile_use/utils/media.py +0 -213
  500. package/artemis-main/third_party/mobile_use/utils/shell_utils.py +0 -39
  501. package/artemis-main/third_party/mobile_use/utils/video.py +0 -398
  502. package/artemis-main/uv.lock +0 -4908
  503. package/bin/artemis-config.mjs +0 -15
  504. package/bin/artemis-embedded.py +0 -56
  505. package/bin/start-artemis.mjs +0 -30
  506. package/bin/start-dev.mjs +0 -112
  507. package/bin/sync-readme-docs.mjs +0 -49
  508. package/bin/test_artemis_embedded.py +0 -44
  509. package/index.html +0 -12
  510. package/remote-agent/index.ts +0 -232
  511. package/server/analytics.test.ts +0 -46
  512. package/server/analytics.ts +0 -24
  513. package/server/android-device-info.ts +0 -28
  514. package/server/android-sdk.ts +0 -104
  515. package/server/api-safety-analytics.test.ts +0 -57
  516. package/server/appium-auto-save.test.ts +0 -79
  517. package/server/appium-config.test.ts +0 -182
  518. package/server/appium-recorder/ai-deduplication.test.ts +0 -80
  519. package/server/appium-recorder/ai-deduplication.ts +0 -74
  520. package/server/appium-recorder/ai-observation.test.ts +0 -125
  521. package/server/appium-recorder/ai-observation.ts +0 -125
  522. package/server/appium-recorder/ai-recognition.test.ts +0 -27
  523. package/server/appium-recorder/ai-recognition.ts +0 -186
  524. package/server/appium-recorder/appium-runner.ts +0 -1985
  525. package/server/appium-recorder/appium-version.test.ts +0 -55
  526. package/server/appium-recorder/bounded-loop.test.ts +0 -55
  527. package/server/appium-recorder/bounded-loop.ts +0 -129
  528. package/server/appium-recorder/condition-timeout.ts +0 -4
  529. package/server/appium-recorder/element-tap.test.ts +0 -312
  530. package/server/appium-recorder/flow-layout.test.ts +0 -52
  531. package/server/appium-recorder/history-capture.ts +0 -35
  532. package/server/appium-recorder/image-check.ts +0 -174
  533. package/server/appium-recorder/managed-appium.ts +0 -198
  534. package/server/appium-recorder/managed-cleanup.test.ts +0 -113
  535. package/server/appium-recorder/open-gallery.ts +0 -61
  536. package/server/appium-recorder/prompt-optimizer.ts +0 -57
  537. package/server/appium-recorder/random-value-replay.test.ts +0 -76
  538. package/server/appium-recorder/random-value.test.ts +0 -114
  539. package/server/appium-recorder/random-value.ts +0 -34
  540. package/server/appium-recorder/replay-lifecycle.test.ts +0 -123
  541. package/server/appium-recorder/replay-log.ts +0 -13
  542. package/server/appium-recorder/replay-mp4.ts +0 -72
  543. package/server/appium-recorder/replay-video-segments.ts +0 -77
  544. package/server/appium-recorder/replay-video.ts +0 -125
  545. package/server/appium-recorder/report-summary.test.ts +0 -78
  546. package/server/appium-recorder/report-summary.ts +0 -60
  547. package/server/appium-recorder/report.ts +0 -935
  548. package/server/appium-recorder/repository.ts +0 -561
  549. package/server/appium-recorder/request-timeout.test.ts +0 -34
  550. package/server/appium-recorder/request-timeout.ts +0 -34
  551. package/server/appium-recorder/routes.ts +0 -524
  552. package/server/appium-recorder/run-history.ts +0 -53
  553. package/server/appium-recorder/scrcpy-recording-source.ts +0 -85
  554. package/server/appium-recorder/screenshot.ts +0 -22
  555. package/server/appium-recorder/script-export.ts +0 -80
  556. package/server/appium-recorder/script-import.test.ts +0 -45
  557. package/server/appium-recorder/stop-app.ts +0 -18
  558. package/server/appium-recorder/tree-dump.ts +0 -66
  559. package/server/appium-recorder/variable-store.ts +0 -22
  560. package/server/appium-recorder/variables.ts +0 -89
  561. package/server/appium-recorder/video-response.ts +0 -36
  562. package/server/appium-recorder/visual-change.ts +0 -184
  563. package/server/artemis.ts +0 -34
  564. package/server/config-access.test.ts +0 -27
  565. package/server/config-access.ts +0 -27
  566. package/server/config-store.ts +0 -137
  567. package/server/config.ts +0 -272
  568. package/server/device-locks/repository.ts +0 -147
  569. package/server/device-locks/service.ts +0 -72
  570. package/server/device-locks/types.ts +0 -22
  571. package/server/device-sessions/repository.ts +0 -169
  572. package/server/device-sessions/service.ts +0 -59
  573. package/server/device-sessions/types.ts +0 -24
  574. package/server/http-api.ts +0 -1505
  575. package/server/model-tester.ts +0 -121
  576. package/server/operations/repository.ts +0 -226
  577. package/server/operations/service.ts +0 -84
  578. package/server/operations/types.ts +0 -27
  579. package/server/paths.ts +0 -36
  580. package/server/remote-agents/protocol.ts +0 -40
  581. package/server/remote-agents/registry.test.ts +0 -65
  582. package/server/remote-agents/registry.ts +0 -191
  583. package/server/remote-agents/replay-integration.test.ts +0 -79
  584. package/server/remote-agents/routes.ts +0 -86
  585. package/server/request-body.test.ts +0 -40
  586. package/server/request-body.ts +0 -48
  587. package/server/script-agent.ts +0 -289
  588. package/server/script-db.ts +0 -255
  589. package/server/script-runner.ts +0 -554
  590. package/server/storage/sqlite.ts +0 -112
  591. package/server/test-case-import/formatter.ts +0 -28
  592. package/server/test-case-import/parsers/excel.ts +0 -69
  593. package/server/test-case-import/parsers/txt.ts +0 -11
  594. package/server/test-case-import/parsers/word.ts +0 -9
  595. package/server/test-case-import/service.ts +0 -58
  596. package/server/test-case-import/text-normalizer.ts +0 -98
  597. package/server/test-case-import/types.ts +0 -24
  598. package/server/test-case-import/validator.ts +0 -34
  599. package/src/App.vue +0 -1022
  600. package/src/analytics/summary.ts +0 -75
  601. package/src/api.ts +0 -320
  602. package/src/appium-recorder/AppiumPage.vue +0 -2836
  603. package/src/appium-recorder/RunHistoryDialog.vue +0 -203
  604. package/src/appium-recorder/action-descriptions.ts +0 -49
  605. package/src/appium-recorder/ai-deduplication.ts +0 -34
  606. package/src/appium-recorder/ai-prompt-presets.ts +0 -34
  607. package/src/appium-recorder/ai-recognition.ts +0 -48
  608. package/src/appium-recorder/api.ts +0 -209
  609. package/src/appium-recorder/bounded-loop.ts +0 -74
  610. package/src/appium-recorder/components/AiRecognitionPromptInput.vue +0 -41
  611. package/src/appium-recorder/components/AiRecognitionSettings.vue +0 -251
  612. package/src/appium-recorder/components/AiRecognitionTestDialog.vue +0 -86
  613. package/src/appium-recorder/components/BranchTimeoutSettings.vue +0 -23
  614. package/src/appium-recorder/components/BreakLoopSettings.vue +0 -45
  615. package/src/appium-recorder/components/ComponentInspector.vue +0 -33
  616. package/src/appium-recorder/components/ComponentTree.vue +0 -139
  617. package/src/appium-recorder/components/CoordinatePointPicker.vue +0 -23
  618. package/src/appium-recorder/components/FlowActionMenu.vue +0 -257
  619. package/src/appium-recorder/components/FlowCanvas.vue +0 -391
  620. package/src/appium-recorder/components/FlowNodeCard.vue +0 -318
  621. package/src/appium-recorder/components/FlowNodeSearch.vue +0 -62
  622. package/src/appium-recorder/components/FlowRoundedEdge.vue +0 -58
  623. package/src/appium-recorder/components/FlowStepEditor.vue +0 -541
  624. package/src/appium-recorder/components/ImageCheckDialog.vue +0 -172
  625. package/src/appium-recorder/components/LongPressSettings.vue +0 -58
  626. package/src/appium-recorder/components/LoopSettings.vue +0 -39
  627. package/src/appium-recorder/components/MergeBranchesDialog.vue +0 -102
  628. package/src/appium-recorder/components/NestedConditionBranches.vue +0 -403
  629. package/src/appium-recorder/components/NewScriptDialog.vue +0 -27
  630. package/src/appium-recorder/components/NodeDetail.vue +0 -179
  631. package/src/appium-recorder/components/PresetVariables.vue +0 -110
  632. package/src/appium-recorder/components/RandomValueSettings.vue +0 -139
  633. package/src/appium-recorder/components/RecordedSteps.vue +0 -468
  634. package/src/appium-recorder/components/RecorderWorkspace.vue +0 -132
  635. package/src/appium-recorder/components/ScriptParameterSettings.vue +0 -65
  636. package/src/appium-recorder/components/StageLogSettings.vue +0 -17
  637. package/src/appium-recorder/components/TextClickSettings.vue +0 -19
  638. package/src/appium-recorder/components/VariableExtractionSettings.vue +0 -19
  639. package/src/appium-recorder/components/VariableTable.vue +0 -82
  640. package/src/appium-recorder/components/VisualChangeDialog.vue +0 -151
  641. package/src/appium-recorder/components/VisualChangeEndPicker.vue +0 -21
  642. package/src/appium-recorder/coordinate-preview.ts +0 -37
  643. package/src/appium-recorder/flow-appearance.ts +0 -70
  644. package/src/appium-recorder/flow-copy.ts +0 -278
  645. package/src/appium-recorder/flow-graph.ts +0 -868
  646. package/src/appium-recorder/flow-insert.ts +0 -27
  647. package/src/appium-recorder/flow-labels.ts +0 -138
  648. package/src/appium-recorder/flow-layout.ts +0 -88
  649. package/src/appium-recorder/flow-merge.ts +0 -123
  650. package/src/appium-recorder/flow-normalize.ts +0 -77
  651. package/src/appium-recorder/flow-remove.ts +0 -75
  652. package/src/appium-recorder/flow-search.ts +0 -29
  653. package/src/appium-recorder/flow-unmerge.ts +0 -145
  654. package/src/appium-recorder/image-check.ts +0 -121
  655. package/src/appium-recorder/long-press.ts +0 -27
  656. package/src/appium-recorder/native-control-state.ts +0 -33
  657. package/src/appium-recorder/node-locators.ts +0 -25
  658. package/src/appium-recorder/node-timeout.ts +0 -1
  659. package/src/appium-recorder/random-value.ts +0 -60
  660. package/src/appium-recorder/report-summary.ts +0 -60
  661. package/src/appium-recorder/run-history.ts +0 -53
  662. package/src/appium-recorder/stage-log.ts +0 -21
  663. package/src/appium-recorder/text-click.ts +0 -9
  664. package/src/appium-recorder/tree.ts +0 -176
  665. package/src/appium-recorder/types.ts +0 -198
  666. package/src/appium-recorder/variable-presets.ts +0 -24
  667. package/src/appium-recorder/variables.ts +0 -34
  668. package/src/appium-recorder/visual-change-pairs.ts +0 -155
  669. package/src/appium-recorder/visual-change.ts +0 -87
  670. package/src/assets/appium-actions/add.svg +0 -7
  671. package/src/assets/appium-actions/android.svg +0 -6
  672. package/src/assets/appium-actions/back.svg +0 -6
  673. package/src/assets/appium-actions/bidirection.svg +0 -6
  674. package/src/assets/appium-actions/browser.svg +0 -6
  675. package/src/assets/appium-actions/clear.svg +0 -3
  676. package/src/assets/appium-actions/crosshair.svg +0 -6
  677. package/src/assets/appium-actions/eye.svg +0 -3
  678. package/src/assets/appium-actions/pause.svg +0 -7
  679. package/src/assets/appium-actions/phone.svg +0 -9
  680. package/src/assets/appium-actions/pin.svg +0 -6
  681. package/src/assets/appium-actions/power.svg +0 -6
  682. package/src/assets/appium-actions/select.svg +0 -3
  683. package/src/assets/appium-actions/sidebar.svg +0 -6
  684. package/src/assets/appium-actions/text.svg +0 -6
  685. package/src/assets/appium-actions/zoom.svg +0 -6
  686. package/src/assets/device-actions/back.svg +0 -5
  687. package/src/assets/device-actions/home.svg +0 -3
  688. package/src/assets/device-actions/power.svg +0 -5
  689. package/src/assets/device-actions/tasks.svg +0 -3
  690. package/src/assets/device-actions/volume-down.svg +0 -3
  691. package/src/assets/device-actions/volume-up.svg +0 -3
  692. package/src/components/AppSidebar.vue +0 -32
  693. package/src/components/MidsceneMaintenanceNotice.vue +0 -17
  694. package/src/components/analytics/AnalysisCharts.vue +0 -189
  695. package/src/components/analytics/ReportAnalysis.vue +0 -78
  696. package/src/components/config/AiDeduplicationSettings.vue +0 -70
  697. package/src/components/config/AiPromptPresetsSettings.vue +0 -113
  698. package/src/components/config/AppiumConfigPanel.vue +0 -113
  699. package/src/components/config/AppiumModelSettings.vue +0 -45
  700. package/src/components/config/BaseConfigPanel.vue +0 -106
  701. package/src/components/config/FlowAppearanceSettings.vue +0 -150
  702. package/src/components/config/MidsceneConfigPanel.vue +0 -211
  703. package/src/components/config/ReplayReportSummarySettings.vue +0 -118
  704. package/src/components/device/DeviceInfoTooltip.vue +0 -55
  705. package/src/components/device/DevicePreviewPanel.vue +0 -482
  706. package/src/components/generator/GeneratedCodePanel.vue +0 -70
  707. package/src/components/generator/TestCaseFileUpload.vue +0 -97
  708. package/src/components/help/HelpCenter.vue +0 -204
  709. package/src/components/help/MarkdownDocument.vue +0 -139
  710. package/src/composables/use-device-preview.ts +0 -279
  711. package/src/composables/use-initial-resource.ts +0 -17
  712. package/src/composables/use-script-execution.ts +0 -277
  713. package/src/config/credentials.ts +0 -2
  714. package/src/config/midscene-model-presets.ts +0 -103
  715. package/src/config/prompt-example.ts +0 -10
  716. package/src/config/prompt-presets.ts +0 -172
  717. package/src/config/use-appium-auto-save.ts +0 -75
  718. package/src/config/use-model-config.ts +0 -161
  719. package/src/main.ts +0 -10
  720. package/src/pages/AiGeneratorPage.vue +0 -273
  721. package/src/pages/AnalysisPage.vue +0 -60
  722. package/src/pages/ArtemisPage.vue +0 -72
  723. package/src/pages/AutomationPage.vue +0 -161
  724. package/src/pages/ConfigPage.vue +0 -165
  725. package/src/pages/GeneratorPage.vue +0 -104
  726. package/src/pages/ManualStepsPage.vue +0 -179
  727. package/src/script-generator/codegen.ts +0 -126
  728. package/src/script-generator/index.ts +0 -4
  729. package/src/script-generator/presets.ts +0 -37
  730. package/src/script-generator/step-options.ts +0 -52
  731. package/src/script-generator/types.ts +0 -27
  732. package/src/style.css +0 -4183
  733. package/src/types.ts +0 -167
  734. package/src/vite-env.d.ts +0 -1
  735. package/tsconfig.app.json +0 -8
  736. package/tsconfig.json +0 -11
  737. package/tsconfig.node.json +0 -16
  738. package/vite.config.ts +0 -28
  739. package//346/265/201/347/250/213/350/212/202/347/202/271/346/223/215/344/275/234/350/257/264/346/230/216.md +0 -408
@@ -1,277 +0,0 @@
1
- import { computed, ref, shallowRef, onScopeDispose, type Ref } from 'vue';
2
- import { ElMessage, ElMessageBox } from 'element-plus';
3
- import * as api from '../api';
4
- import type { SavedScript, ExecutionStep, RunScriptStreamEvent } from '../types';
5
-
6
- export function useScriptExecution(selectedScript: Ref<SavedScript | undefined>, selectedScriptId: Ref<string>, playgroundDeviceId: Ref<string>, loadSavedScripts: (id?: string) => Promise<void>, getMidsceneModelConfigError: () => string) {
7
- const isRunningScript = ref(false);
8
- const isStoppingScript = ref(false);
9
- const executionLog = ref('');
10
- const executionProcess = ref<ExecutionStep[]>([]);
11
- const lastRunStatus = ref('');
12
- const runStartedAt = shallowRef<number | null>(null);
13
- const runningElapsedNow = shallowRef(0);
14
- let executionProgressTimer: number | null = null;
15
- let scriptRunAbortController: AbortController | null = null;
16
- const buildExecutionProcess = (script: SavedScript): ExecutionStep[] => {
17
- const activeSteps = (script.steps || []).filter((step) => step.enabled !== false);
18
- if (!activeSteps.length) {
19
- return [
20
- {
21
- id: 'script',
22
- sourceIndex: 0,
23
- title: script.promptTitle || script.name,
24
- method: 'script',
25
- prompt: script.filePath,
26
- status: 'pending',
27
- detail: '等待执行脚本',
28
- },
29
- ];
30
- }
31
-
32
- return activeSteps
33
- .map((step, index) => ({
34
- id: step.id || `${script.id}-${index}`,
35
- sourceIndex: index,
36
- title: step.label || `步骤 ${index + 1}`,
37
- method: step.type,
38
- prompt: step.prompt || step.value || '',
39
- status: 'pending' as const,
40
- detail: '等待前置步骤完成',
41
- }))
42
- .filter((step) => step.title !== '统一处理弹窗');
43
- };
44
-
45
- const markExecutionProcess = (success: boolean, output: string) => {
46
- if (!executionProcess.value.length) return;
47
- const runningIndex = executionProcess.value.findIndex((step) => step.status === 'running');
48
- const errorIndex = executionProcess.value.findIndex((step) => step.status === 'error');
49
- const failedIndex = success
50
- ? -1
51
- : runningIndex >= 0
52
- ? runningIndex
53
- : errorIndex >= 0
54
- ? errorIndex
55
- : Math.max(0, executionProcess.value.length - 1);
56
- executionProcess.value = executionProcess.value.map((step, index) => {
57
- if (success || index < failedIndex) {
58
- return { ...step, status: 'success', detail: '执行完成' };
59
- }
60
- if (index === failedIndex) {
61
- return {
62
- ...step,
63
- status: 'error',
64
- detail: output || '执行失败',
65
- };
66
- }
67
- return step;
68
- });
69
- };
70
-
71
- const formatElapsed = (startedAt: number) => `${Math.max(0, Math.floor((Date.now() - startedAt) / 1000))} 秒`;
72
- const formatCompactDuration = (milliseconds: number) => {
73
- const totalSeconds = Math.max(0, Math.floor(milliseconds / 1000));
74
- const minutes = Math.floor(totalSeconds / 60);
75
- const seconds = totalSeconds % 60;
76
- return minutes ? `${minutes}m${seconds}s` : `${seconds}s`;
77
- };
78
- const runningElapsedText = computed(() => {
79
- if (lastRunStatus.value !== '执行中' || !runStartedAt.value) return '';
80
- return formatCompactDuration(runningElapsedNow.value - runStartedAt.value);
81
- });
82
-
83
- const updateRunningStepElapsed = () => {
84
- if (runStartedAt.value) {
85
- runningElapsedNow.value = Date.now();
86
- }
87
- executionProcess.value = executionProcess.value.map((step) => {
88
- if (step.status !== 'running' || !step.startedAt) {
89
- return step;
90
- }
91
- return {
92
- ...step,
93
- detail: `执行中,已耗时 ${formatElapsed(step.startedAt)}`,
94
- };
95
- });
96
- };
97
-
98
- const startExecutionProgressTimer = () => {
99
- if (executionProgressTimer) {
100
- window.clearInterval(executionProgressTimer);
101
- }
102
- executionProgressTimer = window.setInterval(updateRunningStepElapsed, 1000);
103
- };
104
-
105
- const stopExecutionProgressTimer = () => {
106
- if (!executionProgressTimer) return;
107
- window.clearInterval(executionProgressTimer);
108
- executionProgressTimer = null;
109
- };
110
-
111
- const appendExecutionStepLog = (event: Extract<RunScriptStreamEvent, { type: 'step' }>) => {
112
- const title = event.title || `步骤 ${event.index + 1}`;
113
- if (event.status === 'start') {
114
- executionLog.value += `[步骤 ${event.index + 1}] 开始:${title}\n`;
115
- return;
116
- }
117
- if (event.status === 'success') {
118
- executionLog.value += `[步骤 ${event.index + 1}] 完成:${title}\n`;
119
- return;
120
- }
121
- executionLog.value += `[步骤 ${event.index + 1}] 失败:${title}${event.detail ? `\n${event.detail}` : ''}\n`;
122
- };
123
-
124
- const applyRunScriptEvent = (event: RunScriptStreamEvent) => {
125
- if (event.type === 'output') {
126
- executionLog.value += event.chunk;
127
- if (!lastRunStatus.value) {
128
- lastRunStatus.value = '执行中';
129
- }
130
- return;
131
- }
132
-
133
- if (event.type === 'error') {
134
- executionLog.value += `${event.message}\n`;
135
- markExecutionProcess(false, event.message);
136
- lastRunStatus.value = '执行失败';
137
- return;
138
- }
139
-
140
- if (event.type === 'step') {
141
- appendExecutionStepLog(event);
142
- executionProcess.value = executionProcess.value.map((step) => {
143
- if (step.sourceIndex !== event.index) {
144
- return step;
145
- }
146
-
147
- if (event.status === 'start') {
148
- const startedAt = Date.now();
149
- return { ...step, status: 'running', startedAt, detail: `执行中,已耗时 ${formatElapsed(startedAt)}` };
150
- }
151
- if (event.status === 'success') {
152
- return { ...step, status: 'success', startedAt: undefined, detail: '执行完成' };
153
- }
154
- return {
155
- ...step,
156
- status: 'error',
157
- startedAt: undefined,
158
- detail: event.detail || '执行失败',
159
- };
160
- });
161
- return;
162
- }
163
-
164
- if (event.type === 'done') {
165
- if (event.output && !executionLog.value.trim()) {
166
- executionLog.value = event.output;
167
- }
168
- markExecutionProcess(event.success, event.output || executionLog.value);
169
- lastRunStatus.value = event.success ? '执行完成' : event.output.includes('脚本执行已停止') ? '已停止' : '执行失败';
170
- }
171
- };
172
-
173
- const runSelectedScript = async () => {
174
- if (isRunningScript.value) return;
175
-
176
- if (!selectedScript.value) {
177
- lastRunStatus.value = '请先选择脚本';
178
- return;
179
- }
180
-
181
- const modelConfigError = getMidsceneModelConfigError();
182
- if (modelConfigError) {
183
- lastRunStatus.value = '模型配置不完整';
184
- executionLog.value = modelConfigError;
185
- ElMessage.error('Midscene 模型配置不完整');
186
- return;
187
- }
188
-
189
- isRunningScript.value = true;
190
- isStoppingScript.value = false;
191
- runStartedAt.value = Date.now();
192
- runningElapsedNow.value = runStartedAt.value;
193
- executionLog.value = '';
194
- lastRunStatus.value = '执行中';
195
-
196
- try {
197
- await loadSavedScripts(selectedScriptId.value);
198
- const script = selectedScript.value;
199
- if (!script) {
200
- throw new Error('脚本不存在');
201
- }
202
-
203
- executionProcess.value = buildExecutionProcess(script);
204
- if (executionProcess.value[0]) {
205
- const startedAt = Date.now();
206
- executionProcess.value[0].status = 'running';
207
- executionProcess.value[0].startedAt = startedAt;
208
- executionProcess.value[0].detail = `执行中,已耗时 ${formatElapsed(startedAt)}`;
209
- }
210
- startExecutionProgressTimer();
211
-
212
- scriptRunAbortController = new AbortController();
213
- await api.runScript(
214
- {
215
- code: script.code,
216
- scriptName: script.name,
217
- deviceId: playgroundDeviceId.value,
218
- steps: script.steps || [],
219
- signal: scriptRunAbortController.signal,
220
- },
221
- applyRunScriptEvent,
222
- );
223
-
224
- if (!lastRunStatus.value) {
225
- lastRunStatus.value = '执行完成';
226
- }
227
- if (!executionLog.value.trim()) {
228
- executionLog.value = '执行完成,无输出';
229
- }
230
- } catch (error) {
231
- const isAbortError = error instanceof DOMException && error.name === 'AbortError';
232
- executionLog.value = isAbortError ? '脚本执行已停止。' : error instanceof Error ? error.message : '执行失败';
233
- markExecutionProcess(false, executionLog.value);
234
- lastRunStatus.value = isAbortError ? '已停止' : '执行失败';
235
- } finally {
236
- stopExecutionProgressTimer();
237
- isRunningScript.value = false;
238
- isStoppingScript.value = false;
239
- runStartedAt.value = null;
240
- runningElapsedNow.value = 0;
241
- scriptRunAbortController = null;
242
- }
243
- };
244
-
245
- const stopSelectedScript = async () => {
246
- if (!isRunningScript.value || isStoppingScript.value) return;
247
-
248
- try {
249
- await ElMessageBox.confirm(
250
- '停止后当前脚本进程会立即终止,未完成步骤不会继续执行。确定停止吗?',
251
- '确认停止执行',
252
- {
253
- confirmButtonText: '停止执行',
254
- cancelButtonText: '继续执行',
255
- type: 'warning',
256
- confirmButtonClass: 'el-button--danger',
257
- },
258
- );
259
- } catch {
260
- return;
261
- }
262
-
263
- isStoppingScript.value = true;
264
- lastRunStatus.value = '停止中';
265
-
266
- try {
267
- await api.stopScript();
268
- } catch (error) {
269
- executionLog.value += `${error instanceof Error ? error.message : '停止执行失败'}\n`;
270
- scriptRunAbortController?.abort();
271
- }
272
- };
273
-
274
-
275
- onScopeDispose(() => { stopExecutionProgressTimer(); scriptRunAbortController?.abort(); });
276
- return { isRunningScript, isStoppingScript, executionLog, executionProcess, lastRunStatus, runningElapsedText, runSelectedScript, stopSelectedScript };
277
- }
@@ -1,2 +0,0 @@
1
- // The browser receives this marker instead of a saved API key.
2
- export const SAVED_API_KEY = '••••••••';
@@ -1,103 +0,0 @@
1
- export type MidsceneModelPresetKey = 'gpt' | 'doubao' | 'qwen' | 'deepseek' | 'gemini' | 'kimi' | 'mimo' | 'glm' | 'glm-global' | 'autoglm' | 'autoglm-global' | 'ui-tars';
2
- export type MidsceneModelProvider = 'custom' | 'codex' | MidsceneModelPresetKey;
3
-
4
- export type MidsceneModelPreset = {
5
- key: MidsceneModelPresetKey;
6
- label: string;
7
- baseUrl: string;
8
- modelName: string;
9
- modelFamily: string;
10
- modelFamilies?: string[];
11
- hint?: string;
12
- };
13
-
14
- export type MidsceneModelOption = {
15
- label: string;
16
- value: string;
17
- family: string;
18
- };
19
-
20
- export const codexMidsceneModel = {
21
- provider: 'codex' as const,
22
- baseUrl: 'codex://app-server',
23
- apiKey: '',
24
- name: 'gpt-5.5',
25
- family: 'gpt-5',
26
- };
27
-
28
- export const codexMidsceneModelOptions: MidsceneModelOption[] = [
29
- { label: 'GPT-5.5(推荐)', value: 'gpt-5.5', family: 'gpt-5' },
30
- { label: 'GPT-5.6 Sol', value: 'gpt-5.6-sol', family: 'gpt-5' },
31
- { label: 'GPT-5.6 Terra', value: 'gpt-5.6-terra', family: 'gpt-5' },
32
- { label: 'GPT-5.6 Luna', value: 'gpt-5.6-luna', family: 'gpt-5' },
33
- { label: 'GPT-5.4', value: 'gpt-5.4', family: 'gpt-5' },
34
- ];
35
-
36
- export const midsceneModelOptions: MidsceneModelOption[] = [
37
- ...codexMidsceneModelOptions,
38
- { label: 'GPT-6 Sol', value: 'gpt-6-sol', family: 'gpt-6' },
39
- { label: 'DeepSeek Flash', value: 'deepseek-flash', family: 'deepseek' },
40
- { label: 'AutoGLM Phone', value: 'autoglm-phone', family: 'auto-glm' },
41
- { label: 'Doubao Seed 2.1 Pro 260628', value: 'doubao-seed-2-1-pro-260628', family: 'doubao-seed' },
42
- { label: 'Doubao Seed 2.1 Turbo', value: 'doubao-seed-2-1-turbo-260628', family: 'doubao-seed' },
43
- { label: 'Doubao Seed 2.0 Lite', value: 'doubao-seed-2.0-lite', family: 'doubao-seed' },
44
- { label: 'Doubao Seed 1.6 Vision', value: 'doubao-seed-1.6-vision', family: 'doubao-seed' },
45
- { label: 'Doubao Seed 1.8', value: 'doubao-seed-1.8', family: 'doubao-seed' },
46
- { label: 'Qwen 3.7 Plus', value: 'qwen3.7-plus', family: 'qwen3' },
47
- { label: 'Qwen 3.5 Plus', value: 'qwen3.5-plus', family: 'qwen3' },
48
- { label: 'Qwen 3.6 Plus', value: 'qwen3.6-plus', family: 'qwen3' },
49
- { label: 'Qwen 3 VL Plus', value: 'qwen3-vl-plus', family: 'qwen3-vl' },
50
- { label: 'Qwen VL Max Latest', value: 'qwen-vl-max-latest', family: 'qwen2.5-vl' },
51
- { label: 'Gemini 3.5 Flash', value: 'gemini-3.5-flash', family: 'gemini' },
52
- { label: 'Gemini 3 Flash Preview', value: 'gemini-3-flash-preview', family: 'gemini' },
53
- { label: 'Kimi K3', value: 'kimi-k3', family: 'kimi3' },
54
- { label: 'Kimi K2.5', value: 'kimi-k2.5', family: 'kimi' },
55
- { label: 'Kimi K2.6', value: 'kimi-k2.6', family: 'kimi' },
56
- { label: 'MiMo V2.6 Pro', value: 'mimo-v2.6-pro', family: 'xiaomi-mimo' },
57
- { label: 'MiMo V2.5', value: 'mimo-v2.5', family: 'xiaomi-mimo' },
58
- { label: 'GLM 5V Turbo', value: 'glm-5v-turbo', family: 'glm-v' },
59
- { label: 'GLM 4.6V', value: 'glm-4.6v', family: 'glm-v' },
60
- ];
61
-
62
- export const midsceneModelFamilyOptions = Array.from(
63
- new Set([...midsceneModelOptions.map((option) => option.family), 'auto-glm-multilingual', 'vlm-ui-tars', 'vlm-ui-tars-doubao', 'vlm-ui-tars-doubao-1.5']),
64
- ).map((family) => ({ label: family, value: family }));
65
-
66
- // 官方配置示例:https://midscenejs.com/zh/model-common-config.html(2026-09-23)。
67
- export const midsceneModelPresets: MidsceneModelPreset[] = [
68
- {
69
- key: 'gpt',
70
- label: 'OpenAI GPT',
71
- baseUrl: 'https://api.openai.com/v1',
72
- modelName: 'gpt-6-sol',
73
- modelFamily: 'gpt-6',
74
- modelFamilies: ['gpt-5', 'gpt-6'],
75
- },
76
- {
77
- key: 'doubao',
78
- label: '火山引擎 · 豆包 Seed',
79
- baseUrl: 'https://ark.cn-beijing.volces.com/api/v3',
80
- modelName: 'doubao-seed-2-1-turbo-260628',
81
- modelFamily: 'doubao-seed',
82
- },
83
- { key: 'qwen', label: '阿里云 · 千问 Qwen', baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1', modelName: 'qwen3.7-plus', modelFamily: 'qwen3', modelFamilies: ['qwen3', 'qwen3-vl', 'qwen2.5-vl'] },
84
- { key: 'deepseek', label: 'DeepSeek', baseUrl: 'https://api.deepseek.com', modelName: 'deepseek-flash', modelFamily: 'deepseek' },
85
- { key: 'gemini', label: 'Google Gemini', baseUrl: 'https://generativelanguage.googleapis.com/v1beta/openai/', modelName: 'gemini-3.5-flash', modelFamily: 'gemini' },
86
- { key: 'kimi', label: '月之暗面 · Kimi', baseUrl: 'https://api.moonshot.cn/v1', modelName: 'kimi-k3', modelFamily: 'kimi3', modelFamilies: ['kimi3', 'kimi'] },
87
- { key: 'mimo', label: '小米 · MiMo', baseUrl: 'https://api.xiaomimimo.com/v1', modelName: 'mimo-v2.6-pro', modelFamily: 'xiaomi-mimo' },
88
- { key: 'glm', label: '智谱 BigModel · GLM-V(国内)', baseUrl: 'https://open.bigmodel.cn/api/paas/v4', modelName: 'glm-5v-turbo', modelFamily: 'glm-v' },
89
- { key: 'glm-global', label: '智谱 Z.AI · GLM-V(国际)', baseUrl: 'https://api.z.ai/api/paas/v4', modelName: 'glm-5v-turbo', modelFamily: 'glm-v' },
90
- { key: 'autoglm', label: '智谱 BigModel · AutoGLM(国内)', baseUrl: 'https://open.bigmodel.cn/api/paas/v4', modelName: 'autoglm-phone', modelFamily: 'auto-glm', modelFamilies: ['auto-glm', 'auto-glm-multilingual'], hint: '模型名称以平台实际名称为准;aiAssert / aiQuery 等页面理解任务需另外配置 Insight 模型。' },
91
- { key: 'autoglm-global', label: '智谱 Z.AI · AutoGLM(国际)', baseUrl: 'https://api.z.ai/api/paas/v4', modelName: 'autoglm-phone', modelFamily: 'auto-glm', modelFamilies: ['auto-glm', 'auto-glm-multilingual'], hint: '模型名称以平台实际名称为准;aiAssert / aiQuery 等页面理解任务需另外配置 Insight 模型。' },
92
- { key: 'ui-tars', label: '火山引擎 · UI-TARS', baseUrl: 'https://ark.cn-beijing.volces.com/api/v3', modelName: '', modelFamily: 'vlm-ui-tars-doubao-1.5', modelFamilies: ['vlm-ui-tars', 'vlm-ui-tars-doubao', 'vlm-ui-tars-doubao-1.5'], hint: '请在 Model Name 中填写已部署 UI-TARS 的推理接入点 ID(ep-…)或实际模型名称。' },
93
- ];
94
-
95
- type MidsceneModelConfig = { provider: MidsceneModelProvider; baseUrl: string; apiKey: string; name: string; family: string };
96
-
97
- export function selectMidsceneModelProvider(provider: MidsceneModelProvider, current: MidsceneModelConfig, custom: Omit<MidsceneModelConfig, 'provider'>): MidsceneModelConfig {
98
- if (provider === 'codex') return { ...codexMidsceneModel };
99
- if (provider === 'custom') return { ...custom, provider };
100
- const preset = midsceneModelPresets.find(item => item.key === provider);
101
- if (!preset) return current;
102
- return { ...current, provider, baseUrl: preset.baseUrl, name: preset.modelName, family: preset.modelFamily };
103
- }
@@ -1,10 +0,0 @@
1
- export const promptDocument = `# 示例 App 登录测试
2
-
3
- 进入目标 App 后,按以下规则处理启动阶段弹窗,这一步必须执行点击动作,不要只判断弹窗是否存在:若弹出位置、存储、相机、麦克风、通知等权限申请弹窗,点击允许;若弹出“声明与条款”、用户协议、隐私政策、服务协议弹窗,点击同意、接受或我已阅读并同意;若弹出广告、活动、版本更新、评分、通知引导等与登录无关的弹窗,点击关闭、跳过、稍后再说或取消。
4
-
5
- 弹窗处理完成后,确认页面已经稳定停留在目标 App 的登录页、手机号登录页、账号密码登录页,或显示可进入登录流程的入口。页面上不应存在遮挡登录操作的权限、协议、广告、更新或活动弹窗;如果仍存在遮挡弹窗,脚本应失败而不是显示执行完成。
6
-
7
- 提交登录后,再处理一次登录后的遮挡弹窗:若出现版本升级、广告、活动、评分、通知引导、登录后协议或权限弹窗,点击关闭、跳过、稍后再说、取消、同意或允许;如果没有弹窗则保持当前状态。不要点击首页业务内容、添加设备入口、底部导航或退出登录;如果是强制升级且没有关闭、取消或稍后按钮,不要点击立即更新。
8
-
9
- 最后等待首页或主界面稳定显示,页面应出现设备列表、添加设备入口、底部导航、用户头像或我的页面入口等首页核心元素之一,并且没有版本升级、广告、活动、评分或通知引导弹窗遮挡首页。
10
- `;
@@ -1,172 +0,0 @@
1
- import { promptDocument } from './prompt-example';
2
-
3
- export type PromptPreset = {
4
- id: string;
5
- name: string;
6
- description: string;
7
- content: string;
8
- };
9
-
10
- export const defaultPromptPresetId = 'general';
11
-
12
- export const promptPresets: PromptPreset[] = [
13
- {
14
- id: defaultPromptPresetId,
15
- name: '通用提示词',
16
- description: '当前默认提示词,适合启动、登录和常规流程',
17
- content: promptDocument.trim(),
18
- },
19
- {
20
- id: 'ads',
21
- name: '广告测试',
22
- description: '开屏、插屏、Banner、激励视频等广告链路',
23
- content: `# 广告相关测试
24
-
25
- 目标:测试 App 中的广告展示、跳过、关闭、点击跳转或奖励发放链路,包括开屏广告、插屏广告、Banner 广告、信息流广告和激励视频广告。
26
-
27
- 生成脚本时请遵循:
28
- 1. 广告素材、广告标识、倒计时、跳过按钮、关闭按钮、领取奖励按钮、奖励到账提示都是本用例的被测目标,不要把它们当作干扰弹窗自动关闭。
29
- 2. 只有权限申请、升级提示、登录态失效、与广告无关的活动弹窗遮挡广告入口或断言时,才生成单独步骤处理。
30
- 3. 每个 Midscene 指令只做一件事:进入页面、触发广告、等待广告出现、读取广告信息、点击跳过/关闭/领取奖励、等待结果分别拆成独立步骤。
31
- 4. 对可见且确定的按钮使用 aiTap;需要等待广告加载、倒计时结束或奖励提示时使用 aiWaitFor;需要读取广告标题、跳转文案、倒计时数字或奖励数量时使用 aiQuery、aiString 或 aiNumber。
32
- 5. 如果测试开屏广告,先启动 App 并等待开屏广告或首页稳定出现;如果没有广告且需求要求必须展示广告,最终步骤应失败,不要自动改为首页成功。
33
- 6. 如果测试激励广告,播放期间不要跳过视频;等待视频播放完成后点击领取、关闭或确认奖励,并等待奖励到账、余额变化或业务页面返回。
34
- 7. 最终成功判定必须是正向、可观察的界面结果,例如“出现广告标识和素材”“广告关闭后回到原页面”“奖励到账提示出现”“点击广告后进入落地页”。`,
35
- },
36
- {
37
- id: 'form',
38
- name: '表单填写',
39
- description: '注册、登录、资料、地址、反馈等表单提交',
40
- content: `# 表单填写测试
41
-
42
- 目标:测试 App 中表单页面的输入、选择、提交和结果验证流程。
43
-
44
- 生成脚本时请遵循:
45
- 1. 先进入目标 App 和目标表单页面,等待页面稳定显示字段、标题或提交按钮。
46
- 2. 输入、选择、勾选、上传、提交必须拆成独立步骤,不要用一条 aiAct 同时填写所有字段并提交。
47
- 3. aiInput 的 value 必须完全来自用户原始需求;不要改写、脱敏、补全或编造示例值。
48
- 4. 每个输入框定位要写清楚页面、字段名、附近文本或业务含义,例如“收货地址页中的联系人姓名输入框”。
49
- 5. 下拉选择、日期选择、单选、多选、开关等稳定可见控件优先用 aiTap;如果需要“未勾选才勾选”或“若有默认值则保持”,用单次 aiAct。
50
- 6. 提交后等待明确结果:成功提示、详情页、列表新增项、状态变更或错误提示;不要只判断按钮被点击。
51
- 7. 如果本用例测试校验失败,保留错误状态并读取或等待错误提示,不要自动修正输入继续提交。`,
52
- },
53
- {
54
- id: 'chat',
55
- name: '聊天对话',
56
- description: 'IM、客服、群聊、发送文本/图片/语音',
57
- content: `# 聊天对话测试
58
-
59
- 目标:测试 App 的聊天、客服或消息会话流程。
60
-
61
- 生成脚本时请遵循:
62
- 1. 先进入目标会话页面,等待会话标题、消息列表、输入框或发送按钮稳定显示。
63
- 2. 发送文本时使用独立 aiInput 定位消息输入框,再用 aiTap 点击发送按钮;不要把输入和发送合成一条泛化 aiAct。
64
- 3. 发送图片、表情、语音、文件等内容时,先打开对应入口,再选择素材或执行录制,最后等待消息气泡出现。
65
- 4. 聊天页中的表情面板、更多面板、语音录制浮层、图片预览、客服欢迎语可能是被测目标,不要当作干扰弹窗关闭。
66
- 5. 如果需要验证回复,使用 aiWaitFor 等待对方消息、客服回复、发送成功状态或已读状态;需要提取回复内容时使用 aiQuery 或 aiString。
67
- 6. 失败场景要保留失败提示,例如发送失败、网络异常、撤回提示,不要自动重试到成功,除非原始需求明确要求重试。
68
- 7. 最终成功判定必须落在可见消息、状态标签、会话列表更新或未读数变化上。`,
69
- },
70
- {
71
- id: 'player',
72
- name: '播放器测试',
73
- description: '播放、暂停、进度、横竖屏、清晰度、弹幕',
74
- content: `# 播放器相关测试
75
-
76
- 目标:测试 App 中视频、音频或直播播放器的播放控制和状态验证。
77
-
78
- 生成脚本时请遵循:
79
- 1. 播放器控件、播放/暂停按钮、进度条、全屏按钮、清晰度菜单、倍速菜单、弹幕开关、试看提示和广告贴片可能是被测目标,不要默认关闭。
80
- 2. 进入播放页后先等待播放器区域、标题或首帧稳定显示,再执行播放、暂停、拖动进度、切换清晰度或全屏等动作。
81
- 3. 明确按钮点击使用 aiTap;需要等待缓冲完成、播放开始、暂停状态、横屏完成或进度变化时使用 aiWaitFor。
82
- 4. 如果测试贴片广告或会员试看提示,保留广告或提示并验证展示、倒计时、跳过或购买入口;不要自动跳过。
83
- 5. 如果测试普通播放链路,只有与播放目标无关且遮挡操作的权限、升级、活动弹窗才可以单独处理。
84
- 6. 读取播放时长、当前进度、清晰度、倍速、标题或直播状态时使用 aiQuery、aiString 或 aiNumber,并描述它们在播放器中的位置。
85
- 7. 最终成功判定应是可观察状态,例如视频正在播放、按钮变为暂停、进度已变化、进入全屏、清晰度已切换或出现播放完成提示。`,
86
- },
87
- {
88
- id: 'search-list',
89
- name: '搜索列表',
90
- description: '搜索、筛选、排序、列表结果和详情页',
91
- content: `# 搜索和列表测试
92
-
93
- 目标:测试 App 中搜索、筛选、排序、列表加载和详情页进入流程。
94
-
95
- 生成脚本时请遵循:
96
- 1. 先进入搜索页或列表页,等待搜索框、筛选入口、列表区域或空状态稳定显示。
97
- 2. 输入搜索词使用 aiInput,提交搜索使用 aiTap 或键盘确认;筛选、排序、分类切换用独立步骤。
98
- 3. 搜索词、筛选条件、排序方式必须来自原始需求,不要自行替换成示例值。
99
- 4. 列表结果需要等待明确的可见信号,例如结果卡片、标题、价格、状态、空结果文案或加载完成提示。
100
- 5. 需要读取多个结果时使用 aiQuery,并指定返回字段;需要点击结果时明确“第一个/包含某文本/某状态”的目标。
101
- 6. 滚动加载只在需求明确需要更多结果时生成,且每次滚动后等待新内容出现。
102
- 7. 最终成功判定应是结果存在、空状态正确、筛选结果符合条件、排序生效或详情页核心信息可见。`,
103
- },
104
- {
105
- id: 'payment-order',
106
- name: '订单支付',
107
- description: '下单、确认订单、支付方式、订单状态',
108
- content: `# 订单和支付测试
109
-
110
- 目标:测试商品/服务选择、提交订单、支付方式选择和订单结果验证。
111
-
112
- 生成脚本时请遵循:
113
- 1. 进入商品、购物车、服务页或订单页后,等待核心信息稳定显示。
114
- 2. 选择规格、数量、地址、优惠券、支付方式、提交订单、确认支付分别拆成独立步骤。
115
- 3. 对真实支付、扣费、转账、提现、购买等高风险动作,只有原始需求明确要求执行时才生成点击确认支付;否则停在支付确认页并验证页面状态。
116
- 4. 金额、商品名、地址、优惠信息、支付方式等关键数据优先使用 aiQuery 或 aiString 读取后再进行可见结果验证。
117
- 5. 支付密码、验证码、短信码等敏感输入必须完全来自原始需求,不能编造。
118
- 6. 如果测试失败场景,等待并读取失败提示、库存不足、余额不足、风控提示或支付取消状态,不要自动换支付方式继续。
119
- 7. 最终成功判定应是订单提交成功、支付成功、订单状态变化、订单号出现或支付确认页信息正确。`,
120
- },
121
- {
122
- id: 'permission-popup',
123
- name: '权限弹窗',
124
- description: '系统权限、协议、升级、活动、引导页处理',
125
- content: `# 权限和弹窗测试
126
-
127
- 目标:测试 App 中权限申请、协议确认、升级提示、活动弹窗、引导页或业务弹窗的展示和处理。
128
-
129
- 生成脚本时请遵循:
130
- 1. 先判断弹窗是被测目标还是干扰遮挡:如果需求正在测试该弹窗,不要关闭;如果弹窗只是遮挡后续操作,才生成处理步骤。
131
- 2. 权限、协议、升级、活动、评分、通知引导等弹窗的按钮定位要写清楚,例如“权限弹窗中的允许按钮”“升级弹窗中的稍后再说按钮”。
132
- 3. 如果测试权限允许链路,点击允许后等待业务页面继续加载;如果测试拒绝链路,点击拒绝后等待错误提示、降级入口或权限引导页。
133
- 4. 如果测试强制升级,不能点击立即更新下载;等待并断言强制升级弹窗内容和按钮状态。
134
- 5. 如果测试活动或营销弹窗,保留弹窗并读取标题、活动文案、按钮或关闭入口;不要默认把它当广告关闭。
135
- 6. 条件式处理使用单次 aiAct,例如“如果出现无关弹窗则关闭,否则保持当前状态”;不要用 boolean 只判断不操作。
136
- 7. 最终成功判定应是弹窗内容正确、弹窗被正确关闭、权限结果生效或后续页面无遮挡。`,
137
- },
138
- {
139
- id: 'profile-settings',
140
- name: '个人设置',
141
- description: '个人资料、设置开关、账号安全、退出登录',
142
- content: `# 个人资料和设置测试
143
-
144
- 目标:测试 App 的个人中心、资料编辑、设置项、账号安全或退出登录流程。
145
-
146
- 生成脚本时请遵循:
147
- 1. 先进入个人中心或设置页面,等待页面标题、头像、昵称、设置列表或账号信息稳定显示。
148
- 2. 点击入口、编辑字段、切换开关、保存、返回验证分别拆成独立步骤。
149
- 3. 修改昵称、手机号、邮箱、签名等输入值必须来自原始需求,不要自行补全示例数据。
150
- 4. 开关类控件如果要求“打开/关闭到某状态”,使用条件式 aiAct 避免反向切换;如果只是点击明确开关,使用 aiTap。
151
- 5. 退出登录、注销账号、清除数据等高风险动作,只有原始需求明确要求时才执行;否则停在确认弹窗并验证。
152
- 6. 保存后等待正向结果,例如保存成功提示、资料页显示新值、设置状态变化或回到登录页。
153
- 7. 需要读取当前资料或设置状态时使用 aiQuery、aiString 或 aiBoolean,并要求返回可见文本或明确真假。`,
154
- },
155
- {
156
- id: 'webview-h5',
157
- name: 'H5/WebView',
158
- description: '内嵌网页、混合页、活动页和外链跳转',
159
- content: `# H5 和 WebView 测试
160
-
161
- 目标:测试 App 内嵌 H5、WebView、活动页、帮助页或外链跳转流程。
162
-
163
- 生成脚本时请遵循:
164
- 1. 先进入包含 H5/WebView 的页面,等待页面标题、加载完成标识、主要按钮或内容区域稳定显示。
165
- 2. WebView 内的页面加载、弹窗、登录态提示、活动浮层可能是被测目标,不要默认关闭;只有无关遮挡才处理。
166
- 3. 点击、输入、筛选、提交、返回 App 原生页面分别拆成独立步骤。
167
- 4. 如果页面内容异步加载,使用 aiWaitFor 等待可见内容,不要用固定等待替代明确状态。
168
- 5. 如果需要读取网页内容、订单号、协议文本、活动规则或按钮状态,使用 aiQuery、aiString 或 aiBoolean,并描述屏幕上可见的位置。
169
- 6. 如果测试外链跳转,等待目标页面标题、域名提示、浏览器选择页或返回入口;不要把跳转后的页面误判为失败。
170
- 7. 最终成功判定应是 H5 内容正确、交互结果正确、跳转成功或返回原 App 页面成功。`,
171
- },
172
- ];
@@ -1,75 +0,0 @@
1
- import { resolveReportSummary } from '../appium-recorder/report-summary';
2
- import { computed, onScopeDispose, shallowRef, watch } from 'vue';
3
- import type { ConfigForm } from '../types';
4
- import { isHexColor } from '../appium-recorder/flow-appearance';
5
- import { resolveAiDeduplication } from '../appium-recorder/ai-deduplication';
6
-
7
- // 串行提交最新快照,较慢的旧请求不会在新请求后覆盖配置。
8
- export function useAppiumAutoSave(config: ConfigForm, save: (value: Omit<ConfigForm['appium'], 'model' | 'promptOptimizer'>) => Promise<unknown>, onError: (error: unknown) => void) {
9
- const saving = shallowRef(false);
10
- const status = shallowRef('');
11
- const saved = shallowRef('');
12
- const initialized = shallowRef(false);
13
- const failed = shallowRef(false);
14
- let pending: string | undefined;
15
- let timer: ReturnType<typeof setTimeout> | undefined;
16
- // 模型只能通过“测试并保存”提交,自动保存仅观察其余设置。
17
- function snapshotSettings() {
18
- const { model: _model, promptOptimizer: _promptOptimizer, reportSummary, ...settings } = config.appium;
19
- return JSON.stringify({ ...settings, ...(reportSummary ? { reportSummary: {
20
- enabled: reportSummary.enabled,
21
- prompt: reportSummary.prompt,
22
- customPresets: reportSummary.customPresets,
23
- } } : {}) });
24
- }
25
- function initialize() { saved.value = snapshotSettings(); initialized.value = true; }
26
- const dirty = computed(() => initialized.value && snapshotSettings() !== saved.value);
27
- async function flush() {
28
- if (saving.value || pending === undefined) return;
29
- saving.value = true;
30
- try {
31
- while (pending !== undefined) {
32
- const snapshot = pending;
33
- pending = undefined;
34
- if (snapshot === saved.value) { status.value = '已自动保存'; continue; }
35
- status.value = '正在自动保存…';
36
- try {
37
- await save(JSON.parse(snapshot));
38
- saved.value = snapshot;
39
- failed.value = false;
40
- if (snapshotSettings() === snapshot) status.value = '已自动保存';
41
- } catch (error) {
42
- status.value = '自动保存失败,修改已保留';
43
- failed.value = true;
44
- onError(error);
45
- // 保留失败快照,等待显式重试或下次修改,避免离线时无限请求。
46
- pending = pending ?? snapshot;
47
- break;
48
- }
49
- }
50
- } finally { saving.value = false; }
51
- }
52
- function queue(snapshot: string) {
53
- if (!initialized.value) return;
54
- failed.value = false;
55
- clearTimeout(timer);
56
- pending = undefined;
57
- const value = config.appium;
58
- if ((value.flowBackgroundColor !== undefined && !isHexColor(value.flowBackgroundColor))
59
- || (value.flowNodeColor !== undefined && !isHexColor(value.flowNodeColor))
60
- || (value.flowNodeBorderColor !== undefined && !isHexColor(value.flowNodeBorderColor))
61
- || (value.flowLineColor !== undefined && !isHexColor(value.flowLineColor))) {
62
- status.value = '颜色格式有误,尚未保存';
63
- return;
64
- }
65
- try { resolveAiDeduplication(value.aiDeduplication); resolveReportSummary(value.reportSummary); }
66
- catch { status.value = '配置参数有误,尚未保存'; return; }
67
- pending = snapshot;
68
- status.value = '等待自动保存…';
69
- timer = setTimeout(() => { void flush(); }, 350);
70
- }
71
- watch(snapshotSettings, queue, { flush: 'sync' });
72
- function retry() { queue(snapshotSettings()); clearTimeout(timer); return flush(); }
73
- onScopeDispose(() => { clearTimeout(timer); pending = undefined; });
74
- return { initialize, saving, status, failed, dirty, retry };
75
- }