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,74 +0,0 @@
1
- import type { AppiumRecordedStep } from './types';
2
-
3
- export const MAX_LOOP_ITERATIONS = 10000;
4
- export const defaultLoopConfig = () => ({ maxIterations: 3, exitWhen: 'never' as const });
5
-
6
- export function validateLoop(step: AppiumRecordedStep) {
7
- const config = step.loop;
8
- if (!config || !Number.isInteger(config.maxIterations) || config.maxIterations < 1 || config.maxIterations > MAX_LOOP_ITERATIONS) {
9
- throw new Error(`循环最大次数必须是 1-${MAX_LOOP_ITERATIONS} 的整数`);
10
- }
11
- if (!['never', 'exists', 'notExists'].includes(config.exitWhen)) throw new Error('循环退出条件无效');
12
- if (config.exitWhen !== 'never' && (!step.selector?.value?.trim() || !['id', 'accessibilityId', 'xpath', 'androidUiAutomator'].includes(step.selector.strategy))) {
13
- throw new Error('请设置循环退出条件的元素定位内容');
14
- }
15
- return config;
16
- }
17
-
18
- // Branch ownership, not array adjacency, determines the innermost active loop.
19
- export function enclosingLoop(steps: readonly AppiumRecordedStep[], step: AppiumRecordedStep): AppiumRecordedStep | undefined {
20
- return enclosingLoops(steps, step)[0];
21
- }
22
-
23
- export function enclosingLoops(steps: readonly AppiumRecordedStep[], step: AppiumRecordedStep): AppiumRecordedStep[] {
24
- const loops: AppiumRecordedStep[] = [];
25
- const byId = new Map(steps.map((item) => [item.id, item]));
26
- const seen = new Set<string>();
27
- let current = step;
28
- while (current.flow?.parentConditionId) {
29
- const parent = byId.get(current.flow.parentConditionId);
30
- if (!parent || seen.has(parent.id)) break;
31
- seen.add(parent.id);
32
- if (parent.type === 'loop' && current.flow.parentBranch === 'yes') loops.push(parent);
33
- current = parent;
34
- }
35
- return loops;
36
- }
37
-
38
- export function breakLoopTarget(steps: readonly AppiumRecordedStep[], step: AppiumRecordedStep) {
39
- const loops = enclosingLoops(steps, step);
40
- const target = step.breakLoopTargetId ? loops.find((loop) => loop.id === step.breakLoopTargetId) : loops[0];
41
- if (!target) throw new Error('退出循环目标必须是当前节点所属的循环体,目标可能已删除或不在当前分支');
42
- return target;
43
- }
44
-
45
- export function continueLoopTarget(steps: readonly AppiumRecordedStep[], step: AppiumRecordedStep) {
46
- const loops = enclosingLoops(steps, step);
47
- const target = step.continueLoopTargetId ? loops.find((loop) => loop.id === step.continueLoopTargetId) : loops[0];
48
- if (!target) throw new Error('继续循环目标必须是当前节点所属的循环体,目标可能已删除或不在当前分支');
49
- return target;
50
- }
51
-
52
- export function validateLoopSteps(steps: readonly AppiumRecordedStep[]) {
53
- if (!steps.some((step) => ['loop', 'breakLoop', 'continueLoop'].includes(step.type))) return;
54
- const byId = new Map(steps.map((step) => [step.id, step]));
55
- if (byId.size !== steps.length) throw new Error('流程节点 ID 重复');
56
- for (const step of steps) {
57
- let current: AppiumRecordedStep | undefined = step;
58
- const seen = new Set<string>();
59
- while (current) {
60
- if (seen.has(current.id)) throw new Error('流程分支归属存在循环');
61
- seen.add(current.id);
62
- const id: string | undefined = current.flow?.parentConditionId;
63
- if (id && !byId.has(id)) throw new Error('流程分支所属节点不存在');
64
- current = id ? byId.get(id) : undefined;
65
- }
66
- if (step.type === 'loop') validateLoop(step);
67
- if (step.type === 'breakLoop') breakLoopTarget(steps, step);
68
- if (step.type === 'continueLoop') continueLoopTarget(steps, step);
69
- if (step.type === 'loop' && step.flow?.yesTargetId) {
70
- const target = byId.get(step.flow.yesTargetId);
71
- if (!target || target.flow?.parentConditionId !== step.id || target.flow.parentBranch !== 'yes') throw new Error('循环入口必须指向所属循环体');
72
- }
73
- }
74
- }
@@ -1,41 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, ref } from 'vue';
3
- import type { AiPromptPreset } from '../ai-prompt-presets';
4
- const props = defineProps<{ modelValue: string; presets: readonly AiPromptPreset[]; disabled?: boolean; placeholder?: string }>();
5
- const selectedPreset = computed(() => props.presets.find(preset => preset.prompt === props.modelValue));
6
- const dropdownOpen = ref(false);
7
- const emit = defineEmits<{ 'update:modelValue': [value: string]; change: [value: string] }>();
8
- function selectPreset(value: string) {
9
- const preset = props.presets.find(preset => preset.name === value);
10
- if (!preset) return;
11
- emit('update:modelValue', preset.prompt);
12
- emit('change', preset.prompt);
13
- }
14
- </script>
15
-
16
- <template>
17
- <div class="recognition-prompt-input">
18
- <el-tooltip :disabled="!selectedPreset || dropdownOpen" :show-after="300" placement="top">
19
- <template #content><div class="recognition-preset-detail">{{ selectedPreset?.prompt }}</div></template>
20
- <el-select :model-value="selectedPreset?.name" :disabled="disabled" filterable placeholder="选择测试场景,或在下方输入" aria-label="选择测试场景" @change="selectPreset" @visible-change="dropdownOpen = $event">
21
- <el-option v-for="preset in presets" :key="preset.name" :label="preset.name" :value="preset.name" class="recognition-preset-option">
22
- <el-tooltip :show-after="300" placement="right">
23
- <template #content><div class="recognition-preset-detail">{{ preset.prompt }}</div></template>
24
- <span class="recognition-preset-name">{{ preset.name }}</span>
25
- </el-tooltip>
26
- </el-option>
27
- <template #empty><div class="recognition-preset-empty">暂无匹配的预设,可在 AI 识别配置中添加</div></template>
28
- </el-select>
29
- </el-tooltip>
30
- <el-input :model-value="modelValue" type="textarea" :rows="3" maxlength="4000" :placeholder="placeholder" :disabled="disabled" @update:model-value="emit('update:modelValue', $event)" @change="emit('change', $event)" />
31
- </div>
32
- </template>
33
-
34
- <style scoped>
35
- .recognition-prompt-input { width: 100%; }
36
- .recognition-prompt-input .el-select { width: 100%; margin-bottom: 10px; }
37
- .recognition-preset-name { display: block; }
38
- .recognition-preset-detail { max-width: min(360px, calc(100vw - 40px)); white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
39
- .recognition-preset-option { height: auto; min-height: 34px; white-space: normal; line-height: 1.6; padding-top: 8px; padding-bottom: 8px; overflow-wrap: anywhere; }
40
- .recognition-preset-empty { padding: 12px; color: var(--el-text-color-secondary); font-size: 12px; }
41
- </style>
@@ -1,251 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed, inject, onBeforeUnmount, ref, shallowRef, watch } from 'vue';
3
- import { Loading, QuestionFilled } from '@element-plus/icons-vue';
4
- import { isAiBranchEnabled, validateAiRecognitionPrompt, DEFAULT_AI_OBSERVATION, validateAiObservation, type AiObservationConfig } from '../ai-recognition';
5
- import { optimizeAppiumPrompt, validateAiBranchQuestion } from '../api';
6
- import { flowBranchLabel } from '../flow-labels';
7
- import type { AppiumRecordedStep } from '../types';
8
- import { aiPromptPresetsKey, DEFAULT_AI_PROMPT_PRESETS } from '../ai-prompt-presets';
9
- import AiRecognitionPromptInput from './AiRecognitionPromptInput.vue';
10
-
11
- const props = defineProps<{ step: AppiumRecordedStep; steps: AppiumRecordedStep[]; disabled?: boolean }>();
12
- const emit = defineEmits<{ update: [patch: Partial<AppiumRecordedStep>] }>();
13
- const prompt = ref(props.step.value || '');
14
- const promptPresets = inject(aiPromptPresetsKey, ref(DEFAULT_AI_PROMPT_PRESETS));
15
- const busy = ref(false);
16
- const optimizingPrompt = shallowRef(false);
17
- const error = ref('');
18
- const branch = computed(() => isAiBranchEnabled(props.step));
19
- const untilMatch = computed(() => props.step.aiObservation?.mode === 'untilMatch');
20
- const branchChoice = ref(branch.value);
21
- const fallbackEnabled = shallowRef(Boolean(props.step.aiInvalidResultBranch));
22
- const activeSections = ref<string[]>(['prompt']);
23
- const observationSummary = computed(() => {
24
- if (!props.step.aiObservation) return '单帧识别';
25
- const mode = props.step.aiObservation.mode === 'untilMatch' ? '命中即结束' : '统一分析';
26
- return `${mode} · ${props.step.aiObservation.durationMs / 1000} 秒`;
27
- });
28
- const branchSummary = computed(() => {
29
- if (!branch.value) return '未启用';
30
- if (!props.step.aiInvalidResultBranch) return '已启用';
31
- return `已启用 · 无效结果进入${props.step.aiInvalidResultBranch === 'yes' ? '左侧' : '右侧'}`;
32
- });
33
- watch(branch, value => { branchChoice.value = value; });
34
- watch(() => props.step.aiInvalidResultBranch, value => { fallbackEnabled.value = Boolean(value); });
35
- let controller: AbortController | undefined;
36
- let optimizeController: AbortController | undefined;
37
- watch(() => props.step.value, value => { prompt.value = value || ''; });
38
- onBeforeUnmount(() => { controller?.abort(); optimizeController?.abort(); });
39
-
40
- function updateObservation(patch: Partial<AiObservationConfig>) {
41
- try {
42
- const aiObservation = validateAiObservation({ ...DEFAULT_AI_OBSERVATION, ...props.step.aiObservation, ...patch });
43
- error.value = '';
44
- emit('update', { aiObservation });
45
- } catch (cause) { error.value = cause instanceof Error ? cause.message : '持续观察配置无效'; }
46
- }
47
-
48
- async function toggleBranch(enabled: boolean) {
49
- branchChoice.value = enabled;
50
- await save(enabled);
51
- branchChoice.value = branch.value;
52
- }
53
-
54
- function toggleFallback(enabled: boolean) {
55
- fallbackEnabled.value = enabled;
56
- error.value = '';
57
- if (!enabled) emit('update', { aiInvalidResultBranch: undefined });
58
- }
59
-
60
- async function optimizePrompt() {
61
- if (busy.value || optimizingPrompt.value || props.disabled) return;
62
- error.value = '';
63
- optimizeController = new AbortController();
64
- optimizingPrompt.value = true;
65
- let optimized = '';
66
- try {
67
- optimized = (await optimizeAppiumPrompt({
68
- kind: 'aiRecognition',
69
- prompt: prompt.value,
70
- condition: branch.value || untilMatch.value,
71
- }, optimizeController.signal)).prompt;
72
- prompt.value = optimized;
73
- } catch (cause) {
74
- if (!optimizeController.signal.aborted) error.value = cause instanceof Error ? cause.message : '提示词优化失败';
75
- } finally {
76
- optimizingPrompt.value = false;
77
- }
78
- if (optimized) await save(branch.value);
79
- }
80
-
81
- async function save(enabled: boolean, observation?: AiObservationConfig) {
82
- if (busy.value || props.disabled) return;
83
- error.value = '';
84
- if (!enabled && branch.value && (props.step.flow?.yesTargetId || props.step.flow?.noTargetId
85
- || props.steps.some(step => step.flow?.parentConditionId === props.step.id))) {
86
- error.value = '请先移除当前 AI 节点的子分支,再关闭分支模式';
87
- return;
88
- }
89
- controller = new AbortController();
90
- const signal = controller.signal;
91
- busy.value = true;
92
- try {
93
- const value = validateAiRecognitionPrompt(prompt.value);
94
- if (enabled || (observation ?? props.step.aiObservation)?.mode === 'untilMatch') {
95
- const validation = await validateAiBranchQuestion(value, signal);
96
- if (!validation.result) {
97
- const reason = validation.reason || '提示词不是可直接判断 true/false 的封闭条件';
98
- throw new Error(`${enabled ? '无法进入分支' : '命中条件无效'}:${reason}\n开放式输出包括:输出时长或时间点、列举或提取内容、描述画面、说明失败原因或判断依据,以及指定“XX秒”“HH:MM:SS”“播放失败”等格式。\n修改建议:删除额外输出要求,只保留一个可回答“是/否”的判断问题及其成立、不成立条件;需要详细内容时请关闭分支并使用普通识别。`);
99
- }
100
- }
101
- if (signal.aborted) return;
102
- emit('update', { value, aiBranchEnabled: enabled, ...(observation ? { aiObservation: observation } : {}), flow: { ...props.step.flow, nodeKind: enabled ? 'condition' : 'action' } });
103
- } catch (cause) {
104
- if (!signal.aborted) error.value = `${cause instanceof Error ? cause.message : '问题验证失败'}(未保存本次修改)`;
105
- } finally { busy.value = false; }
106
- }
107
- </script>
108
-
109
- <template>
110
- <div class="ai-recognition-settings">
111
- <el-collapse v-model="activeSections" class="ai-recognition-settings__groups">
112
- <el-collapse-item name="prompt">
113
- <template #title>
114
- <span class="ai-recognition-settings__group-title"><strong>识别内容</strong><small>{{ prompt.trim() ? '已填写' : '未填写' }}</small></span>
115
- </template>
116
- <el-form-item :label="untilMatch ? '命中条件' : '识别内容'">
117
- <template #label>
118
- <span class="recognition-label">{{ untilMatch ? '命中条件' : '识别内容' }}
119
- <el-tooltip v-if="untilMatch" placement="top" :show-after="200">
120
- <template #content><div class="recognition-help-content">填写能用“是 / 否”判断的具体条件,例如“当前画面是否出现广告弹窗?”。模型判断为“是”即命中并提前结束观察;修改条件后需验证并保存。“广告内容是什么”等开放式问题请使用统一分析模式。</div></template>
121
- <el-button class="recognition-help" text :icon="QuestionFilled" aria-label="命中条件说明" @click.prevent />
122
- </el-tooltip>
123
- </span>
124
- </template>
125
- <AiRecognitionPromptInput v-model="prompt" :presets="promptPresets" :placeholder="untilMatch ? '例如:当前画面是否出现广告弹窗?' : ''" :disabled="disabled || busy || optimizingPrompt" @change="error = ''; !branch && !untilMatch && save(false)" />
126
- <div class="recognition-prompt-actions">
127
- <el-button :loading="optimizingPrompt" :disabled="disabled || busy || !prompt.trim()" @click="optimizePrompt">优化提示词</el-button>
128
- <el-button v-if="(branch || untilMatch) && prompt !== step.value" :disabled="disabled || busy || optimizingPrompt" @click="save(branch)">验证并保存问题</el-button>
129
- </div>
130
- </el-form-item>
131
- </el-collapse-item>
132
-
133
- <el-collapse-item name="observation">
134
- <template #title>
135
- <span class="ai-recognition-settings__group-title"><strong>观察设置</strong><small>{{ observationSummary }}</small></span>
136
- </template>
137
- <el-form-item label="识别方式">
138
- <template #label>
139
- <span class="recognition-label">识别方式
140
- <el-tooltip placement="top" :show-after="200">
141
- <template #content><div class="recognition-help-content">单帧识别:截取当前画面并分析。持续观察:按采样间隔连续截图,判断目标是否在观察期间出现过。建议紧接启动 App 或触发广告的操作放置本节点。</div></template>
142
- <el-button class="recognition-help" text :icon="QuestionFilled" aria-label="识别方式说明" @click.prevent />
143
- </el-tooltip>
144
- </span>
145
- </template>
146
- <el-radio-group :model-value="Boolean(step.aiObservation)" :disabled="disabled || busy" @update:model-value="emit('update', { aiObservation: $event ? { ...DEFAULT_AI_OBSERVATION } : undefined }); error = ''">
147
- <el-radio-button :value="false">单帧识别</el-radio-button>
148
- <el-radio-button :value="true">持续观察</el-radio-button>
149
- </el-radio-group>
150
- </el-form-item>
151
- <template v-if="step.aiObservation">
152
- <el-form-item label="观察模式">
153
- <template #label>
154
- <span class="recognition-label">观察模式
155
- <el-tooltip placement="top" :show-after="200">
156
- <template #content>
157
- <div class="recognition-help-content">
158
- <p>观察结束后统一分析:完成采样后,将保留的截图一次提交给模型。</p>
159
- <p>检测命中后提前结束:采样期间逐次识别,确认命中后停止观察并执行下一节点;启用分支时走“是”分支。达到最长观察时间后停止采样,等待剩余关键帧判断,未命中则继续下一节点或走“否”分支。</p>
160
- <p>最多采样 30 帧,实际速度取决于设备,截图按去重配置保留。观察时长与模型请求超时分别计时;提前结束模式可能多次调用模型,实际结束时间包含模型等待,识别错误不会视为未命中。</p>
161
- </div>
162
- </template>
163
- <el-button class="recognition-help" text :icon="QuestionFilled" aria-label="观察模式说明" @click.prevent />
164
- </el-tooltip>
165
- </span>
166
- </template>
167
- <el-radio-group :model-value="step.aiObservation.mode ?? 'batch'" :disabled="disabled || busy" @update:model-value="$event === 'untilMatch' ? save(branch, { ...step.aiObservation!, mode: 'untilMatch' }) : updateObservation({ mode: 'batch' })">
168
- <el-radio-button value="batch">观察结束后统一分析</el-radio-button>
169
- <el-radio-button value="untilMatch">检测命中后提前结束</el-radio-button>
170
- </el-radio-group>
171
- </el-form-item>
172
- <div class="ai-recognition-settings__grid">
173
- <el-form-item :label="untilMatch ? '最长观察时间 ms' : '观察时长 ms'">
174
- <el-input-number :model-value="step.aiObservation.durationMs" :min="1000" :max="60000" :step="1000" :disabled="disabled || busy" controls-position="right" @change="updateObservation({ durationMs: $event })" />
175
- </el-form-item>
176
- <el-form-item label="采样间隔 ms">
177
- <el-input-number :model-value="step.aiObservation.intervalMs" :min="500" :max="10000" :step="500" :disabled="disabled || busy" controls-position="right" @change="updateObservation({ intervalMs: $event })" />
178
- </el-form-item>
179
- </div>
180
- </template>
181
- </el-collapse-item>
182
-
183
- <el-collapse-item name="branch">
184
- <template #title>
185
- <span class="ai-recognition-settings__group-title"><strong>分支设置</strong><small>{{ branchSummary }}</small></span>
186
- </template>
187
- <el-form-item class="ai-recognition-settings__toggles">
188
- <div class="ai-recognition-settings__toggle-row">
189
- <el-checkbox :model-value="branchChoice" :disabled="disabled || busy" @update:model-value="toggleBranch($event === true)">启用分支</el-checkbox>
190
- <template v-if="branch">
191
- <el-checkbox :model-value="fallbackEnabled" :disabled="disabled || busy" @update:model-value="toggleFallback($event === true)">启用兜底</el-checkbox>
192
- <el-tooltip placement="top" :show-after="200">
193
- <template #content><div class="recognition-help-content">仅在模型返回空内容、无效格式、无法判断或没有返回 true/false 时生效。正常返回布尔结果时仍按识别结果进入分支;请求失败和超时不使用此兜底。</div></template>
194
- <el-button class="recognition-help" text :icon="QuestionFilled" aria-label="AI 识别兜底说明" @click.prevent />
195
- </el-tooltip>
196
- </template>
197
- </div>
198
- <span v-if="busy" class="validation-status" role="status">
199
- <el-icon class="is-loading" aria-hidden="true"><Loading /></el-icon>
200
- 正在验证…
201
- </span>
202
- </el-form-item>
203
- <el-form-item v-if="branch && fallbackEnabled" label="兜底分支">
204
- <el-select :model-value="step.aiInvalidResultBranch || ''" :disabled="disabled || busy" placeholder="请选择左右分支" @update:model-value="emit('update', { aiInvalidResultBranch: $event })">
205
- <el-option :label="`进入左侧分支(${flowBranchLabel(step, 'yes')})`" value="yes" />
206
- <el-option :label="`进入右侧分支(${flowBranchLabel(step, 'no')})`" value="no" />
207
- </el-select>
208
- </el-form-item>
209
- </el-collapse-item>
210
-
211
- <el-collapse-item title="节点信息与超时设置" name="other">
212
- <slot name="other" />
213
- </el-collapse-item>
214
- </el-collapse>
215
- <el-alert v-if="error" :title="error" type="warning" :closable="false" show-icon />
216
- </div>
217
- </template>
218
-
219
- <style scoped>
220
- .recognition-label { display: inline-flex; align-items: center; gap: 4px; }
221
- .recognition-help { width: 28px; height: 28px; padding: 0; font-size: 16px; }
222
- .recognition-help-content { max-width: min(360px, calc(100vw - 40px)); line-height: 1.6; overflow-wrap: anywhere; }
223
- .recognition-help-content p { margin: 0 0 8px; }
224
- .recognition-help-content p:last-child { margin-bottom: 0; }
225
- .recognition-prompt-actions { display: flex; justify-content: flex-end; gap: 6px; width: 100%; margin-top: 6px; }
226
- .recognition-prompt-actions .el-button + .el-button { margin-left: 0; }
227
- .ai-recognition-settings { min-width: 0; }
228
- .ai-recognition-settings :deep(.el-form-item) { margin-bottom: 10px; }
229
- .ai-recognition-settings__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
230
- .ai-recognition-settings__grid :deep(.el-form-item) { min-width: 0; }
231
- .ai-recognition-settings__grid :deep(.el-input-number) { width: 100%; }
232
- .ai-recognition-settings__toggle-row { display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px; }
233
- .ai-recognition-settings__toggle-row :deep(.el-checkbox) { margin-right: 0; }
234
- .ai-recognition-settings__toggles :deep(.el-form-item__content) { align-items: center; }
235
- .ai-recognition-settings__groups { overflow: hidden; border: 1px solid var(--el-border-color-lighter); border-radius: 10px; background: var(--ui-surface); }
236
- .ai-recognition-settings__groups :deep(.el-collapse-item__header) { height: 42px; padding: 0 10px; border-bottom-color: var(--el-border-color-lighter); font-size: 12px; }
237
- .ai-recognition-settings__groups :deep(.el-collapse-item__wrap) { border-bottom-color: var(--el-border-color-lighter); }
238
- .ai-recognition-settings__groups :deep(.el-collapse-item:last-child .el-collapse-item__header),
239
- .ai-recognition-settings__groups :deep(.el-collapse-item:last-child .el-collapse-item__wrap) { border-bottom: 0; }
240
- .ai-recognition-settings__groups :deep(.el-collapse-item__content) { padding: 8px 10px 2px; }
241
- .ai-recognition-settings__group-title { display: flex; align-items: center; justify-content: space-between; min-width: 0; width: 100%; padding-right: 8px; gap: 8px; }
242
- .ai-recognition-settings__group-title strong { color: var(--ui-text); font-size: 12px; }
243
- .ai-recognition-settings__group-title small { min-width: 0; overflow: hidden; color: var(--ui-text-muted); font-size: 11px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
244
- .el-alert :deep(.el-alert__title) { white-space: pre-line; line-height: 1.6; }
245
- .validation-status {
246
- display: inline-flex;
247
- align-items: center;
248
- gap: 6px;
249
- margin-left: 8px;
250
- }
251
- </style>
@@ -1,86 +0,0 @@
1
- <script setup lang="ts">
2
- import { onBeforeUnmount, onMounted, shallowRef } from 'vue';
3
- import { Refresh } from '@element-plus/icons-vue';
4
- import { testAiRecognition } from '../api';
5
- import { AI_MODEL_CONFIG_HINT, validateAiRecognitionPrompt, isAiBranchEnabled } from '../ai-recognition';
6
- import type { AppiumRecordedStep } from '../types';
7
-
8
- const props = defineProps<{ step: AppiumRecordedStep; deviceId: string; modelConfigured: boolean }>();
9
- defineEmits<{ close: [] }>();
10
- const loading = shallowRef(false);
11
- const error = shallowRef('');
12
- const result = shallowRef<Awaited<ReturnType<typeof testAiRecognition>> | null>(null);
13
- let controller: AbortController | undefined;
14
-
15
- async function runTest() {
16
- if (loading.value) return;
17
- error.value = '';
18
- result.value = null;
19
- controller = new AbortController();
20
- loading.value = true;
21
- try {
22
- if (!props.modelConfigured) throw new Error(AI_MODEL_CONFIG_HINT);
23
- if (!props.deviceId) throw new Error('请选择设备');
24
- const prompt = validateAiRecognitionPrompt(props.step.value);
25
- result.value = await testAiRecognition({ deviceId: props.deviceId, prompt, timeoutMs: props.step.timeoutMs, aiTimeoutEnabled: props.step.aiTimeoutEnabled === true, aiBranchEnabled: isAiBranchEnabled(props.step), aiObservation: props.step.aiObservation }, controller.signal);
26
- } catch (cause) {
27
- if (!controller.signal.aborted) error.value = cause instanceof Error ? cause.message : 'AI 识别测试失败';
28
- } finally {
29
- loading.value = false;
30
- }
31
- }
32
-
33
- onMounted(runTest);
34
- onBeforeUnmount(() => controller?.abort());
35
- </script>
36
-
37
- <template>
38
- <el-dialog :model-value="true" title="测试 AI 识别" width="min(560px, calc(100vw - 32px))" append-to-body @close="$emit('close')">
39
- <div class="ai-recognition-test" aria-live="polite">
40
- <p class="ai-recognition-test__prompt">{{ step.value }}</p>
41
- <el-alert v-if="error" type="error" :title="error" :closable="false" show-icon />
42
- <p v-if="loading">{{ step.aiObservation?.mode === 'untilMatch' ? `边观察边检测中…(最长采样 ${step.aiObservation.durationMs / 1000} 秒,命中即结束,未命中需等待剩余识别)` : step.aiObservation ? `持续观察并分析中…(观察 ${step.aiObservation.durationMs / 1000} 秒,之后等待模型返回)` : '识别中…' }}</p>
43
- <template v-if="result">
44
- <div class="ai-recognition-test__result">
45
- <strong>{{ result.result === null ? '识别完成' : String(result.result) }}</strong>
46
- <span>{{ result.durationMs }}ms</span>
47
- </div>
48
- <p>{{ result.reason }}</p>
49
- <template v-if="result.observation">
50
- <p v-if="result.observation.completion">{{ result.observation.completion === 'matched' ? '检测命中,已结束观察' : '观察结束,未命中条件' }} · 模型请求 {{ result.observation.modelRequestCount }} 次</p>
51
- <p>实际观察 {{ (result.observation.durationMs / 1000).toFixed(1) }} 秒,采集 {{ result.observation.sampleCount ?? result.observation.frames.length }} 帧,提交模型 {{ result.observation.frames.length }} 帧</p>
52
- <p v-if="result.observation.deduplicationMethod">去重方式:{{ result.observation.deduplicationMethod === 'none' ? '不去重' : result.observation.deduplicationMethod === 'opencv' ? 'OpenCV(SSIM)' : 'pixelmatch' }};下方为实际提交画面。</p>
53
- <div class="ai-observation-frames">
54
- <figure v-for="(frame, index) in result.observation.frames" :key="index">
55
- <el-image :src="frame.imageDataUrl" :preview-src-list="result.observation.frames.map(item => item.imageDataUrl)" :initial-index="index" preview-teleported fit="contain" :alt="`观察第 ${index + 1} 帧`" />
56
- <figcaption>第 {{ index + 1 }} 帧 · {{ (frame.elapsedMs / 1000).toFixed(1) }}s</figcaption>
57
- </figure>
58
- </div>
59
- </template>
60
- <el-image
61
- v-else-if="result.imageBase64"
62
- class="ai-recognition-test__image" fit="contain"
63
- :src="`data:image/png;base64,${result.imageBase64}`"
64
- :preview-src-list="[`data:image/png;base64,${result.imageBase64}`]"
65
- preview-teleported alt="AI 识别使用的设备截图"
66
- />
67
- </template>
68
- </div>
69
- <template #footer>
70
- <el-button @click="$emit('close')">关闭</el-button>
71
- <el-button type="primary" :icon="Refresh" :loading="loading" :disabled="!modelConfigured || !deviceId" @click="runTest">重新测试</el-button>
72
- </template>
73
- </el-dialog>
74
- </template>
75
-
76
- <style scoped>
77
- .ai-observation-frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; max-height: 360px; overflow-y: auto; }
78
- .ai-observation-frames figure { margin: 0; }
79
- .ai-observation-frames .el-image { width: 100%; height: 140px; }
80
- .ai-observation-frames figcaption { font-size: 12px; text-align: center; }
81
- .ai-recognition-test { overflow-wrap: anywhere; }
82
- .ai-recognition-test__prompt { white-space: pre-wrap; margin-top: 0; }
83
- .ai-recognition-test__result { display: flex; align-items: center; gap: 16px; }
84
- .ai-recognition-test__result strong { font-size: 20px; }
85
- .ai-recognition-test__image { display: block; width: 100%; height: 280px; }
86
- </style>
@@ -1,23 +0,0 @@
1
- <script setup lang="ts">
2
- import type { AppiumRecordedStep } from '../types';
3
- import { flowBranchLabel } from '../flow-labels';
4
- defineProps<{ step: AppiumRecordedStep; disabled?: boolean }>();
5
- defineEmits<{ update: [value: NonNullable<AppiumRecordedStep['timeoutBranch']>] }>();
6
- </script>
7
-
8
- <template>
9
- <el-form-item label="超时后处理">
10
- <el-select class="branch-timeout-select" size="small" popper-class="branch-timeout-popper" :model-value="step.timeoutBranch || 'stop'" :disabled="disabled" @update:model-value="$emit('update', $event)">
11
- <el-option label="未配置分支(超时终止)" value="stop" />
12
- <el-option :label="`进入左侧分支(${flowBranchLabel(step, 'yes')})`" value="yes" />
13
- <el-option :label="`进入右侧分支(${flowBranchLabel(step, 'no')})`" value="no" />
14
- </el-select>
15
- </el-form-item>
16
- </template>
17
-
18
- <style>
19
- .el-select.branch-timeout-select { width: 240px; max-width: 100%; flex: none; }
20
- .branch-timeout-popper .el-select-dropdown__list { padding: 4px 0; }
21
- .branch-timeout-popper .el-select-dropdown__item { height: 28px; line-height: 28px; padding: 0 12px; font-size: 12px; }
22
- .branch-timeout-popper .el-select-dropdown__item.is-selected { color: var(--el-color-primary); }
23
- </style>
@@ -1,45 +0,0 @@
1
- <script setup lang="ts">
2
- import { computed } from 'vue';
3
- import type { AppiumRecordedStep } from '../types';
4
- import { enclosingLoops } from '../bounded-loop';
5
-
6
- const props = defineProps<{
7
- step: AppiumRecordedStep;
8
- steps: AppiumRecordedStep[];
9
- disabled?: boolean;
10
- mode?: 'break' | 'continue';
11
- }>();
12
- const emit = defineEmits<{ update: [patch: Partial<AppiumRecordedStep>] }>();
13
- const loops = computed(() => enclosingLoops(props.steps, props.step));
14
- const isContinue = computed(() => props.mode === 'continue');
15
- const fieldLabel = computed(() => isContinue.value ? '继续目标循环' : '退出目标循环');
16
- const targetId = computed(() => (
17
- isContinue.value ? props.step.continueLoopTargetId : props.step.breakLoopTargetId
18
- ) || loops.value[0]?.id);
19
-
20
- function updateTarget(value: string) {
21
- emit('update', isContinue.value
22
- ? { continueLoopTargetId: value }
23
- : { breakLoopTargetId: value });
24
- }
25
- </script>
26
-
27
- <template>
28
- <el-form-item :label="fieldLabel">
29
- <el-select class="break-loop-target" popper-class="break-loop-target-popper" :model-value="targetId" :disabled="disabled" :aria-label="fieldLabel" @update:model-value="updateTarget">
30
- <el-option class="break-loop-target-option" v-for="(loop, index) in loops" :key="loop.id" :value="loop.id" :label="`${loop.label}(${index === 0 ? '当前循环' : `外层 ${index}`} · 节点 ${steps.findIndex(item => item.id === loop.id) + 1})`" />
31
- </el-select>
32
- </el-form-item>
33
- </template>
34
-
35
- <style scoped>
36
- .break-loop-target { width: 100%; min-width: 0; }
37
- .break-loop-target :deep(.el-select__wrapper) { height: auto; min-height: 36px; }
38
- .break-loop-target :deep(.el-select__placeholder) {
39
- position: relative; top: auto; transform: none; z-index: 0; pointer-events: none;
40
- white-space: normal; overflow-wrap: anywhere; line-height: 22px;
41
- }
42
- .break-loop-target :deep(.el-select__input-wrapper) { position: absolute; width: 100%; }
43
- .break-loop-target-option { height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; white-space: normal; overflow-wrap: anywhere; line-height: 22px; }
44
- :global(.break-loop-target-popper) { max-width: calc(100vw - 32px); }
45
- </style>
@@ -1,33 +0,0 @@
1
- <script setup lang="ts">
2
- import { Refresh } from '@element-plus/icons-vue';
3
- import type { AppiumNode } from '../types';
4
- import ComponentTree from './ComponentTree.vue';
5
- import NodeDetail from './NodeDetail.vue';
6
- defineProps<{ tree: AppiumNode | null; node: AppiumNode | null; activity: string; loading: boolean; disabled: boolean; recording: boolean }>();
7
- defineEmits<{ refresh: []; select: [node: AppiumNode] }>();
8
- </script>
9
-
10
- <template>
11
- <el-card shadow="never" class="appium-recorder-card component-inspector">
12
- <template #header><div class="panel-header"><span>App 组件树</span><el-tooltip content="刷新组件树" placement="top" :show-after="200"><el-button class="recorder-panel-tool" :icon="Refresh" size="small" aria-label="刷新组件树" :loading="loading" :disabled="disabled" @click="$emit('refresh')" /></el-tooltip></div></template>
13
- <ComponentTree :tree="tree" :selected-id="node?.id || ''" @select="$emit('select', $event)" />
14
- <NodeDetail :node="node" :current-activity="activity" :loading="recording" />
15
- <div class="component-inspector__activity">
16
- <span>Activity</span>
17
- <el-tooltip :content="activity" :disabled="!activity" placement="top" effect="dark" :show-after="200"
18
- :popper-style="{ maxWidth: 'min(480px, calc(100vw - 24px))', overflowWrap: 'anywhere', fontSize: '12px' }">
19
- <code :tabindex="activity ? 0 : undefined">{{ activity || '-' }}</code>
20
- </el-tooltip>
21
- </div>
22
- </el-card>
23
- </template>
24
-
25
- <style scoped>
26
- .component-inspector :deep(> .el-card__body) { display: flex; flex-direction: column; overflow: hidden; gap: 8px; }
27
- .component-inspector :deep(.appium-tree-container) { flex: 1; min-height: 0; }
28
- .component-inspector :deep(.appium-node-summary) { flex: none; }
29
- .panel-header { font-size: 14px; gap: 4px; }
30
- .component-inspector__activity { flex: none; display: flex; min-width: 0; gap: 6px; padding-top: 8px; border-top: 1px solid var(--ui-border); font-size: 12px; color: var(--ui-text-secondary); }
31
- .component-inspector__activity > span { flex-shrink: 0; }
32
- .component-inspector__activity code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
33
- </style>