feat(apple): add verified simulator screen lock
Closed
CS
1mo ago+680+680+012345678901234567890123456789-17-17-01234567890123456789
Summary
- add the public
screen-lockcommand through the typed Node client, CLI, MCP, daemon registry, runtime facts, and structured result schema - admit only iOS/iPadOS Simulators and return structured
UNSUPPORTED_OPERATIONrefusals on other platform leaves - make the transition idempotent and report success only after SpringBoard lock state and a visible non-empty SpringBoard surface agree
- add deterministic Swift transition tests for already-locked, delayed/booting, unavailable HID, timeout, and unverified-surface cases
Implementation
The Apple runner uses XCTest's simulator-only pressLockButton selector, the same audited route used by Appium WebDriverAgent, and independently verifies com.apple.springboard.lockstate before checking the visible SpringBoard surface. This avoids Simulator.app menu/keyboard automation and does not conflate screen state with process mutexes, device claims, or runner leases.
Verification
pnpm typecheck- focused TypeScript suite: 139 tests passed
- focused web/Linux runtime and coverage contracts passed
pnpm check:packaged-runner-swift(58 packaged Swift files parsed)pnpm check:xctest-selection(all declared tests reachable by a configured lane)pnpm check:affected --run: formatting, lint, typecheck, layering, fallow gate, build, integration coverage, and 5,019 related tests reached green after classification fixes; the full rerun still hit the unrelated timing-sensitiveweb shutdown cleanup reaps the exact daemonassertion under load. The exact test passed standalone. GitHub's Apple/XCTest and device lanes remain authoritative.
No npm package was published and no live device/simulator green is claimed locally.