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
Add remote HTTP daemon mode with lease admission controls (#136)
* fix: add daemon remote HTTP server mode with isolation controls
* feat: add tenant lease lifecycle and admission control
* refactor: simplify lease scope and rpc method routing
* fix: correct smoke expectations for close without session
-`--run-id <id>` run identifier used with tenant-scoped lease admission
220
+
-`--lease-id <id>` active lease identifier used with tenant-scoped lease admission
214
221
-`--count <n>` repeat count for `press`/`swipe`
215
222
-`--interval-ms <ms>` delay between `press` iterations
216
223
-`--hold-ms <ms>` hold duration per `press` iteration
@@ -262,7 +269,7 @@ Sessions:
262
269
- If a session is already open, `open <app|url>` switches the active app or opens a deep link URL.
263
270
-`close` stops the session and releases device resources. Pass an app to close it explicitly, or omit to just close the session.
264
271
- Use `--session <name>` to manage multiple sessions.
265
-
- Session scripts are written to `~/.agent-device/sessions/<session>-<timestamp>.ad` when recording is enabled with `--save-script`.
272
+
- Session scripts are written to `<state-dir>/sessions/<session>-<timestamp>.ad` when recording is enabled with `--save-script`.
266
273
-`--save-script` accepts an optional path: `--save-script ./workflows/my-flow.ad`.
267
274
- For ambiguous bare values, use an explicit form: `--save-script=workflow.ad` or a path-like value such as `./workflow.ad`.
268
275
- Deterministic replay is `.ad`-based; use `replay --update` (`-u`) to update selector drift and rewrite the replay file in place.
@@ -386,7 +393,7 @@ Clipboard:
386
393
387
394
## Debug
388
395
389
-
-**App logs (token-efficient):** Logging is off by default in normal flows. Enable it on demand when debugging. With an active session, run `logs path` to get path + state metadata (e.g. `~/.agent-device/sessions/<session>/app.log`). Run `logs start` to stream app output to that file; use `logs stop` to stop. Run `logs clear` to truncate `app.log` (and remove rotated `app.log.N` files) before a new repro window. Run `logs doctor` for tool/runtime checks and `logs mark "step"` to insert timeline markers. Grep the file when you need to inspect errors (e.g. `grep -n "Error\|Exception" <path>`) instead of pulling full logs into context. Supported on iOS simulator, iOS physical device, and Android.
396
+
-**App logs (token-efficient):** Logging is off by default in normal flows. Enable it on demand when debugging. With an active session, run `logs path` to get path + state metadata (e.g. `<state-dir>/sessions/<session>/app.log`). Run `logs start` to stream app output to that file; use `logs stop` to stop. Run `logs clear` to truncate `app.log` (and remove rotated `app.log.N` files) before a new repro window. Run `logs doctor` for tool/runtime checks and `logs mark "step"` to insert timeline markers. Grep the file when you need to inspect errors (e.g. `grep -n "Error\|Exception" <path>`) instead of pulling full logs into context. Supported on iOS simulator, iOS physical device, and Android.
390
397
- Use `logs clear --restart` when you want one command to stop an active stream, clear current logs, and immediately resume streaming.
391
398
-`logs start` appends to `app.log` and rotates to `app.log.1` when the file exceeds 5 MB.
392
399
-**Network dump (best-effort):**`network dump [limit] [summary|headers|body|all]` parses recent HTTP(s) lines from the same session app log file and returns method/url/status with optional headers/bodies. `network log ...` is an alias. Current limits: scans up to 4000 recent log lines, returns up to 200 entries, truncates payload/header fields at 2048 characters.
@@ -400,7 +407,7 @@ Clipboard:
400
407
- The trace log includes snapshot logs and XCTest runner logs for the session.
- For snapshot issues (missing elements), compare with `--raw` flag for unaltered output and scope with `-s "<label>"`.
403
-
- If startup fails with stale metadata hints, remove stale `~/.agent-device/daemon.json` / `~/.agent-device/daemon.lock` and retry.
410
+
- If startup fails with stale metadata hints, remove stale `<state-dir>/daemon.json` / `<state-dir>/daemon.lock` and retry (state dir defaults to `~/.agent-device` unless overridden).
404
411
405
412
Boot diagnostics:
406
413
- Boot failures include normalized reason codes in `error.details.reason` (JSON mode) and verbose logs.
@@ -458,6 +465,15 @@ Environment selectors:
458
465
-`IOS_DEVICE="iPhone 17 Pro"` or `IOS_UDID=<udid>`
-`AGENT_DEVICE_DAEMON_TIMEOUT_MS=<ms>` to override daemon request timeout (default `90000`). Increase for slow physical-device setup (for example `120000`).
468
+
-`AGENT_DEVICE_STATE_DIR=<path>` override daemon state directory (metadata, logs, session artifacts).
469
+
-`AGENT_DEVICE_DAEMON_SERVER_MODE=socket|http|dual` daemon server mode. `http` and `dual` expose JSON-RPC 2.0 at `POST /rpc` (`GET /health` available for liveness).
470
+
-`AGENT_DEVICE_DAEMON_TRANSPORT=auto|socket|http` client preference when connecting to daemon metadata.
471
+
-`AGENT_DEVICE_HTTP_AUTH_HOOK=<module-path>` optional HTTP auth hook module path for JSON-RPC server mode.
472
+
-`AGENT_DEVICE_HTTP_AUTH_EXPORT=<export-name>` optional export name from auth hook module (default: `default`).
473
+
-`AGENT_DEVICE_MAX_SIMULATOR_LEASES=<n>` optional max concurrent simulator leases for HTTP lease allocation (default: unlimited).
474
+
-`AGENT_DEVICE_LEASE_TTL_MS=<ms>` default lease TTL used by `agent_device.lease.allocate` and `agent_device.lease.heartbeat` (default: `60000`).
0 commit comments