Repository navigation
AndroidForge v0.10.0 - Agent Surface
AndroidForge v0.10.0 (Alpha) - Agent Surface
AndroidForge v0.10.0 is the agent-surface release. It adds the seven capabilities requested for the
next minor line: an MCP server with tool export, selector v2 with optional OCR, resumable runs with
NDJSON events, structured logcat query/watch, generic intents/deep links, network profiles/proxy and
device waiting with a parallel matrix.
Highlights
MCP server and tool export
androidforge mcp serve is a local stdio Model Context Protocol server using JSON-RPC
2025-06-18. It exposes 31 tools and 29 resources and deliberately shells out to the same
androidforge binary, so the CLI, JSON contract and MCP surface cannot drift into separate command
engines. Destructive tools (app uninstall, fresh installs) require confirm=true; uninstall also
gets --yes automatically only after that confirmation.
androidforge tools schema --format mcp|openai|json exports the same catalog for function-calling
clients that do not speak MCP.
The server is local only. There is no HTTP/SSE transport, account, key or network listener.
Selector v2 and optional OCR
Selectors now support semantic roles (--role), regular expressions (--text-regex), device-pixel
regions (--region) and relative bounds (--within, --above, --below, --left-of,
--right-of). All v1 selectors continue to work.
--ocr-fallback runs only when UIAutomator has no match. The default engine is tesseract;
ANDROIDFORGE_OCR_COMMAND overrides it. OCR accepts text, regex, region and index, and explicitly
refuses to pretend it can prove resource IDs, classes, roles or relative-node relationships. Images
stay on the local host.
Resumable runs and NDJSON events
run checkpoint <name> records a resume point. run resume --from-checkpoint <name> reopens a
terminal run, moves the previous failure into failure_history, increments resume_count and keeps
appending to the same report. run events [--follow] prints events.ndjson; the stream covers
run_started, step_started, step_finished, checkpoint, artifact, run_finalized and
resumed. report repro emits a PowerShell script from the run's exact recorded argv, or explains
which legacy run lacks it.
Logcat query and watch
diagnostics logcat query returns structured threadtime records with --level, --package,
--since, --until, --grep and --limit. diagnostics logcat watch streams NDJSON events with a
bounded --timeout, --max-events and optional crash/ANR filters. Watch output is raw NDJSON, not a
JSON envelope, so line-oriented consumers can read it directly.
Generic intents and deep links
app launch accepts --component, --action, --data, --mime-type, --category, --extra,
--flag, --wait and --force-stop. Extras use key:type:value with s, i, l, f, z, esa
and eia. app broadcast adds receiver permission and asynchronous delivery; app service starts or
stops a service intent. Package existence is validated when a package is supplied.
Network profiles and proxy
network proxy get|set|clear manages the global HTTP proxy. network profile list|apply provides
default, offline, wifi-only, data-only and no-proxy, and records the previous state in the
session. network restore restores it and removes the recorded entries. Profiles do not fake
latency, loss or bandwidth shaping.
Device waiting and parallel matrix
session ensure --wait --timeout retries while a device is busy and returns E_DEVICE_BUSY with the
elapsed wait when the deadline expires. agent matrix --parallel 1..32 runs one independent child
matrix per target. Port probing and session creation are serialized under a cross-process lock, live
session ports are treated as occupied, and each target gets its own child log/report. --fail-fast
is documented as best-effort because already-running targets finish.
Compatibility
- Workspace, CLI, desktop, installer and compatibility version are
0.10.0. - Report schema remains
1; new run fields are additive and optional. - Existing selector, JSON envelope, exit codes and session ownership behavior are unchanged.
matrix.schema.jsonaddsparallelandchild_report.
Validation
- MCP smoke: 10/10 PASS, 31 tools, 29 resources, protocol
2025-06-18, exit 0. - Selector/OCR: 21 UI tests pass; live OCR find/tap passed; missing engine returned
E_TOOL_NOT_FOUND. - Runs: checkpoint, failure, resume, events and repro verified live.
- Logcat: an injected sentinel was returned by query and watch.
- Intents: action start, component start (with and without wait) and broadcast passed.
- Network: proxy set/get/clear,
wifi-onlyapply and restore passed. - Devices: busy wait returned
E_DEVICE_BUSYafter ~6.8s with a 6s timeout. - Matrix: two AVDs,
--parallel 2, 2/2 passed in 7.2s with distinct serials and released sessions. - Full workspace fmt, clippy, tests and release build results are recorded in
VERIFICATION.md.
Not validated
- Real Tesseract recognition accuracy. OCR was exercised with a deterministic local test engine; the
defaulttesseractbinary was not installed on the verification host. - MCP over HTTP/SSE. Only local stdio is implemented.
- Physical-device intent, network and matrix mutation paths beyond the existing read-only/safe-device
policy.