You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Three benchmark-surfaced bugs from Phase 88 Round 2 Android, all fixed in
this batch with unit tests. 213 -> 225 tests passing.
B118/D637 — platform-aware CDP timeouts
Android emulator JS thread is 50-170× slower than iOS simulator for
Runtime.evaluate. A single 5s CDP_TIMEOUT_MS constant produced false-negatives
on typeText (timed out AFTER the mutation succeeded). Introduced Platform
type + defaultTimeout(platform) + timeoutForMethod(method, platform) in
cdp/timeout-config.ts. Android gets 2×; iOS unchanged. CDPClient routes both
evaluate paths and sendWithTimeout fallbacks through the new helpers using
this._connectedTarget?.platform. 10 new unit tests.
B117/D638 — device_* tools inherit platform from CDP target
runAgentDevice(cliArgs, opts) now accepts optional platform; appends
--platform <p> to agent-device CLI when no session is open. Sessions still
carry device identity so session-happy path unchanged.
createDeviceScreenshotHandler accepts optional getClient and derives platform
from client.connectedTarget?.platform with an explicit args.platform
override. Added `platform` to device_screenshot tool schema. Back-compat
preserved (existing zero-arg call still works). 3 new unit tests.
B116/D639 — simctl listapps cross-check in platform inference
inferPlatforms now reads BOTH adb pm list AND xcrun simctl listapps booted
(via parseSimctlListapps, which extracts top-level bundle IDs from the
NeXTSTEP plist format, skipping nested GroupContainers). Logic:
Android-only→android, iOS-only→ios, both→ios+ambiguousPlatform=true,
neither→ios. Readers are injectable for unit testing without subprocesses.
HermesTarget gains ambiguousPlatform flag. 9 new unit tests.
All 225 tests pass; TypeScript clean; dist/ rebuilt.
trackedTool('device_list','List all available iOS simulators and Android emulators. Returns device name, UDID, platform, and status. Use before device_snapshot action=open to confirm the target device.',{},createDeviceListHandler());
280
-
trackedTool('device_screenshot','Capture a screenshot of the active device screen. Returns image data or file path. Prefer JPEG for faster capture.',{
280
+
trackedTool('device_screenshot','Capture a screenshot of the active device screen. Returns image data or file path. Prefer JPEG for faster capture. When both iOS sim and Android emulator are booted, defaults to the platform of the currently connected CDP target; override with `platform` if needed.',{
281
281
path: z.string().optional().describe('Output file path (default: auto-generated in /tmp). Use .jpg extension for JPEG.'),
282
282
format: z.enum(['jpeg','png']).optional().describe('Image format (default: auto-detect from path extension, or jpeg)'),
283
-
},createDeviceScreenshotHandler());
283
+
platform: z.enum(['ios','android']).optional().describe('Target device platform. Defaults to the currently-connected CDP target platform.'),
284
+
},createDeviceScreenshotHandler(getClient));
284
285
trackedTool('device_snapshot','Manage device sessions and capture UI snapshots. action=open starts a session (required before other device_ tools). action=snapshot returns the accessibility tree with @ref identifiers for device_press/device_fill. action=close ends the session.',{
285
286
action: z.enum(['open','close','snapshot']).default('snapshot').describe('open: start session for an app. snapshot: capture UI tree with element refs. close: end session.'),
286
287
appId: z.string().optional().describe('App bundle ID — required for action=open (e.g. "com.example.app")'),
0 commit comments