90 Commits

Author SHA1 Message Date
Michał Pierzchała f512b7d69c feat: add network dump command for session app traffic (#120)
* feat: add network dump command for session app traffic

* fix: restore cli branch block after rebase conflict
2026-02-25 16:17:08 +01:00
Nick Dima 43aae1d30a fix(ios): correctly implement runner fallback for physical device screenshots (#132)
* fix(ios): use XCTest runner for screenshots on physical devices

`xcrun devicectl device screenshot` was removed in Xcode 26.x, causing
`agent-device screenshot` to fail on physical iOS devices with exit code 64.

This fix routes physical device screenshots through the AgentDeviceRunner
XCTest runner (already used for snapshot/interaction commands) instead:

- Add `screenshot` command to the Swift runner's `CommandType` enum
- Implement the handler using `XCUIScreen.main.screenshot()`, writing a
  timestamped PNG to the app's temp directory (returned as `tmp/<file>`)
- If `appBundleId` is provided, activate the target app before capturing
  so the screenshot shows the app under test rather than the runner itself
- In `screenshotIos()`, pass `appBundleId` to the runner command then pull
  the file back to the host via `xcrun devicectl device copy from` (same
  mechanism used by the recording feature)
- Thread `appBundleId` through `Interactor.screenshot()` → `dispatch.ts`
  → `screenshotIos()` so the active session's app is always captured
- Extract `IOS_RUNNER_CONTAINER_BUNDLE_IDS` to `runner-client.ts` so it
  can be shared between `apps.ts` and `record-trace.ts`

Fixes: screenshots failing with "Failed to capture iOS screenshot" on
devices using Xcode 26.x / devicectl 506.6+

* fix: clean up iOS screenshot fallback follow-ups

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-02-25 16:11:01 +01:00
Michał Pierzchała 8123117e6d fix: fallback iOS/tvOS screenshot to runner when devicectl screenshot is unavailable (#130) 2026-02-25 15:34:14 +01:00
Michał Pierzchała ef20dea6bc feat: add AndroidTV and tvOS target support (#125)
* feat: add AndroidTV and tvOS target support

* feat: enable tvOS runner interactions

* refactor: unify apple target handling and tvOS capability gates

* refactor: remove hardcoded tvOS app-switcher sleep

* fix: align tvOS capabilities and docs for simulator-only helpers

* feat: improve AppleTV and AndroidTV physical device detection

* refactor: simplify tv target detection helpers
2026-02-25 14:55:54 +01:00
Michał Pierzchała 996d1fca2f feat: add session perf metrics command (#121)
* feat: add session perf metrics command

* refactor: simplify open perf result shaping

* docs: improve perf guidance in docs and skill

* docs: split perf guidance into skill reference
2026-02-25 13:49:59 +01:00
Michał Pierzchała ab338263ed feat: add clipboard read and write commands (#122) 2026-02-25 13:01:33 +01:00
Michał Pierzchała 66b0bdba31 fix: expose push notification simulation (#109)
* fix: expose push notification simulation across iOS and Android

* refactor: share push JSON detection and clean extras validation

* fix: harden push payload path handling in session

* refactor: consolidate push payload source resolution
2026-02-24 17:34:28 +01:00
Nils Fischer 8660b0433f feat: add settings appearance command (#119)
* feat: add settings appearance command

- add appearance light|dark|toggle support to settings command

- implement iOS simulator and Android night mode handlers

- cover parser/handler/platform behavior with unit tests

- update README, docs, and agent-device skill guidance

* test: align settings usage assertions

- expect split settings usage lines for wifi/location and appearance

* fix: harden settings appearance parsing and dedupe usage contract

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-02-24 17:25:56 +01:00
Michał Pierzchała ddfeb65896 fix: harden android non-ascii text input and document IME workaround (#118) 2026-02-24 16:53:30 +01:00
Michał Pierzchała 20aa00587b fix: harden permission controls across iOS and Android (#117) 2026-02-24 10:55:07 +01:00
EarthXP 0041dee2b7 fix: add MAIN/LAUNCHER flags to Android launcher activity resolver (#115)
* fix: add MAIN/LAUNCHER flags to Android launcher activity resolver

The `resolve-activity` fallback command was missing `-a android.intent.action.MAIN`
and `-c android.intent.category.LAUNCHER`, causing it to resolve the wrong activity
on multi-entry apps like Microsoft Outlook. This adds the correct intent flags so
the resolver consistently returns the launcher activity.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: detect am start silent failures and fall back to resolved component

am start -p <package> can exit 0 while printing "Error: Activity not
started" to stdout.  The previous try/catch never entered the fallback
because runCmd did not throw.  Now we check the output for error
indicators via isAmStartError() and proceed to the resolve-activity
fallback when the primary launch silently fails.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: EarthXP <15072042+EarthXP@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:57:28 +01:00
Michał Pierzchała 67b6698f34 feat: expose app permission grant/deny/reset in settings (#108)
* feat: add app-scoped permission settings across ios and android

* refactor: centralize permission target parsing and options

* fix: include stderr excerpt in generic command failures

* refactor: gate stderr message override to process-exit errors
2026-02-23 18:34:27 +01:00
Michał Pierzchała 55065488f6 feat: improve logs debugging workflow (#111) 2026-02-22 15:52:26 +01:00
Michał Pierzchała e638e0ac60 feat: add full session log coverage and diagnostics workflows (#106)
* feat: add full session log coverage with doctor and marker tooling

* chore: split logs skill guidance into reference doc
2026-02-22 10:35:41 +01:00
Michał Pierzchała df0892b88a feat: colorize snapshot diff output (#90)
* feat: colorize snapshot diff output with node util

* docs: update snapshot diff color guidance
2026-02-20 20:01:22 +01:00
Michał Pierzchała 615331291b chore: remove dead node/ts code paths (#89) 2026-02-20 19:44:58 +01:00
Michał Pierzchała 00ba0be101 fix: speed up and simplify scrollintoview @ref (#87) 2026-02-20 19:43:05 +01:00
Michał Pierzchała 2fd2bf50fe chore: remove dead ios runner command paths (#88) 2026-02-20 19:38:16 +01:00
Michał Pierzchała 8eea063374 feat: add iOS device record support via runner (#83)
* feat: add iOS device record support via runner

* refactor: simplify record command pathways

* fix: harden iOS record runner failure handling

* chore: emit diagnostic on iOS record stop runner failure

* fix: clear ios device runner cache in build:xcuitest

* chore: drop unused clean-derived env from build script

* fix: stage iOS device recordings via runner temp file

* fix: prefer requested iOS record path with permission fallback

* fix: disable iOS record fallback for explicit output paths

* refactor: remove iOS record fallback staging path flow

* fix: resolve record output paths from request cwd

* chore: log resolved record output path in diagnostics

* fix: avoid app activation when starting iOS recording

* refactor: streamline iOS recording setup paths

* fix: copy iOS device recordings back to host path

* fix: copy iOS recordings from runner test container

* feat: add configurable iOS recording fps

* fix: disable xcode test diagnostics for runner sessions

* fix: use wall-clock timestamps for iOS recording

* feat: default iOS recording to uncapped fps

* fix: recover stale ios runner recording state

* fix: preserve app focus when starting iOS recording

* docs: clarify iOS device recording capture model

* fix: tighten iOS device record start ownership checks

* refactor: collocate iOS record context checks

* refactor: derive uncapped recorder timescale from interval
2026-02-20 18:41:07 +01:00
Michał Pierzchała cd73856d17 perf: optimize and verify scrollintoview ref path (#86) 2026-02-20 18:38:07 +01:00
Michał Pierzchała 87a11bd765 feat: add diff snapshot command (#81)
* feat: add snapshot diff command and snapshot efficiency guidance

* chore: polish snapshot diff baseline output

* fix: trim diff output context and normalize +/- indentation

* fix: normalize unchanged context indentation in diff output

* fix: preserve snapshot indentation in diff formatter

* fix: honor diff snapshot -i flatten mode
2026-02-20 18:37:28 +01:00
Michał Pierzchała 345b7eee7d fix: harden ios runner resilience and cancellation (#85) 2026-02-20 17:18:37 +01:00
Michał Pierzchała 40283f5c27 fix: allow swipe on ios physical devices (#84) 2026-02-20 16:05:58 +01:00
Michał Pierzchała 44c966b4b4 feat: switch CLI long-press command to longpress (#80)
* fix: use longpress as sole CLI command and sync docs

* fix: keep long-press as hidden longpress alias
2026-02-20 12:51:01 +01:00
Michał Pierzchała a46d3d6e1e fix: resolve replay script paths from caller cwd (#77) 2026-02-18 20:50:34 +01:00
Michał Pierzchała 4e1c76e45d fix: honor replay device selectors and validate session device mismatch (#76) 2026-02-18 20:24:56 +01:00
Michał Pierzchała feeee5e414 feat: add unified node diagnostics and error normalization (#73)
* feat: add unified node diagnostics and error normalization

* chore: clarify diagnostics session scope and retry logging docs

* chore: simplify and de-stale AGENTS guidance

* chore: add diagnostics context for settings actions
2026-02-18 19:40:45 +01:00
Michał Pierzchała 0418b0cb7c feat: add Face ID simulator controls to settings command (#75)
* feat: add iOS simulator Face ID settings command support

* fix: remove faceid aliases and standardize docs
2026-02-18 19:34:10 +01:00
Michał Pierzchała 99cc68463c fix: align press/click behavior and honor fast press cadence on iOS (#70)
* fix: align press and click semantics and reduce iOS tap latency

* perf: batch repeated iOS taps in runner

* perf: add opt-in tap batching for repeated iOS presses

* perf: batch repeated iOS swipes in runner

* fix: preserve interaction series semantics in record/replay

* test: cover click/press interaction handler paths

* refactor: dedupe replay and interaction series helpers

* fix: unify press/click double-tap behavior

* refactor: add interactor doubleTap and alias docs

* refactor: normalize click alias to press path
2026-02-18 16:02:45 +01:00
Michał Pierzchała 94477dd998 feat: add daemon-native JSON batch execution (#69)
* feat: add daemon-native JSON batch command for agent workflows

* docs: add agent batching guides across readme website and skills

* chore: remove batch stdin source and related docs

* fix: harden batch step normalization and flag sanitization

* refactor: simplify batch execution and validation reuse

* docs: rename batching guidance and links
2026-02-18 11:45:19 +01:00
Michał Pierzchała c1c50af598 fix: support reinstall on physical iOS devices (#67)
* fix: support reinstall on physical iOS devices

* fix: add devicectl timeout for iOS uninstall

* chore: simplify iOS reinstall error handling and tests
2026-02-18 10:58:49 +01:00
Michał Pierzchała 106a5f661d chore(breaking): remove AX snapshot backend and trim npm artifacts (#62)
* chore: remove AX snapshot backend and trim npm artifacts

* docs: remove AX backend references from commands page

* chore: update website
2026-02-17 12:00:21 +01:00
Michał Pierzchała 2f64e845b0 feat: iOS device deep link support and web links (#66)
* feat: add iOS device URL session fallback behavior

* chore: trim PR branch naming note

* docs: remove simulator/device support phrasing

* feat: unify iOS deep link behavior across simulator and device

* feat: support iOS open <app> <url> flow

* fix: validate iOS open app+url argument shape

* docs: remove redundant iOS deep-link note
2026-02-16 20:35:00 +01:00
Michał Pierzchała ac078905c6 refactor: stabilize iOS app/session and daemon startup flows (#64)
* refactor: stabilize iOS app/session and daemon startup flows

* fix: wait for android app launch completion

* fix: address review findings for iOS appstate and daemon flows

* fixups
2026-02-16 18:19:17 +01:00
Michał Pierzchała 3314d0355e feat: allow optional --save-script output path (#63) 2026-02-16 11:43:36 +01:00
Michał Pierzchała 586716d060 fix: stop daemon/runner lifecycle leaks on iOS (#60)
* fix: enforce daemon and iOS runner lifecycle ownership

* fix: address lifecycle review findings

* chore: harden daemon identity matching and tests
2026-02-16 11:30:46 +01:00
Michał Pierzchała 5709f8d3dd fix: support command-specific help output (#59)
* fix: add command-specific CLI help routing

* fix: omit empty command flag section in help
2026-02-16 11:13:38 +01:00
Michał Pierzchała 06a8778157 Enable iOS device core parity and align docs/skills (#55)
* Add iOS device runner support and document platform matrix

* ios: make signing identity override-only

* ios: address PR55 review follow-ups

* docs: remove v1 phrasing from support messages

* ios appstate: prefer xctest before ax fallback

* docs: clarify ios runner derived path override behavior

* ios: harden runner polling and appstate fallback

* ios: remove automatic AX fallback paths

* docs: clarify no automatic AX fallback

* ios: replace ad-hoc runner poll sleep with retry policy

* Harden iOS runner timeouts and cleanup safety

* args: align scrollintoview schema with capabilities

* test: skip iOS integration flows on CI by default
2026-02-15 21:12:10 +01:00
Michał Pierzchała 57062c8664 Refactor CLI command schema and strict flag validation (#57)
* Refactor CLI command schema and strict flag validation

* Tighten parser positional handling and ref flag validation

* Fix strict no-command flags and negative positional parsing

* simplify command schema internals and ref flag guards
2026-02-14 14:40:30 +01:00
Michał Pierzchała 64d27c18d0 Add consolidated gesture controls for press and swipe (#54)
* Add gesture series controls for press and swipe

* Normalize iOS swipe timing to safe duration

* Harden daemon startup for integration runs
2026-02-14 13:55:58 +01:00
Michał Pierzchała 0b5586fad9 Add open --relaunch and persist replay semantics (#52)
* Add open --relaunch and persist replay semantics

* Update agent-device skill docs for open --relaunch

* Disambiguate relaunch and save-script examples

* Support non-hierarchical deep links in open target detection
2026-02-13 19:21:25 +01:00
Michał Pierzchała 8cef2a61e0 Add deep-link URL support to open command (#53)
* Add deep-link URL support to open command

* Update agent-device skill docs for deep-link open
2026-02-13 18:49:00 +01:00
Michał Pierzchała e3b1aa6892 CI: add manual iOS runner prebuild cache for iOS job (#50)
* ci: add manual iOS runner prebuild cache for iOS workflow

* ci: simplify manual iOS prebuild workflow

* ci: pin cache actions in iOS workflows

* ci: fix iOS workflow env paths for parser compatibility

* ci: increase daemon timeout for iOS boot preflight

* ios: harden simulator state timeout and reuse preflight session

* ci: remove redundant iOS boot preflight step

* ios: retry transient simctl launch failures on simulator

* ci: pin iOS integration test target to resolved 26.2 simulator

* ci: harden iOS prebuild cache keys and remove derived-data copy path

* ci: simplify iOS workflow caching and drop redundant prebuild workflow

- Remove standalone ios-runner-prebuild.yml (redundant — ios.yml builds on cache miss)
- Switch from actions/cache/restore to actions/cache (auto-saves on miss)
- Drop restore-keys and -stable suffix (no longer needed without prebuild workflow)
- Remove UDID resolution step (test falls back to --platform ios)
- Use point-free shouldRetry for isTransientSimulatorLaunchFailure

Co-authored-by: Cursor <cursoragent@cursor.com>

* ios: increase simctl launch retry budget for CI simulators

SpringBoard can take several seconds after boot to accept app launches.
Increase from 3 attempts / 500ms–2s to 5 attempts / 1s–5s to give CI
simulators enough time.

Co-authored-by: Cursor <cursoragent@cursor.com>

* ios: use deadline-based retry for simulator app launch

The fixed-attempt retry (5 attempts, ~12s window) is too short for CI
simulators where SpringBoard needs 30-60s after boot to accept app
launches — especially when the build step is cached and provides zero
warm-up time.

Switch to a deadline-based approach matching ensureBootedSimulator:
- Default 30s timeout (configurable via AGENT_DEVICE_IOS_APP_LAUNCH_TIMEOUT_MS)
- CI sets 60s to handle cold-boot scenarios
- maxAttempts set high (30) so the deadline is the real limit

Co-authored-by: Cursor <cursoragent@cursor.com>

* ci(ios): keep tests platform-based and stabilize simulator selection

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 18:47:39 +01:00
Michał Pierzchała 8bc1675add Heal numeric get-text drift in replay update (#51)
* Refine selector resolution and simplify replay healing

* Address review feedback on selector internals

* Heal numeric get-text drift in replay update

* Remove redundant find and dead assignment in selector internals

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-13 14:35:45 +01:00
Michał Pierzchała 172968c0e1 fix: refine selector resolution and simplify replay healing (#49)
* Refine selector resolution and simplify replay healing

* Address review feedback on selector internals
2026-02-13 13:05:07 +01:00
Michał Pierzchała 1cf54a265c Boot, reinstall commands, diagnostics overhaul, and review fixes (#48)
* Refine reinstall flow and add agent-focused coverage

* Avoid duplicate readiness preflight in open flow

* Document boot and reinstall in website docs and skill

* Refine boot docs: troubleshooting-only and non-CI wording

* Fix duplicate find matching, add IOS_TOOL_MISSING reason, DRY retry log env check

- Remove redundant findNodeByLocator call in find handler; reuse
  bestMatches from the ambiguity check instead of scanning nodes twice.
- Add IOS_TOOL_MISSING boot failure reason so xcrun/simctl absence gets
  a specific diagnostic hint instead of generic BOOT_COMMAND_FAILED.
- Extract isEnvTruthy helper into retry.ts and replace duplicated
  RETRY_LOGS_ENABLED parsing in ios/index.ts and android/devices.ts.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 17:54:04 +01:00
Michał Pierzchała a0ce6f1df2 feat: reinstall command for reuse and agent ergonomics (#47)
* Refine reinstall flow and add agent-focused coverage

* Avoid duplicate readiness preflight in open flow

* Document boot and reinstall in website docs and skill

* Bound iOS boot commands and enforce runCmd timeouts

* Align boot readiness with timeout profiles across platforms

* Refine boot docs: troubleshooting-only and non-CI wording

* Clarify open vs boot fallback guidance
2026-02-12 17:17:56 +01:00
Michał Pierzchała 3ddd3a1ef5 Complete issue #39 boot diagnostics, telemetry, and boot command (#46)
* Complete issue #39 phase diagnostics telemetry and boot command

* Address review findings for boot diagnostics and command gating

* Use agent-device boot preflight in iOS CI workflow

* Run iOS boot preflight via source CLI in CI
2026-02-12 15:00:27 +01:00
Michał Pierzchała 70ab1a8e97 Improve Android open fallback, find ambiguity handling, and replay diagnostics (#45)
* Improve Android open fallback, find ambiguity handling, and replay diagnostics

* Fix iOS integration step to use unique selector for General
2026-02-12 14:51:17 +01:00
Michał Pierzchała 204184ac1e Improve boot readiness retries and normalized diagnostics (#41)
* Add boot diagnostics classification and deadline-based boot retries

* Fix TypeScript narrowing in boot diagnostics error paths

* update docs and cleanup

* Stabilize iOS integration assertion for Settings General page
2026-02-12 13:51:54 +01:00