437 Commits

Author SHA1 Message Date
Michał Pierzchała 89ecaaf68c 0.12.9 v0.12.9 2026-04-18 19:31:23 +02:00
Michał Pierzchała 57ba479e51 fix: add screenshot max-size flag (#428) 2026-04-18 19:30:39 +02:00
Michał Pierzchała 77365ab708 refactor: simplify Android hidden-content hints (#427) 2026-04-18 19:13:22 +02:00
Michał Pierzchała ee6cc7cc5b fix: use bridge metro runtime descriptors (#425) 2026-04-17 20:01:20 +02:00
Michał Pierzchała 33083b5a86 chore: codebase cleanup pass (dedup, types, dead code, cycles) (#420)
* refactor: remove dead code and unused exports

- Delete interaction-get.ts, interaction-is.ts, interaction-selector.ts (superseded by selector-runtime dispatchers)
- Remove handleWaitCommand and its private helpers from snapshot-wait.ts (replaced by dispatchWaitViaRuntime)
- Remove unused distanceFromSafeViewportBand/isRectWithinSafeViewportBand from rect-visibility
- Trim Linux platform barrel to only the re-export still in use (snapshotLinux)

* refactor: consolidate duplicated helpers

- Move sleep() to utils/timeouts.ts; remove 6 duplicate implementations
- Use existing isApplePlatform() helper for ios||macos checks (5 sites)
- Export trimRuntimeValue from runtime-hints; drop duplicate trimRuntimeString
- Merge normalizeTextSurfaceType/normalizeType into single text-surface helper
- Remove pointless isScrollableContainerType wrapper

* refactor: consolidate accidentally-duplicated type definitions

- SnapshotDiffLine/Summary: single definition in utils/snapshot-diff, re-exported from capture-snapshot
- FindLocator: single definition in utils/finders, re-exported from client-types
- JsonRpc envelope in http-server now uses JsonRpcRequestEnvelope/JsonRpcId from contracts
- Inline 'primary'|'secondary'|'middle' literals replaced with ClickButton (internal sites only)

* refactor: strengthen weak types and fix DEVICE_IN_USE downgrade bug

- Add toAppErrorCode() validator and DEVICE_IN_USE to AppErrorCode union
- Replace 'as any' casts on wire error codes with the validator (daemon-error, daemon-client, request-router, http-server)
- Type Metro worker payload as MetroTunnelResponseMessage
- Type xctestrun plist parsing with explicit partial schema
- Narrow 'details.stderr' via typeof checks on Android error paths
- Type runner-session parseRunnerResponse with RunnerResponsePayload

Bug fix: handler emitted 'DEVICE_IN_USE' but router cast silently downgraded to
'COMMAND_FAILED' because the code was missing from AppErrorCode. Clients can now
react to same-device contention.

* refactor: collapse redundant 'ignore' comments in empty catch blocks

- Replace 16 instances of 3-line catch { // ignore } with 1-line catch {}
- Remove one self-describing 'Re-export public API' comment

Specific 'ignore shutdown races' / 'ignore malformed pid files' style comments
that name concrete failure modes are kept.

* refactor: eliminate circular dependencies by extracting shared types to leaves

Resolves all 44 cycles reported by madge. Pattern throughout: extract shared
type into a leaf module; both producer and consumer import from the leaf;
original module re-exports for API stability.

New leaf type modules:
- src/runtime-contract.ts (AgentDeviceRuntime, CommandContext, ...)
- src/metro-types.ts (MetroRuntimeHints, MetroBridgeResult, ...)
- src/commands/runtime-types.ts (CommandResult, RuntimeCommand, ...)
- src/commands/diagnostics-types.ts
- src/cli/commands/router-types.ts (ClientCommandParams, ...)
- src/core/interactor-types.ts (Interactor, BackMode, ...)
- src/platforms/ios/runner-session-types.ts (RunnerSession)
- src/utils/screenshot-diff-region-types.ts (MutableDiffRegion)
- src/daemon/handlers/record-trace-types.ts

madge --circular now reports 0 cycles (was 44). No runtime behavior changes.

* fix: preserve wire error codes verbatim (addresses codex review)

The initial weak-types pass validated wire error codes against a closed
union, silently downgrading any unknown code to COMMAND_FAILED. This
dropped signals like AMBIGUOUS_MATCH that handlers emit and clients are
documented to handle (skills/agent-device/references/exploration.md).

- Widen AppErrorCode to 'KnownAppErrorCode | (string & {})' so autocomplete
  of known codes is preserved while any wire code flows through
- toAppErrorCode now preserves any non-empty code; fallback only when
  undefined or empty
- Add AMBIGUOUS_MATCH to KnownAppErrorCode (documented public code)
- Add test coverage for preservation and fallback behavior

* refactor: address review follow-ups

- Add DEVICE_IN_USE to the batch error taxonomy in exploration.md (now
  observable by clients after earlier fix, needs agent-facing guidance)
- Delete one-line src/platforms/linux/index.ts barrel; both consumers
  (core/dispatch, daemon/handlers/snapshot-capture) now import from
  platforms/linux/snapshot directly
- Replace inline { tenantId; runId; leaseId } shapes with MetroBridgeScope
  alias at client-types, metro, and cli/commands/connection-runtime
- Consolidate remaining inline setTimeout wrappers onto utils/timeouts.ts#sleep
  (12 files, ~18 sites). Left test files and the runtime-clock aware helper
  in commands/selector-read-utils alone. Also removes the local sleepMs
  helper from daemon-client.ts.

* refactor: address low-priority review follow-ups

- daemon-client RPC error path: stringify any non-null data.code instead
  of only forwarding strings. Preserves numeric codes from hypothetical
  future proxies/servers; for first-party daemon today this is a no-op
  since handlers already emit strings.
- errors.ts: expand AppErrorCode comment to call out the exhaustiveness
  tradeoff of the '(string & {})' widening for SDK consumers.
2026-04-17 13:22:46 +02:00
Michał Pierzchała bbfddc36c6 chore: add npm package metadata (#424) 2026-04-17 13:11:42 +02:00
Michał Pierzchała 67337e2f0a 0.12.8 v0.12.8 2026-04-17 12:51:54 +02:00
Michał Pierzchała add43ec4f4 fix: prevent rslib publish chunk collisions (#423) 2026-04-17 12:51:34 +02:00
Michał Pierzchała 1eddf53ae9 0.12.7 v0.12.7 2026-04-17 12:26:53 +02:00
Michał Pierzchała 63ab9d625c fix: propagate remote config through remote flows (#422)
* fix: propagate remote config through commands

* fix: complete remote React Native flow

* test: cover remote install source lease reuse

* fix: honor remote config session scope

* refactor: drop remote react native shortcut

* docs: simplify remote tenancy skill flow

* docs: use trusted artifact placeholders

* docs: prune remote tenancy prompt note
2026-04-17 12:26:42 +02:00
Michał Pierzchała 3c8cbcbcfc build: allow manual iOS runner release workflow (#421) 2026-04-17 10:11:45 +02:00
Michał Pierzchała 8bc9d34576 build: fix release workflow temp path expressions (#419) 2026-04-16 18:28:08 +02:00
Michał Pierzchała a53ba204ac 0.12.6 v0.12.6 2026-04-16 18:16:57 +02:00
Michał Pierzchała 4bc6443605 build: publish iOS simulator runner release assets (#418)
* build: publish iOS simulator runner release assets

* build: switch iOS runner release asset to tar.gz

* build: resolve iOS runner from xctestrun metadata
2026-04-16 18:15:44 +02:00
Michał Pierzchała 1b71dfee4c fix: defer remote connect lease and metro setup (#417) 2026-04-16 17:53:04 +02:00
Michał Pierzchała f0eb8c6d4f feat: add runtime admin, batch, diagnostics, and recording commands (#416)
* feat: add runtime admin and orchestration commands

* feat: add runtime diagnostics commands

* refactor: clean up runtime router surface

* refactor: remove runtime cleanup dead weight

* fix: clean up admin install temp inputs on resolve failure
2026-04-16 17:41:16 +02:00
Michał Pierzchała afcd375323 feat: add runtime system and gesture commands (#415) 2026-04-16 15:32:17 +02:00
Michał Pierzchała 2c41225b7b feat: add runtime app commands (#414) 2026-04-16 14:41:10 +02:00
Michał Pierzchała 94d44d5a4f 0.12.5 v0.12.5 2026-04-16 13:03:56 +02:00
Michał Pierzchała 8bcefb754a feat: add runtime command boundary (#412)
* feat: add runtime command boundary

* refactor: harden runtime command boundary

* fix: address runtime boundary review

* fix: preserve selector snapshot flags

* fix: preserve selector get and screenshot cleanup

* fix: harden runtime boundary follow-ups

* fix: close runtime parity gaps

* test: harden android replay navigation

* fix: close screenshot surface edge cases

* test: harden packaged runtime API smoke

* fix: close runtime review edge cases

* test: isolate CLI state dir in unit helpers
2026-04-16 13:03:31 +02:00
Michał Pierzchała 5868ace77b fix: optimize remote install artifact uploads (#413)
* fix: optimize remote install artifact uploads

* refactor: clean up upload client flow

* fix: fall back after direct upload failure

* docs: correct ios install source examples
2026-04-16 12:25:50 +02:00
Michał Pierzchała 364844e01d feat: add recording quality flag (#409)
* feat: add recording quality flag

* test: cover quality edge cases

* fix: scale transform translation in resize

* fix: narrow recording quality flag
2026-04-15 13:18:57 +02:00
Michał Pierzchała 8f7375f788 ci: remove redundant Linux validation and fix unit hang (#411)
* ci: remove redundant linux validation job

* test: add bridge scope to packaged metro smoke
2026-04-15 13:01:09 +02:00
Michał Pierzchała f3a9632491 0.12.4 v0.12.4 2026-04-13 17:32:36 +02:00
Michał Pierzchała e99bbb526e fix: include lease scope in Metro bridge calls (#408) 2026-04-13 17:32:23 +02:00
Michał Pierzchała ac01393a9e 0.12.3 v0.12.3 2026-04-13 14:12:21 +02:00
Michał Pierzchała 39a09f95c4 feat: export Android app parsers (#406) 2026-04-13 14:11:53 +02:00
Michał Pierzchała 47a1529e98 feat: add remote connect lifecycle (#407) 2026-04-13 14:11:40 +02:00
Michał Pierzchała 17317d01ac fix: support saved screenshot diffs (#404) 2026-04-12 14:09:55 +02:00
Michał Pierzchała 657945d241 0.12.2 v0.12.2 2026-04-12 12:45:32 +02:00
Michał Pierzchała 3e0a7b56bb feat: enrich screenshot diff guidance (#403)
* feat: enrich screenshot diff guidance

* fix: address screenshot diff review feedback

* docs: organize screenshot diff skill guidance

* refactor: prune screenshot diff result metadata

* refactor: tighten screenshot diff readout

* refactor: generalize screenshot diff heuristics

* feat: add compact screenshot diff hints

* refactor: prune screenshot diff guidance output
2026-04-12 12:45:15 +02:00
Michał Pierzchała e31ff32b54 0.12.1 v0.12.1 2026-04-11 22:17:09 +02:00
Michał Pierzchała f4f143ced7 fix: restore helper subpath exports (#402)
* fix: restore helper subpath exports

* fix: polish helper subpath typings
2026-04-11 22:16:32 +02:00
Michał Pierzchała b0f52a9905 0.12.0 v0.12.0 2026-04-11 21:37:29 +02:00
Michał Pierzchała d63cfcd956 fix: harden executable override policy (#398) 2026-04-11 21:36:54 +02:00
Michał Pierzchała 43110aa7d3 fix: support portable zip install-source extraction (#401) 2026-04-11 21:08:09 +02:00
Michał Pierzchała 24f398c9a9 refactor: remove scrollintoview command (#400) 2026-04-11 21:07:54 +02:00
Michał Pierzchała 8e42f2e654 fix: harden public API boundaries (#399) 2026-04-11 21:01:09 +02:00
Michał Pierzchała 406b3ed00d 0.11.16 v0.11.16 2026-04-11 20:20:04 +02:00
Michał Pierzchała 0fe724f252 feat: export error contract helpers (#396) 2026-04-11 20:14:46 +02:00
Michał Pierzchała 037caf749f feat: export artifact package resolver (#392) 2026-04-11 20:02:14 +02:00
Michał Pierzchała 0b76783360 feat: export install-source helpers (#393)
* feat: export install-source helpers

* fix: freeze exported archive extensions
2026-04-11 20:00:38 +02:00
Michał Pierzchała d2b02f1b93 feat: export snapshot contracts (#394) 2026-04-11 19:54:34 +02:00
Michał Pierzchała 6f13f60659 feat: export runtime transport helper (#395) 2026-04-11 19:53:24 +02:00
Michał Pierzchała 966fcb2547 feat: export finder helpers (#391) 2026-04-11 19:51:30 +02:00
Michał Pierzchała 84098be37a fix: preserve script argument whitespace (#397) 2026-04-11 19:49:54 +02:00
Michał Pierzchała 6cf63c262c feat: expose selector helper subpath (#384) 2026-04-11 19:07:42 +02:00
Michał Pierzchała e9c473034b 0.11.15 v0.11.15 2026-04-11 16:24:31 +02:00
Michał Pierzchała ffd472a5bf feat: expose typed client command methods (#380) 2026-04-11 16:24:16 +02:00
Michał Pierzchała 60bed774c6 chore: clean up unused exports (#383) 2026-04-11 15:43:39 +02:00