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
Copy file name to clipboardExpand all lines: skills/agent-device/references/remote-tenancy.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Open this file for remote daemon HTTP flows that let an agent running in a Linux
13
13
14
14
## Most common mistake to avoid
15
15
16
-
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, lease, and prepared Metro runtime context.
16
+
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.
17
17
18
18
## Preferred remote flow
19
19
@@ -34,7 +34,7 @@ agent-device fill @e3 "test@example.com"
34
34
agent-device disconnect
35
35
```
36
36
37
-
`connect` resolves the remote profile, verifies daemon reachability through the normal client path, allocates or refreshes the tenant lease, prepares local Metro when the profile has Metro fields, starts the local Metro companion when the bridge needs it, and writes local non-secret connection state for later commands. `disconnect` closes the session when possible, stops the Metro companion owned by that connection, releases the lease, and removes local connection state.
37
+
`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.
38
38
39
39
After `connect`, normal `agent-device` commands use the active remote connection. Do not repeat `--remote-config` on every command.
40
40
@@ -63,18 +63,26 @@ Example `remote-config.json` shape:
63
63
"tenant": "acme",
64
64
"runId": "run-123",
65
65
"sessionIsolation": "tenant",
66
-
"session": "adc-android",
67
66
"platform": "android",
67
+
"metroPublicBaseUrl": "http://127.0.0.1:8081"
68
+
}
69
+
```
70
+
71
+
Optional overrides stay available for advanced cases:
- Keep secrets in env/config managed by the operator boundary. Do not persist auth tokens in connection state.
76
84
- Omit Metro fields for non-React Native flows.
77
-
- Put `tenant`, `runId`, `session`,`sessionIsolation`, `platform`, and `leaseBackend`in the remote profile when possible so agents can run `agent-device connect --remote-config ./remote-config.json` without extra scope flags.
85
+
- Put `tenant`, `runId`, and`sessionIsolation`in the remote profile so agents can run `agent-device connect --remote-config ./remote-config.json` without extra scope flags. Add `platform`, `leaseBackend`, `session`, or Metro overrides only when the default inference is not enough for that flow.
78
86
- Explicit command-line flags override connected defaults. Use them intentionally when switching session, platform, target, tenant, run, or lease scope.
79
87
- For React Native Metro runs with `metroProxyBaseUrl`, `agent-device >= 0.11.12` can manage the local companion tunnel, but Metro itself still needs to be running locally.
80
88
- Use a lease backend that matches the bridge target platform, for example `android-instance`, `ios-instance`, or an explicit `--lease-backend` override.
0 commit comments