feat(config): pin workspace devices with explicit selectors
Summary
Pin a workspace with an explicit selector in agent-device.json:
{ "devicePin": { "platform": "ios", "device": "iPad Pro" } }
agent-device boot
agent-device boot --platform apple
Commands select within the pin. Conflicting CLI, MCP, and batch selectors return device_pin_conflict with the config source. Pins replace each other atomically across config layers; ordinary defaults remain overridable.
Daemon and proxy lease admission enforce selected devices, explicit keys, and existing-ID retries. Shared config/wire parsing rejects malformed or impossible pins as invalid_device_pin. The generic option schema has no pin code; the Boolean flag and provenance map are removed. Wire coverage tracks the metadata field and detects its removal.
40 files changed. Scope includes daemon, contracts, and lease admission. Part of #2161; inventory pin markers remain follow-up work.
Validation
Tested SHA: 9f3049cb2c5a798a6ae676917f6584feb9d60af3.
AGENT_DEVICE_VITEST_MAX_WORKERS=1 pnpm check:affected --run --head 9f3049cb2c passed: run-PgYvFi, exactCommit: true; 42 checks passed, 25 skipped. Passed 19,191 unit tests (3 skipped), 396 related tests, and 270 provider integration tests.
Base/head regression proof, live key/retry RPCs, malformed-pin checks, help JSON, and receipt. Private lease released and daemon stopped; no app or simulator opened. Cold-boot evidence at 54ae02a.
GitHub validation at this head: 16 checks passed and three workflow jobs skipped. Coverage, integration, and iOS/macOS/Android/Linux smoke checks pass. Cubic found zero issues across the 12 files changed this round; all review threads are resolved. Size skips fork PRs; no CI size comparison is available.