refactor(gesture): simplify SDK payload adapters

Draft
TH
4h ago
+23-62

Summary

Simplify gesture SDK adapters: derive drag, tap, and swipe-preset options from existing payload types, inline helpers that only add kind, share pan/transform coordinate projection, and keep center validation beside its caller.

Two files, 39 fewer production lines. Public signatures, wire payloads, field precedence, and errors are preserved. No new files or dependencies. SDK-only scope; native executors and daemon dispatch are unchanged. Follow-up to #3852; no linked issue.

Validation

  • Head: 34a33e84cc9901cfd9729c36c93af1c8fa8aca85. Independent review: no findings.
  • CI passed, including coverage, repository guards, packaging, and all 201 provider integration tests across 65 files. Draft-only Apple/Android/Linux smoke jobs were skipped.
  • Size report: unpacked package −361 B; download −11 B.
  • Local pnpm check:affected --run --head 34a33e84cc9901cfd9729c36c93af1c8fa8aca85 failed (run-vK9A6Z, exactCommit=true): 949 passed; fake record exceeded 20 seconds at apple-platform-output-guard.test.ts:384. Structural checks passed.
  • Same command on unchanged base f8c60ca188f62e110bdc1d3e6225b134960886c0—pnpm exec vitest related --run --passWithNoTests packages/contracts/src/client-gesture.ts src/agent-device-client.ts—reproduced the identical failure/counts. Isolated checkout removed.
  • Earlier dirty-tree run passed all 950 tests (run-SRBMb9). CI success does not replace the failed local receipt. Draft retained pending resolution of that local blocker; no live-device verification claimed.