Commit Graph

576 Commits

Author SHA1 Message Date
Michał Pierzchała 7a5e1dca75 refactor: P3 polish — Interactor type safety, error response builder, OXC (#316)
* refactor: polish improvements from codebase review (P3)

- Export Interactor type and add `satisfies Interactor` to both return
  objects in getInteractor() for compile-time completeness checking
- Create errorResponse/successResponse builder in handlers/response.ts
  and adopt it in 5 representative handler files (find, record-trace,
  interaction-press, session-deploy, snapshot-wait)
- Add ESLint with typescript-eslint, fix unused imports and trivial
  lint issues, configure rules to warn for stylistic patterns

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: complete P3 items — consolidate runner files, document macOS exports, standardize dispatch

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address P3 review feedback — remove invalid ESLint rules, dead code, unused export

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: replace eslint and prettier with oxc

* chore: tighten oxc config and upgrade typescript

* refactor: extract ios runner contract helpers

* docs: tighten agent guidance and add check scripts

* fix: resolve post-rebase validation issues

* fix: remove shell interpolation from metro launcher

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 20:43:24 +02:00
Michał Pierzchała 017ac817ff refactor: P1 structural improvements — move interactors to core, consolidate selectors, rename client-shared (#314)
* refactor: structural improvements from codebase review (P1)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: complete P1 items — split CLI commands, decompose handlers, consolidate artifacts

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* refactor: simplify CLI and daemon facades

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 12:53:15 +02:00
Michał Pierzchała 0fed800eee fix: avoid focusing iOS simulator window (#319) 2026-03-28 19:39:14 +01:00
Michał Pierzchała 876f091c00 feat: close macOS parity gaps (#311)
* feat: close macos parity gaps

* fix: support targeted macOS menubar app snapshots

* chore: clarify menubar fallback heuristics

* chore: address review nits

* fix: complete macOS parity flow
2026-03-28 19:06:52 +01:00
Michał Pierzchała 8888dd5d08 fix: address P0 safety issues from codebase review (#318)
- Add unhandledRejection handler in daemon to prevent silent crashes
- Add timeout handling to runCmdStreaming matching runCmd pattern
- Fix port allocation race in getFreePort by resolving inside close callback
- Replace synchronous appendFileSync with async appendFile in logChunk

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:56:54 +01:00
Michał Pierzchała 48e55dbd6f fix: address P0 safety issues from codebase review (#313)
- Add unhandledRejection handler in daemon to prevent silent crashes
- Add timeout handling to runCmdStreaming matching runCmd pattern
- Fix port allocation race in getFreePort by resolving inside close callback
- Replace synchronous appendFileSync with async appendFile in logChunk

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 18:55:53 +01:00
Michał Pierzchała 153ac82c78 0.11.1 v0.11.1 2026-03-27 19:39:00 +01:00
Michał Pierzchała f7e1e7a89c refactor: split touch interaction handlers (#310)
* refactor: split touch interaction handlers

* refactor: extract touch reference frame helpers
2026-03-27 19:13:29 +01:00
Michał Pierzchała f13ad2054d feat: add screenshot ref overlays (#307)
* feat: add screenshot ref overlays

* fix: refresh overlay refs from a fresh snapshot

* chore: tighten screenshot overlay plumbing

* fix: improve screenshot overlay targeting

* docs: trim screenshot overlay docs

* feat: add overlay ref centers

* docs: trim fallback guidance

* fix: improve android overlay labels
2026-03-27 19:04:34 +01:00
Michał Pierzchała 86674d2109 docs: clarify commit and PR title prefixes for agents (#309)
* docs: clarify commit and PR title prefixes for agents

* docs: default agents to ready-for-review PRs
2026-03-27 18:05:12 +01:00
Michał Pierzchała 44db0ca1cb refactor: remove remaining test DI seams (#304)
* refactor: remove remaining test DI seams

* refactor: remove xctestrun test seam

* chore: address PR review nits
2026-03-27 17:51:51 +01:00
Michał Pierzchała d5cbec08fc [codex] Speed up Apple CI jobs (#305)
* perf: speed up apple ci jobs

* chore: address ci review feedback

* chore: unify apple runner build scripts
2026-03-27 17:51:13 +01:00
Michał Pierzchała d9d94f0f5a [codex] close iOS runner responses gracefully (#306)
* fix: close iOS runner responses gracefully

* fix: close runner connection after send
2026-03-27 17:48:20 +01:00
Michał Pierzchała f984a655ce chore: add CI replay retries (#308) 2026-03-27 17:45:42 +01:00
Michał Pierzchała 7c36b0f821 0.11.0 v0.11.0 2026-03-27 16:50:53 +01:00
Michał Pierzchała 9eb0604065 refactor: migrate session.ts orchestrator to vitest + drop node:test (#284) (#302)
Remove all test-only DI parameters from handleSessionCommands (signature
drops from ~30 params to 5: req, sessionName, logPath, sessionStore,
invoke) and from the remaining sub-handlers (session-inventory,
session-observability, session-replay, session-close, session-state).

Migrate all 89 remaining node:test unit test files to vitest. Tests that
passed DI overrides now use vi.mock instead. Update vitest.config.ts to
include *.test.ts alongside *.vitest.ts, and remove the dual-runner
node --test from package.json scripts.

Add a permanent CI lint guard that fails if optional typeof DI seams
reappear in production code.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 16:39:59 +01:00
Michał Pierzchała fa212489d4 chore: remove duplicate publish build hook (#301) 2026-03-27 15:28:20 +01:00
Michał Pierzchała ac50381270 docs: clarify iOS runner protocol contract (#300) 2026-03-27 15:27:56 +01:00
Michał Pierzchała aae1771c54 refactor: remove JS test wrappers, run .ad replays directly on CI (#299)
* refactor: remove JS test wrappers, run .ad replay suites directly on CI

The platform JS test files (ios.test.ts, android.test.ts, macos.test.ts)
were thin wrappers that shelled out to `agent-device test` and asserted
on JSON counts. Since the CLI already exits non-zero on failure, the
wrappers added no value. CI now invokes the replay suites directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add local replay entrypoints and restore physical device test

- Add pnpm scripts for each replay suite (test:replay:ios,
  test:replay:ios-device, test:replay:android, test:replay:macos)
  so local runs still exercise platform replays
- Restore physical-device iOS replay step in CI workflow
  (conditional on IOS_UDID variable)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:24:07 +01:00
Michał Pierzchała acee54b697 refactor: migrate session sub-handlers + request-router from test-only DI to vitest mocking (#295)
Remove ~35 DI parameters from session-close, session-open, session-deploy,
session-device-utils, session-runtime, record-trace-recording, and
request-router. All sub-handlers now use direct imports instead of
threaded typeof params. Tests rewritten from node:test to vitest with
vi.mock() replacing manual dependency injection.

Closes #283

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 15:06:39 +01:00
Michał Pierzchała b6592db978 Fix iOS runner fill for tapped secure text fields (#298)
* fix: target iOS runner fill typing to tapped inputs

* fix: clarify targeted fill error handling
2026-03-27 14:57:56 +01:00
Michał Pierzchała 6ef0dfa2f5 refactor: flatten session open flow (#296)
* refactor: simplify session open preparation flow

* refactor: flatten session open flow

* refactor: use explicit open details result
2026-03-27 13:53:50 +01:00
Michał Pierzchała 8f6c01c7f4 refactor: trim replay healing heuristics (#297)
* refactor: trim replay healing heuristics

* test: clarify ref-label replay guard
2026-03-27 13:51:23 +01:00
Michał Pierzchała 73298e5c9a Bound scrollintoview with max-scroll and progress guards (#290)
* fix: bound scrollintoview termination

* fix: finish scrollintoview review follow-ups

* fix: finish rebased scrollintoview follow-ups

* refactor: address remaining scroll review nits

* fix: finalize rebased scrollintoview merge
2026-03-27 12:52:02 +01:00
Michał Pierzchała 1669c7a101 feat: support pixel-based scroll gestures (#293)
* feat: add pixel-based scroll gestures

* fix: address remaining scroll review comments

* chore: make scroll direction switch exhaustive

* docs: keep readme informational

* docs: revert readme changes

* refactor: reuse shared apple scroll planning

* refactor: reduce apple scroll runner churn
2026-03-27 12:06:57 +01:00
Michał Pierzchała 11b47a25a7 Fix keyboard dismiss semantics across iOS and Android (#291)
* fix: correct keyboard dismiss semantics

* fix: address PR review feedback

* fix: preserve iOS keyboard dismiss contract

* fix: restore session handler platform import

* docs: update skill guidance for keyboard commands
2026-03-27 11:49:30 +01:00
Michał Pierzchała a28059b0ad refactor: migrate interaction + snapshot chains from test-only DI to vitest mocking (#294)
* refactor: migrate interaction + snapshot chains from test-only DI to vitest mocking

Remove ~25 DI parameters threaded through the interaction and snapshot
handler chains that existed solely for testability.  Functions now import
their dependencies directly; tests use vi.mock to intercept them.

Interaction chain: dispatch, readAndroidScreenSize removed from
interaction.ts, interaction-touch.ts, interaction-common.ts,
interaction-read.ts, interaction-selector.ts, interaction-snapshot.ts,
interaction-get.ts, interaction-is.ts, interaction-scroll.ts, find.ts.

Snapshot chain: dispatchSnapshotCommand, runnerCommand,
sessionlessRunnerCleanup removed from snapshot.ts, snapshot-wait.ts,
snapshot-alert.ts, snapshot-capture.ts.

Old node:test files replaced with vitest equivalents using vi.mock.

Closes #282

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: align vitest interaction handler coverage

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:49:11 +01:00
Michał Pierzchała c9ca550f1e feat: add --delay-ms support to type and fill (#292)
* feat: add delayed typing support

* fix: keep literal delay tokens in replay

* chore: tighten delay-ms follow-up polish
2026-03-27 10:43:52 +01:00
Michał Pierzchała 90b8544c75 feat: improve cli batch output and acknowledgments (#280)
* feat: improve cli batch output and acknowledgments

* docs: clarify skill guidance for cheaper models

* fix: move success messages into command responses

* refactor: add shared success message helpers

* refactor: address PR review follow-ups

* refactor: reuse daemon success payloads
2026-03-27 10:34:31 +01:00
Michał Pierzchała 55c1341304 fix: align is visible with snapshot semantics (#286)
* fix: align is visible with snapshot semantics

* fix: address visibility review feedback
2026-03-27 10:28:25 +01:00
Michał Pierzchała 605f736f2f fix: expose collapsed iOS tab items in snapshots (#287)
* fix: expose collapsed iOS tab items in snapshots

* fix: address snapshot fallback review feedback

* fix: tighten snapshot fallback scope and truncation
2026-03-27 10:25:32 +01:00
Michał Pierzchała dc8f318f76 Split back navigation into explicit in-app and system semantics (#288)
* feat: split back navigation semantics

* fix: address back review feedback

* fix: make in-app back the default
2026-03-27 10:18:00 +01:00
Michał Pierzchała 1172b0bf32 fix: promote press ref taps to hittable ancestors (#285)
* fix: promote press ref taps to hittable ancestors

* chore: trim press ref refresh fallback

* fix: keep fill refs on editable nodes
2026-03-27 10:09:02 +01:00
Michał Pierzchała d1d2f3852a refactor: migrate leaf modules from test-only DI to vitest mocking (#289)
* refactor: migrate leaf modules from test-only DI to vitest mocking

Drop optional DI parameters from 6 production modules that existed
solely as test seams. Replace with vi.mock() in new vitest test files.

Production files simplified:
- recording-telemetry.ts: remove writeTelemetry?
- find.ts: remove dispatch?, use dispatchCommand directly
- install-source.ts: remove entire deps? object (7 params)
- session-runtime-command.ts: remove clearRuntimeHints?
- android-system-dialog.ts: remove 4 DI params, simplify internals
- record-trace-recording.ts: remove writeRecordingTelemetry from deps

Closes #281

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: restore DI seams broken by premature removal, fix test script

- request-router.ts: remove 4 dead DI params (snapshotAndroidUi,
  reopenAndroidApp, readAndroidAppState, execCommand) from
  RequestRouterDeps since recoverAndroidBlockingSystemDialog no
  longer accepts them
- session-runtime-command.ts: restore clearRuntimeHints? param that
  handleSessionCommands threads through — removing it broke callers
  that override the seam
- session.ts: restore clearRuntimeHints pass-through to runtime branch
- session.test.ts: restore the end-to-end runtime clear DI test
- package.json: include vitest in the default `test` script

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: rename *.vitest.test.ts → *.vitest.ts to avoid node:test collision

Node's default test discovery matches *.test.ts, which picked up vitest
files and crashed. Rename to *.vitest.ts so the two runners have disjoint
file sets without needing find-based exclusions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use vi.mocked().mock.calls instead of module-level mutable state

Replace manual clearCalls array with direct assertion on the mock,
consistent with the pattern used in request-router-android-modal.vitest.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 10:01:46 +01:00
Michał Pierzchała a79b70325a refactor: split session handler modules (#268)
* refactor: split session handler modules

* refactor: trim session handler follow-ups

* fix: validate relaunch args before device resolution
2026-03-26 21:15:47 +01:00
Michał Pierzchała c393ffe612 feat: add light test runner for .ad scripts (#266)
* feat: add metadata-aware ad test runner

* test: migrate platform integrations to replay suites

* fix: stop macos runner during close

* fix: harden ad test runner

* fix: tighten ad test runner retries and reporting

* refactor: tighten replay test suite runtime

* test: cover replay suite helpers

* docs: trim replay test guidance in skill

* refactor: extract replay test cli helpers
2026-03-26 19:21:16 +01:00
Michał Pierzchała e8065b87d4 fix: bump rspress core to remediate docs advisories (#265) 2026-03-26 13:00:34 +01:00
Michał Pierzchała 5c30372c24 0.10.3 v0.10.3 2026-03-25 19:55:16 +01:00
Michał Pierzchała 836dc6ad3d docs: tighten agent-device skill defaults (#263)
* docs: tighten agent-device skill defaults

* docs: split exploration skill loops

* docs: require interactive snapshots before actions

* docs: clarify exploration loops are examples

* docs: simplify exploration anti-pattern wording

* docs: reframe bootstrap setup examples

* docs: clarify deterministic bootstrap routing

* docs: add app discovery to bootstrap flow

* docs: require loading bootstrap and exploration

* docs: tighten bootstrap setup guidance

* docs: prefer open before install on first attempt

* docs: simplify agent-device skill routing

* docs: simplify weak-model skill guidance
2026-03-25 19:54:49 +01:00
Michał Pierzchała 05a822455c chore: publish bundled public type declarations (#262)
* chore: publish bundled public type declarations

* chore: keep package root exports value-only
2026-03-25 18:40:36 +01:00
Michał Pierzchała ba5e951e1b 0.10.2 v0.10.2 2026-03-25 17:15:44 +01:00
Michał Pierzchała a39bb6d0fc fix: improve large text surface discovery and reads (#261)
* fix: improve large text surface discovery and reads

* chore: trim duplicated skill guidance

* fix: tighten large text read follow-ups

* fix: scope snapshot metadata and log read fallbacks
2026-03-25 17:13:31 +01:00
Michał Pierzchała bb8d9ddeb8 docs: restructure agent-device skill docs (#260)
* docs: restructure agent-device skill docs

* docs: keep agent-device references grouped

* docs: clarify batch use in verification

* docs: restore skill operational detail

* docs: add qa loop for acceptance criteria

* docs: clarify qa modes in skill router

* docs: improve skill mental model wording

* docs: simplify skill router labels

* docs: add accessibility audit guidance

* docs: update iOS simulator example device

* docs: clarify follow-up routing after session open

* docs: tighten session follow-up rule
2026-03-25 16:01:03 +01:00
Michał Pierzchała 7100fc5920 feat: add macOS desktop snapshot surfaces (#258)
* feat: add macOS desktop snapshot surfaces

* fix: tighten macos desktop surface routing

* refactor: harden macos helper snapshot traversal

* fix: scope frontmost macos snapshots to visible windows
2026-03-25 15:10:52 +01:00
Michał Pierzchała 9c37d76381 feat: improve macOS phase 1 support (#256)
* feat: improve macOS phase 1 support

* fix: address macOS phase 1 review comments

* fix: address macOS PR review feedback

* chore: remove unused apple log alias

* fix: allow mocked macOS helper outside darwin
2026-03-25 13:45:40 +01:00
Michał Pierzchała 974e7ff2cd Tighten touch interaction reliability (#255)
* fix: tighten touch interaction reliability

* fix: make touch visualization metadata best effort
2026-03-25 13:27:51 +01:00
Ken Tominaga 65d08abb2d fix: restore interaction handler refactoring reverted by #245 (#254)
PR #248 refactored interaction.ts into a thin routing layer delegating
to focused command modules. PR #245 (gesture telemetry overlays)
unintentionally reverted get/is/scrollintoview back to inline
implementations due to a stale branch.

This restores the thin router from #248, adapted for #245's
handleTouchInteractionCommands, and removes interaction-press.ts and
interaction-fill.ts which were made dead code by #245's
interaction-touch.ts.
2026-03-25 11:28:22 +01:00
Michał Pierzchała eb9573923a 0.10.1 v0.10.1 2026-03-24 13:39:02 +01:00
Michał Pierzchała 0cca41f673 feat: add gesture telemetry recording overlays (#245)
* feat: add gesture telemetry recording overlays

* fix: stabilize recording validation and telemetry artifacts

* fix: tighten recording telemetry helpers

* fix: clean up android recording stop fallback

* refactor: split ios recording handlers

* fix: tighten runner-backed touch telemetry

* refactor: simplify touch recording recovery

* feat: add gesture telemetry recording overlays

* refactor: split touch interaction recording flow

* fix: rebase gesture telemetry onto main

* test: fix recording overlay CI expectations
2026-03-24 13:38:41 +01:00
Michał Pierzchała 121eacc872 restore readme 2026-03-24 07:57:33 +01:00