adb-ready 0.2.0 → 0.3.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.
- package/CHANGELOG.md +97 -1
- package/README.md +42 -24
- package/dist/cli.js +3563 -816
- package/dist/cli.js.map +24 -20
- package/docs/agent-integration.md +31 -13
- package/docs/apps-and-evidence.md +9 -2
- package/docs/automation.md +43 -2
- package/docs/configuration.md +1 -1
- package/docs/dev-sessions.md +4 -0
- package/docs/logs-and-context.md +15 -0
- package/docs/troubleshooting.md +1 -0
- package/docs/ui-automation.md +84 -8
- package/examples/README.md +2 -0
- package/examples/capacitor/adb-ready.config.json +9 -0
- package/examples/flutter/adb-ready.config.json +9 -0
- package/llms.txt +14 -5
- package/package.json +4 -2
- package/schema/agent-tools-v1.json +2809 -166
- package/schema/config-v1.schema.json +93 -1
|
@@ -129,14 +129,21 @@ Ask the agent to follow this sequence:
|
|
|
129
129
|
1. Call `doctor` when host or ADB health is unknown.
|
|
130
130
|
2. Call `ensure_ready`; provide an exact device serial, configured alias, or
|
|
131
131
|
transport ID when more than one ready target exists.
|
|
132
|
-
3.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
3. Start the configured stack with `start_dev_session` when it is not already
|
|
133
|
+
running; retain its task handle and poll `get_dev_session` without holding a
|
|
134
|
+
tool call open.
|
|
135
|
+
4. Resolve the project app with `resolve_app`.
|
|
136
|
+
5. Use `inspect_app` or `inspect_ui` for bounded current evidence.
|
|
137
|
+
6. Perform one typed action, then inspect again instead of assuming success.
|
|
138
|
+
7. Use `get_session_problems` or `compile_debug_context` for an existing
|
|
136
139
|
development session.
|
|
137
140
|
|
|
138
|
-
The first successful `ensure_ready` binds one target to that MCP connection
|
|
139
|
-
|
|
141
|
+
The first successful `ensure_ready` binds one target to that MCP connection and
|
|
142
|
+
returns a `targetHandle`. Pass that handle to later target-bound calls when the
|
|
143
|
+
client supports workflow state. A stale or cross-connection handle is rejected,
|
|
144
|
+
and later tools cannot silently switch targets. When no ready target exists,
|
|
145
|
+
`ensure_ready` may reconnect an explicit network endpoint or the single
|
|
146
|
+
unambiguous paired service; it never guesses among multiple devices.
|
|
140
147
|
|
|
141
148
|
Tool calls within one MCP connection are executed in submission order. This
|
|
142
149
|
prevents parallel agent requests from interleaving target binding, UI snapshots,
|
|
@@ -147,10 +154,11 @@ or device mutations. Separate MCP connections remain independent.
|
|
|
147
154
|
| Capability | MCP tools |
|
|
148
155
|
| --- | --- |
|
|
149
156
|
| Host and target readiness | `doctor`, `list_targets`, `ensure_ready` |
|
|
157
|
+
| Durable development lifecycle | `start_dev_session`, `get_dev_session`, `stop_dev_session` |
|
|
150
158
|
| App identity and lifecycle | `resolve_app`, `install_app`, `launch_app`, `restart_app`, `open_url` |
|
|
151
159
|
| Current evidence | `inspect_app`, `inspect_ui`, `capture_screenshot` |
|
|
152
|
-
| Safe UI actions | `tap_ui`, `long_press_ui`, `swipe_ui`, `type_text_ui`, `press_key_ui`, `wait_for_ui` |
|
|
153
|
-
| Saved diagnostics | `get_session_problems`, `compile_debug_context` |
|
|
160
|
+
| Safe UI queries and actions | `audit_ui`, `get_ui`, `find_ui`, `assert_ui`, `compare_ui`, `tap_ui`, `long_press_ui`, `scroll_ui`, `swipe_ui`, `fill_ui`, `clear_ui`, `type_text_ui`, `press_key_ui`, `wait_for_ui` |
|
|
161
|
+
| Saved diagnostics | `list_sessions`, `get_session_problems`, `compile_debug_context` |
|
|
154
162
|
|
|
155
163
|
MCP resources keep larger read-only context outside tool calls:
|
|
156
164
|
|
|
@@ -162,12 +170,20 @@ MCP resources keep larger read-only context outside tool calls:
|
|
|
162
170
|
| `adb-ready://sessions/{sessionId}/events/{offset}/{limit}` | a page of up to 200 redacted events |
|
|
163
171
|
| `adb-ready://sessions/{sessionId}/context` | a bounded redacted Markdown context document |
|
|
164
172
|
|
|
165
|
-
|
|
166
|
-
|
|
173
|
+
Every tool advertises an output schema and returns the same versioned result
|
|
174
|
+
envelope used by CLI JSON output. Screenshot capture additionally returns MCP
|
|
175
|
+
`image` content so a vision-capable agent can inspect the pixels directly; the
|
|
176
|
+
verified project-local PNG remains the evidence source of record.
|
|
167
177
|
|
|
168
178
|
The npm package also ships `schema/agent-tools-v1.json`, generated from the
|
|
169
179
|
server's real `tools/list` response during every build. Integrations can inspect
|
|
170
|
-
version-matched input schemas
|
|
180
|
+
version-matched input and output schemas plus safety annotations without
|
|
181
|
+
starting ADB.
|
|
182
|
+
|
|
183
|
+
`list_sessions` is project-scoped by default and supports status, preset,
|
|
184
|
+
recency, and result-count filters. When more matches remain, pass its opaque
|
|
185
|
+
`nextCursor` back as `cursor`; an expired cursor fails explicitly instead of
|
|
186
|
+
silently restarting the list.
|
|
171
187
|
|
|
172
188
|
## Safety boundary
|
|
173
189
|
|
|
@@ -181,6 +197,8 @@ version-matched input schemas and safety annotations without starting ADB.
|
|
|
181
197
|
- Data clearing and uninstall are intentionally absent from the agent surface.
|
|
182
198
|
- Tool annotations help clients request approval, but ADB Ready enforces its
|
|
183
199
|
own target, path, and destructive-action rules.
|
|
200
|
+
- Durable development handles are random, project-scoped, heartbeat-checked,
|
|
201
|
+
and can signal only the owned managed process recorded for that handle.
|
|
184
202
|
- Nothing is uploaded by ADB Ready. The selected AI client controls what tool
|
|
185
203
|
results it sends to its model provider.
|
|
186
204
|
|
|
@@ -191,8 +209,8 @@ the complete trust model.
|
|
|
191
209
|
## Runtime alternatives
|
|
192
210
|
|
|
193
211
|
The published bundle is smoke-tested as an MCP stdio server under Node.js, Bun,
|
|
194
|
-
and Deno
|
|
195
|
-
runtime:
|
|
212
|
+
and Deno against the legacy 2025-11-25 and modern 2026-07-28 protocol eras.
|
|
213
|
+
Replace the command and arguments when Node.js is not your chosen runtime:
|
|
196
214
|
|
|
197
215
|
```text
|
|
198
216
|
Bun: bun ./node_modules/adb-ready/dist/cli.js mcp
|
|
@@ -48,14 +48,21 @@ User packages are the default. Enumeration and machine output are bounded.
|
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
adb-ready app install ./android/app/build/outputs/apk/debug/app-debug.apk --replace
|
|
51
|
+
adb-ready app install ./splits/base.apk ./splits/config.arm64_v8a.apk ./splits/config.en.apk
|
|
51
52
|
adb-ready app launch
|
|
52
53
|
adb-ready app restart
|
|
53
54
|
adb-ready app stop
|
|
54
55
|
adb-ready open 'myapp://orders/42' --package com.example.app
|
|
55
56
|
```
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
Pass all files from one split APK set together; ADB Ready uses Android's
|
|
59
|
+
`install-multiple` operation and verifies the installed package afterward.
|
|
60
|
+
Android App Bundles (`.aab`) and APK Set archives (`.apks`) are not directly
|
|
61
|
+
installable. Generate device-specific APKs with the Android build tool that
|
|
62
|
+
created them, then pass those `.apk` files explicitly.
|
|
63
|
+
|
|
64
|
+
- Installation accepts one ordinary APK or an explicit complete split APK set.
|
|
65
|
+
`.apks`, `.aab`, and implicit downloads are not accepted yet.
|
|
59
66
|
- Install, launch, stop, restart, and explicit deep-link handlers are checked
|
|
60
67
|
after ADB accepts the request.
|
|
61
68
|
- `restart` is a verified stop followed by a verified launch.
|
package/docs/automation.md
CHANGED
|
@@ -19,6 +19,14 @@ adb-ready logs --format ndjson --non-interactive
|
|
|
19
19
|
| `ndjson` | one versioned event per line, followed by the command result where applicable; saved timelines end with an event-count summary instead of duplicating the full event array |
|
|
20
20
|
| `markdown` | bounded diagnostic context; only valid for `context` |
|
|
21
21
|
|
|
22
|
+
Calling the root with `--json` returns a small product/capability overview. It
|
|
23
|
+
does not probe ADB or load project configuration, which makes it safe for an
|
|
24
|
+
agent or integration to identify the installed CLI first:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
adb-ready --json
|
|
28
|
+
```
|
|
29
|
+
|
|
22
30
|
Machine data is written to `stdout`. Human progress and diagnostics are written
|
|
23
31
|
to `stderr`. `--quiet` hides successful human output without hiding failures.
|
|
24
32
|
|
|
@@ -46,8 +54,8 @@ schema version.
|
|
|
46
54
|
The npm package includes two versioned public artifacts:
|
|
47
55
|
|
|
48
56
|
- `schema/config-v1.schema.json` validates project configuration; and
|
|
49
|
-
- `schema/agent-tools-v1.json` catalogs every MCP tool's generated input
|
|
50
|
-
|
|
57
|
+
- `schema/agent-tools-v1.json` catalogs every MCP tool's generated input and
|
|
58
|
+
output schemas plus safety annotations for the matching package version.
|
|
51
59
|
|
|
52
60
|
## Event envelope
|
|
53
61
|
|
|
@@ -117,6 +125,39 @@ adb-ready dev --port 8081 --dry-run --json
|
|
|
117
125
|
Plan steps declare their risk. A dry run performs no pairing, connection,
|
|
118
126
|
mapping, hook, or child-process mutation.
|
|
119
127
|
|
|
128
|
+
## Run one bounded verification
|
|
129
|
+
|
|
130
|
+
Use `run` when CI or an agent must prove a workflow and then exit instead of
|
|
131
|
+
leaving a development server open:
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
adb-ready run --preset expo --run-timeout 10m -- \
|
|
135
|
+
maestro '--device={target.serial}' test .maestro/smoke.yaml
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
ADB Ready selects and exclusively leases one target, prepares the configured
|
|
139
|
+
ports and development command, waits for every readiness assertion, runs the
|
|
140
|
+
exact command after `--`, and cleans only the resources it created. It never
|
|
141
|
+
retries a failed product assertion as if it were an infrastructure failure.
|
|
142
|
+
|
|
143
|
+
The literal `{target.serial}` inside a verification argument is replaced only
|
|
144
|
+
after ADB Ready selects and leases the target. The child also receives the
|
|
145
|
+
same value as `ANDROID_SERIAL` and `ADB_READY_TARGET_SERIAL`. This keeps tools
|
|
146
|
+
such as Maestro pinned explicitly without invoking a shell; tools that already
|
|
147
|
+
honor `ANDROID_SERIAL`, including common Gradle/ADB workflows, need no placeholder.
|
|
148
|
+
|
|
149
|
+
Every executed run prints the path to a project-local evidence directory under
|
|
150
|
+
`.adb-ready/artifacts/`. Its manifest references the structured result,
|
|
151
|
+
timeline, problems, focused logcat, bounded AI context, JUnit XML, and a concise
|
|
152
|
+
GitHub Actions summary. The evidence remains available when readiness or the
|
|
153
|
+
verification command fails.
|
|
154
|
+
|
|
155
|
+
Preview the complete project plan before a device is allocated:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
adb-ready run --preset expo --dry-run --json -- npm run test:e2e
|
|
159
|
+
```
|
|
160
|
+
|
|
120
161
|
## CI example
|
|
121
162
|
|
|
122
163
|
```yaml
|
package/docs/configuration.md
CHANGED
|
@@ -65,7 +65,7 @@ existing file unless `--force` is explicit. Use `--dry-run` first.
|
|
|
65
65
|
|
|
66
66
|
| Field | Values or shape |
|
|
67
67
|
| --- | --- |
|
|
68
|
-
| `preset` | `expo`, `react-native`, `gradle`, or `custom` |
|
|
68
|
+
| `preset` | `expo`, `react-native`, `flutter`, `capacitor`, `gradle`, or `custom` |
|
|
69
69
|
| `packageManager` | `npm`, `pnpm`, `yarn`, or `bun` |
|
|
70
70
|
| `command` | `{ "executable": string, "args": string[], "cwd"?: string }` |
|
|
71
71
|
| `reversePorts` | integers or `{ "device": number, "host"?: number }` objects |
|
package/docs/dev-sessions.md
CHANGED
|
@@ -10,6 +10,8 @@ local diagnostic record.
|
|
|
10
10
|
| --- | --- | --- | --- |
|
|
11
11
|
| Expo | `expo` dependency | project `start` script with `--android`, otherwise Expo CLI | `8081` |
|
|
12
12
|
| React Native | `react-native` dependency | project `android` script, otherwise React Native CLI | `8081` |
|
|
13
|
+
| Flutter | `pubspec.yaml` | `flutter run -d <selected-target>` | none |
|
|
14
|
+
| Capacitor | `@capacitor/android` or `@capacitor/core` dependency | Capacitor CLI for the selected target | none |
|
|
13
15
|
| Gradle | wrapper or Gradle build file | wrapper `installDebug` | none |
|
|
14
16
|
| Custom | explicit config or `--` | exact executable and argument array | none |
|
|
15
17
|
|
|
@@ -18,6 +20,8 @@ Select a preset when detection is intentionally unavailable or ambiguous:
|
|
|
18
20
|
```bash
|
|
19
21
|
adb-ready dev --preset expo
|
|
20
22
|
adb-ready dev --preset react-native --package-manager pnpm
|
|
23
|
+
adb-ready dev --preset flutter
|
|
24
|
+
adb-ready dev --preset capacitor
|
|
21
25
|
adb-ready dev --preset gradle --device emulator-5554
|
|
22
26
|
```
|
|
23
27
|
|
package/docs/logs-and-context.md
CHANGED
|
@@ -57,6 +57,18 @@ adb-ready sessions events SESSION_ID --format ndjson
|
|
|
57
57
|
adb-ready problems SESSION_ID
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
Find the useful run without scanning a long global list:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
adb-ready sessions list --status failed --since 24h --limit 5
|
|
64
|
+
adb-ready sessions list --preset expo
|
|
65
|
+
adb-ready sessions list --all-projects
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
History is scoped to the current project by default. Status, time, preset, and
|
|
69
|
+
count filters apply before output; `--all-projects` is an explicit escape hatch
|
|
70
|
+
for a machine-wide audit.
|
|
71
|
+
|
|
60
72
|
When the ID is omitted, the latest saved session is selected. Default retention
|
|
61
73
|
keeps at most 30 finalized sessions, 14 days, and 20 MiB. Active sessions are
|
|
62
74
|
not pruned as finalized history.
|
|
@@ -88,6 +100,9 @@ Available filters are `problems`, `recovery`, `logs`, `child`, `state`, `target`
|
|
|
88
100
|
and `ports`. The compiler prioritizes structured problems, failures, warnings,
|
|
89
101
|
recovery, and nearby diagnostic output within the requested character budget.
|
|
90
102
|
It reports how many events were filtered or omitted.
|
|
103
|
+
Repeated successful health checks are represented once with their count and
|
|
104
|
+
final timestamp. The stored NDJSON remains complete, so compact AI context does
|
|
105
|
+
not discard diagnostic evidence.
|
|
91
106
|
|
|
92
107
|
Use JSON when another local tool should consume the result envelope:
|
|
93
108
|
|
package/docs/troubleshooting.md
CHANGED
|
@@ -31,6 +31,7 @@ adb-ready context --since 5m --only problems,recovery,logs
|
|
|
31
31
|
| `MULTIPLE_WIRELESS_ENDPOINTS` | Discovery returned ambiguous services | Pass one exact `HOST:PORT` |
|
|
32
32
|
| `PORT_MAPPING_CONFLICT` | Another mapping owns the requested listen port | Inspect `ports ... list`; remove or change it explicitly |
|
|
33
33
|
| `LOG_PACKAGE_NOT_RUNNING` | Package filtering could not resolve a live process | Launch the app or use another package/PID |
|
|
34
|
+
| `UI_NOT_IDLE` | Android UI Automator could not observe a quiet accessibility window | Pause continuous UI changes or navigate to a stable screen, then retry |
|
|
34
35
|
| `SESSION_RECOVERY_FAILED` | The bounded target/port recovery budget was exhausted | Inspect `problems`, network state, and saved recovery events |
|
|
35
36
|
| `SESSION_PERSISTENCE_FAILED` | The private session record could not be written | Check user-state directory permissions and capacity |
|
|
36
37
|
| `CHILD_PROCESS_FAILED` | The project command exited unsuccessfully | Inspect child output, targeted logs, and preserved exit code |
|
package/docs/ui-automation.md
CHANGED
|
@@ -17,9 +17,38 @@ device still returns that same UI digest; after any screen change, inspect
|
|
|
17
17
|
again. Hierarchies and UI text are sensitive and are not persisted
|
|
18
18
|
automatically.
|
|
19
19
|
|
|
20
|
+
UI hierarchy capture has a 15-second default because Android's platform
|
|
21
|
+
UI Automator waits for a quiet accessibility window before returning data.
|
|
22
|
+
`UI_NOT_IDLE` means continuous animation or accessibility events prevented that
|
|
23
|
+
quiet window; pause the changing UI or navigate to a stable screen and retry.
|
|
24
|
+
ADB Ready does not silently disable device-wide animations.
|
|
25
|
+
|
|
26
|
+
## Audit one screen for people and agents
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
adb-ready ui audit --json --non-interactive
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
The audit reports enabled actionable nodes that have no visible text or
|
|
33
|
+
content description, and nodes that have no resource ID for a stable selector.
|
|
34
|
+
It returns the exact current references and attributes, plus bounded totals;
|
|
35
|
+
it deliberately does not invent a subjective quality score. A missing label is
|
|
36
|
+
an accessibility warning. A missing stable ID is an automation advisory—use a
|
|
37
|
+
resource ID or expose a Compose test tag through `testTagsAsResourceId` where
|
|
38
|
+
appropriate.
|
|
39
|
+
|
|
20
40
|
## Tap and long-press
|
|
21
41
|
|
|
22
|
-
|
|
42
|
+
For a unique stable label or resource ID, act directly by intent:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
adb-ready ui tap 'text=Continue'
|
|
46
|
+
adb-ready ui long-press 'id=com.example:id/item'
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
ADB Ready resolves a fresh hierarchy and refuses to guess when a selector has
|
|
50
|
+
zero or multiple matches. Prefer a current reference when the exact observed
|
|
51
|
+
snapshot matters:
|
|
23
52
|
|
|
24
53
|
```bash
|
|
25
54
|
adb-ready ui tap ui:7c4a31b8d2ef:14
|
|
@@ -37,24 +66,64 @@ adb-ready ui long-press 540 1200
|
|
|
37
66
|
ADB Ready rejects stale, disabled, non-actionable, missing-bounds, and
|
|
38
67
|
out-of-display targets before input is sent.
|
|
39
68
|
|
|
40
|
-
##
|
|
69
|
+
## Read and fill a specific field
|
|
70
|
+
|
|
71
|
+
Agents do not need to infer state from a large hierarchy or depend on whatever
|
|
72
|
+
field happens to be focused:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
adb-ready ui get 'id=com.example:id/email' --json
|
|
76
|
+
adb-ready ui fill 'id=com.example:id/email' 'person@example.com'
|
|
77
|
+
adb-ready ui fill 'id=com.example:id/search' 'pixel' --submit
|
|
78
|
+
adb-ready ui clear 'id=com.example:id/search'
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`get` requires one unambiguous match and returns its semantic values, state,
|
|
82
|
+
and bounds. `fill` and `clear` focus that exact enabled field, select its
|
|
83
|
+
existing value, replace it, then inspect the hierarchy again. A visible normal
|
|
84
|
+
field is successful only when its post-action value matches. Password and
|
|
85
|
+
custom fields can accept input without exposing their value; those calls stay
|
|
86
|
+
successful but report `verified: false` and `text-not-observable`, so the next
|
|
87
|
+
screen state should be asserted explicitly.
|
|
88
|
+
|
|
89
|
+
Safe replacement requires the target's Android `input keycombination`
|
|
90
|
+
capability. ADB Ready checks it before touching the screen and returns a
|
|
91
|
+
structured unsupported-capability problem on older targets rather than
|
|
92
|
+
appending to an unknown value.
|
|
93
|
+
|
|
94
|
+
## Scroll, swipe, type, and keys
|
|
41
95
|
|
|
42
96
|
```bash
|
|
43
97
|
adb-ready ui swipe up
|
|
44
98
|
adb-ready ui swipe 900 1200 180 1200
|
|
99
|
+
adb-ready ui scroll up 'id=com.example:id/results'
|
|
45
100
|
adb-ready ui type "person@example.com" --submit
|
|
46
101
|
adb-ready ui press back
|
|
47
102
|
```
|
|
48
103
|
|
|
49
104
|
Direction swipes use screen-relative points, so they work across display
|
|
50
|
-
sizes.
|
|
105
|
+
sizes. `scroll` can constrain that gesture to one enabled accessibility node
|
|
106
|
+
whose `scrollable` property is true; without a selector it uses the screen.
|
|
107
|
+
Supported keys are `back`, `home`, `enter`, `menu`, `volume-up`, and
|
|
51
108
|
`volume-down`.
|
|
52
109
|
|
|
53
110
|
Android's text-input command passes through a device shell. ADB Ready therefore
|
|
54
111
|
accepts only 1–256 ASCII letters, numbers, spaces, and `._@+,:/-`. Unsupported
|
|
55
112
|
characters are rejected instead of being reinterpreted by a shell.
|
|
56
113
|
|
|
57
|
-
##
|
|
114
|
+
## Find, assert, compare, and wait
|
|
115
|
+
|
|
116
|
+
Query or assert the current hierarchy without changing it:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
adb-ready ui find 'class=android.widget.Button' --json
|
|
120
|
+
adb-ready ui assert 'text=Signed in'
|
|
121
|
+
adb-ready ui assert 'text=Loading' --state gone
|
|
122
|
+
adb-ready ui compare 7c4a31b8d2ef0000000000000000000000000000000000000000000000000000
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
`compare` consumes the complete digest returned by inspection or another UI
|
|
126
|
+
action and reports whether the current hierarchy changed.
|
|
58
127
|
|
|
59
128
|
Waits use exact, explicit selectors:
|
|
60
129
|
|
|
@@ -65,7 +134,8 @@ adb-ready ui wait 'desc=Open settings'
|
|
|
65
134
|
adb-ready ui wait 'package=com.example.app'
|
|
66
135
|
```
|
|
67
136
|
|
|
68
|
-
|
|
137
|
+
Compact selector prefixes are `id=`, `text=`, `desc=`, `class=`, and
|
|
138
|
+
`package=`. The default
|
|
69
139
|
state is `visible`; timeouts are bounded from 100 ms to 2 minutes. Structured
|
|
70
140
|
results include the attempt count and the matched node summary.
|
|
71
141
|
|
|
@@ -79,6 +149,8 @@ adb-ready ui press back --json --non-interactive
|
|
|
79
149
|
- `ok: true` means Android accepted the allowlisted input operation.
|
|
80
150
|
- `verified: true` with `verification: "ui-changed"` means the hierarchy digest
|
|
81
151
|
changed afterward.
|
|
152
|
+
- `before.acquisitionDurationMs` and `after.acquisitionDurationMs` expose the
|
|
153
|
+
measured cost of each UI Automator snapshot instead of hiding slow devices.
|
|
82
154
|
- `verified: false` with `verificationGap: "ui-unchanged"` means the command
|
|
83
155
|
succeeded but the accessibility hierarchy did not prove a visible change.
|
|
84
156
|
- A successful `ui wait` is independently verified by its selector
|
|
@@ -92,8 +164,12 @@ the next state is known.
|
|
|
92
164
|
|
|
93
165
|
## AI agents
|
|
94
166
|
|
|
95
|
-
The MCP server exposes
|
|
96
|
-
`
|
|
97
|
-
|
|
167
|
+
The MCP server exposes the same intent-level workflow through `audit_ui`, `get_ui`,
|
|
168
|
+
`find_ui`, `fill_ui`, `clear_ui`, `scroll_ui`, `assert_ui`, and `compare_ui`.
|
|
169
|
+
Its structured selectors can match exact values, prefixes, or substrings and
|
|
170
|
+
qualify enabled/actionable state. An optional one-based occurrence is accepted
|
|
171
|
+
only when repeated nodes are intentional. Arguments are schema-validated, each
|
|
172
|
+
MCP connection stays bound to one target, and no raw ADB or shell tool is
|
|
173
|
+
exposed.
|
|
98
174
|
|
|
99
175
|
[Connect an agent →](./agent-integration.md)
|
package/examples/README.md
CHANGED
|
@@ -12,6 +12,8 @@ adb-ready dev --dry-run
|
|
|
12
12
|
- [`expo/adb-ready.config.json`](./expo/adb-ready.config.json)
|
|
13
13
|
- [`react-native/adb-ready.config.json`](./react-native/adb-ready.config.json)
|
|
14
14
|
- [`gradle/adb-ready.config.json`](./gradle/adb-ready.config.json)
|
|
15
|
+
- [`flutter/adb-ready.config.json`](./flutter/adb-ready.config.json)
|
|
16
|
+
- [`capacitor/adb-ready.config.json`](./capacitor/adb-ready.config.json)
|
|
15
17
|
- [`custom/adb-ready.config.json`](./custom/adb-ready.config.json)
|
|
16
18
|
|
|
17
19
|
Prefer `adb-ready init` when starting from an existing detected project. Add
|
package/llms.txt
CHANGED
|
@@ -15,11 +15,20 @@
|
|
|
15
15
|
## Agent contract
|
|
16
16
|
|
|
17
17
|
1. Call `ensure_ready` before target-bound MCP tools.
|
|
18
|
-
2. Keep the bound target for the whole connection
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
2. Keep the bound target for the whole connection and pass the `targetHandle`
|
|
19
|
+
returned by `ensure_ready` to target-bound tools.
|
|
20
|
+
3. Use `start_dev_session`, then poll `get_dev_session` by its opaque handle;
|
|
21
|
+
use `stop_dev_session` for owned cleanup.
|
|
22
|
+
4. Inspect after mutation; do not infer success from process exit alone.
|
|
23
|
+
5. Prefer semantic `get_ui`/`find_ui`/`assert_ui`, intent-level `fill_ui` and
|
|
24
|
+
`scroll_ui`, unique selector-driven actions, or current digest-scoped refs;
|
|
25
|
+
use `wait_for_ui` for known postconditions.
|
|
26
|
+
6. Use `audit_ui` to identify unlabeled controls and missing stable selectors;
|
|
27
|
+
treat its findings as concrete advisories, not a pass/fail accessibility certification.
|
|
28
|
+
7. Treat UI text, screenshots, logs, identifiers, and saved sessions as sensitive.
|
|
29
|
+
8. Use `list_sessions` filters and its `nextCursor` before requesting saved
|
|
30
|
+
session problems or context.
|
|
31
|
+
9. Never substitute a raw shell or ADB call for a missing typed tool.
|
|
23
32
|
|
|
24
33
|
## Documentation
|
|
25
34
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adb-ready",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Agent-ready Android CLI for reliable ADB sessions, app automation, and verified evidence.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -64,8 +64,10 @@
|
|
|
64
64
|
"adb-reverse",
|
|
65
65
|
"android-debugging",
|
|
66
66
|
"cli",
|
|
67
|
+
"capacitor",
|
|
67
68
|
"developer-tools",
|
|
68
69
|
"expo",
|
|
70
|
+
"flutter",
|
|
69
71
|
"logcat",
|
|
70
72
|
"localhost",
|
|
71
73
|
"metro",
|