…ecated alias
The top-level `rotate` command (device orientation: portrait/landscape) shared
a name with the `gesture rotate` two-finger rotation gesture. Rename the
orientation command to `orientation` and keep `rotate` working as a minimal,
silent CLI alias (same mechanism as `tap`->`press`) for a few versions.
The rename is applied across every layer:
- command-descriptor registry `name`, daemon dispatch handler, and the typed
system facet (metadata/cliReader/daemonWriter/schema/output formatter)
- navigation projection + `CommandResultMap` (`OrientationCommandResult`,
`action: 'orientation'`), client types (`OrientationCommandOptions`), and the
runtime family (`device.system.orientation`)
- interactor + backend methods -> `setOrientation` (matching the backend's
`setKeyboard`/`setClipboard` verb convention); Android helper
`rotateAndroid` -> `setAndroidOrientation`
- Apple/cloud-webdriver capability keys and plugin gate
- user-facing docs (commands.md, client-api.md)
Client SDK method is `orientation` (client convention = camelCase of the
command name, matching `back`/`home`/`appSwitcher`); execution layers use the
imperative `setOrientation`.
Deliberately unchanged:
- the Swift runner wire protocol keeps `command: 'rotate'` — the runner has its
own command namespace with no gesture collision, so renaming it would only
risk CLI<->installed-runner version skew on physical devices
- the `DeviceRotation` value type / `parseDeviceRotation` (names the orientation
values, no collision)
Note: `client.command.rotate` / `device.system.rotate` and the `RotateCommand*`
exported types are removed (the alias only rewrites CLI tokens); SDK consumers
must use `orientation`. The JSON `action` value changes `rotate` -> `orientation`.
Why
The top-level
rotatecommand sets device orientation (portrait / landscape). That name collided with thegesture rotatetwo-finger rotation gesture —agent-device rotate landscape-left(rotate the screen) vsagent-device gesture rotate 35 …(rotate app content). This renames the orientation command toorientationand keepsrotateworking as a minimal, silent alias for a few versions.What
orientation—agent-device orientation <portrait|portrait-upside-down|landscape-left|landscape-right>.rotate→ deprecated alias: one line incli-command-aliases.ts, exactly the mechanism used bytap→press/launch→open. It normalizes at CLI parse time (so everything internal only ever seesorientation) and is silent — it does not appear in--help.Renamed across every layer so nothing is half-migrated:
namerotateorientationclient.command.rotateclient.command.orientationdevice.system.rotatedevice.system.orientationactionRotateCommandResult/'rotate'OrientationCommandResult/'orientation'RotateCommandOptionsOrientationCommandOptionsrotatesetOrientationrotateAndroidsetAndroidOrientationrotateorientationcommands.md,client-api.md)rotateorientation(+ alias note)Naming rationale (each layer follows its own existing convention):
orientation(client method = camelCase of the command name, matchingback/home/appSwitcher/tvRemote).setOrientation(imperative, matching the backend'ssetKeyboard/setClipboard/pressHomefamily and unambiguously not a gesture).Deliberately unchanged (scoped, not oversights)
command: 'rotate'. The runner has its own command namespace whererotate(orientation) andgestureare already distinct — no collision there. Renaming it would only risk CLI ↔ installed runner version skew on physical devices for zero user benefit. The Apple interactor'ssetOrientation()sends{ command: 'rotate', … }with an inline comment;apple-runner/is untouched.DeviceRotation/parseDeviceRotation/DEVICE_ROTATIONS— these name the orientation values, don't collide, and renaming them is unrelated scope creep.docs/agents/contract-projection-output-economy-spike.md— historical spike report (point-in-time record), left as-is.client.command.rotate/device.system.rotateand theRotateCommand*exported types are removed — the alias only rewrites CLI tokens, it does not add a client method. Node SDK consumers must switch toorientation. The JSONactionvalue changesrotate→orientation. CLI users are unaffected (rotate …still works via the alias).Verification
typecheck,lint,check:layering,check:production-exports,check:mcp-metadata,check:toolingruntime-hintsAndroid tests that hit live emulators on the dev machine (adb run-as) — outside this diff.rotate→ daemonorientation) mirroring thetapconvention; parser + usage + capability + dispatch + contract tests all moved toorientation; the true-alias regression guard now coversrotate.orientationshows in--help("Set device orientation…"),orientation --helprenders, androtatesilently resolves to it.website/docsare folded into this PR).Closes the naming collision noted while reviewing #105.