@midscene/core 1.8.5-beta-20260525033347.0 → 1.8.5

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.
@@ -83,17 +83,17 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
83
83
  callActionInActionSpace<T = any>(type: string, opt?: T): Promise<any>;
84
84
  aiTap(locatePrompt: TUserPrompt, opt?: LocateOption & {
85
85
  fileChooserAccept?: string | string[];
86
- }): Promise<any>;
87
- aiRightClick(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<any>;
88
- aiDoubleClick(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<any>;
89
- aiHover(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<any>;
86
+ }): Promise<void>;
87
+ aiRightClick(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<void>;
88
+ aiDoubleClick(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<void>;
89
+ aiHover(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<void>;
90
90
  aiInput(locatePrompt: TUserPrompt, opt: LocateOption & {
91
91
  value: string | number;
92
92
  } & {
93
93
  autoDismissKeyboard?: boolean;
94
94
  } & {
95
95
  mode?: 'replace' | 'clear' | 'typeOnly' | 'append';
96
- }): Promise<any>;
96
+ }): Promise<void>;
97
97
  /**
98
98
  * @deprecated Use aiInput(locatePrompt, opt) instead where opt contains the value
99
99
  */
@@ -101,28 +101,28 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
101
101
  autoDismissKeyboard?: boolean;
102
102
  } & {
103
103
  mode?: 'replace' | 'clear' | 'typeOnly' | 'append';
104
- }): Promise<any>;
104
+ }): Promise<void>;
105
105
  aiKeyboardPress(locatePrompt: TUserPrompt, opt: LocateOption & {
106
106
  keyName: string;
107
- }): Promise<any>;
107
+ }): Promise<void>;
108
108
  /**
109
109
  * @deprecated Use aiKeyboardPress(locatePrompt, opt) instead where opt contains the keyName
110
110
  */
111
- aiKeyboardPress(keyName: string, locatePrompt?: TUserPrompt, opt?: LocateOption): Promise<any>;
112
- aiScroll(locatePrompt: TUserPrompt | undefined, opt: LocateOption & ScrollParam): Promise<any>;
111
+ aiKeyboardPress(keyName: string, locatePrompt?: TUserPrompt, opt?: LocateOption): Promise<void>;
112
+ aiScroll(locatePrompt: TUserPrompt | undefined, opt: LocateOption & ScrollParam): Promise<void>;
113
113
  /**
114
114
  * @deprecated Use aiScroll(locatePrompt, opt) instead where opt contains the scroll parameters
115
115
  */
116
- aiScroll(scrollParam: ScrollParam, locatePrompt?: TUserPrompt, opt?: LocateOption): Promise<any>;
116
+ aiScroll(scrollParam: ScrollParam, locatePrompt?: TUserPrompt, opt?: LocateOption): Promise<void>;
117
117
  aiPinch(locatePrompt: TUserPrompt | undefined, opt: LocateOption & {
118
118
  direction: 'in' | 'out';
119
119
  distance?: number;
120
120
  duration?: number;
121
- }): Promise<any>;
121
+ }): Promise<void>;
122
122
  aiLongPress(locatePrompt: TUserPrompt, opt?: LocateOption & {
123
123
  duration?: number;
124
- }): Promise<any>;
125
- aiClearInput(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<any>;
124
+ }): Promise<void>;
125
+ aiClearInput(locatePrompt: TUserPrompt, opt?: LocateOption): Promise<void>;
126
126
  aiAct(taskPrompt: string, opt?: AiActOptions): Promise<string | undefined>;
127
127
  /**
128
128
  * @deprecated Use {@link Agent.aiAct} instead.
@@ -180,7 +180,8 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
180
180
  clearDumpUpdateListeners(): void;
181
181
  destroy(): Promise<void>;
182
182
  recordToReport(title?: string, opt?: {
183
- content: string;
183
+ content?: string;
184
+ screenshotBase64?: string;
184
185
  }): Promise<void>;
185
186
  /**
186
187
  * @deprecated Use {@link Agent.recordToReport} instead.
@@ -109,16 +109,6 @@ export type AndroidDeviceOpt = {
109
109
  export type IOSDeviceInputOpt = {
110
110
  /** Automatically dismiss the keyboard after input is completed */
111
111
  autoDismissKeyboard?: boolean;
112
- /**
113
- * Per-character delay (ms) used when typing into iOS input fields. When set
114
- * to a positive number, characters are dispatched to WebDriverAgent one at a
115
- * time with this gap between them, which prevents app-side reaction windows
116
- * (re-render, predictive bar, autocorrect) from swallowing a contiguous
117
- * block of keystrokes. Set to 0 to send the whole string in a single
118
- * `/wda/keys` request (faster, but lossy on slow-reacting inputs).
119
- * @default 80
120
- */
121
- keyboardTypeDelay?: number;
122
112
  };
123
113
  /**
124
114
  * iOS device options
@@ -15,7 +15,7 @@ export { restoreImageReferences, escapeContent, unescapeContent, parseImageScrip
15
15
  export type { IReportGenerator } from './report-generator';
16
16
  export { ReportGenerator, nullReportGenerator } from './report-generator';
17
17
  export { collectDedupedExecutions, ReportMergingTool, dedupeExecutionsKeepLatest, splitReportHtmlByExecution, } from './report';
18
- export { createReportCliCommands, reportFileToMarkdown, splitReportFile, type ConsumeReportFileAction, type ReportFileToMarkdownOptions, type ReportCliCommandDefinition, type ReportCliCommandEntry, type SplitReportFileOptions, } from './report-cli';
18
+ export { createReportCliCommands, reportFileToMarkdown, splitReportFile, mergeReportFiles, type ConsumeReportFileAction, type ReportFileToMarkdownOptions, type ReportCliCommandDefinition, type ReportCliCommandEntry, type SplitReportFileOptions, type MergeReportFilesOptions, type MergeReportFilesResult, } from './report-cli';
19
19
  export { ScreenshotItem } from './screenshot-item';
20
20
  export { ScreenshotStore, type ScreenshotRef } from './dump/screenshot-store';
21
21
  export { executionToMarkdown, reportToMarkdown, type ExecutionMarkdownOptions, type ExecutionMarkdownResult, type ReportMarkdownResult, type MarkdownAttachment, } from './report-markdown';
@@ -17,13 +17,22 @@ export interface ReportCliCommandEntry {
17
17
  name: string;
18
18
  def: ReportCliCommandDefinition;
19
19
  }
20
- export type ConsumeReportFileAction = 'split' | 'to-markdown';
20
+ export type ConsumeReportFileAction = 'split' | 'to-markdown' | 'merge-html';
21
21
  export interface ConsumeReportFileOptions {
22
22
  htmlPath: string;
23
23
  outputDir: string;
24
24
  }
25
25
  export type SplitReportFileOptions = ConsumeReportFileOptions;
26
26
  export type ReportFileToMarkdownOptions = ConsumeReportFileOptions;
27
+ export interface MergeReportFilesOptions {
28
+ htmlPaths: string[];
29
+ outputDir?: string;
30
+ outputName?: string;
31
+ overwrite?: boolean;
32
+ }
33
+ export interface MergeReportFilesResult {
34
+ mergedReportPath: string;
35
+ }
27
36
  export declare function splitReportFile(options: SplitReportFileOptions): {
28
37
  executionJsonFiles: string[];
29
38
  screenshotFiles: string[];
@@ -32,5 +41,6 @@ export declare function reportFileToMarkdown(options: ReportFileToMarkdownOption
32
41
  markdownFiles: string[];
33
42
  screenshotFiles: string[];
34
43
  }>;
44
+ export declare function mergeReportFiles(options: MergeReportFilesOptions): MergeReportFilesResult;
35
45
  export declare function createReportCliCommands(): ReportCliCommandEntry[];
36
46
  export {};
@@ -25,6 +25,7 @@ export declare class ReportMergingTool {
25
25
  mergeReports(reportFileName?: 'AUTO' | string, opts?: {
26
26
  rmOriginalReports?: boolean;
27
27
  overwrite?: boolean;
28
+ outputDir?: string;
28
29
  }): string | null;
29
30
  }
30
31
  export interface SplitReportHtmlOptions {
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.8.5-beta-20260525033347.0",
4
+ "version": "1.8.5",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "main": "./dist/lib/index.js",
@@ -97,7 +97,7 @@
97
97
  "semver": "7.5.2",
98
98
  "undici": "^6.0.0",
99
99
  "zod": "^3.25.1",
100
- "@midscene/shared": "1.8.5-beta-20260525033347.0"
100
+ "@midscene/shared": "1.8.5"
101
101
  },
102
102
  "devDependencies": {
103
103
  "@rslib/core": "^0.18.3",
@@ -123,8 +123,8 @@
123
123
  "build:watch": "USE_DEV_REPORT=1 rslib build --watch --no-clean",
124
124
  "test": "vitest --run",
125
125
  "test:u": "vitest --run -u",
126
- "test:ai": "AITEST=true npm run test",
127
- "computer": "TEST_COMPUTER=true npm run test:ai -- tests/ai/evaluate/computer.test.ts",
128
- "test:parse-action": "npm run test:ai -- tests/ai/parse-action.test.ts"
126
+ "test:ai": "AITEST=true vitest --run",
127
+ "computer": "TEST_COMPUTER=true AITEST=true vitest --run tests/ai/evaluate/computer.test.ts",
128
+ "test:parse-action": "vitest --run tests/unit-test/parse-action.test.ts"
129
129
  }
130
130
  }