@midscene/android 0.28.2-beta-20250910072710.0 → 0.28.2
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/index.mjs +6 -2
- package/dist/lib/index.js +5 -1
- package/package.json +3 -3
package/dist/es/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import node_path from "node:path";
|
|
|
6
6
|
import { getMidsceneLocationSchema, z } from "@midscene/core";
|
|
7
7
|
import { defineAction, defineActionDoubleClick, defineActionDragAndDrop, defineActionKeyboardPress, defineActionScroll, defineActionTap } from "@midscene/core/device";
|
|
8
8
|
import { getTmpFile, sleep } from "@midscene/core/utils";
|
|
9
|
-
import { MIDSCENE_ADB_PATH, MIDSCENE_ADB_REMOTE_HOST, MIDSCENE_ADB_REMOTE_PORT, MIDSCENE_ANDROID_IME_STRATEGY, globalConfigManager, overrideAIConfig } from "@midscene/shared/env";
|
|
9
|
+
import { MIDSCENE_ADB_PATH, MIDSCENE_ADB_REMOTE_HOST, MIDSCENE_ADB_REMOTE_PORT, MIDSCENE_ANDROID_IME_STRATEGY, globalConfigManager, overrideAIConfig, vlLocateMode } from "@midscene/shared/env";
|
|
10
10
|
import { createImgBase64ByFormat, isValidPNGImageBuffer, resizeAndConvertImgBuffer } from "@midscene/shared/img";
|
|
11
11
|
import { getDebug } from "@midscene/shared/logger";
|
|
12
12
|
import { repeat } from "@midscene/shared/utils";
|
|
@@ -946,7 +946,11 @@ class AndroidAgent extends Agent {
|
|
|
946
946
|
}
|
|
947
947
|
constructor(interfaceInstance, opts){
|
|
948
948
|
super(interfaceInstance, opts);
|
|
949
|
-
if (!
|
|
949
|
+
if (!vlLocateMode({
|
|
950
|
+
intent: 'grounding'
|
|
951
|
+
}) || !vlLocateMode({
|
|
952
|
+
intent: 'planning'
|
|
953
|
+
})) throw new Error('Android Agent only supports vl-model. https://midscenejs.com/choose-a-model.html');
|
|
950
954
|
}
|
|
951
955
|
}
|
|
952
956
|
async function agentFromAdbDevice(deviceId, opts) {
|
package/dist/lib/index.js
CHANGED
|
@@ -993,7 +993,11 @@ class AndroidAgent extends agent_namespaceObject.Agent {
|
|
|
993
993
|
}
|
|
994
994
|
constructor(interfaceInstance, opts){
|
|
995
995
|
super(interfaceInstance, opts);
|
|
996
|
-
if (!
|
|
996
|
+
if (!(0, env_namespaceObject.vlLocateMode)({
|
|
997
|
+
intent: 'grounding'
|
|
998
|
+
}) || !(0, env_namespaceObject.vlLocateMode)({
|
|
999
|
+
intent: 'planning'
|
|
1000
|
+
})) throw new Error('Android Agent only supports vl-model. https://midscenejs.com/choose-a-model.html');
|
|
997
1001
|
}
|
|
998
1002
|
}
|
|
999
1003
|
async function agentFromAdbDevice(deviceId, opts) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/android",
|
|
3
|
-
"version": "0.28.2
|
|
3
|
+
"version": "0.28.2",
|
|
4
4
|
"description": "Android automation library for Midscene",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Android UI automation",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"appium-adb": "12.12.1",
|
|
30
|
-
"@midscene/core": "0.28.2
|
|
31
|
-
"@midscene/shared": "0.28.2
|
|
30
|
+
"@midscene/core": "0.28.2",
|
|
31
|
+
"@midscene/shared": "0.28.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@microsoft/api-extractor": "^7.52.10",
|