@midscene/android 1.2.1-beta-20260109060244.0 → 1.2.1-beta-20260112081017.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.
@@ -1067,30 +1067,7 @@ class AndroidMidsceneTools extends BaseMidsceneTools {
1067
1067
  name: 'android_disconnect',
1068
1068
  description: 'Disconnect from current Android device and release ADB resources',
1069
1069
  schema: {},
1070
- handler: async ()=>{
1071
- if (!this.agent) return {
1072
- content: [
1073
- {
1074
- type: 'text',
1075
- text: 'No active connection to disconnect'
1076
- }
1077
- ]
1078
- };
1079
- try {
1080
- await this.agent.destroy?.();
1081
- } catch (error) {
1082
- debug('Failed to destroy agent during disconnect:', error);
1083
- }
1084
- this.agent = void 0;
1085
- return {
1086
- content: [
1087
- {
1088
- type: 'text',
1089
- text: 'Disconnected from Android device'
1090
- }
1091
- ]
1092
- };
1093
- }
1070
+ handler: this.createDisconnectHandler('Android device')
1094
1071
  }
1095
1072
  ];
1096
1073
  }
@@ -1112,30 +1112,7 @@ class AndroidMidsceneTools extends mcp_namespaceObject.BaseMidsceneTools {
1112
1112
  name: 'android_disconnect',
1113
1113
  description: 'Disconnect from current Android device and release ADB resources',
1114
1114
  schema: {},
1115
- handler: async ()=>{
1116
- if (!this.agent) return {
1117
- content: [
1118
- {
1119
- type: 'text',
1120
- text: 'No active connection to disconnect'
1121
- }
1122
- ]
1123
- };
1124
- try {
1125
- await this.agent.destroy?.();
1126
- } catch (error) {
1127
- debug('Failed to destroy agent during disconnect:', error);
1128
- }
1129
- this.agent = void 0;
1130
- return {
1131
- content: [
1132
- {
1133
- type: 'text',
1134
- text: 'Disconnected from Android device'
1135
- }
1136
- ]
1137
- };
1138
- }
1115
+ handler: this.createDisconnectHandler('Android device')
1139
1116
  }
1140
1117
  ];
1141
1118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/android",
3
- "version": "1.2.1-beta-20260109060244.0",
3
+ "version": "1.2.1-beta-20260112081017.0",
4
4
  "description": "Android automation library for Midscene",
5
5
  "keywords": [
6
6
  "Android UI automation",
@@ -32,8 +32,8 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "appium-adb": "12.12.1",
35
- "@midscene/shared": "1.2.1-beta-20260109060244.0",
36
- "@midscene/core": "1.2.1-beta-20260109060244.0"
35
+ "@midscene/core": "1.2.1-beta-20260112081017.0",
36
+ "@midscene/shared": "1.2.1-beta-20260112081017.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@rslib/core": "^0.18.3",
@@ -43,7 +43,7 @@
43
43
  "tsx": "^4.19.2",
44
44
  "vitest": "3.0.5",
45
45
  "zod": "3.24.3",
46
- "@midscene/playground": "1.2.1-beta-20260109060244.0"
46
+ "@midscene/playground": "1.2.1-beta-20260112081017.0"
47
47
  },
48
48
  "license": "MIT",
49
49
  "scripts": {