Commit Graph

806 Commits

Author SHA1 Message Date
Michał Pierzchała ca6f60ec9a refactor: decompose selector system into parse/match/resolve/build modules (#234)
Closes #159

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 16:50:40 +01:00
Michał Pierzchała 3a2ff61e9d fix: bound iOS simulator focus timeout (#233)
* fix: bound iOS simulator focus timeout

* fix: raise iOS simulator focus timeout
2026-03-17 16:27:06 +01:00
Michał Pierzchała 7747761715 refactor: simplify daemon transport resolution (#228)
* refactor: simplify runtime hint parsing and daemon transport resolution

* refactor: trim daemon transport cleanup scope
2026-03-17 15:54:04 +01:00
Michał Pierzchała e5637bfab2 fix: remove interactive device prompt dependency (#232) 2026-03-17 15:53:29 +01:00
Michał Pierzchała ee83df80db chore: prune redundant tests (#229)
* chore: prune redundant tests

* chore: address test review feedback
2026-03-17 15:42:21 +01:00
Michał Pierzchała b0d598c900 chore: split session handler modules (#230)
* chore: split session handler modules

* chore: tighten session handler cleanup
2026-03-17 15:41:29 +01:00
Michał Pierzchała d66a580454 refactor: consolidate platform branching into Interactor (#231)
Move back, home, appSwitcher, clipboard read/write, setSetting, and
screenshot into the Interactor abstraction, eliminating scattered
if-platform checks in dispatch.ts.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 15:36:12 +01:00
Michał Pierzchała 694a85124e refactor: reduce duplicated client wire mappings (#227)
* fix: reduce duplicated client wire mappings

* refactor: clarify android serial serializer default
2026-03-17 15:29:02 +01:00
Michał Pierzchała ecf1378a7e 0.8.3 v0.8.3 2026-03-16 14:10:46 +01:00
Michał Pierzchała 056b314774 0.8.2 2026-03-16 14:10:39 +01:00
Michał Pierzchała 22fbca81e2 fix: return Android identity from install_from_source (#226)
* 0.8.1

* fix: derive android launch target for installFromSource

* fix: return android identity from install source

* fix: resolve android package from install artifacts

* docs: move typed client docs out of readme
2026-03-16 14:10:27 +01:00
Michał Pierzchała 6644763cde fix: derive Android launch target for installFromSource (#225)
* 0.8.1

* fix: derive android launch target for installFromSource
2026-03-16 13:04:47 +01:00
Michał Pierzchała 9b65546562 fix: harden remote install-from-source transport (#224) 2026-03-16 11:26:45 +01:00
Michał Pierzchała 1af4832937 0.8.0 v0.8.0 2026-03-14 20:58:23 +01:00
Michał Pierzchała b5b78e379e 0.7.22 2026-03-14 20:56:18 +01:00
Michał Pierzchała c874eeb4a5 feat: centralize CLI option resolution (#223)
* 0.7.22

* feat: centralize CLI option resolution

* refactor: introduce canonical CLI option specs

* fix: preserve enum config parsing in option specs

* docs: clarify canonical config values

* fix: honor config-backed session bindings
2026-03-14 20:55:59 +01:00
Michał Pierzchała c34639ec4d feat: share session lock policy across clients (#222)
* 0.7.22

* fix: add cli session binding lock mode

* fix: add cli session lock flags

* fix: preserve batch platform inheritance

* chore: clean up cli binding flow

* docs: update session-bound automation guidance

* feat: simplify session lock policy

* feat: share session lock policy across clients

* docs: add shared session lock examples

* refactor: simplify session lock policy helpers

* test: cover shared session lock policy cases

* test: cover strip mode router dispatch
2026-03-14 20:46:15 +01:00
Rui Fan bef575bde6 fix: resolve screenshot path against caller cwd (#221)
* fix: resolve screenshot path against caller cwd (#220)

When the daemon process starts from a different directory than the
caller (e.g. executor install dir vs suite workspace), relative
screenshot paths were resolved against the daemon's cwd instead of
the caller's cwd.

Apply the same SessionStore.expandHome(path, meta.cwd) pattern already
used by replay and record before dispatching the command.

Closes #220

* fix: record normalized screenshot paths

---------

Co-authored-by: Michał Pierzchała <thymikee@gmail.com>
2026-03-14 14:24:30 +01:00
Michał Pierzchała 34b9579b51 Add typed TypeScript daemon client (#218)
* feat: add typed daemon client

* chore: tighten client package exports

* fix: preserve open and screenshot cli flags

* feat: expose runtime open and install-source client flows

* feat: expose retained materialization paths in client

* feat: complete typed client cleanup

* fix: fall back to XML plist parsing
2026-03-14 14:19:16 +01:00
Michał Pierzchała d841bc58ad fix: simplify install-from-source identity resolution (#219)
* fix: simplify install-from-source identity resolution

* fix: trim install-source follow-ups

* fix: enforce install-source download timeout through body copy

* fix: omit ephemeral install artifact paths from daemon responses

* feat: retain install-source materializations on demand
2026-03-13 19:35:29 +01:00
Michał Pierzchała 674ae974ec feat: add typed runtime to open (#217)
* feat: add typed runtime to open

* fix: normalize typed runtime validation errors

* fix: defer runtime replacement until open succeeds

* feat: add typed openApp client helper
2026-03-13 19:35:05 +01:00
Michał Pierzchała d7a0102395 refactor: extract internal artifact materialization helpers (#215)
* fix: harden and simplify artifact materialization

* fix: cap artifact error buffering
2026-03-13 19:34:39 +01:00
Michał Pierzchała ad4015cbce fix: unref artifact cleanup timer (#216) 2026-03-13 18:09:20 +01:00
Michał Pierzchała b79cbce951 feat: support android shutdown on close (#213)
* feat: support android shutdown on close

* fix: stub android readiness in relaunch test
2026-03-13 14:36:57 +01:00
Michał Pierzchała 45cc50362b 0.7.21 v0.7.21 2026-03-12 18:41:00 +01:00
Michał Pierzchała 6088a5d063 fix: reject Android binary paths in runtime hints (#212)
* fix: refine Android relaunch target guard

* fix: reject Android binary paths in runtime hints

* fix: reject bare Android binary filenames

* refactor: centralize Android target classification

* chore: trim Android target guard helpers
2026-03-12 18:40:20 +01:00
Michał Pierzchała 479537f36f 0.7.20 v0.7.20 2026-03-12 17:29:55 +01:00
Michał Pierzchała 884e48ba27 fix: harden Android runtime relaunch flows (#211)
* fix: harden Android runtime relaunch flows

* docs: clarify mobile QA skill flows
2026-03-12 17:29:40 +01:00
Michał Pierzchała b8cad6b226 0.7.19 v0.7.19 2026-03-12 15:45:14 +01:00
Michał Pierzchała 967f71fc77 fix: prevent auto-selection of physical iOS devices when simulators are available (#210)
* fix: prevent auto-selection of physical iOS devices when simulators are available

When running with --platform ios and a physical iPhone connected but no
simulators booted, the tool would connect to the physical device instead
of booting a simulator. Add a safeguard in resolveTargetDevice that
rejects auto-selected physical devices and falls back to
findBootableIosSimulator, which queries simctl without the isAvailable
filter to find any bootable simulator.

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

* fix: handle empty device list and filter unavailable simulators in fallback

- Extract resolveIosDevice() so the iOS fallback logic is testable via
  dependency injection without module mocking
- Catch DEVICE_NOT_FOUND from selectDevice when no explicit selector was
  used, so the simulator fallback runs even when listIosDevices returns
  an empty list (all simulators filtered by isAvailable)
- Restore isAvailable check in findBootableIosSimulator to avoid
  returning simulators with missing runtimes that cannot boot
- Add 8 tests covering: physical-device rejection, empty-list recovery,
  explicit-selector passthrough, and normal simulator-present path

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 15:44:52 +01:00
Michał Pierzchała 76cf675d1e 0.7.18 v0.7.18 2026-03-12 14:31:23 +01:00
Michał Pierzchała ce1f37113e fix: prefer simulators/emulators over physical devices in auto-selection (#209)
Physical iOS devices always report booted=true, so the "prefer booted"
tiebreaker would pick them over unbooted simulators. This caused sessions
to bind to a connected iPhone instead of a simulator when no explicit
device selector (--udid/--device/--serial) was provided.

Now, when multiple candidates exist and no explicit device was requested,
physical devices are filtered out if virtual alternatives are available.
The simulator is then booted on demand by the existing ensureBootedSimulator
flow.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 14:30:38 +01:00
Michał Pierzchała 51667d5b96 0.7.17 v0.7.17 2026-03-12 13:39:29 +01:00
Michał Pierzchała 990a02bec6 fix: increase Android emulator AVD name resolution timeout to 10s (#208)
The 1.5s per-command timeout in resolveAndroidEmulatorAvdName was too
aggressive for emulators over remote adb daemon transport, causing
open --relaunch to fail during device discovery.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:38:48 +01:00
Michał Pierzchała 0f18a0ffa2 0.7.16 v0.7.16 2026-03-12 13:05:49 +01:00
Michał Pierzchała 7131fc1fe7 fix: quote sh -c script in adb shell to prevent argument splitting (#207)
adb shell concatenates all arguments with spaces into a single string
for the remote shell. Without quoting, the && in the mkdir/cat script
was interpreted as a command separator, causing mkdir to run with no
arguments ("mkdir: Needs 1 argument").

Wrapping the script in single quotes ensures the remote device shell
passes the entire command as one argument to sh -c.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:03:41 +01:00
Michał Pierzchała 9df2567d94 fix: detect persistent iOS simulator launch failures early with actionable hints (#206)
When `xcrun simctl launch` fails with FBSOpenApplicationServiceErrorDomain
code=4 persistently (e.g. architecture mismatch), all 30 retries would fail
identically, wasting 30 seconds before surfacing a generic error. Now we bail
after 3 consecutive identical FBS failures, probe the simulator for root cause
(app not installed, device binary on simulator, etc.), and surface an actionable
hint. Also reduces maxAttempts from 30 to 10 as a secondary safety net.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 13:00:34 +01:00
Michał Pierzchała c3fb690acb 0.7.15 v0.7.15 2026-03-12 12:29:10 +01:00
Michał Pierzchała 3bb5e6c6a8 fix: prevent APK file paths from being used as package names in adb run-as (#204)
resolveAndroidApp treated any input containing a dot as a package name,
which caused APK file paths (e.g. /path/to/app-debug.apk) to flow through
as appId into runtime hints, failing with a misleading "app not debuggable"
diagnosis. Android package names never contain slashes, so exclude paths
with '/' from the dot-based package heuristic.

Also differentiate probe failures in writeAndroidDevPrefs: check
isAndroidRunAsDeniedOutput on the probe result so connectivity/transport
errors are not misattributed to debuggability.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:28:22 +01:00
Michał Pierzchała 3847958067 fix: serve artifact downloads at /upload/{id} to fix proxy 404 (#205)
The artifact download endpoint was at GET /artifacts/{id}, but proxies
in the sandbox → proxy → daemon architecture only forward known paths
(/rpc, /health, /upload). Move downloads to GET /upload/{id} so they
share the already-forwarded /upload path (POST for uploads, GET for
downloads).

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:28:11 +01:00
Michał Pierzchała 2522984aa9 0.7.14 v0.7.14 2026-03-11 16:11:08 +01:00
Michał Pierzchała ee7f81b8ab fix: write android runtime hints via stdin (#203) 2026-03-11 16:10:57 +01:00
Michał Pierzchała 55d69f7729 0.7.13 v0.7.13 2026-03-11 14:56:43 +01:00
Michał Pierzchała 3763772734 fix: clarify android runtime hint failures (#202) 2026-03-11 14:56:15 +01:00
Michał Pierzchała f23df4d9c8 docs: add missing command reference entries (#201)
* docs: add missing command reference entries

* docs: clarify wait ref behavior
2026-03-10 12:59:36 +01:00
Michał Pierzchała e2bf4ef7a1 docs: add missing command reference entries (#200) 2026-03-10 12:29:05 +01:00
Michał Pierzchała 63d9f0021c refactor: extract daemon orchestration into dedicated modules (#160) (#198)
Restore src/daemon.ts to thin-router entrypoint by extracting:
- server-lifecycle.ts: lock/info file management, code signature, env parsing
- request-router.ts: request dispatch orchestration across handlers
- transport.ts: socket server, listen helpers, disconnect/abort logic

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 10:27:17 +01:00
Michał Pierzchała 12d54989b3 0.7.12 v0.7.12 2026-03-09 19:50:59 +01:00
Michał Pierzchała 8b36c2a56c feat: support remote runtime hints and artifact retrieval (#199)
* feat: add remote runtime hints and artifact retrieval

* fix: apply session runtime transport hints on open

* fix: secure and time out artifact downloads
2026-03-09 19:50:40 +01:00
Michał Pierzchała 150399ec0c 0.7.11 v0.7.11 2026-03-09 17:35:07 +01:00