From 4fd5d39eec38b987dab37ffecf9121f20f9172c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pierzcha=C5=82a?= Date: Sat, 25 Jul 2026 12:21:54 +0200 Subject: [PATCH] docs(gestures): make the migration sweep and MCP claim accurate Re-review findings on 328bad8e (both migration-guide accuracy). The saved-script sweep matched only the five-argument `swipe` form; it missed timed `gesture fling`, timed `gesture swipe`, and `gesture rotate ... velocity`, so the repository-cleanliness step was incomplete. Provide one grep per retired form (number-or-`${VAR}` token), each verified to flag the removed shape and skip the valid one. The MCP section claimed the structured rejection carries the CLI's concrete replacement command. It does not: `readGesturePayload` and `assertNoRemovedSwipeInput` return a message that names the removed key and the replacement command (e.g. `gesture fling does not accept durationMs; use gesture pan for timed movement`) but not the fully-substituted coordinate rewrite, because the structured request carries no positional string to rewrite. Describe what the structured path actually returns. --- website/docs/docs/migrating-gestures.md | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/website/docs/docs/migrating-gestures.md b/website/docs/docs/migrating-gestures.md index fa686c1b6..b0147a9cd 100644 --- a/website/docs/docs/migrating-gestures.md +++ b/website/docs/docs/migrating-gestures.md @@ -86,8 +86,12 @@ await device.interactions.swipe({ from: { x: 197, y: 650 }, to: { x: 197, y: 300 The `swipe`, `gesture` (`fling`, `swipe` kinds), and `gesture rotate` tool schemas no longer advertise `durationMs` or `velocity`, so an agent reading the schema will not produce the removed -form. An agent that sends one anyway — from a cached schema or a memorized example — gets the same -`INVALID_ARGS` message as the CLI, with the concrete replacement command in it. +form. An agent that sends one anyway — from a cached schema or a memorized example — gets an +`INVALID_ARGS` rejection that names the removed key and the command to use instead, for example +`gesture fling does not accept durationMs; use gesture pan for timed movement`. This is the +structured-input equivalent of the CLI error; it names the replacement command but, unlike the CLI +and `.ad` messages, does not echo a fully-substituted rewrite, because the structured request +carries no positional string to rewrite. No MCP server configuration changes. @@ -119,10 +123,18 @@ swipe 206 650 206 300 --count 2 --pause-ms 200 --pattern one-way A duration held in a variable (`swipe 197 650 197 300 ${DURATION}`) is reported the same way — the preflight counts arguments, so it does not need the value. -To find every affected line across a suite: +To find every affected line across a suite — one pattern per retired form, where a token is a +number or a `${VAR}`: ```bash +# swipe x1 y1 x2 y2 durationMs grep -rnE '\bswipe( +([-0-9.]+|\$\{[^}]*\})){5}' --include='*.ad' . +# gesture fling x y distance durationMs +grep -rnE '\bgesture +fling +[a-z]+( +([-0-9.]+|\$\{[^}]*\})){4}' --include='*.ad' . +# gesture swipe durationMs +grep -rnE '\bgesture +swipe +[a-z-]+ +([-0-9.]+|\$\{[^}]*\})' --include='*.ad' . +# gesture rotate degrees x y velocity +grep -rnE '\bgesture +rotate( +([-0-9.]+|\$\{[^}]*\})){4}' --include='*.ad' . ``` Re-recording also produces a migrated script: the recorder writes the canonical form, so a fresh