Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2171e8a
fix(daemon): refuse leased requests that name no session at admission…
airowe Nov 13, 2026
6fcb97f
refactor(plugins): remove the version 1 provider plugin contract (#37…
thymikee Nov 13, 2026
1a8f4fd
refactor(sdk): require explicit hosts in 0.22 (#4521)
thymikee Nov 13, 2026
709d7ac
test(maestro): prepare export and suite coverage for plugin extractio…
thymikee Nov 13, 2026
f5d1221
test(maestro): keep optional scroll continuation assertion visible (#…
thymikee Nov 14, 2026
cbcd529
test(sdk): give upstream artifact fixtures an explicit cwd
thymikee Nov 14, 2026
7113072
test(host-kit): isolate ps process fixtures from host proc identity (…
thymikee Nov 14, 2026
b3c6ec2
ci: prepare the 0.22 source branch for nightly releases (#4546)
thymikee Nov 14, 2026
4823943
build(maestro): prepare the private v2 factory and packed contracts (…
thymikee Nov 16, 2026
11d3028
refactor(maestro): load the engine as a managed replay plugin (#4505)
thymikee Nov 16, 2026
abc3ca2
chore(gates): keep replay data contracts and their consumers atomic (…
thymikee Nov 16, 2026
5c5db3f
feat(plugins): validate native execution in the managed replay regist…
thymikee Nov 16, 2026
518056e
feat(replay): deliver optional execution with real routing consumers …
thymikee Nov 16, 2026
7cce03e
test(connect): isolate BrowserStack provider scenarios (#4578)
thymikee Nov 16, 2026
3f2e11b
fix(cli): remove internal nightly update routing (#4588)
thymikee Nov 16, 2026
4f2cadb
test: unlink directory symlink fixtures
thymikee Nov 16, 2026
d353396
fix: reconcile unrun lockfile dependency
thymikee Nov 16, 2026
d16e22c
docs: clarify shared execution locks
thymikee Nov 16, 2026
7fbdc88
test: provide artifact adapter working directory
thymikee Nov 16, 2026
31fc8df
refactor(client): remove managed daemon lifecycle (#4614)
thymikee Nov 16, 2026
976b911
fix(android): retain foreground close fence evidence (#4619)
thymikee Nov 17, 2026
e3211ae
Fix Android smoke catalog readiness (#4624)
thymikee Nov 17, 2026
7ccde11
feat(plugins): install local artifacts through the plugin manager (#4…
thymikee Nov 17, 2026
9717295
test(android): retain original helper diagnostics (#4648)
thymikee Nov 17, 2026
eb8779b
refactor(browserstack): extract the v2 provider plugin (#4579)
thymikee Nov 17, 2026
9a25700
fix: bound command output and colocate fuzz coverage (#4621)
thymikee Nov 17, 2026
af80d8e
fix(plugins): enforce connection provider admission (#4636)
thymikee Nov 17, 2026
873de91
feat: extract AWS Device Farm provider plugin (#4617)
thymikee Nov 17, 2026
0e633ab
test(maestro): install the packed plugin through the plugin manager (…
thymikee Nov 18, 2026
af9a27c
fix(plugins): match provider install guidance to the release (#4694)
thymikee Nov 18, 2026
c04bd19
refactor(sdk): remove the bundled Limrun SDK facade (#4691)
thymikee Nov 18, 2026
92f96af
test(replay): run managed packed-CLI replay and suite through plugins…
thymikee Nov 18, 2026
84e669a
feat(plugins): add host capability facets for provider setup
thymikee Nov 18, 2026
5321dff
refactor(plugins): keep provider facets inside their own authority
thymikee Nov 18, 2026
d1a6dcf
refactor(plugins): keep provider operations with their owning authori…
thymikee Nov 19, 2026
81136d5
fix(limrun): enforce Apple tools allowlist at runner construction
thymikee Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/aws-device-farm-plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'agent-device': minor
---

AWS Device Farm moves to a private, unpublished plugin. After publication, CLI hosts can install it with `agent-device plugins add @agent-device/aws-device-farm`; finish sessions, stop the detached daemon for its matching state directory, and retry. Embedded hosts import the factory, pass it to `startAgentDevice({ plugins: [awsDeviceFarm()] })`, and close and recreate the runtime after changes.
5 changes: 5 additions & 0 deletions .changeset/browserstack-provider-plugin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'agent-device': minor
---

Extract BrowserStack out of the bundled WebDriver provider into the new `@agent-device/browserstack` plugin package. Install it with `agent-device plugins add @agent-device/browserstack`, then close your sessions and run `agent-device daemon stop --state-dir <path>` for your daemon before reconnecting. Commands for a saved BrowserStack connection keep working while the plugin is installed; without it, `connect browserstack` explains how to install the plugin.
11 changes: 11 additions & 0 deletions .changeset/explicit-sdk-hosts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
'agent-device': minor
---

Require explicit SDK host dependencies in 0.22. Part of #3759 section 3.

Pass `{ env, cwd }` to `runAndroidShell(device, words, host, options?)`, `runAndroidExecOut(device, words, host, options?)`, `resolveAndroidArchivePackageName(archivePath, host, signal?)`, `prepareMetroRuntime(options, host)`, and `new LimrunRuntime(options, host)`. For example, capture `const host = { env: { ...process.env }, cwd: process.cwd() }` in your entry point, then call `await prepareMetroRuntime(options, host)`.

`resolveRemoteConfigProfile({ configPath, cwd, env })` requires `env`, and `createLocalArtifactAdapter({ cwd })` requires `cwd`. Archive inspection resolves relative paths from the supplied host and no longer shares a cached SDK tool across hosts. The internal contracts, host-kit, remote, and platform-android packages are bundled into `agent-device`; this changeset covers their affected public APIs.

Executable captures and `startAgentDevice`'s optional-host capture remain available. See [Build an integration](/docs/build-an-integration#migrate-sdk-hosts-to-022) for migration examples.
5 changes: 5 additions & 0 deletions .changeset/managed-plugin-artifact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'agent-device': minor
---

Install local plugin tarballs with `plugins add` or the plugin manager API. Artifact selections record their version and SHA-512 integrity. To replace one, run `plugins remove <package>` and then `plugins add ./plugin.tgz`. Close active sessions and restart the daemon to apply the changed selection.
7 changes: 7 additions & 0 deletions .changeset/optional-maestro-engine.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'agent-device': minor
---

Release prerequisite: the plugin remains private and unavailable from npm until a usable package is published through the configured release workflow.

Maestro YAML replay, suites, and export now require the optional `@agent-device/maestro` plugin. After publication, install it on each CLI and store-backed daemon host that uses these flows. Finish sessions and stop the matching daemon. Embedded hosts supply the factory through `startAgentDevice({ plugins })` and close/recreate the returned runtime; they do not use the CLI store or daemon stop command. Retry your original command to start a daemon with the updated plugin set; flow syntax and arguments stay the same. Native `.ad` replay remains available without this plugin.
8 changes: 8 additions & 0 deletions .changeset/optional-native-replay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'agent-device': minor
'@agent-device/replay': minor
---

Release prerequisite: the replay plugin remains private and unpublished. Its npm installation command below is unavailable until a usable package is published through the configured release workflow.

Native `.ad` replay and all test suites require the optional `@agent-device/replay` plugin on the daemon host. Run `agent-device plugins add @agent-device/replay`, finish your sessions and restart that daemon, then retry the original invocation with all its arguments. Remote hosts need their own installation. Embedded hosts supply the version 2 factory through `startAgentDevice({ plugins: [replay()] })` and own runtime replacement. Existing scripts, resume and repair syntax stay the same. Ordinary script recording remains in core.
5 changes: 5 additions & 0 deletions .changeset/remove-managed-client-lifecycle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'agent-device': minor
---

Clients attach to an existing daemon and no longer start, replace, or retire it on timeout. This also applies to `client.replay.run()` and `client.replay.test()`; they no longer start a private daemon. Remove `daemonLifecycle: 'managed'` and call `ensureDaemon({ stateDir })` before creating a client for a detached daemon. To own a daemon in your process, call `startAgentDevice({ stateDir })` from `agent-device` and close its returned handle. CLI and MCP commands continue to ensure their daemon, including private one-shot replay/test startup and cleanup.
9 changes: 9 additions & 0 deletions .changeset/remove-provider-plugin-v1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'agent-device': minor
'@agent-device/testmu': minor
'@agent-device/revyl': minor
---

Remove the version 1 provider plugin contract. A store package is now discovered only through its exports: `./agent-device`, or the package root when that subpath is absent. The host no longer reads an `agentDevicePlugin` manifest to choose an entry or to declare a provider, connection capabilities, or credential variables, and `agent-device plugins add` no longer refuses a package for a provider another manifest claims — the registry settles a duplicate provider id when the daemon next composes its plugins, as the first claim wins.

Migrate a plugin by exporting its factory from `./agent-device` and returning the manifest's values from the factory: `provider`, `credentials: { variables: [...] }`, an optional `connection`, and `setup(host)` that returns `{ runtime, platformModule }` or `{ webDriver }`, with `apiVersion: 2`. See [Provider plugins](/docs/plugins) for the full migration. A plugin object with an `apiVersion` other than 2 is listed as `failed` with `incompatible_plugin`, and a default export that is not a plugin factory with `invalid_plugin`; the daemon starts without either.
34 changes: 21 additions & 13 deletions .fallowrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@
"tools/depgraph-view/app.js",
"scripts/check-provider-plugin.mjs",
"scripts/check-affected/command.ts",
"packages/provider-aws-device-farm/test/package-smoke.mjs",
"packages/provider-browserstack/test/package-smoke.mjs",
"packages/provider-browserstack/tsdown.config.ts",
"packages/provider-testmu/test/package-smoke.mjs",
"packages/maestro/test/package-artifact.test.mjs",
"packages/maestro/test/packed-clickability.mjs",
"packages/maestro/test/packed-screen-origin.mjs",
"packages/maestro/test/package-test-support.mjs",
"packages/maestro/test/package-smoke.mjs",
"packages/replay/test/package-smoke.mjs",
"packages/replay/test/packed-runtime.mjs",
"packages/maestro/test/packed-runtime.mjs",
"packages/maestro/tsdown.config.ts",
"packages/maestro/src/plugin.ts",
"packages/replay/src/plugin.ts",
"packages/replay/tsdown.config.ts",
"packages/provider-testmu/tsdown.config.ts",
"packages/provider-testmu/src/plugin.ts",
"packages/provider-revyl/test/package-smoke.mjs",
"packages/provider-revyl/tsdown.config.ts",
"packages/provider-revyl/src/plugin.ts",
"packages/provider-webos/test/package-smoke.mjs",
"packages/provider-webos/tsdown.config.ts",
"packages/provider-tizen/test/package-smoke.mjs",
Expand Down Expand Up @@ -100,9 +113,9 @@
// @agent-device/provider-limrun owns the source import, while the published
// root build externalizes @limrun/api and retains runtime imports in packed chunks.
"@limrun/api",
// @agent-device/testmu imports agent-device type-only, and its tsconfig maps those specifiers
// through this workspace link to core source so typecheck needs no build; Fallow then credits
// the source files rather than the package.
// @agent-device/browserstack and @agent-device/testmu import agent-device type-only, and their
// tsconfigs map those specifiers through this workspace link to core source so typecheck needs
// no build; Fallow then credits the source files rather than the package.
"agent-device",
// Nothing in the root imports the TV plugins or the tv-cdp package they bundle, but layering
// requires the root manifest to declare every workspace package.
Expand Down Expand Up @@ -152,13 +165,8 @@
"exports": ["*"]
},
{
// A published provider package's default export is its plugin contract; packages/plugins/src/load.ts imports the package by name at runtime and reads `default`.
"file": "packages/provider-*/src/index.ts",
"exports": ["default"]
},
{
// The version 1 entry a provider package's `agentDevicePlugin.entry` names; hosts without the version 2 contract import the built file and read `default`.
"file": "packages/provider-*/src/plugin.ts",
// A published plugin's default export is its contract; the plugin loader imports the installed package's resolved entry at runtime and reads `default`.
"file": "packages/{provider-*/src/index,maestro/src/plugin,replay/src/plugin}.ts",
"exports": ["default"]
},
{
Expand Down Expand Up @@ -288,7 +296,7 @@
},
{
// Tool config default exports, loaded by the tool rather than imported.
"file": "{oxlint.config.ts,tsdown.config.ts,packages/provider-*/tsdown.config.ts,packages/proxy/tsdown.config.ts,vitest.mutation.config.ts}",
"file": "{oxlint.config.ts,tsdown.config.ts,packages/provider-*/tsdown.config.ts,packages/maestro/tsdown.config.ts,packages/replay/tsdown.config.ts,packages/proxy/tsdown.config.ts,vitest.mutation.config.ts}",
"exports": ["default"]
},
{
Expand Down
9 changes: 9 additions & 0 deletions .github/actions/run-gate/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ outputs:
runs:
using: composite
steps:
- name: Install first-party replay plugins for execution gates
if: contains(fromJSON('["unit", "unit-ci", "provider-integration", "integration-node", "macos-coverage", "web-smoke", "mutation", "fuzz-parsers", "maestro-differential", "replay-ios", "replay-ios-device", "replay-macos", "replay-linux", "replay-android", "linux-command-evidence", "concurrency-torture"]'), inputs.gate)
shell: bash
run: |
set -euo pipefail
pnpm --filter @agent-device/maestro --filter @agent-device/replay build
export AGENT_DEVICE_HOME="${AGENT_DEVICE_HOME:-$RUNNER_TEMP/agent-device-replay-plugins}"
node --experimental-strip-types scripts/install-workspace-replay-plugins.ts
echo "AGENT_DEVICE_HOME=$AGENT_DEVICE_HOME" >> "$GITHUB_ENV"
- id: run
shell: bash
env:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
if: ${{ !github.event.pull_request.draft }}
runs-on: blacksmith-4vcpu-ubuntu-2404
timeout-minutes: 80
env:
AGENT_DEVICE_HOME: ${{ github.workspace }}/.tmp/agent-device-android-smoke-home
steps:
- name: Checkout
uses: useblacksmith/checkout@2b9fe87d796feea153b455ec2f3125b471a7b0e7 # v1.8.2
Expand Down Expand Up @@ -91,6 +93,7 @@ jobs:
ANDROID_SERIAL="$(adb devices | awk 'NR > 1 && $2 == "device" { print $1; exit }')"
test -n "$ANDROID_SERIAL"
pnpm gate build
node --experimental-strip-types scripts/install-workspace-replay-plugins.ts
pnpm clean:daemon
AGENT_DEVICE_ANDROID_E2E=1 AGENT_DEVICE_ANDROID_E2E_TIER=smoke AGENT_DEVICE_ANDROID_SERIAL="$ANDROID_SERIAL" AGENT_DEVICE_FIXTURE_APP_PATH="${{ steps.fixture-app.outputs.apk-path }}" AGENT_DEVICE_FIXTURE_APP_ID="${{ steps.fixture-app.outputs.app-id }}" node --experimental-strip-types scripts/node-test-tmpdir.ts --test test/integration/smoke-android-emulator.test.ts
node --experimental-strip-types src/bin.ts test test/integration/replays/android/emulator/01-settings.ad --retries 2 --report-junit test/artifacts/replays-android-smoke.junit.xml
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/apple.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
runs-on: blacksmith-6vcpu-macos-26
timeout-minutes: 90
env:
AGENT_DEVICE_HOME: ${{ github.workspace }}/.tmp/agent-device-apple-smoke-home
BASE_SHA: ${{ github.event.pull_request.base.sha }}
IOS_STATE_DIR: ${{ github.workspace }}/.tmp/ios-agent-device-state
MACOS_STATE_DIR: ${{ github.workspace }}/.tmp/macos-agent-device-state
Expand Down Expand Up @@ -83,6 +84,8 @@ jobs:
uses: ./.github/actions/run-gate
with:
gate: build
- if: matrix.platform == 'ios' && steps.build.outcome == 'success'
run: node --experimental-strip-types scripts/install-workspace-replay-plugins.ts
- name: iOS smoke tests
id: ios
uses: ./.github/actions/smoke-ios-run
Expand Down
26 changes: 22 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ on:
push:
branches:
- main
- '0.22'

permissions:
contents: read

# Release and nightly publishing require green CI on the exact main commit, so a
# main push never cancels or replaces another commit's run.
# Release and nightly publishing require green CI on the exact source commit, so a
# push never cancels or replaces another commit's run.
concurrency:
group: >-
ci-${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
Expand Down Expand Up @@ -101,11 +102,28 @@ jobs:
uses: ./.github/actions/run-gate
with: { gate: build }

- name: Verify the core and standalone Maestro packages
uses: ./.github/actions/run-gate
with: { gate: package }

- name: Verify emitted chunk ownership
uses: ./.github/actions/run-gate
with: { gate: bundle-owner-files }

# The build runs on the default toolchain Node and the package is verified on the minimum
- name: Setup Node.js 22.13
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: '22.13.0'

- name: Verify the repository build on Node.js 22.13
uses: ./.github/actions/run-gate
with: { gate: build }

- name: Verify development packaging on Node.js 22.13
uses: ./.github/actions/run-gate
with: { gate: package }

# The build runs on the development floor and the package is verified on the minimum
# supported Node, so this job covers what a user on `engines.node` floor actually installs.
- name: Setup Node.js 22.12
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
Expand All @@ -117,7 +135,7 @@ jobs:
#
# Runs the script directly rather than through `pnpm check:package`: the repo's pinned pnpm
# requires Node >= 22.13 and refuses to start on the 22.12 floor this job exists to cover. The
# gate itself only needs `node` and `npm`, so it is the package.json script minus the launcher.
# root-package probe only needs `node` and `npm`. The full package gate runs above.
- name: Verify the published package on Node.js 22.12
run: node --experimental-strip-types scripts/check-package.ts

Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/conformance-differential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ jobs:
- name: Setup toolchain
uses: ./.github/actions/setup-node-pnpm

- name: Build and install the workspace Maestro plugin
run: |
pnpm --filter @agent-device/maestro build
pnpm --filter @agent-device/replay build
export AGENT_DEVICE_HOME="$RUNNER_TEMP/agent-device-maestro-home"
node --experimental-strip-types scripts/install-workspace-replay-plugins.ts
echo "AGENT_DEVICE_HOME=$AGENT_DEVICE_HOME" >> "$GITHUB_ENV"

- name: Restore and build iOS XCTest runner
uses: ./.github/actions/setup-apple-runner-build
with:
Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Works with Claude Code, Codex, Cursor, Windsurf, Cline, Goose, and any agent tha
Install the CLI and check setup. It requires Node.js 22.12 or newer; web automation requires Node.js 24 or newer. See [Installation](https://agent-device.dev/docs/installation) for target requirements.

```bash
npm install -g agent-device@latest
npm install -g agent-device@nightly-0.22
agent-device doctor
agent-device help workflow
```
Expand Down Expand Up @@ -101,16 +101,21 @@ See [AI agent setup](https://agent-device.dev/docs/agent-setup) for per-client s
`createAgentDeviceClient()` gives Node.js code typed access to the same commands, as model tools in your own agent or from orchestration code:

```ts
import { createAgentDeviceClient } from 'agent-device';
import { createAgentDeviceClient, ensureDaemon, isAgentDeviceError } from 'agent-device';

await ensureDaemon();
const client = createAgentDeviceClient({ session: 'qa-run' });
try {
await client.apps.open({ app: 'com.apple.Preferences', platform: 'ios' });
const snapshot = await client.capture.snapshot({ interactiveOnly: true });
const button = snapshot.nodes.find((node) => node.role === 'button');
if (button) await client.interactions.press({ ref: button.ref });
} finally {
await client.sessions.close();
await client.sessions.close().catch((error) => {
if (isAgentDeviceError(error) && error.code === 'SESSION_NOT_FOUND') return;
console.error('Session cleanup failed:', error);
process.exitCode = 1;
});
}
```

Expand Down Expand Up @@ -151,7 +156,7 @@ The same session and evidence model works at every step: the agent explores the
| --- | --- | --- |
| Local | Trying commands and debugging apps on simulators, emulators, physical devices, macOS, and Linux. | Follow the Quick Start. |
| CI/CD | Automated pull request and merge validation with replay scripts and captured artifacts. | Try the [EAS workflow template](https://github.com/callstackincubator/eas-agent-device/blob/main/.eas/workflows/agent-qa-mobile.yml). |
| Cloud / remote | Linux runners, managed devices, and remote jobs. | Set up a [remote proxy](https://agent-device.dev/docs/remote-proxy), connect a [device cloud](https://agent-device.dev/docs/device-clouds) (BrowserStack, AWS Device Farm, TestMu AI, Limrun), or [contact Callstack](mailto:hello@callstack.com) for team QA. |
| Cloud / remote | Linux runners, managed devices, and remote jobs. | Set up a [remote proxy](https://agent-device.dev/docs/remote-proxy), connect a [device cloud](https://agent-device.dev/docs/device-clouds) (BrowserStack, AWS Device Farm, and TestMu AI through `agent-device plugins add`, or Limrun), or [contact Callstack](mailto:hello@callstack.com) for team QA. |

## How it works

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Foundation
import XCTest

/// Replays `contracts/fixtures/snapshot-actionability-policy.json` against the Swift predicate. The
/// TypeScript twin replays the same rows in `scripts/ios-snapshot-differential.test.ts`.
/// TypeScript twin replays the same rows in `packages/capture-kit/test/ios-snapshot-differential.test.ts`.
final class ActionabilityPolicyTests: XCTestCase {
private struct Table: Decodable {
let cases: [PolicyCase]
Expand Down
Loading
Loading