feat(lease): name a backend baseline in a proxy lease device spec

V3
1d ago
+261-28

Summary

A proxy lease can now name a backend baseline (a saved, prepared device state) with --device-baseline <name> (spec key deviceBaseline), modelled on deviceMode (#4183). Simlock side: callstackincubator/simlock#1308.

  • deviceBaseline joins LEASE_DEVICE_SPEC_KEYS: blank names nothing, a non-string is device-spec-invalid, a daemon refuses it with device-spec-unsupported. Carried by CLI flags, remote config, connect proxy defaults, MCP and the SDK.
  • LeaseDevice.baseline?: { name; version } (version a positive integer), read by readLeaseDevice; a malformed echo is dropped.
  • A new lease allocated with deviceBaseline whose lease.device.baseline.name differs (or is missing) is released and fails with device-spec-unsupported. A reused lease serves it only when allocated with the same name.
  • diff --baseline is unchanged.
  • Help, remote-proxy.md and ADR 0007 updated. 21 files.
agent-device open MyApp --platform ios --device-baseline logged-in

Closes #4235

Validation

At b7331fa392b4b124b6f2d00f4bf27baa8aa0f87e: pnpm check:affected --run --head passed format, lint, typecheck, layering, fallow, build, package, integration-node and the related tests on its second run. Each run had one unrelated timeout under load (macos-recording.test.ts, then platform-runtime-android-adb-host.test.ts). Neither file is touched here, and both pass when run alone (the adb test 3/3). CI owns the full unit suite.

Written by an agent.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.