@midscene/core 0.30.3-beta-20251011080128.0 → 0.30.3-beta-20251014030035.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.
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/ai-model/common.mjs +4 -11
- package/dist/es/ai-model/common.mjs.map +1 -1
- package/dist/es/device/index.mjs +18 -3
- package/dist/es/device/index.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/ai-model/common.js +4 -11
- package/dist/lib/ai-model/common.js.map +1 -1
- package/dist/lib/device/index.js +23 -2
- package/dist/lib/device/index.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/agent/agent.d.ts +4 -0
- package/dist/types/device/index.d.ts +150 -0
- package/package.json +3 -3
|
@@ -68,12 +68,16 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
68
68
|
value: string;
|
|
69
69
|
} & {
|
|
70
70
|
autoDismissKeyboard?: boolean;
|
|
71
|
+
} & {
|
|
72
|
+
mode?: 'replace' | 'clear' | 'append';
|
|
71
73
|
}): Promise<any>;
|
|
72
74
|
/**
|
|
73
75
|
* @deprecated Use aiInput(locatePrompt, opt) instead where opt contains the value
|
|
74
76
|
*/
|
|
75
77
|
aiInput(value: string, locatePrompt: TUserPrompt, opt?: LocateOption & {
|
|
76
78
|
autoDismissKeyboard?: boolean;
|
|
79
|
+
} & {
|
|
80
|
+
mode?: 'replace' | 'clear' | 'append';
|
|
77
81
|
}): Promise<any>;
|
|
78
82
|
aiKeyboardPress(locatePrompt: TUserPrompt, opt: LocateOption & {
|
|
79
83
|
keyName: string;
|
|
@@ -719,6 +719,7 @@ export declare const actionInputParamSchema: z.ZodObject<{
|
|
|
719
719
|
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
720
720
|
xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
721
721
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
722
|
+
mode: z.ZodOptional<z.ZodDefault<z.ZodEnum<["replace", "clear", "append"]>>>;
|
|
722
723
|
}, "strip", z.ZodTypeAny, {
|
|
723
724
|
value: string;
|
|
724
725
|
locate?: z.objectOutputType<{
|
|
@@ -757,6 +758,7 @@ export declare const actionInputParamSchema: z.ZodObject<{
|
|
|
757
758
|
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
758
759
|
xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
759
760
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
761
|
+
mode?: "replace" | "clear" | "append" | undefined;
|
|
760
762
|
}, {
|
|
761
763
|
value: string;
|
|
762
764
|
locate?: z.objectInputType<{
|
|
@@ -795,10 +797,12 @@ export declare const actionInputParamSchema: z.ZodObject<{
|
|
|
795
797
|
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
796
798
|
xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
797
799
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
800
|
+
mode?: "replace" | "clear" | "append" | undefined;
|
|
798
801
|
}>;
|
|
799
802
|
export type ActionInputParam = {
|
|
800
803
|
value: string;
|
|
801
804
|
locate?: LocateResultElement;
|
|
805
|
+
mode?: 'replace' | 'clear' | 'append';
|
|
802
806
|
};
|
|
803
807
|
export declare const defineActionInput: (call: (param: ActionInputParam) => Promise<void>) => DeviceAction<ActionInputParam>;
|
|
804
808
|
export declare const actionKeyboardPressParamSchema: z.ZodObject<{
|
|
@@ -2005,4 +2009,150 @@ export type ActionSwipeParam = {
|
|
|
2005
2009
|
repeat?: number;
|
|
2006
2010
|
};
|
|
2007
2011
|
export declare const defineActionSwipe: (call: (param: ActionSwipeParam) => Promise<void>) => DeviceAction<ActionSwipeParam>;
|
|
2012
|
+
export declare const actionClearInputParamSchema: z.ZodObject<{
|
|
2013
|
+
locate: z.ZodObject<{
|
|
2014
|
+
prompt: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
2015
|
+
prompt: z.ZodString;
|
|
2016
|
+
}, "strip", z.ZodTypeAny, {
|
|
2017
|
+
prompt: string;
|
|
2018
|
+
}, {
|
|
2019
|
+
prompt: string;
|
|
2020
|
+
}>, z.ZodObject<{
|
|
2021
|
+
images: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2022
|
+
name: z.ZodString;
|
|
2023
|
+
url: z.ZodString;
|
|
2024
|
+
}, "strip", z.ZodTypeAny, {
|
|
2025
|
+
name: string;
|
|
2026
|
+
url: string;
|
|
2027
|
+
}, {
|
|
2028
|
+
name: string;
|
|
2029
|
+
url: string;
|
|
2030
|
+
}>, "many">>>;
|
|
2031
|
+
convertHttpImage2Base64: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2032
|
+
}, "strip", z.ZodTypeAny, {
|
|
2033
|
+
images?: {
|
|
2034
|
+
name: string;
|
|
2035
|
+
url: string;
|
|
2036
|
+
}[] | undefined;
|
|
2037
|
+
convertHttpImage2Base64?: boolean | undefined;
|
|
2038
|
+
}, {
|
|
2039
|
+
images?: {
|
|
2040
|
+
name: string;
|
|
2041
|
+
url: string;
|
|
2042
|
+
}[] | undefined;
|
|
2043
|
+
convertHttpImage2Base64?: boolean | undefined;
|
|
2044
|
+
}>>]>;
|
|
2045
|
+
deepThink: z.ZodOptional<z.ZodBoolean>;
|
|
2046
|
+
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
2047
|
+
xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
2048
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
2049
|
+
prompt: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
2050
|
+
prompt: z.ZodString;
|
|
2051
|
+
}, "strip", z.ZodTypeAny, {
|
|
2052
|
+
prompt: string;
|
|
2053
|
+
}, {
|
|
2054
|
+
prompt: string;
|
|
2055
|
+
}>, z.ZodObject<{
|
|
2056
|
+
images: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2057
|
+
name: z.ZodString;
|
|
2058
|
+
url: z.ZodString;
|
|
2059
|
+
}, "strip", z.ZodTypeAny, {
|
|
2060
|
+
name: string;
|
|
2061
|
+
url: string;
|
|
2062
|
+
}, {
|
|
2063
|
+
name: string;
|
|
2064
|
+
url: string;
|
|
2065
|
+
}>, "many">>>;
|
|
2066
|
+
convertHttpImage2Base64: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2067
|
+
}, "strip", z.ZodTypeAny, {
|
|
2068
|
+
images?: {
|
|
2069
|
+
name: string;
|
|
2070
|
+
url: string;
|
|
2071
|
+
}[] | undefined;
|
|
2072
|
+
convertHttpImage2Base64?: boolean | undefined;
|
|
2073
|
+
}, {
|
|
2074
|
+
images?: {
|
|
2075
|
+
name: string;
|
|
2076
|
+
url: string;
|
|
2077
|
+
}[] | undefined;
|
|
2078
|
+
convertHttpImage2Base64?: boolean | undefined;
|
|
2079
|
+
}>>]>;
|
|
2080
|
+
deepThink: z.ZodOptional<z.ZodBoolean>;
|
|
2081
|
+
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
2082
|
+
xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
2083
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
2084
|
+
prompt: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
2085
|
+
prompt: z.ZodString;
|
|
2086
|
+
}, "strip", z.ZodTypeAny, {
|
|
2087
|
+
prompt: string;
|
|
2088
|
+
}, {
|
|
2089
|
+
prompt: string;
|
|
2090
|
+
}>, z.ZodObject<{
|
|
2091
|
+
images: z.ZodOptional<z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2092
|
+
name: z.ZodString;
|
|
2093
|
+
url: z.ZodString;
|
|
2094
|
+
}, "strip", z.ZodTypeAny, {
|
|
2095
|
+
name: string;
|
|
2096
|
+
url: string;
|
|
2097
|
+
}, {
|
|
2098
|
+
name: string;
|
|
2099
|
+
url: string;
|
|
2100
|
+
}>, "many">>>;
|
|
2101
|
+
convertHttpImage2Base64: z.ZodOptional<z.ZodOptional<z.ZodBoolean>>;
|
|
2102
|
+
}, "strip", z.ZodTypeAny, {
|
|
2103
|
+
images?: {
|
|
2104
|
+
name: string;
|
|
2105
|
+
url: string;
|
|
2106
|
+
}[] | undefined;
|
|
2107
|
+
convertHttpImage2Base64?: boolean | undefined;
|
|
2108
|
+
}, {
|
|
2109
|
+
images?: {
|
|
2110
|
+
name: string;
|
|
2111
|
+
url: string;
|
|
2112
|
+
}[] | undefined;
|
|
2113
|
+
convertHttpImage2Base64?: boolean | undefined;
|
|
2114
|
+
}>>]>;
|
|
2115
|
+
deepThink: z.ZodOptional<z.ZodBoolean>;
|
|
2116
|
+
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
2117
|
+
xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
2118
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2119
|
+
}, "strip", z.ZodTypeAny, {
|
|
2120
|
+
locate: {
|
|
2121
|
+
prompt: string | ({
|
|
2122
|
+
prompt: string;
|
|
2123
|
+
} & {
|
|
2124
|
+
images?: {
|
|
2125
|
+
name: string;
|
|
2126
|
+
url: string;
|
|
2127
|
+
}[] | undefined;
|
|
2128
|
+
convertHttpImage2Base64?: boolean | undefined;
|
|
2129
|
+
});
|
|
2130
|
+
cacheable?: boolean | undefined;
|
|
2131
|
+
deepThink?: boolean | undefined;
|
|
2132
|
+
xpath?: string | boolean | undefined;
|
|
2133
|
+
} & {
|
|
2134
|
+
[k: string]: unknown;
|
|
2135
|
+
};
|
|
2136
|
+
}, {
|
|
2137
|
+
locate: {
|
|
2138
|
+
prompt: string | ({
|
|
2139
|
+
prompt: string;
|
|
2140
|
+
} & {
|
|
2141
|
+
images?: {
|
|
2142
|
+
name: string;
|
|
2143
|
+
url: string;
|
|
2144
|
+
}[] | undefined;
|
|
2145
|
+
convertHttpImage2Base64?: boolean | undefined;
|
|
2146
|
+
});
|
|
2147
|
+
cacheable?: boolean | undefined;
|
|
2148
|
+
deepThink?: boolean | undefined;
|
|
2149
|
+
xpath?: string | boolean | undefined;
|
|
2150
|
+
} & {
|
|
2151
|
+
[k: string]: unknown;
|
|
2152
|
+
};
|
|
2153
|
+
}>;
|
|
2154
|
+
export type ActionClearInputParam = {
|
|
2155
|
+
locate: LocateResultElement;
|
|
2156
|
+
};
|
|
2157
|
+
export declare const defineActionClearInput: (call: (param: ActionClearInputParam) => Promise<void>) => DeviceAction<ActionClearInputParam>;
|
|
2008
2158
|
export type { DeviceAction } from '../types';
|
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.30.3-beta-
|
|
4
|
+
"version": "0.30.3-beta-20251014030035.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.30.3-beta-
|
|
91
|
-
"@midscene/shared": "0.30.3-beta-
|
|
90
|
+
"@midscene/recorder": "0.30.3-beta-20251014030035.0",
|
|
91
|
+
"@midscene/shared": "0.30.3-beta-20251014030035.0"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
94
94
|
"@rslib/core": "^0.11.2",
|