You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do not run remote tenant work by repeating `--remote-config` on every command. `--remote-config` is a `connect` input. After connecting, use normal `agent-device` commands; the active connection supplies daemon URL, tenant, run, and session context, then resolves lease and Metro details only when a later command actually needs them.
19
+
Do not mix an arbitrary `--session` plus ad-hoc daemon, tenant, run, or lease flags. That can bypass saved Metro runtime hints. Use one of these patterns instead:
17
20
18
-
## Preferred remote flow
21
+
- Interactive flow: run `connect --remote-config <path>` once, then normal commands, then `disconnect`.
22
+
- Script flow: pass the same `--remote-config <path>` to every command, including `disconnect`.
19
23
20
-
Use this when the agent needs the simplest remote control flow: a Linux sandbox agent talks over HTTP to `agent-device` on a remote macOS host and launches the target app through a checked-in `--remote-config` profile.
24
+
## Choose one flow
25
+
26
+
### Interactive flow
27
+
28
+
Use this when the agent will run several commands in one session.
`connect` resolves the remote profile, generates a local session name when the profile omits one, stores local non-secret connection state, and defers tenant lease allocation plus Metro preparation until a later command needs them. When a command such as `open`, `install`, `apps`, or `snapshot` needs a lease, the client allocates or refreshes it from the connected scope. When a command needs Metro runtime hints, the client prepares Metro locally at that point and starts the local Metro companion when the bridge needs it, including `batch` runs whose steps open an app. `disconnect` closes the session when possible, stops the Metro companion owned by that connection, releases the lease when one was allocated, and removes local connection state.
44
+
After `connect`, normal commands use the active remote connection. End with `disconnect` to release the lease and stop the owned Metro companion.
45
+
46
+
### Self-contained script flow
47
+
48
+
Use this when each command must be explicit and repeatable. Pass the same `--remote-config` to each step.
The first command that needs a lease or Metro runtime prepares and persists it. Later commands with the same `--remote-config` reuse that state. End with `disconnect --remote-config <path>` to release the lease and stop the owned Metro companion.
70
+
71
+
## Behavior summary
38
72
39
-
After `connect`, normal `agent-device` commands use the active remote connection. Do not repeat `--remote-config` on every command.
73
+
-`connect` stores local non-secret connection state and defers tenant lease allocation plus Metro preparation until a later command needs them.
74
+
- Commands such as `install-from-source`, `open`, `snapshot`, and `apps` allocate or refresh the lease when needed.
75
+
-`open` prepares Metro runtime hints when the remote profile has Metro fields and no compatible runtime is already saved.
76
+
-`batch` also prepares Metro when any step opens an app and that step does not provide its own runtime.
77
+
-`disconnect` closes the session when possible, stops the Metro companion owned by the connection, releases the lease when one was allocated, and removes local connection state.
- Use `install` or `reinstall` for local paths; remote daemons upload local artifacts automatically.
50
-
- Use `install-from-source` for artifact URLs the remote daemon can reach.
90
+
- Use `install-from-source`only for trusted, operator-approved artifact URLs the remote daemon can reach. Do not fetch arbitrary user-supplied URLs.
51
91
- For local-path versus URL artifact rules, follow [bootstrap-install.md](bootstrap-install.md).
52
92
53
93
Use `agent-device connection status --session adc-android` to inspect the active connection without reading JSON state manually. Status output must not include auth tokens.
0 commit comments