mobridge-mcp 0.10.2 → 0.10.4

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.
@@ -59,7 +59,7 @@
59
59
  "required": ["query"],
60
60
  "description": "Locate the target and act in one call, instead of passing `target`. The query is resolved immediately before the action and re-resolved ONCE if the screen moved underneath, which closes the race the separate find-then-act pair leaves open. Matching several nodes is AMBIGUOUS_MATCH with candidates — it never picks one.",
61
61
  "properties": {
62
- "query": { "type": "object", "description": "SemanticQuery, same shape as mobile.screen.find." },
62
+ "query": { "type": "object", "additionalProperties": false, "minProperties": 1, "description": "SemanticQuery, same fields as mobile.screen.find (text/label may be a plain string). Unknown fields such as `index` or a node `id` are refused instead of silently matching every node.", "properties": { "role": { "type": "string" }, "text": {}, "label": {}, "resourceId": { "type": "string" }, "state": { "type": "object" }, "within": { "type": "object" }, "firstVisible": { "type": "boolean" }, "nth": { "type": "integer", "minimum": 0 } } },
63
63
  "actionable": { "type": "boolean", "default": true, "description": "Resolve to the nearest ACTIONABLE ancestor when the matched node cannot be acted on. Never climbs past an ancestor covering more than one match." },
64
64
  "waitMs": { "type": "integer", "minimum": 0, "maximum": 10000, "description": "How long to wait for a query that matches nothing YET before NODE_NOT_FOUND. Default 1500 (4000 behind a SystemUI overlay). 0 fails at once, for a target that is either there or not." }
65
65
  }
package/integrity.json CHANGED
@@ -1,4 +1,4 @@
1
1
  {
2
- "buildId": "2cfde9a-20261103171312",
3
- "bundleSha256": "fb33de05ca4e23a9c4b25a9661f08b928f050b3c06ab21221f3f7f2abf9ec1d7"
2
+ "buildId": "be44bc9-20261105164321",
3
+ "bundleSha256": "3afc7a177964510da34941c127a8fb1371e594b1302d96228315976732b88732"
4
4
  }
package/loader.cjs CHANGED
@@ -14,7 +14,7 @@ const os = require("node:os");
14
14
  const path = require("node:path");
15
15
  const crypto = require("node:crypto");
16
16
 
17
- const BUILD_ID = "2cfde9a-20261103171312"; // pack-npx stamps the real build id
17
+ const BUILD_ID = "be44bc9-20261105164321"; // pack-npx stamps the real build id
18
18
  const ROOT = __dirname; // package root (loader.cjs sits here)
19
19
  const DIST = path.join(ROOT, "dist");
20
20
  const BUNDLE = path.join(DIST, "main.obf.cjs");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mobridge-mcp",
3
- "version": "0.10.2",
3
+ "version": "0.10.4",
4
4
  "description": "MoBridge MCP — a stdio MCP server exposing on-device Android UIs as fast semantic read / observe / find / act / verify tools plus screenshots. Ships an installer that wires it into Claude Code, Claude Desktop, Cursor and Codex.",
5
5
  "keywords": [
6
6
  "mcp",
@@ -5,15 +5,15 @@
5
5
  },
6
6
  "mobridge-companion-setup": {
7
7
  "version": "1.1.0",
8
- "digest": "12a409e4d043a1c3"
8
+ "digest": "b2193b406c0d058a"
9
9
  },
10
10
  "mobridge-core": {
11
11
  "version": "1.0.1",
12
- "digest": "9a2823d9aa9e6eaf"
12
+ "digest": "fec1c7331dabe6db"
13
13
  },
14
14
  "mobridge-debugging": {
15
- "version": "1.0.1",
16
- "digest": "e7cdfa202cf19add"
15
+ "version": "1.0.2",
16
+ "digest": "e277e59f39d9f71f"
17
17
  },
18
18
  "mobridge-devices": {
19
19
  "version": "1.0.1",
@@ -24,6 +24,7 @@ The owner switches go back to their defaults (install and permissions on, protec
24
24
  | `COMPANION_VERSION_MISMATCH` persists | `mobridge connect` once more; if it repeats `mobridge doctor` |
25
25
  | `COMPANION_INSTALL_FAILED` | Free storage, check minimum SDK, retry |
26
26
  | The daemon runs an old build (`DAEMON_BUILD_MISMATCH`) | `mobridge daemon restart` |
27
+ | Android lists the service under "Crashed services" (often right after an upgrade), `ACCESSIBILITY_CRASHED` | `mobridge connect` switches the MoBridge service off and on once and retries; if it repeats, toggle MoBridge Runtime in Settings > Accessibility |
27
28
  | A stale forward points at another phone (`DEVICE_BINDING_MISMATCH`) | `mobridge connect -d ANDROID:<serial>`, then `mobridge doctor` |
28
29
  | Wrong APK picked up | Set `MSM_COMPANION_APK` to the APK inside this package, or reinstall with `npx -y mobridge-mcp@latest install` |
29
30
 
@@ -102,6 +102,9 @@ More fields and the query grammar: `references/queries.md`, `references/response
102
102
  | Fewer tokens, faster runs, parallel reads, burst capture | `mobridge-efficiency` |
103
103
  | Compose, WebView, native, games, test matrix | `mobridge-surfaces` |
104
104
 
105
+ - `mobridge analyze` classifies the current screen (login, list, dialog...) without a capture. `mobridge guide --short` prints the tool guide. `mobridge disconnect` ends the session and clears the device binding.
106
+ - `mobridge fallback prepare|commit|cancel` gives a single-use ADB token for an action the accessibility executor cannot do (state NEEDS_VISION or rejected); prepare binds it to the target, commit within 30 s, never after an unknown prior result.
107
+
105
108
  ## Verification
106
109
 
107
110
  - Success is a `VERIFIED` verdict on the action, or a fresh `observe` that shows the expected node. Never report success from `DISPATCHED`.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: mobridge-debugging
3
3
  description: Use when a MoBridge call fails, times out, is ambiguous, flaky or stuck, or returns an error.code
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  ---
6
6
 
7
7
  # MoBridge debugging
@@ -51,7 +51,8 @@ command you may run, a `Guidance:` line is something only the person can do. `do
51
51
  1. `RESULT_UNKNOWN`: the action may or may not have happened (the link dropped after dispatch). Do not resend.
52
52
  `mobridge operation status <operationId>`, then `mobridge screen observe`, then decide.
53
53
  2. `AMBIGUOUS_MATCH`: several nodes fit. Narrow with `--role`, `--nth`, `--within`, or `--resource-id`. Do not use the
54
- first candidate.
54
+ first candidate. `candidates` holds at most 5; `candidatesTruncated: true` means more exist, so narrow further.
55
+ 2b. `SCROLL_LOOP`: `find --scroll` ended while the list still scrolls. Raise `--max-scrolls` or narrow the query.
55
56
  3. `NODE_NOT_FOUND`: wrong text, wrong match mode or the node is off screen. Default match is `NORMALIZED_EXACT`;
56
57
  a longer on-screen string needs `CONTAINS`. Scroll with `mobridge find --text ... --scroll`. For a control with no
57
58
  text try `--label`. If the screen has no accessibility tree you get `VISION_REQUIRED`, not `NODE_NOT_FOUND`.
@@ -22,7 +22,8 @@ Every code below comes with `cause`, `recoverable`, `agentAction` and, when a pe
22
22
  | `ACCESSIBILITY_DISABLED` | The Accessibility service is off. | yes | Run `mobridge connect`; it enables the service over adb and reads it back. |
23
23
  | `ACCESSIBILITY_ENABLE_BLOCKED` | The phone does not let adb enable the Accessibility service. | no | 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). |
24
24
  | `WAITING_FOR_USER_ACCESSIBILITY` | Waiting for the person to turn Accessibility on; the wait window ended. | no | Ask the user to finish the step, then run `mobridge connect` again (it resumes; nothing is reinstalled). **User:** Settings > Accessibility > MoBridge Runtime > On. |
25
- | `ACCESSIBILITY_PREEMPTED` | The service is enabled but not bound; another owner took the session. | yes | Wait a few seconds and run `mobridge connect`. |
25
+ | `ACCESSIBILITY_PREEMPTED` | The service is enabled but Android shows it unbound (the OEM killed it, or an install left it half-bound). | yes | Run `mobridge connect`: it switches the service off and on once and retries. If it repeats, check `dumpsys accessibility` for another service or UiAutomation. |
26
+ | `ACCESSIBILITY_CRASHED` | Android lists the MoBridge accessibility service under Crashed services; it is not running even if it looks enabled. | yes | Run `mobridge connect` (it toggles the service off and on). If it repeats, toggle MoBridge Runtime in Settings > Accessibility. |
26
27
  | `EXTERNAL_INSTRUMENTATION_ACTIVE` | Another tool holds UiAutomation (uiautomator, a test runner, another agent). | no | Fail fast: ask the user to stop the other tool, then `mobridge connect`. **User:** Stop the other automation tool on this phone. |
27
28
  | `TRANSPORT_DEGRADED` | The link to the phone dropped. | yes | Retry the read; for a mutation check `mobridge operation status <operationId>` first. Prefer USB over wireless adb. |
28
29
  | `WS_CONNECTION_LOST` | The WebSocket to the companion closed. | yes | Reads retry by themselves; a mutation reports RESULT_UNKNOWN, so look its operation up, never resend it. |