mobridge-mcp 0.10.1 → 0.10.3

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.
package/AI-USAGE.md CHANGED
@@ -46,6 +46,7 @@ After an install/update, connect waits for the companion to become ready (a few
46
46
  | DEVICE_UNAUTHORIZED | The phone has not accepted this computer's USB debugging key. | needs action | Ask the user to unlock the phone and accept the dialog, then retry `mobridge connect`. User: Unlock the phone and tap Allow on the "Allow USB debugging?" dialog (tick Always allow). |
47
47
  | MULTIPLE_DEVICES | More than one usable device is attached and none was chosen. | needs action | Pick one from `details.candidates` and pass it as deviceId (`-d ANDROID:<serial>`), or save it once with `mobridge device use <serial>`. |
48
48
  | AMBIGUOUS_DEVICE | Several devices are connected in this daemon and the call named none. | needs action | Pass `deviceId` (from `mobridge devices`) on every call; never guess one. |
49
+ | CAPTURE_SOURCE_MISMATCH | The frame size and the adb window topology do not describe the same screen. | self-heals / retry | Connect the named phone again with `-d ANDROID:<serial>`; nothing was tapped. |
49
50
  | DEVICE_BINDING_MISMATCH | The runtime socket answered for a different phone than the one named. | self-heals / retry | Run `mobridge connect -d ANDROID:<serial>` again; if it repeats run `mobridge doctor`. Nothing was driven. |
50
51
  | COMPANION_MISSING | The companion app is not installed and no APK was available. | needs action | Run `npx -y mobridge-mcp@latest install`, or set MSM_COMPANION_APK to the APK of this package. |
51
52
  | COMPANION_VERSION_MISMATCH | The installed companion is not the build this host expects. | self-heals / retry | Run `mobridge connect`; it updates the companion once. |
@@ -56,7 +57,8 @@ After an install/update, connect waits for the companion to become ready (a few
56
57
  | ACCESSIBILITY_DISABLED | The Accessibility service is off. | self-heals / retry | Run `mobridge connect`; it enables the service over adb and reads it back. |
57
58
  | ACCESSIBILITY_ENABLE_BLOCKED | The phone does not let adb enable the Accessibility service. | needs action | Show the user `userAction`, then run `mobridge connect --wait-user 120` to resume the moment it is on. User: Settings > Accessibility > MoBridge Runtime > On. Android 13+: first Settings > Apps > MoBridge Runtime > ⋮ > Allow restricted settings. Xiaomi: Developer options > USB debugging (Security settings). |
58
59
  | WAITING_FOR_USER_ACCESSIBILITY | Waiting for the person to turn Accessibility on; the wait window ended. | needs action | Ask the user to finish the step, then run `mobridge connect` again (it resumes; nothing is reinstalled). User: Settings > Accessibility > MoBridge Runtime > On. |
59
- | ACCESSIBILITY_PREEMPTED | The service is enabled but not bound; another owner took the session. | self-heals / retry | Wait a few seconds and run `mobridge connect`. |
60
+ | ACCESSIBILITY_PREEMPTED | The service is enabled but Android shows it unbound (the OEM killed it, or an install left it half-bound). | self-heals / retry | Run `mobridge connect`: it switches the service off and on once and retries. If it repeats, check `dumpsys accessibility` for another service or UiAutomation. |
61
+ | ACCESSIBILITY_CRASHED | Android lists the MoBridge accessibility service under Crashed services; it is not running even if it looks enabled. | self-heals / retry | Run `mobridge connect` (it toggles the service off and on). If it repeats, toggle MoBridge Runtime in Settings > Accessibility. |
60
62
  | EXTERNAL_INSTRUMENTATION_ACTIVE | Another tool holds UiAutomation (uiautomator, a test runner, another agent). | needs action | Fail fast: ask the user to stop the other tool, then `mobridge connect`. User: Stop the other automation tool on this phone. |
61
63
  | TRANSPORT_DEGRADED | The link to the phone dropped. | self-heals / retry | Retry the read; for a mutation check `mobridge operation status <operationId>` first. Prefer USB over wireless adb. |
62
64
  | WS_CONNECTION_LOST | The WebSocket to the companion closed. | self-heals / retry | Reads retry by themselves; a mutation reports RESULT_UNKNOWN, so look its operation up, never resend it. |
@@ -101,7 +103,7 @@ After an install/update, connect waits for the companion to become ready (a few
101
103
  - Semantic UI (find/click/type/scroll/BACK/HOME/wait) runs through Accessibility; package/process/permission/settings/log/perf run through ADB; opening an app, permission flows, notifications and ads are hybrid; canvas/games/unlabeled icons use vision.
102
104
  - With a clear goal call one act directly; find is only for checking or when ambiguous. Several steps: mobile.run/mobridge run or mobridge session --jsonl; one-shot CLI is for single operations only.
103
105
  - permission respond answers the dialog that is showing (resource-id, not pm grant); permission set changes state with pm grant/revoke and reads it back to verify. The two do not replace each other.
104
- - NEEDS_VISION: read the current capture (it has a captureId), pick a point on the image, then act CLICK {at:{captureId,x,y}} (dynamic UI such as ads/video: stalePolicy VISUAL_DYNAMIC); an old image gives STALE_CAPTURE. Never guess coordinates. Find by colour: capture {color:{hex}} → colorMatch. A control without a node: capture {scan:{}} → regionScan.regions[] (regionId, bounds, position, semanticNode, at): neutral facts that do not name the icon. Look at the image, choose a region, act CLICK {at}; if unsure it stays NEEDS_VISION, do not guess.
106
+ - NEEDS_VISION: read the current capture (it has a captureId), pick a point on the image, then act CLICK {at:{captureId,x,y}} (dynamic UI such as ads/video/countdown timers: stalePolicy VISUAL_DYNAMIC, act within 8 s); an old image gives STALE_CAPTURE. Never guess coordinates. Find by colour: capture {color:{hex}} → colorMatch. A control without a node: capture {scan:{}} → regionScan.regions[] (regionId, bounds, position, semanticNode, at): neutral facts that do not name the icon. Look at the image, choose a region, act CLICK {at}; if unsure it stays NEEDS_VISION, do not guess.
105
107
  - Do not change executor after a dispatch that may have run (timeout/dropped connection): the result is RESULT_UNKNOWN, look up the operation status, do not resend over ADB.
106
108
  - Do not use raw adb when a typed command exists. mobridge capabilities [--family F] lists each op's executor, replay class and verification.
107
109