mobile-debug-mcp 0.31.0 → 0.32.1
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/README.md +1 -0
- package/dist/interact/android.js +13 -8
- package/dist/interact/index.js +33 -22
- package/dist/interact/ios.js +5 -2
- package/dist/manage/android.js +20 -10
- package/dist/manage/ios.js +19 -10
- package/dist/observe/android-tree-bridge.js +192 -0
- package/dist/observe/android.js +53 -14
- package/dist/observe/index.js +22 -5
- package/dist/observe/ios.js +50 -29
- package/dist/observe/performance-metrics.js +124 -0
- package/dist/observe/snapshot-metadata.js +94 -15
- package/dist/server/common.js +14 -7
- package/dist/server/journey-schema.js +60 -0
- package/dist/server/tool-definitions.js +59 -6
- package/dist/server/tool-handlers.js +381 -56
- package/dist/server-core.js +1 -1
- package/dist/utils/exec.js +18 -5
- package/dist/utils/ios/utils.js +5 -2
- package/dist/utils/operation-budget.js +25 -0
- package/dist/utils/resolve-device.js +12 -1
- package/dist/utils/timing.js +19 -0
- package/dist/utils/ui/index.js +2 -0
- package/docs/CHANGELOG.md +6 -0
- package/docs/ROADMAP.md +9 -0
- package/docs/benchmarks/interaction-latency/README.md +26 -0
- package/docs/benchmarks/interaction-latency/final.json +1810 -0
- package/docs/benchmarks/interaction-latency/final.md +17 -0
- package/docs/benchmarks/interaction-latency/ios-validation.md +11 -0
- package/docs/benchmarks/ui-tree-performance/README.md +51 -0
- package/docs/benchmarks/ui-tree-performance/baseline.json +59546 -0
- package/docs/benchmarks/ui-tree-performance/bridge-probe.json +28 -0
- package/docs/benchmarks/ui-tree-performance/candidate.json +51691 -0
- package/docs/benchmarks/ui-tree-performance/comparison-attempt-1.json +110679 -0
- package/docs/benchmarks/ui-tree-performance/comparison.json +111230 -0
- package/docs/benchmarks/ui-tree-performance/comparison.md +41 -0
- package/docs/benchmarks/ui-tree-performance/initial-baseline.json +59560 -0
- package/docs/specs/018-interaction-latency-and-batched-journeys/spec.md +301 -0
- package/docs/specs/019-ui-tree-observation-performance/spec.md +148 -0
- package/docs/tools/interact.md +30 -0
- package/docs/tools/observe.md +1 -0
- package/package.json +1 -1
- package/skills/mobile-debug-tools-usage/SKILL.md +74 -0
- package/src/interact/android.ts +13 -8
- package/src/interact/index.ts +32 -23
- package/src/interact/ios.ts +5 -2
- package/src/manage/android.ts +19 -10
- package/src/manage/ios.ts +18 -10
- package/src/observe/android-tree-bridge.ts +170 -0
- package/src/observe/android.ts +48 -17
- package/src/observe/index.ts +21 -5
- package/src/observe/ios.ts +49 -36
- package/src/observe/performance-metrics.ts +125 -0
- package/src/observe/snapshot-metadata.ts +94 -15
- package/src/server/common.ts +13 -6
- package/src/server/journey-schema.ts +63 -0
- package/src/server/tool-definitions.ts +60 -7
- package/src/server/tool-handlers.ts +349 -54
- package/src/server-core.ts +1 -1
- package/src/types.ts +31 -2
- package/src/utils/exec.ts +13 -5
- package/src/utils/ios/utils.ts +5 -2
- package/src/utils/operation-budget.ts +22 -0
- package/src/utils/resolve-device.ts +13 -1
- package/src/utils/timing.ts +15 -0
- package/src/utils/ui/index.ts +2 -0
- package/test/device/automated/latency/benchmark.ts +136 -0
- package/test/device/automated/latency/report.ts +6 -0
- package/test/device/automated/ui-tree-performance/benchmark.ts +401 -0
- package/test/device/automated/ui-tree-performance/bridge-probe.ts +183 -0
- package/test/fixtures/latency-journey-app/AndroidManifest.xml +7 -0
- package/test/fixtures/latency-journey-app/README.md +28 -0
- package/test/fixtures/latency-journey-app/build.ts +26 -0
- package/test/fixtures/latency-journey-app/src/MainActivity.java +104 -0
- package/test/fixtures/ui-tree-bridge/AndroidManifest.xml +6 -0
- package/test/fixtures/ui-tree-bridge/build.ts +34 -0
- package/test/fixtures/ui-tree-bridge/src/TreeInstrumentation.java +119 -0
- package/test/unit/manage/restart_budget.test.ts +37 -0
- package/test/unit/observe/android_tree_acquisition.test.ts +70 -0
- package/test/unit/observe/android_tree_bridge_cleanup.test.ts +76 -0
- package/test/unit/observe/capture_debug_snapshot.test.ts +6 -0
- package/test/unit/observe/ios_tree_acquisition.test.ts +77 -0
- package/test/unit/observe/performance_metrics.test.ts +40 -0
- package/test/unit/observe/snapshot_metadata.test.ts +20 -1
- package/test/unit/observe/state_delta.test.ts +15 -0
- package/test/unit/server/benchmark_report.test.ts +4 -0
- package/test/unit/server/contract.test.ts +1 -1
- package/test/unit/server/interaction_modes.test.ts +60 -0
- package/test/unit/server/operation_budget.test.ts +45 -0
- package/test/unit/server/response_shapes.test.ts +3 -3
- package/test/unit/server/run_journey.test.ts +120 -0
- package/test/unit/server/tap_selector.test.ts +68 -0
- /package/docs/{specs-deltas/001-state-verification.md → specs/001-state-verification/spec.md} +0 -0
- /package/docs/{specs-deltas/002-richer-element-identity → specs/002-richer-element-identity/spec.md} +0 -0
- /package/docs/{specs-deltas/003-wait-and-synchronization-reliability.md → specs/003-wait-and-synchronization-reliability/spec.md} +0 -0
- /package/docs/{specs-deltas/004-action-verification-routing.md → specs/004-action-verification-routing/spec.md} +0 -0
- /package/docs/{specs-deltas/005-unified-action-execution-and-verification-model.md → specs/005-unified-action-execution-and-verification-model/spec.md} +0 -0
- /package/docs/{specs-deltas/006-runtime-action-instrumentation-and-binding-layer.md → specs/006-runtime-action-instrumentation-and-binding-layer/spec.md} +0 -0
- /package/docs/{specs-deltas/007-actionability-resolution-and-executable-target-selection.md → specs/007-actionability-resolution-and-executable-target-selection/spec.md} +0 -0
- /package/docs/{specs-deltas/008-adjustable-control-support-and-semantic-value-manipulation.md → specs/008-adjustable-control-support-and-semantic-value-manipulation/spec.md} +0 -0
- /package/docs/{specs-deltas/009-semantic-control-modeling-for-custom-and-composite-controls.md → specs/009-semantic-control-modeling-for-custom-and-composite-controls/spec.md} +0 -0
- /package/docs/{specs-deltas/010-verification-stabilization-and-temporal-convergence.md → specs/010-verification-stabilization-and-temporal-convergence/spec.md} +0 -0
- /package/docs/{specs-deltas/011-recovery-and-replanning-for-failed-or-ambiguous-interaction-flows.md → specs/011-recovery-and-replanning-for-failed-or-ambiguous-interaction-flows/spec.md} +0 -0
- /package/docs/{specs-deltas/011.1-recovery-contract-types-and-runtime-wiring-spec.md → specs/011.1-recovery-contract-types-and-runtime-wiring-spec/spec.md} +0 -0
- /package/docs/{specs-deltas/012-action-trace-and-xecution-observability.md → specs/012-action-trace-and-xecution-observability/spec.md} +0 -0
- /package/docs/{specs-deltas/013-wait-and-synchronization-reliability.md → specs/013-wait-and-synchronization-reliability/spec.md} +0 -0
- /package/docs/{specs-deltas/014-actionability-resolution.md → specs/014-actionability-resolution/spec.md} +0 -0
- /package/docs/{specs-deltas/015-adjustable-control-support.md → specs/015-adjustable-control-support/spec.md} +0 -0
- /package/docs/{specs-deltas/016-environment-tools.md → specs/016-environment-tools/spec.md} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Interaction latency benchmark
|
|
2
|
+
|
|
3
|
+
Commit: d3e6ae720db1ad1da294795790689df5a80b56b0 (working tree candidate). Fixture: 1.0, SHA-256 98244deeeba0a21da7d99a3e4b43c97806d6f8a8787ad7fe38249e5d311a6fb6.
|
|
4
|
+
|
|
5
|
+
Environment: Pixel_9_Pro, Android 16, API 36. Three warm-ups and ten measured runs per mode. Failed runs excluded.
|
|
6
|
+
|
|
7
|
+
| Mode | p50 ms | p95 ms | Failures |
|
|
8
|
+
|---|---:|---:|---:|
|
|
9
|
+
| baseline | 124094.50754200004 | 124597.88916599983 | 0 |
|
|
10
|
+
| full | 87262.29954100028 | 88067.6383750001 | 0 |
|
|
11
|
+
| light | 51817.59008300025 | 53873.19891700009 | 0 |
|
|
12
|
+
|
|
13
|
+
First failure by mode: baseline: none; full: none; light: none.
|
|
14
|
+
|
|
15
|
+
Full p95 gate: true. Light p50 gate: true.
|
|
16
|
+
|
|
17
|
+
See final.json for requests, timing components, and failure selectors.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Spec 018 iOS device validation
|
|
2
|
+
|
|
3
|
+
Validated on 27 September 2026 with the booted iPhone Air simulator (iOS 26.4.1).
|
|
4
|
+
|
|
5
|
+
- `npm run test:device` passed all six Android and iOS screenshot, log, and UI-tree smoke checks.
|
|
6
|
+
- Over a spawned stdio MCP server, `start_app` launched Settings with `light`/`compact` and returned a fresh UI observation.
|
|
7
|
+
- A selector-based `tap_element` opened General with `light`/`compact`; its result included an available state delta.
|
|
8
|
+
- `run_journey` used two selector taps to return to General and open About, then asserted a visible `Model Name` label. All three steps passed with `light`/`compact`.
|
|
9
|
+
- A separate `full`/`debug` selector tap returned to General and reported a fresh observation. A `none`/`compact` selector tap reopened About without requesting post-action verification; a separate UI-tree read confirmed the destination.
|
|
10
|
+
|
|
11
|
+
The performance benchmark and its fixture are Android-only. These iOS checks exercised the interaction contract on a system app; they did not measure latency on an iOS app with network requests.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# UI tree observation performance benchmark
|
|
2
|
+
|
|
3
|
+
This paired Android benchmark compares a clean, built instrumentation baseline
|
|
4
|
+
with a clean, built candidate. It runs the Spec 018 static journey and a local
|
|
5
|
+
network-backed loading-to-ready flow against the same fixture APK and emulator.
|
|
6
|
+
The network flow asserts a run-unique value from a physical tree read that
|
|
7
|
+
started after the local server sent its response.
|
|
8
|
+
|
|
9
|
+
Capture the instrumented baseline first from a clean, built baseline checkout:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
UI_TREE_BASELINE_ROOT=/path/to/instrumented-baseline \
|
|
13
|
+
LATENCY_DEVICE_ID=emulator-5554 \
|
|
14
|
+
npx tsx test/device/automated/ui-tree-performance/benchmark.ts --baseline-only
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This writes `baseline.json`. After measuring and implementing an optimization,
|
|
18
|
+
run the paired comparison from the clean, built candidate checkout:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
UI_TREE_BASELINE_ROOT=/path/to/instrumented-baseline \
|
|
22
|
+
UI_TREE_CANDIDATE_ROOT=/path/to/optimized-candidate \
|
|
23
|
+
LATENCY_DEVICE_ID=emulator-5554 \
|
|
24
|
+
npx tsx test/device/automated/ui-tree-performance/benchmark.ts
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Add `--smoke --baseline-only` for one attempt per flow while checking the
|
|
28
|
+
fixture and emulator connection. Smoke mode writes no performance report and
|
|
29
|
+
does not satisfy the sample-count or acceptance gates.
|
|
30
|
+
|
|
31
|
+
Both input checkouts must contain `dist/server.js` and have clean Git working
|
|
32
|
+
trees. The harness checks both before installing or resetting the fixture. It
|
|
33
|
+
builds one APK from the candidate fixture and uses that exact APK in both modes.
|
|
34
|
+
Each flow and mode receives three warm-ups and ten measured attempts; baseline
|
|
35
|
+
and candidate order alternates by pair.
|
|
36
|
+
|
|
37
|
+
The paired run writes `baseline.json`, `candidate.json`, `comparison.json`, and
|
|
38
|
+
`comparison.md` here. Timing events are enabled only in the spawned benchmark
|
|
39
|
+
servers through `MOBILE_DEBUG_MCP_UI_TREE_METRICS=1`; normal MCP responses do
|
|
40
|
+
not gain timing fields. Events contain timings, platform, generated journey step
|
|
41
|
+
IDs, and opaque acquisition IDs. They omit UI contents, app identifiers,
|
|
42
|
+
screenshots, logs, payloads, and device serials. iOS latency remains unmeasured.
|
|
43
|
+
|
|
44
|
+
The checked-in `initial-baseline.json` is the standalone capture taken before
|
|
45
|
+
the optimization. The checked-in `baseline.json` is the baseline side of the
|
|
46
|
+
paired run, so it shares the fixture APK hash with `candidate.json`.
|
|
47
|
+
`comparison-attempt-1.json` retains an earlier paired run with two visible
|
|
48
|
+
network failures; see `comparison.md` for the outcome and limitation.
|
|
49
|
+
The report commit SHAs are available locally as `codex/spec-019-baseline` and
|
|
50
|
+
`codex/spec-019-candidate`; create clean, built checkouts of those refs to
|
|
51
|
+
reproduce the paired measurement.
|