Skip to content

Commit 7a21a50

Browse files
committed
chore: document isolation scopes in agent-device skills
1 parent e31d48b commit 7a21a50

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

skills/agent-device/SKILL.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Use this skill as a router, not a full manual.
2626
- Debug/crash: `open <app>` -> `logs clear --restart` -> reproduce -> `network dump` -> `logs path` -> targeted `grep`
2727
- Replay drift: `replay -u <path>` -> verify updated selectors
2828
- Remote multi-tenant run: allocate lease -> run commands with tenant isolation flags -> heartbeat/release lease
29+
- Device-scope isolation run: set iOS simulator set / Android allowlist -> run selectors within scope only
2930

3031
## Canonical Flows
3132

@@ -92,6 +93,8 @@ curl -sS http://127.0.0.1:${AGENT_DEVICE_DAEMON_HTTP_PORT}/rpc \
9293

9394
```bash
9495
agent-device devices
96+
agent-device devices --platform ios --ios-simulator-device-set /tmp/tenant-a/simulators
97+
agent-device devices --platform android --android-device-allowlist emulator-5554,device-1234
9598
agent-device open [app|url] [url]
9699
agent-device open [app] --relaunch
97100
agent-device close [app]
@@ -103,6 +106,12 @@ For Android emulators by AVD name, use `boot --platform android --device <avd-na
103106
For Android emulators without GUI, add `--headless`.
104107
Use `--target mobile|tv` with `--platform` (required) to pick phone/tablet vs TV targets (AndroidTV/tvOS).
105108

109+
Isolation scoping quick reference:
110+
- `--ios-simulator-device-set <path>` scopes iOS simulator discovery + command execution to one simulator set.
111+
- `--android-device-allowlist <serials>` scopes Android discovery/selection to comma/space separated serials.
112+
- Scope is applied before selectors (`--device`, `--udid`, `--serial`); out-of-scope selectors fail with `DEVICE_NOT_FOUND`.
113+
- With iOS simulator-set scope enabled, iOS physical devices are not enumerated.
114+
106115
TV quick reference:
107116
- AndroidTV: `open`/`apps` use TV launcher discovery automatically.
108117
- TV target selection works on emulators/simulators and connected physical devices (AndroidTV + AppleTV).
@@ -172,6 +181,8 @@ agent-device batch --steps-file /tmp/batch-steps.json --json
172181
- If using `--save-script`, prefer explicit path syntax (`--save-script=flow.ad` or `./flow.ad`).
173182
- For tenant-isolated remote runs, always pass `--tenant`, `--session-isolation tenant`, `--run-id`, and `--lease-id` together.
174183
- Use short lease TTLs and heartbeat only while work is active; release leases immediately after run completion/failure.
184+
- Env equivalents for scoped runs: `AGENT_DEVICE_IOS_SIMULATOR_DEVICE_SET` (compat `IOS_SIMULATOR_DEVICE_SET`) and
185+
`AGENT_DEVICE_ANDROID_DEVICE_ALLOWLIST` (compat `ANDROID_DEVICE_ALLOWLIST`).
175186

176187
## Security and Trust Notes
177188

skills/agent-device/references/session-management.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,22 @@ Sessions isolate device context. A device can only be held by one session at a t
2525
- For deterministic replay scripts, prefer selector-based actions and assertions.
2626
- Use `replay -u` to update selector drift during maintenance.
2727

28+
## Scoped device isolation
29+
30+
Use scoped discovery when sessions must not see host-global device lists.
31+
32+
```bash
33+
agent-device devices --platform ios --ios-simulator-device-set /tmp/tenant-a/simulators
34+
agent-device devices --platform android --android-device-allowlist emulator-5554,device-1234
35+
```
36+
37+
- Scope is applied before selectors (`--device`, `--udid`, `--serial`).
38+
- If selector target is outside scope, resolution fails with `DEVICE_NOT_FOUND`.
39+
- With iOS simulator-set scope enabled, iOS physical devices are not enumerated.
40+
- Environment equivalents:
41+
- `AGENT_DEVICE_IOS_SIMULATOR_DEVICE_SET` (compat: `IOS_SIMULATOR_DEVICE_SET`)
42+
- `AGENT_DEVICE_ANDROID_DEVICE_ALLOWLIST` (compat: `ANDROID_DEVICE_ALLOWLIST`)
43+
2844
## Listing sessions
2945

3046
```bash

0 commit comments

Comments
 (0)