@midscene/core 1.10.8 → 1.10.9-beta-20260731103801.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.
@@ -117,7 +117,7 @@ export type AndroidDeviceOpt = {
117
117
  /**
118
118
  * Video bit rate for H.264 encoding in bits per second.
119
119
  * Higher values improve quality but increase bandwidth usage.
120
- * @default 2000000 (2 Mbps)
120
+ * @default 100000000 (100 Mbps)
121
121
  */
122
122
  videoBitRate?: number;
123
123
  };
@@ -141,8 +141,6 @@ export type IOSDeviceInputOpt = {
141
141
  * iOS device options
142
142
  */
143
143
  export type IOSDeviceOpt = {
144
- /** Device ID (UDID) to connect to */
145
- deviceId?: string;
146
144
  /**
147
145
  * Optional npm module path used to override the default iOS device implementation.
148
146
  * The target module must export an `IOSDevice` class (or default export) compatible with Midscene's iOS device interface.
@@ -160,8 +158,6 @@ export type IOSDeviceOpt = {
160
158
  * the external session during cleanup.
161
159
  */
162
160
  sessionId?: string;
163
- /** Whether to use WebDriverAgent */
164
- useWDA?: boolean;
165
161
  /** WDA MJPEG server port for real-time screen streaming (default: 9100) */
166
162
  wdaMjpegPort?: number;
167
163
  /**
@@ -2,7 +2,7 @@ import type { ModelRuntime } from '../ai-model/models';
2
2
  import type { ActionScrollParam, DeviceAction, ExecutorContext, LocateResultElement } from '../types';
3
3
  import type { ElementNode } from '@midscene/shared/extractor';
4
4
  import { z } from 'zod';
5
- import type { ElementCacheFeature, Rect, Size } from '../types';
5
+ import type { ElementCacheFeature, Rect, Size, UITreeSnapshot } from '../types';
6
6
  export interface FileChooserHandler {
7
7
  accept(files: string[]): Promise<void>;
8
8
  }
@@ -154,6 +154,7 @@ export declare abstract class AbstractInterface {
154
154
  modelRuntime?: ModelRuntime;
155
155
  }): Promise<ElementCacheFeature>;
156
156
  abstract rectMatchesCacheFeature?(feature: ElementCacheFeature): Promise<Rect>;
157
+ abstract getUITree?(): Promise<UITreeSnapshot>;
157
158
  abstract destroy?(): Promise<void>;
158
159
  abstract describe?(): string;
159
160
  abstract beforeInvokeAction?(actionName: string, param: any): Promise<void>;
@@ -93,6 +93,17 @@ export interface AgentDescribeElementAtPointResult {
93
93
  /**
94
94
  * context
95
95
  */
96
+ export interface UiNode {
97
+ type: string;
98
+ attrs: Record<string, string | undefined>;
99
+ bounds: Rect;
100
+ children: UiNode[];
101
+ }
102
+ export interface UITreeSnapshot {
103
+ platform: 'android';
104
+ capturedAt: number;
105
+ root: UiNode;
106
+ }
96
107
  export declare abstract class UIContext {
97
108
  /**
98
109
  * screenshot of the current UI state. which size is shotSize(be shrunk by screenshotShrinkFactor),
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": "1.10.8",
4
+ "version": "1.10.9-beta-20260731103801.0",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "main": "./dist/lib/index.js",
@@ -115,7 +115,7 @@
115
115
  "semver": "7.5.2",
116
116
  "undici": "^6.0.0",
117
117
  "zod": "^3.25.1",
118
- "@midscene/shared": "1.10.8"
118
+ "@midscene/shared": "1.10.9-beta-20260731103801.0"
119
119
  },
120
120
  "devDependencies": {
121
121
  "@rslib/core": "^0.18.3",