@midscene/ios 1.5.4-beta-20260310030546.0 → 1.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/bin.mjs CHANGED
@@ -573,6 +573,16 @@ function _define_property(obj, key, value) {
573
573
  return obj;
574
574
  }
575
575
  const debugDevice = getDebug('ios:device');
576
+ const iosInputParamSchema = z.object({
577
+ value: z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
578
+ autoDismissKeyboard: z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
579
+ mode: z.preprocess((val)=>'append' === val ? 'typeOnly' : val, z["enum"]([
580
+ 'replace',
581
+ 'clear',
582
+ 'typeOnly'
583
+ ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
584
+ locate: getMidsceneLocationSchema().describe('The input field to be filled').optional()
585
+ });
576
586
  const WDA_HTTP_METHODS = [
577
587
  'GET',
578
588
  'POST',
@@ -597,16 +607,13 @@ class device_IOSDevice {
597
607
  name: 'Input',
598
608
  description: 'Input text into the input field',
599
609
  interfaceAlias: 'aiInput',
600
- paramSchema: z.object({
601
- value: z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
602
- autoDismissKeyboard: z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
603
- mode: z.preprocess((val)=>'append' === val ? 'typeOnly' : val, z["enum"]([
604
- 'replace',
605
- 'clear',
606
- 'typeOnly'
607
- ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
608
- locate: getMidsceneLocationSchema().describe('The input field to be filled').optional()
609
- }),
610
+ paramSchema: iosInputParamSchema,
611
+ sample: {
612
+ value: 'test@example.com',
613
+ locate: {
614
+ prompt: 'the email input field'
615
+ }
616
+ },
610
617
  call: async (param)=>{
611
618
  const element = param.locate;
612
619
  if ('typeOnly' !== param.mode) await this.clearInput(element);
@@ -668,6 +675,11 @@ class device_IOSDevice {
668
675
  duration: z.number().optional().describe('The duration of the long press in milliseconds'),
669
676
  locate: getMidsceneLocationSchema().describe('The element to be long pressed')
670
677
  }),
678
+ sample: {
679
+ locate: {
680
+ prompt: 'the message bubble'
681
+ }
682
+ },
671
683
  call: async (param)=>{
672
684
  const element = param.locate;
673
685
  node_assert(element, 'LongPress requires an element to be located');
@@ -1157,6 +1169,10 @@ const createPlatformActions = (device)=>({
1157
1169
  description: 'Execute WebDriverAgent API request directly on iOS device',
1158
1170
  interfaceAlias: 'runWdaRequest',
1159
1171
  paramSchema: runWdaRequestParamSchema,
1172
+ sample: {
1173
+ method: 'GET',
1174
+ endpoint: '/status'
1175
+ },
1160
1176
  call: async (param)=>await device.runWdaRequest(param.method, param.endpoint, param.data)
1161
1177
  }),
1162
1178
  Launch: defineAction({
package/dist/es/cli.mjs CHANGED
@@ -571,6 +571,16 @@ function _define_property(obj, key, value) {
571
571
  return obj;
572
572
  }
573
573
  const debugDevice = getDebug('ios:device');
574
+ const iosInputParamSchema = z.object({
575
+ value: z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
576
+ autoDismissKeyboard: z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
577
+ mode: z.preprocess((val)=>'append' === val ? 'typeOnly' : val, z["enum"]([
578
+ 'replace',
579
+ 'clear',
580
+ 'typeOnly'
581
+ ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
582
+ locate: getMidsceneLocationSchema().describe('The input field to be filled').optional()
583
+ });
574
584
  const WDA_HTTP_METHODS = [
575
585
  'GET',
576
586
  'POST',
@@ -595,16 +605,13 @@ class IOSDevice {
595
605
  name: 'Input',
596
606
  description: 'Input text into the input field',
597
607
  interfaceAlias: 'aiInput',
598
- paramSchema: z.object({
599
- value: z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
600
- autoDismissKeyboard: z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
601
- mode: z.preprocess((val)=>'append' === val ? 'typeOnly' : val, z["enum"]([
602
- 'replace',
603
- 'clear',
604
- 'typeOnly'
605
- ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
606
- locate: getMidsceneLocationSchema().describe('The input field to be filled').optional()
607
- }),
608
+ paramSchema: iosInputParamSchema,
609
+ sample: {
610
+ value: 'test@example.com',
611
+ locate: {
612
+ prompt: 'the email input field'
613
+ }
614
+ },
608
615
  call: async (param)=>{
609
616
  const element = param.locate;
610
617
  if ('typeOnly' !== param.mode) await this.clearInput(element);
@@ -666,6 +673,11 @@ class IOSDevice {
666
673
  duration: z.number().optional().describe('The duration of the long press in milliseconds'),
667
674
  locate: getMidsceneLocationSchema().describe('The element to be long pressed')
668
675
  }),
676
+ sample: {
677
+ locate: {
678
+ prompt: 'the message bubble'
679
+ }
680
+ },
669
681
  call: async (param)=>{
670
682
  const element = param.locate;
671
683
  node_assert(element, 'LongPress requires an element to be located');
@@ -1155,6 +1167,10 @@ const createPlatformActions = (device)=>({
1155
1167
  description: 'Execute WebDriverAgent API request directly on iOS device',
1156
1168
  interfaceAlias: 'runWdaRequest',
1157
1169
  paramSchema: runWdaRequestParamSchema,
1170
+ sample: {
1171
+ method: 'GET',
1172
+ endpoint: '/status'
1173
+ },
1158
1174
  call: async (param)=>await device.runWdaRequest(param.method, param.endpoint, param.data)
1159
1175
  }),
1160
1176
  Launch: defineAction({
@@ -1268,7 +1284,8 @@ class IOSMidsceneTools extends BaseMidsceneTools {
1268
1284
  }
1269
1285
  const tools = new IOSMidsceneTools();
1270
1286
  runToolsCLI(tools, 'midscene-ios', {
1271
- stripPrefix: 'ios_'
1287
+ stripPrefix: 'ios_',
1288
+ version: "1.5.4"
1272
1289
  }).catch((e)=>{
1273
1290
  if (!(e instanceof CLIError)) console.error(e);
1274
1291
  process.exit(e instanceof CLIError ? e.exitCode : 1);
package/dist/es/index.mjs CHANGED
@@ -390,6 +390,16 @@ function _define_property(obj, key, value) {
390
390
  return obj;
391
391
  }
392
392
  const debugDevice = getDebug('ios:device');
393
+ const iosInputParamSchema = z.object({
394
+ value: z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
395
+ autoDismissKeyboard: z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
396
+ mode: z.preprocess((val)=>'append' === val ? 'typeOnly' : val, z["enum"]([
397
+ 'replace',
398
+ 'clear',
399
+ 'typeOnly'
400
+ ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
401
+ locate: getMidsceneLocationSchema().describe('The input field to be filled').optional()
402
+ });
393
403
  const WDA_HTTP_METHODS = [
394
404
  'GET',
395
405
  'POST',
@@ -414,16 +424,13 @@ class IOSDevice {
414
424
  name: 'Input',
415
425
  description: 'Input text into the input field',
416
426
  interfaceAlias: 'aiInput',
417
- paramSchema: z.object({
418
- value: z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
419
- autoDismissKeyboard: z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
420
- mode: z.preprocess((val)=>'append' === val ? 'typeOnly' : val, z["enum"]([
421
- 'replace',
422
- 'clear',
423
- 'typeOnly'
424
- ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
425
- locate: getMidsceneLocationSchema().describe('The input field to be filled').optional()
426
- }),
427
+ paramSchema: iosInputParamSchema,
428
+ sample: {
429
+ value: 'test@example.com',
430
+ locate: {
431
+ prompt: 'the email input field'
432
+ }
433
+ },
427
434
  call: async (param)=>{
428
435
  const element = param.locate;
429
436
  if ('typeOnly' !== param.mode) await this.clearInput(element);
@@ -485,6 +492,11 @@ class IOSDevice {
485
492
  duration: z.number().optional().describe('The duration of the long press in milliseconds'),
486
493
  locate: getMidsceneLocationSchema().describe('The element to be long pressed')
487
494
  }),
495
+ sample: {
496
+ locate: {
497
+ prompt: 'the message bubble'
498
+ }
499
+ },
488
500
  call: async (param)=>{
489
501
  const element = param.locate;
490
502
  node_assert(element, 'LongPress requires an element to be located');
@@ -974,6 +986,10 @@ const createPlatformActions = (device)=>({
974
986
  description: 'Execute WebDriverAgent API request directly on iOS device',
975
987
  interfaceAlias: 'runWdaRequest',
976
988
  paramSchema: runWdaRequestParamSchema,
989
+ sample: {
990
+ method: 'GET',
991
+ endpoint: '/status'
992
+ },
977
993
  call: async (param)=>await device.runWdaRequest(param.method, param.endpoint, param.data)
978
994
  }),
979
995
  Launch: defineAction({
@@ -570,6 +570,16 @@ function _define_property(obj, key, value) {
570
570
  return obj;
571
571
  }
572
572
  const debugDevice = getDebug('ios:device');
573
+ const iosInputParamSchema = z.object({
574
+ value: z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
575
+ autoDismissKeyboard: z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
576
+ mode: z.preprocess((val)=>'append' === val ? 'typeOnly' : val, z["enum"]([
577
+ 'replace',
578
+ 'clear',
579
+ 'typeOnly'
580
+ ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
581
+ locate: getMidsceneLocationSchema().describe('The input field to be filled').optional()
582
+ });
573
583
  const WDA_HTTP_METHODS = [
574
584
  'GET',
575
585
  'POST',
@@ -594,16 +604,13 @@ class IOSDevice {
594
604
  name: 'Input',
595
605
  description: 'Input text into the input field',
596
606
  interfaceAlias: 'aiInput',
597
- paramSchema: z.object({
598
- value: z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
599
- autoDismissKeyboard: z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
600
- mode: z.preprocess((val)=>'append' === val ? 'typeOnly' : val, z["enum"]([
601
- 'replace',
602
- 'clear',
603
- 'typeOnly'
604
- ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
605
- locate: getMidsceneLocationSchema().describe('The input field to be filled').optional()
606
- }),
607
+ paramSchema: iosInputParamSchema,
608
+ sample: {
609
+ value: 'test@example.com',
610
+ locate: {
611
+ prompt: 'the email input field'
612
+ }
613
+ },
607
614
  call: async (param)=>{
608
615
  const element = param.locate;
609
616
  if ('typeOnly' !== param.mode) await this.clearInput(element);
@@ -665,6 +672,11 @@ class IOSDevice {
665
672
  duration: z.number().optional().describe('The duration of the long press in milliseconds'),
666
673
  locate: getMidsceneLocationSchema().describe('The element to be long pressed')
667
674
  }),
675
+ sample: {
676
+ locate: {
677
+ prompt: 'the message bubble'
678
+ }
679
+ },
668
680
  call: async (param)=>{
669
681
  const element = param.locate;
670
682
  node_assert(element, 'LongPress requires an element to be located');
@@ -1154,6 +1166,10 @@ const createPlatformActions = (device)=>({
1154
1166
  description: 'Execute WebDriverAgent API request directly on iOS device',
1155
1167
  interfaceAlias: 'runWdaRequest',
1156
1168
  paramSchema: runWdaRequestParamSchema,
1169
+ sample: {
1170
+ method: 'GET',
1171
+ endpoint: '/status'
1172
+ },
1157
1173
  call: async (param)=>await device.runWdaRequest(param.method, param.endpoint, param.data)
1158
1174
  }),
1159
1175
  Launch: defineAction({
@@ -1272,7 +1288,7 @@ class IOSMCPServer extends BaseMCPServer {
1272
1288
  constructor(toolsManager){
1273
1289
  super({
1274
1290
  name: '@midscene/ios-mcp',
1275
- version: "1.5.4-beta-20260310030546.0",
1291
+ version: "1.5.4",
1276
1292
  description: 'Control the iOS device using natural language commands'
1277
1293
  }, toolsManager);
1278
1294
  }
package/dist/lib/bin.js CHANGED
@@ -598,6 +598,16 @@ function _define_property(obj, key, value) {
598
598
  return obj;
599
599
  }
600
600
  const debugDevice = (0, logger_namespaceObject.getDebug)('ios:device');
601
+ const iosInputParamSchema = core_namespaceObject.z.object({
602
+ value: core_namespaceObject.z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
603
+ autoDismissKeyboard: core_namespaceObject.z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
604
+ mode: core_namespaceObject.z.preprocess((val)=>'append' === val ? 'typeOnly' : val, core_namespaceObject.z["enum"]([
605
+ 'replace',
606
+ 'clear',
607
+ 'typeOnly'
608
+ ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
609
+ locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The input field to be filled').optional()
610
+ });
601
611
  const WDA_HTTP_METHODS = [
602
612
  'GET',
603
613
  'POST',
@@ -622,16 +632,13 @@ class device_IOSDevice {
622
632
  name: 'Input',
623
633
  description: 'Input text into the input field',
624
634
  interfaceAlias: 'aiInput',
625
- paramSchema: core_namespaceObject.z.object({
626
- value: core_namespaceObject.z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
627
- autoDismissKeyboard: core_namespaceObject.z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
628
- mode: core_namespaceObject.z.preprocess((val)=>'append' === val ? 'typeOnly' : val, core_namespaceObject.z["enum"]([
629
- 'replace',
630
- 'clear',
631
- 'typeOnly'
632
- ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
633
- locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The input field to be filled').optional()
634
- }),
635
+ paramSchema: iosInputParamSchema,
636
+ sample: {
637
+ value: 'test@example.com',
638
+ locate: {
639
+ prompt: 'the email input field'
640
+ }
641
+ },
635
642
  call: async (param)=>{
636
643
  const element = param.locate;
637
644
  if ('typeOnly' !== param.mode) await this.clearInput(element);
@@ -693,6 +700,11 @@ class device_IOSDevice {
693
700
  duration: core_namespaceObject.z.number().optional().describe('The duration of the long press in milliseconds'),
694
701
  locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The element to be long pressed')
695
702
  }),
703
+ sample: {
704
+ locate: {
705
+ prompt: 'the message bubble'
706
+ }
707
+ },
696
708
  call: async (param)=>{
697
709
  const element = param.locate;
698
710
  external_node_assert_default()(element, 'LongPress requires an element to be located');
@@ -1182,6 +1194,10 @@ const createPlatformActions = (device)=>({
1182
1194
  description: 'Execute WebDriverAgent API request directly on iOS device',
1183
1195
  interfaceAlias: 'runWdaRequest',
1184
1196
  paramSchema: runWdaRequestParamSchema,
1197
+ sample: {
1198
+ method: 'GET',
1199
+ endpoint: '/status'
1200
+ },
1185
1201
  call: async (param)=>await device.runWdaRequest(param.method, param.endpoint, param.data)
1186
1202
  }),
1187
1203
  Launch: (0, device_namespaceObject.defineAction)({
package/dist/lib/cli.js CHANGED
@@ -595,6 +595,16 @@ function _define_property(obj, key, value) {
595
595
  return obj;
596
596
  }
597
597
  const debugDevice = (0, logger_namespaceObject.getDebug)('ios:device');
598
+ const iosInputParamSchema = core_namespaceObject.z.object({
599
+ value: core_namespaceObject.z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
600
+ autoDismissKeyboard: core_namespaceObject.z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
601
+ mode: core_namespaceObject.z.preprocess((val)=>'append' === val ? 'typeOnly' : val, core_namespaceObject.z["enum"]([
602
+ 'replace',
603
+ 'clear',
604
+ 'typeOnly'
605
+ ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
606
+ locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The input field to be filled').optional()
607
+ });
598
608
  const WDA_HTTP_METHODS = [
599
609
  'GET',
600
610
  'POST',
@@ -619,16 +629,13 @@ class IOSDevice {
619
629
  name: 'Input',
620
630
  description: 'Input text into the input field',
621
631
  interfaceAlias: 'aiInput',
622
- paramSchema: core_namespaceObject.z.object({
623
- value: core_namespaceObject.z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
624
- autoDismissKeyboard: core_namespaceObject.z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
625
- mode: core_namespaceObject.z.preprocess((val)=>'append' === val ? 'typeOnly' : val, core_namespaceObject.z["enum"]([
626
- 'replace',
627
- 'clear',
628
- 'typeOnly'
629
- ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
630
- locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The input field to be filled').optional()
631
- }),
632
+ paramSchema: iosInputParamSchema,
633
+ sample: {
634
+ value: 'test@example.com',
635
+ locate: {
636
+ prompt: 'the email input field'
637
+ }
638
+ },
632
639
  call: async (param)=>{
633
640
  const element = param.locate;
634
641
  if ('typeOnly' !== param.mode) await this.clearInput(element);
@@ -690,6 +697,11 @@ class IOSDevice {
690
697
  duration: core_namespaceObject.z.number().optional().describe('The duration of the long press in milliseconds'),
691
698
  locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The element to be long pressed')
692
699
  }),
700
+ sample: {
701
+ locate: {
702
+ prompt: 'the message bubble'
703
+ }
704
+ },
693
705
  call: async (param)=>{
694
706
  const element = param.locate;
695
707
  external_node_assert_default()(element, 'LongPress requires an element to be located');
@@ -1179,6 +1191,10 @@ const createPlatformActions = (device)=>({
1179
1191
  description: 'Execute WebDriverAgent API request directly on iOS device',
1180
1192
  interfaceAlias: 'runWdaRequest',
1181
1193
  paramSchema: runWdaRequestParamSchema,
1194
+ sample: {
1195
+ method: 'GET',
1196
+ endpoint: '/status'
1197
+ },
1182
1198
  call: async (param)=>await device.runWdaRequest(param.method, param.endpoint, param.data)
1183
1199
  }),
1184
1200
  Launch: (0, device_namespaceObject.defineAction)({
@@ -1292,7 +1308,8 @@ class IOSMidsceneTools extends mcp_namespaceObject.BaseMidsceneTools {
1292
1308
  }
1293
1309
  const tools = new IOSMidsceneTools();
1294
1310
  (0, cli_namespaceObject.runToolsCLI)(tools, 'midscene-ios', {
1295
- stripPrefix: 'ios_'
1311
+ stripPrefix: 'ios_',
1312
+ version: "1.5.4"
1296
1313
  }).catch((e)=>{
1297
1314
  if (!(e instanceof cli_namespaceObject.CLIError)) console.error(e);
1298
1315
  process.exit(e instanceof cli_namespaceObject.CLIError ? e.exitCode : 1);
package/dist/lib/index.js CHANGED
@@ -428,6 +428,16 @@ function _define_property(obj, key, value) {
428
428
  return obj;
429
429
  }
430
430
  const debugDevice = (0, logger_namespaceObject.getDebug)('ios:device');
431
+ const iosInputParamSchema = core_namespaceObject.z.object({
432
+ value: core_namespaceObject.z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
433
+ autoDismissKeyboard: core_namespaceObject.z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
434
+ mode: core_namespaceObject.z.preprocess((val)=>'append' === val ? 'typeOnly' : val, core_namespaceObject.z["enum"]([
435
+ 'replace',
436
+ 'clear',
437
+ 'typeOnly'
438
+ ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
439
+ locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The input field to be filled').optional()
440
+ });
431
441
  const WDA_HTTP_METHODS = [
432
442
  'GET',
433
443
  'POST',
@@ -452,16 +462,13 @@ class IOSDevice {
452
462
  name: 'Input',
453
463
  description: 'Input text into the input field',
454
464
  interfaceAlias: 'aiInput',
455
- paramSchema: core_namespaceObject.z.object({
456
- value: core_namespaceObject.z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
457
- autoDismissKeyboard: core_namespaceObject.z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
458
- mode: core_namespaceObject.z.preprocess((val)=>'append' === val ? 'typeOnly' : val, core_namespaceObject.z["enum"]([
459
- 'replace',
460
- 'clear',
461
- 'typeOnly'
462
- ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
463
- locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The input field to be filled').optional()
464
- }),
465
+ paramSchema: iosInputParamSchema,
466
+ sample: {
467
+ value: 'test@example.com',
468
+ locate: {
469
+ prompt: 'the email input field'
470
+ }
471
+ },
465
472
  call: async (param)=>{
466
473
  const element = param.locate;
467
474
  if ('typeOnly' !== param.mode) await this.clearInput(element);
@@ -523,6 +530,11 @@ class IOSDevice {
523
530
  duration: core_namespaceObject.z.number().optional().describe('The duration of the long press in milliseconds'),
524
531
  locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The element to be long pressed')
525
532
  }),
533
+ sample: {
534
+ locate: {
535
+ prompt: 'the message bubble'
536
+ }
537
+ },
526
538
  call: async (param)=>{
527
539
  const element = param.locate;
528
540
  external_node_assert_default()(element, 'LongPress requires an element to be located');
@@ -1012,6 +1024,10 @@ const createPlatformActions = (device)=>({
1012
1024
  description: 'Execute WebDriverAgent API request directly on iOS device',
1013
1025
  interfaceAlias: 'runWdaRequest',
1014
1026
  paramSchema: runWdaRequestParamSchema,
1027
+ sample: {
1028
+ method: 'GET',
1029
+ endpoint: '/status'
1030
+ },
1015
1031
  call: async (param)=>await device.runWdaRequest(param.method, param.endpoint, param.data)
1016
1032
  }),
1017
1033
  Launch: (0, device_namespaceObject.defineAction)({
@@ -610,6 +610,16 @@ function _define_property(obj, key, value) {
610
610
  return obj;
611
611
  }
612
612
  const debugDevice = (0, logger_namespaceObject.getDebug)('ios:device');
613
+ const iosInputParamSchema = core_namespaceObject.z.object({
614
+ value: core_namespaceObject.z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
615
+ autoDismissKeyboard: core_namespaceObject.z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
616
+ mode: core_namespaceObject.z.preprocess((val)=>'append' === val ? 'typeOnly' : val, core_namespaceObject.z["enum"]([
617
+ 'replace',
618
+ 'clear',
619
+ 'typeOnly'
620
+ ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
621
+ locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The input field to be filled').optional()
622
+ });
613
623
  const WDA_HTTP_METHODS = [
614
624
  'GET',
615
625
  'POST',
@@ -634,16 +644,13 @@ class IOSDevice {
634
644
  name: 'Input',
635
645
  description: 'Input text into the input field',
636
646
  interfaceAlias: 'aiInput',
637
- paramSchema: core_namespaceObject.z.object({
638
- value: core_namespaceObject.z.string().describe('The text to input. Provide the final content for replace/append modes, or an empty string when using clear mode to remove existing text.'),
639
- autoDismissKeyboard: core_namespaceObject.z.boolean().optional().describe('Whether to dismiss the keyboard after input. Defaults to true if not specified. Set to false to keep the keyboard visible after input.'),
640
- mode: core_namespaceObject.z.preprocess((val)=>'append' === val ? 'typeOnly' : val, core_namespaceObject.z["enum"]([
641
- 'replace',
642
- 'clear',
643
- 'typeOnly'
644
- ]).default('replace').optional().describe('Input mode: "replace" (default) - clear the field and input the value; "typeOnly" - type the value directly without clearing the field first; "clear" - clear the field without inputting new text.')),
645
- locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The input field to be filled').optional()
646
- }),
647
+ paramSchema: iosInputParamSchema,
648
+ sample: {
649
+ value: 'test@example.com',
650
+ locate: {
651
+ prompt: 'the email input field'
652
+ }
653
+ },
647
654
  call: async (param)=>{
648
655
  const element = param.locate;
649
656
  if ('typeOnly' !== param.mode) await this.clearInput(element);
@@ -705,6 +712,11 @@ class IOSDevice {
705
712
  duration: core_namespaceObject.z.number().optional().describe('The duration of the long press in milliseconds'),
706
713
  locate: (0, core_namespaceObject.getMidsceneLocationSchema)().describe('The element to be long pressed')
707
714
  }),
715
+ sample: {
716
+ locate: {
717
+ prompt: 'the message bubble'
718
+ }
719
+ },
708
720
  call: async (param)=>{
709
721
  const element = param.locate;
710
722
  external_node_assert_default()(element, 'LongPress requires an element to be located');
@@ -1194,6 +1206,10 @@ const createPlatformActions = (device)=>({
1194
1206
  description: 'Execute WebDriverAgent API request directly on iOS device',
1195
1207
  interfaceAlias: 'runWdaRequest',
1196
1208
  paramSchema: runWdaRequestParamSchema,
1209
+ sample: {
1210
+ method: 'GET',
1211
+ endpoint: '/status'
1212
+ },
1197
1213
  call: async (param)=>await device.runWdaRequest(param.method, param.endpoint, param.data)
1198
1214
  }),
1199
1215
  Launch: (0, device_namespaceObject.defineAction)({
@@ -1312,7 +1328,7 @@ class IOSMCPServer extends mcp_namespaceObject.BaseMCPServer {
1312
1328
  constructor(toolsManager){
1313
1329
  super({
1314
1330
  name: '@midscene/ios-mcp',
1315
- version: "1.5.4-beta-20260310030546.0",
1331
+ version: "1.5.4",
1316
1332
  description: 'Control the iOS device using natural language commands'
1317
1333
  }, toolsManager);
1318
1334
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/ios",
3
- "version": "1.5.4-beta-20260310030546.0",
3
+ "version": "1.5.4",
4
4
  "description": "iOS automation library for Midscene",
5
5
  "keywords": [
6
6
  "iOS UI automation",
@@ -43,10 +43,10 @@
43
43
  "dependencies": {
44
44
  "@inquirer/prompts": "^7.8.6",
45
45
  "open": "10.1.0",
46
- "@midscene/webdriver": "1.5.4-beta-20260310030546.0",
47
- "@midscene/playground": "1.5.4-beta-20260310030546.0",
48
- "@midscene/shared": "1.5.4-beta-20260310030546.0",
49
- "@midscene/core": "1.5.4-beta-20260310030546.0"
46
+ "@midscene/core": "1.5.4",
47
+ "@midscene/shared": "1.5.4",
48
+ "@midscene/webdriver": "1.5.4",
49
+ "@midscene/playground": "1.5.4"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@rslib/core": "^0.18.3",
package/static/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.7b1abe58.js"></script><script defer src="/static/js/148.23cd9828.js"></script><script defer src="/static/js/index.5dd18cad.js"></script><link href="/static/css/index.b190a147.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1
+ <!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.7b1abe58.js"></script><script defer src="/static/js/148.23cd9828.js"></script><script defer src="/static/js/index.1f580227.js"></script><link href="/static/css/index.b190a147.css" rel="stylesheet"></head><body><div id="root"></div></body></html>