feat: add a sampled path gesture for one timed contact

TJ
7h ago
+588-25

Summary

Closes #5419. Adds gesture path, where one contact follows 2 to 256 timed samples. That lets it reverse, pause, or curve. The SDK, MCP, CLI and .ad replay all take the same {durationMs, samples} object. Offsets are whole milliseconds. They start at 0, strictly increase, and end at durationMs. Anything else is refused with INVALID_ARGS before dispatch. Paths run through the target-authored-drag tier. Backends that collapse plans to endpoints refuse them. dp input converts each sample point. Out of scope: the recording touch overlay draws nothing for a path.

Before / after

base: INVALID_ARGS "Expected kind to be one of: pan, fling, swipe, pinch, rotate, transform, tap, drag."
head: "Moved one contact through 4 samples over 1000 ms", executionProfile timed-pan

Android emulator (InputDispatcher injected events, one pointer id):

DOWN y=800 t=0 · turn y=1600 t=400 · held y=900 t=800..1000 · UP t=1000

iOS 26.5 simulator, app-logged touches (one touch id):

down y=300 t=0 · turn y=600 t=400 · held y=350 from t=817 · up t=1017

A fractional offset is refused on both, and neither device logged a touch.

Validation

  • Tested SHA 5e1de7f. pnpm check:affected --run passed format, lint, typecheck, layering, fallow, build and vitest-related. In the unit lane, only 22 contact-sheet tests fail, and they fail the same way at the merge base on this host.
  • Device runs predate 5e1de7f, which only moves pathTimeline into contracts/scroll-gesture. The iOS run was at 150526b. Android ran at 116b349 with the released 0.21.46 helper APK, whose source matches this head.
  • A multi-model adversarial review found four issues: fractional offsets, dropped samples on other kinds, computed arrays failing typecheck, and missing CLI detail. All four are fixed.
  • Not run live: limrun, WebDriver, physical iOS.

🤖 Generated with Claude Code