@midscene/core 0.27.7-beta-20250901120709.0 → 0.27.7-beta-20250902060833.0

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.
@@ -51,6 +51,7 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
51
51
  callActionInActionSpace<T = any>(type: string, opt?: T): Promise<any>;
52
52
  aiTap(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<any>;
53
53
  aiRightClick(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<any>;
54
+ aiDoubleClick(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<any>;
54
55
  aiHover(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<any>;
55
56
  aiInput(locatePrompt: TUserPrompt, opt: LocateOption & {
56
57
  value: string;
@@ -538,6 +538,264 @@ export declare const actionRightClickParamSchema: z.ZodObject<{
538
538
  }>;
539
539
  export type ActionRightClickParam = z.infer<typeof actionRightClickParamSchema>;
540
540
  export declare const defineActionRightClick: (call: (param: ActionRightClickParam) => Promise<void>) => DeviceAction<ActionRightClickParam>;
541
+ export declare const actionDoubleClickParamSchema: z.ZodObject<{
542
+ locate: z.ZodObject<{
543
+ midscene_location_field_flag: z.ZodLiteral<true>;
544
+ prompt: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
545
+ prompt: z.ZodString;
546
+ }, "strip", z.ZodTypeAny, {
547
+ prompt: string;
548
+ }, {
549
+ prompt: string;
550
+ }>, z.ZodObject<{
551
+ images: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
552
+ name: z.ZodString;
553
+ url: z.ZodString;
554
+ }, "strip", z.ZodTypeAny, {
555
+ name: string;
556
+ url: string;
557
+ }, {
558
+ name: string;
559
+ url: string;
560
+ }>, "many">>>;
561
+ convertHttpImage2Base64: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
562
+ }, "strip", z.ZodTypeAny, {
563
+ images?: {
564
+ name: string;
565
+ url: string;
566
+ }[] | undefined;
567
+ convertHttpImage2Base64?: boolean | undefined;
568
+ }, {
569
+ images?: {
570
+ name: string;
571
+ url: string;
572
+ }[] | undefined;
573
+ convertHttpImage2Base64?: boolean | undefined;
574
+ }>>]>;
575
+ deepThink: z.ZodOptional<z.ZodBoolean>;
576
+ cacheable: z.ZodOptional<z.ZodBoolean>;
577
+ xpath: z.ZodOptional<z.ZodBoolean>;
578
+ center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
579
+ rect: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
580
+ left: z.ZodNumber;
581
+ top: z.ZodNumber;
582
+ }, "strip", z.ZodTypeAny, {
583
+ left: number;
584
+ top: number;
585
+ }, {
586
+ left: number;
587
+ top: number;
588
+ }>, z.ZodObject<{
589
+ width: z.ZodNumber;
590
+ height: z.ZodNumber;
591
+ dpr: z.ZodOptional<z.ZodNumber>;
592
+ }, "strip", z.ZodTypeAny, {
593
+ width: number;
594
+ height: number;
595
+ dpr?: number | undefined;
596
+ }, {
597
+ width: number;
598
+ height: number;
599
+ dpr?: number | undefined;
600
+ }>>, z.ZodObject<{
601
+ zoom: z.ZodOptional<z.ZodNumber>;
602
+ }, "strip", z.ZodTypeAny, {
603
+ zoom?: number | undefined;
604
+ }, {
605
+ zoom?: number | undefined;
606
+ }>>;
607
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
608
+ midscene_location_field_flag: z.ZodLiteral<true>;
609
+ prompt: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
610
+ prompt: z.ZodString;
611
+ }, "strip", z.ZodTypeAny, {
612
+ prompt: string;
613
+ }, {
614
+ prompt: string;
615
+ }>, z.ZodObject<{
616
+ images: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
617
+ name: z.ZodString;
618
+ url: z.ZodString;
619
+ }, "strip", z.ZodTypeAny, {
620
+ name: string;
621
+ url: string;
622
+ }, {
623
+ name: string;
624
+ url: string;
625
+ }>, "many">>>;
626
+ convertHttpImage2Base64: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
627
+ }, "strip", z.ZodTypeAny, {
628
+ images?: {
629
+ name: string;
630
+ url: string;
631
+ }[] | undefined;
632
+ convertHttpImage2Base64?: boolean | undefined;
633
+ }, {
634
+ images?: {
635
+ name: string;
636
+ url: string;
637
+ }[] | undefined;
638
+ convertHttpImage2Base64?: boolean | undefined;
639
+ }>>]>;
640
+ deepThink: z.ZodOptional<z.ZodBoolean>;
641
+ cacheable: z.ZodOptional<z.ZodBoolean>;
642
+ xpath: z.ZodOptional<z.ZodBoolean>;
643
+ center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
644
+ rect: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
645
+ left: z.ZodNumber;
646
+ top: z.ZodNumber;
647
+ }, "strip", z.ZodTypeAny, {
648
+ left: number;
649
+ top: number;
650
+ }, {
651
+ left: number;
652
+ top: number;
653
+ }>, z.ZodObject<{
654
+ width: z.ZodNumber;
655
+ height: z.ZodNumber;
656
+ dpr: z.ZodOptional<z.ZodNumber>;
657
+ }, "strip", z.ZodTypeAny, {
658
+ width: number;
659
+ height: number;
660
+ dpr?: number | undefined;
661
+ }, {
662
+ width: number;
663
+ height: number;
664
+ dpr?: number | undefined;
665
+ }>>, z.ZodObject<{
666
+ zoom: z.ZodOptional<z.ZodNumber>;
667
+ }, "strip", z.ZodTypeAny, {
668
+ zoom?: number | undefined;
669
+ }, {
670
+ zoom?: number | undefined;
671
+ }>>;
672
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
673
+ midscene_location_field_flag: z.ZodLiteral<true>;
674
+ prompt: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
675
+ prompt: z.ZodString;
676
+ }, "strip", z.ZodTypeAny, {
677
+ prompt: string;
678
+ }, {
679
+ prompt: string;
680
+ }>, z.ZodObject<{
681
+ images: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
682
+ name: z.ZodString;
683
+ url: z.ZodString;
684
+ }, "strip", z.ZodTypeAny, {
685
+ name: string;
686
+ url: string;
687
+ }, {
688
+ name: string;
689
+ url: string;
690
+ }>, "many">>>;
691
+ convertHttpImage2Base64: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
692
+ }, "strip", z.ZodTypeAny, {
693
+ images?: {
694
+ name: string;
695
+ url: string;
696
+ }[] | undefined;
697
+ convertHttpImage2Base64?: boolean | undefined;
698
+ }, {
699
+ images?: {
700
+ name: string;
701
+ url: string;
702
+ }[] | undefined;
703
+ convertHttpImage2Base64?: boolean | undefined;
704
+ }>>]>;
705
+ deepThink: z.ZodOptional<z.ZodBoolean>;
706
+ cacheable: z.ZodOptional<z.ZodBoolean>;
707
+ xpath: z.ZodOptional<z.ZodBoolean>;
708
+ center: z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>;
709
+ rect: z.ZodIntersection<z.ZodIntersection<z.ZodObject<{
710
+ left: z.ZodNumber;
711
+ top: z.ZodNumber;
712
+ }, "strip", z.ZodTypeAny, {
713
+ left: number;
714
+ top: number;
715
+ }, {
716
+ left: number;
717
+ top: number;
718
+ }>, z.ZodObject<{
719
+ width: z.ZodNumber;
720
+ height: z.ZodNumber;
721
+ dpr: z.ZodOptional<z.ZodNumber>;
722
+ }, "strip", z.ZodTypeAny, {
723
+ width: number;
724
+ height: number;
725
+ dpr?: number | undefined;
726
+ }, {
727
+ width: number;
728
+ height: number;
729
+ dpr?: number | undefined;
730
+ }>>, z.ZodObject<{
731
+ zoom: z.ZodOptional<z.ZodNumber>;
732
+ }, "strip", z.ZodTypeAny, {
733
+ zoom?: number | undefined;
734
+ }, {
735
+ zoom?: number | undefined;
736
+ }>>;
737
+ }, z.ZodTypeAny, "passthrough">>;
738
+ }, "strip", z.ZodTypeAny, {
739
+ locate: {
740
+ prompt: string | ({
741
+ prompt: string;
742
+ } & {
743
+ images?: {
744
+ name: string;
745
+ url: string;
746
+ }[] | undefined;
747
+ convertHttpImage2Base64?: boolean | undefined;
748
+ });
749
+ midscene_location_field_flag: true;
750
+ center: [number, number];
751
+ rect: {
752
+ left: number;
753
+ top: number;
754
+ } & {
755
+ width: number;
756
+ height: number;
757
+ dpr?: number | undefined;
758
+ } & {
759
+ zoom?: number | undefined;
760
+ };
761
+ cacheable?: boolean | undefined;
762
+ deepThink?: boolean | undefined;
763
+ xpath?: boolean | undefined;
764
+ } & {
765
+ [k: string]: unknown;
766
+ };
767
+ }, {
768
+ locate: {
769
+ prompt: string | ({
770
+ prompt: string;
771
+ } & {
772
+ images?: {
773
+ name: string;
774
+ url: string;
775
+ }[] | undefined;
776
+ convertHttpImage2Base64?: boolean | undefined;
777
+ });
778
+ midscene_location_field_flag: true;
779
+ center: [number, number];
780
+ rect: {
781
+ left: number;
782
+ top: number;
783
+ } & {
784
+ width: number;
785
+ height: number;
786
+ dpr?: number | undefined;
787
+ } & {
788
+ zoom?: number | undefined;
789
+ };
790
+ cacheable?: boolean | undefined;
791
+ deepThink?: boolean | undefined;
792
+ xpath?: boolean | undefined;
793
+ } & {
794
+ [k: string]: unknown;
795
+ };
796
+ }>;
797
+ export type ActionDoubleClickParam = z.infer<typeof actionDoubleClickParamSchema>;
798
+ export declare const defineActionDoubleClick: (call: (param: ActionDoubleClickParam) => Promise<void>) => DeviceAction<ActionDoubleClickParam>;
541
799
  export declare const actionHoverParamSchema: z.ZodObject<{
542
800
  locate: z.ZodObject<{
543
801
  midscene_location_field_flag: z.ZodLiteral<true>;
@@ -8,5 +8,5 @@ export type * from './types';
8
8
  export { z };
9
9
  export default Insight;
10
10
  export { Executor, Insight, getVersion };
11
- export type { MidsceneYamlScript, MidsceneYamlTask, MidsceneYamlFlowItem, MidsceneYamlFlowItemAIRightClick, MidsceneYamlConfigResult, LocateOption, DetailedLocateParam, } from './yaml';
11
+ export type { MidsceneYamlScript, MidsceneYamlTask, MidsceneYamlFlowItem, MidsceneYamlFlowItemAIRightClick, MidsceneYamlFlowItemAIDoubleClick, MidsceneYamlConfigResult, LocateOption, DetailedLocateParam, } from './yaml';
12
12
  export { Agent, type AgentOpt } from './agent';
@@ -111,6 +111,9 @@ export interface MidsceneYamlFlowItemAITap extends LocateOption {
111
111
  export interface MidsceneYamlFlowItemAIRightClick extends LocateOption {
112
112
  aiRightClick: TUserPrompt;
113
113
  }
114
+ export interface MidsceneYamlFlowItemAIDoubleClick extends LocateOption {
115
+ aiDoubleClick: TUserPrompt;
116
+ }
114
117
  export interface MidsceneYamlFlowItemAIHover extends LocateOption {
115
118
  aiHover: TUserPrompt;
116
119
  }
@@ -136,7 +139,7 @@ export interface MidsceneYamlFlowItemLogScreenshot {
136
139
  logScreenshot?: string;
137
140
  content?: string;
138
141
  }
139
- export type MidsceneYamlFlowItem = MidsceneYamlFlowItemAIAction | MidsceneYamlFlowItemAIAssert | MidsceneYamlFlowItemAIQuery | MidsceneYamlFlowItemAIWaitFor | MidsceneYamlFlowItemAITap | MidsceneYamlFlowItemAIRightClick | MidsceneYamlFlowItemAIHover | MidsceneYamlFlowItemAIInput | MidsceneYamlFlowItemAIKeyboardPress | MidsceneYamlFlowItemAIScroll | MidsceneYamlFlowItemSleep | MidsceneYamlFlowItemLogScreenshot;
142
+ export type MidsceneYamlFlowItem = MidsceneYamlFlowItemAIAction | MidsceneYamlFlowItemAIAssert | MidsceneYamlFlowItemAIQuery | MidsceneYamlFlowItemAIWaitFor | MidsceneYamlFlowItemAITap | MidsceneYamlFlowItemAIRightClick | MidsceneYamlFlowItemAIDoubleClick | MidsceneYamlFlowItemAIHover | MidsceneYamlFlowItemAIInput | MidsceneYamlFlowItemAIKeyboardPress | MidsceneYamlFlowItemAIScroll | MidsceneYamlFlowItemSleep | MidsceneYamlFlowItemLogScreenshot;
140
143
  export interface FreeFn {
141
144
  name: string;
142
145
  fn: () => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midscene/core",
3
3
  "description": "Automate browser actions, extract data, and perform assertions using AI. It offers JavaScript SDK, Chrome extension, and support for scripting in YAML. See https://midscenejs.com/ for details.",
4
- "version": "0.27.7-beta-20250901120709.0",
4
+ "version": "0.27.7-beta-20250902060833.0",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "main": "./dist/lib/index.js",
@@ -87,8 +87,8 @@
87
87
  "zod": "3.24.3",
88
88
  "semver": "7.5.2",
89
89
  "js-yaml": "4.1.0",
90
- "@midscene/recorder": "0.27.7-beta-20250901120709.0",
91
- "@midscene/shared": "0.27.7-beta-20250901120709.0"
90
+ "@midscene/shared": "0.27.7-beta-20250902060833.0",
91
+ "@midscene/recorder": "0.27.7-beta-20250902060833.0"
92
92
  },
93
93
  "devDependencies": {
94
94
  "@microsoft/api-extractor": "^7.52.10",