Repository navigation
Commit e8da1e1
feat(fold): pose a foldable iPhone simulator through Device Hub and verify it with CoreDevice (#2717)
* feat(fold): pose a foldable iPhone simulator through Device Hub and verify it with CoreDevice
Add `agent-device fold <closed|half-open|open>` and `client.command.fold({ pose })`.
ADR 0025 recorded that no official host API sets the hinge pose and left it to the
operator. The operator's own control is the pose action bar in the Xcode Device Hub
window, whose controls are ordinary accessibility buttons; the macOS helper gains a
`device-hub pose` subcommand that finds Device Hub in the process table (LaunchServices
registers the trampolined app with pid -1, which is why System Events saw no nodes),
reopens its window with a reopen event when it shows none, selects the simulator through
the sidebar row keyed `TableRow.Device.<udid>`, and presses the control.
The press is not the evidence. The Apple owner reads the hinge angle back through
`devicectl device motion hinge-angle` until it agrees with the request: closed is 0°, open
is 180°, and half-open is any angle between them reported only once two consecutive reads
agree the hinge stopped moving, because a hinge sweeps through half-open angles on its way
to either stop (the live run read 175.1° one stream after pressing Book, 130° after it
settled). The stream never ends on its own, so each read is bounded by devicectl's smallest
`--timeout` of five seconds. The response carries the verified pose, the angle, and the lit
panel's point size, so an agent sees its refs are stale without another capture.
`setFoldPose` is a host-side device-runtime operation rather than an interactor method: it
needs no XCUITest runner, and the leaf fact admits iPhone/iPad simulators while the
operation itself refuses a single-panel simulator from CoreDevice's display table. Every
other platform and provider states its own refusal cell.
Verified through the built CLI on an iOS 27.1 iPhone Duo simulator: open → 180° on LCD-1
(669x951pt, screenshot 951x669), half-open → 130°, closed → 0° on LCD (466x678pt,
screenshot 466x678), from a Device Hub that showed no window for the device; an iPhone 17
refuses with UNSUPPORTED_OPERATION before anything is pressed.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
* chore(gates): register fold in the exports snapshot, coverage tables, and conformance tables
The contracts export snapshot names the new `fold-runtime` subpath, the six-platform
coverage declaration and its Android evidence row classify the command, the runtime-binding
conformance table resolves it, and the provider output guard drives it.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
---------
Co-authored-by: Claude Fable 5.1 <[email protected]>1 parent e3edc9e commit e8da1e1
84 files changed
Lines changed: 1878 additions & 67 deletions
File tree
- .agent-device/test-artifacts
- req-maestro-test-wire-true
- 01-flow.yaml/attempt-1
- 02-flow.yaml/attempt-1
- req-maestro-test-wire-undefined
- 01-flow.yaml/attempt-1
- 02-flow.yaml/attempt-1
- apple/macos-helper
- Sources
- AgentDeviceMacOSDeviceHub
- AgentDeviceMacOSHelper
- Tests/AgentDeviceMacOSDeviceHubTests
- docs
- adr
- agents
- packages
- command-registry/src
- __tests__
- contracts
- src
- facades
- platform-android/src
- platform-apple/src
- core
- __tests__
- foldable
- os/macos
- platform-harmonyos/src
- platform-linux/src
- platform-vega/src
- platform-web/src
- provider-limrun/src
- provider-webdriver/src
- session-journal/src
- scripts
- layering
- src
- __tests__
- test-utils
- client
- commands
- schema
- system
- daemon
- __tests__
- handlers/__tests__
- mcp
- test/integration
- command-coverage
- provider-scenarios
- website/docs/docs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
13 | 26 | | |
14 | 27 | | |
15 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | 21 | | |
19 | | - | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
25 | 32 | | |
26 | 33 | | |
0 commit comments