add iOS support (#358)

* ios

* tests

* docs

* real device

* better list

* fixes
This commit is contained in:
Chris Tate
2026-02-03 01:36:19 -06:00
committed by GitHub
parent 3c6ae7df9d
commit a1b992411e
18 changed files with 4197 additions and 56 deletions
+13
View File
@@ -686,6 +686,17 @@ const inputTouchSchema = baseCommandSchema.extend({
modifiers: z.number().optional(),
});
// iOS-specific schemas
const swipeSchema = baseCommandSchema.extend({
action: z.literal('swipe'),
direction: z.enum(['up', 'down', 'left', 'right']),
distance: z.number().positive().optional(),
});
const deviceListSchema = baseCommandSchema.extend({
action: z.literal('device_list'),
});
const pressSchema = baseCommandSchema.extend({
action: z.literal('press'),
key: z.string().min(1),
@@ -906,6 +917,8 @@ const commandSchema = z.discriminatedUnion('action', [
inputMouseSchema,
inputKeyboardSchema,
inputTouchSchema,
swipeSchema,
deviceListSchema,
]);
// Parse result type