Skip to content

Latest commit

 

History

History
27 lines (25 loc) · 11.4 KB

CHANGELOG.md

File metadata and controls

27 lines (25 loc) · 11.4 KB

Changelog

Unreleased

  • Behavior change: resolveHubAppReference, shipped through agent-device/plugins/webdriver, now needs cwd to resolve a relative app path. Without it the call fails with INVALID_ARGS and details.reason: provider_app_cwd_missing; it used to resolve against the process's working directory. Absolute paths, URLs and provider references are unaffected. The daemon fills it from the client's working directory (or its host's) for every provider lease request, so connect and lease_allocate are unchanged.
  • Fix ensureDaemon(), the CLI and MCP killing a daemon they had just asked to leave. After the daemon answers the quiesce request with draining, the client now waits up to 60 s for it to exit by itself and clean up its registration, so plugin disposal and lease finalization finish (on Windows a signal ends the process outright, and on POSIX a drain longer than 3 s was killed). A daemon still running at the deadline that fails its liveness probes is force-retired; one that still answers is left running and the call fails with details.reason: 'daemon-drain-timeout', with a hint naming agent-device daemon stop --state-dir <path>.
  • @agent-device/testmu is now a version 2 provider plugin. import testmu from '@agent-device/testmu' gives a factory, testmu({ credentials: { username, accessKey } }), that reads those credentials instead of LT_USERNAME and LT_ACCESS_KEY; without options it reads the variables as before. The package still declares the version 1 plugin entry, so agent-device plugins add @agent-device/testmu keeps working on hosts that predate the version 2 contract.
  • Provider plugins have a new contract. A package exports a factory at ./agent-device that returns { apiVersion: 2, provider, credentials, connection?, setup(host) }, typed by AgentDevicePluginFactory from agent-device/plugins. The store calls the factory with the package's config.json options, and a JavaScript host can call it directly. Version 1 plugins (agentDevicePlugin.apiVersion: 1) keep loading.
  • Bundled providers and installed plugins now register through one registry, in that order, with a third slot for embedder plugins (#3757). The first plugin to name a provider id claims it; a later duplicate is recorded as failed, and cloud and proxy stay reserved.
  • A plugin that fails to load, validate, or set up no longer stops the daemon. It is listed as failed with a typed error.reason, and the other providers still register. The new agent-device daemon status [--json] shows the inventory, which the daemon also publishes in daemon.json; plugins list --json works without a daemon and reports a running daemon's inventory under daemon.
  • The client reads provider credential variable names from that inventory, narrowed per lease backend, and falls back to version 1 manifests. A Limrun credential fingerprint now hashes the exact variable values, so padding whitespace around a value counts as a change, as it does for BrowserStack.
  • A partial Limrun instance set now appears in daemon status as a failed provider and as provider_plugin_failed in daemon.log, replacing provider_runtime_skipped.
  • Behavior change: the CLI and MCP now call ensureDaemon() explicitly once their config is resolved, then attach to the daemon it leaves. A command that finds a daemon from another version or build replaces it only if the daemon reports no request, session, repair session or live lease. A resumable upload still streaming and a host human-control hold that names no lease are not counted, so a replacement can end them. A daemon that answers nothing on any transport is retired after repeated failed liveness probes, which cannot show it idle. A busy one fails the command with details.reason: 'daemon-busy' instead of being replaced with its sessions, and a daemon from a release that predates quiescing fails it with 'daemon-incompatible'; stop either with agent-device daemon stop --state-dir <path>. The takeover notice moves from Replacing daemon … : <reason> to Replaced idle daemon … (an incompatible daemon) or Replaced unreachable daemon … (one that answered nothing). A request that times out no longer retires an unresponsive daemon from the CLI or MCP; the error names agent-device daemon stop --state-dir <path>. A one-shot replay or test with an explicit --state-dir leaves the daemon it started running until its idle reap instead of stopping it. Remote --daemon-base-url connections and replay on its private ephemeral daemon are unchanged. Node.js clients keep daemonLifecycle: 'managed' until 0.22.
  • Add ensureDaemon({ stateDir }) and the client config daemonLifecycle: 'attach' | 'managed'. An attach client connects to the daemon registered in the state directory and never starts, replaces or kills one, including after a request times out. It fails with details.reason: 'daemon-not-running' (the hint points at ensureDaemon()) or 'daemon-incompatible' (both identities in details, the hint names agent-device daemon stop). ensureDaemon() starts a missing daemon and replaces an incompatible one that answers only through an authenticated quiesce request the daemon answers itself (a resumable upload still streaming and a human-control hold that names no lease are not counted, so a replacement can end them): it refuses with daemon-busy while any request is in flight or any session, repair session or live lease exists, and a daemon from a release before this one is never replaced. A registered daemon that answers nothing is retired, as is one that times out on the quiesce request and then fails repeated liveness probes; neither can be asked. A remote daemonBaseUrl connection never starts or retires a local daemon in either mode. managed stays the default and behaves as before until 0.22.
  • lease_allocate (and client.leases.allocate()) with a leaseProvider that no registered runtime claims now refuses before recording a lease, with UNSUPPORTED_OPERATION, error.details.reason: provider-not-registered, details.provider, details.registeredProviders, and details.failedPlugins naming a plugin that failed to register. Previously a plugin provider that the daemon never loaded passed admission and recorded a lease with no device behind it. Leases with no provider (a leaseBackend alone included), proxy and cloud need no runtime and still allocate. Restart the daemon with the provider configured, then retry.
  • Add uninstall <app> and client.apps.uninstall({ app }) to remove an installed app on adb-backed Android targets, iOS simulators, and CoreDevice iOS devices. Both report wasInstalled. A package name or bundle id that is not installed succeeds with wasInstalled: false. Other targets, Appium and Limrun sessions included, refuse it before anything runs.
  • Add settings mobile-data on|off for adb-backed Android targets. It switches mobile data through svc data and reports the mobileData state stored in the global mobile_data row; multi-SIM read-back is not covered yet. Every other target refuses it before anything runs, and --app is refused because the switch is device-wide.
  • On iOS, a fill that runs under a degraded XCTest snapshot channel now aims at a point, including ref, selector and replay fills. When the runner identifies no text input under that point, it refuses with NO_TEXT_INPUT_AT_POINT (error.details.reason: no_text_input_at_point, dispatched: no) before dispatching its focus tap, and no field changes; when the input lookup itself cannot answer, it refuses with TEXT_INPUT_PROBE_UNAVAILABLE (error.details.reason: text_input_probe_unavailable). Previously such a fill cleared and typed through the app-level first responder, so it could rewrite a field the caller never named, or report a clear failure after emptying it. A ref or selector fill whose rect centre misses the real field (an outer container, a non-input node) now needs a point inside the input's own rect.
  • Opening a macOS app by bundle identifier now waits briefly when the app is already running but not yet registered with LaunchServices — the case when a supervisor or dev script started it directly — and if registration arrives within that bounded window the open attaches to the running copy, so the session drives the app the caller started, with its arguments. A copy still unlisted when the window closes gets the plain open as before, which can still duplicate; the wait only bounds the race, it does not close it. Launching an app that is not running costs one extra LaunchServices lookup and one process-table read, plus one bundle-identifier read when app-shaped processes exist.
  • Limrun iOS snapshots no longer fail when the instance reports a numeric or boolean accessibility value (the system photo picker's tabs report 1/0): the provider seam normalizes variant scalars to text, the way the Apple tree does. Limrun nodes now also publish selected: true for nodes carrying the Selected trait, so snapshot output and selected: selectors can tell a picked photo from an unpicked one.
  • settings refuses a setting the target does not serve before anything changes, with UNSUPPORTED_OPERATION, settings <setting> is not supported on this device, and the target's error.details.reason (such as unsupported-platform-leaf). This replaces the macOS INVALID_ARGS refusal and the Apple setting-unsupported-on-leaf reason, and now also covers settings that used to reach the device first, such as Android reset-keychain or Apple animations.
  • settings refuses, before touching the device, a state its setting does not accept (Invalid <setting> state: …), a permission action or mode its target does not take (such as permission deny accessibility), and a stray extra argument (such as clear-app-state <app> <extra>). The CLI and the daemon accept the same state spellings, in any casing or surrounding whitespace.
  • alert wait 0 on Android reports an alert that is already visible instead of timing out.
  • settings --help describes each setting on its own line, and its usage folds settings that share a form.
  • Added (android): telephony call|accept|cancel <number> and telephony sms <number> <text>, plus client.command.telephony({ action, number, text }), simulate an incoming phone call or SMS on an Android emulator through the emulator console (adb emu gsm …, adb emu sms send …), so a test can check how an app behaves when a call or message interrupts it, such as video playback pausing and resuming. The number must be up to 15 digits with an optional leading +; SMS text is sent as one adb argument, with backslashes and line breaks escaped for the console; the emulator drops characters outside the Basic Multilingual Plane, such as emoji. A console refusal (for example accept for a number with no call) fails with COMMAND_FAILED and reason: telephony-console-refused. Physical Android devices, iOS, every other target, and the WebDriver (Appium) and Limrun providers refuse with UNSUPPORTED_OPERATION.
  • fold on Android emulators: the posture and hinge-angle console calls now time out after 10 s instead of waiting on a console that stopped answering, and a failed call names only its first two words (for example adb emu sensor get).
  • Carry provider keyboard facts through snapshots. Appium captures, including wait polls and fill pre-captures, add one sequential keyboard visibility probe with a 500 ms timeout. Probe results preserve tap-time docked-tree checks; unavailable probes leave visibility unknown.