@midscene/web 0.8.6 → 0.8.7

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.
@@ -721,26 +721,42 @@ var PageTaskExecutor = class {
721
721
  param: plan2.param,
722
722
  thought: plan2.thought,
723
723
  locate: plan2.locate,
724
- executor: async (taskParam) => {
725
- const scrollToEventName = taskParam.scrollType;
726
- switch (scrollToEventName) {
727
- case "scrollUntilTop":
728
- await this.page.scrollUntilTop();
729
- break;
730
- case "scrollUntilBottom":
731
- await this.page.scrollUntilBottom();
732
- break;
733
- case "scrollUpOneScreen":
734
- await this.page.scrollUpOneScreen();
735
- break;
736
- case "scrollDownOneScreen":
737
- await this.page.scrollDownOneScreen();
738
- break;
739
- default:
740
- console.error(
741
- "Unknown scroll event type:",
742
- scrollToEventName
724
+ executor: async (taskParam, { element }) => {
725
+ if (element) {
726
+ await this.page.mouse.move(
727
+ element.center[0],
728
+ element.center[1]
729
+ );
730
+ }
731
+ const scrollToEventName = taskParam == null ? void 0 : taskParam.scrollType;
732
+ if (scrollToEventName === "untilTop") {
733
+ await this.page.scrollUntilTop();
734
+ } else if (scrollToEventName === "untilBottom") {
735
+ await this.page.scrollUntilBottom();
736
+ } else if (scrollToEventName === "untilRight") {
737
+ await this.page.scrollUntilRight();
738
+ } else if (scrollToEventName === "untilLeft") {
739
+ await this.page.scrollUntilLeft();
740
+ } else if (scrollToEventName === "once") {
741
+ if (taskParam.direction === "down") {
742
+ await this.page.scrollDown(taskParam.distance || void 0);
743
+ } else if (taskParam.direction === "up") {
744
+ await this.page.scrollUp(taskParam.distance || void 0);
745
+ } else if (taskParam.direction === "left") {
746
+ await this.page.scrollLeft(taskParam.distance || void 0);
747
+ } else if (taskParam.direction === "right") {
748
+ await this.page.scrollRight(taskParam.distance || void 0);
749
+ } else {
750
+ throw new Error(
751
+ `Unknown scroll direction: ${taskParam.direction}`
743
752
  );
753
+ }
754
+ } else {
755
+ throw new Error(
756
+ `Unknown scroll event type: ${scrollToEventName}, taskParam: ${JSON.stringify(
757
+ taskParam
758
+ )}`
759
+ );
744
760
  }
745
761
  }
746
762
  };
@@ -769,6 +785,17 @@ var PageTaskExecutor = class {
769
785
  }
770
786
  };
771
787
  tasks.push(taskActionError);
788
+ } else if (plan2.type === "FalsyConditionStatement") {
789
+ const taskActionFalsyConditionStatement = {
790
+ type: "Action",
791
+ subType: "FalsyConditionStatement",
792
+ param: null,
793
+ thought: plan2.thought,
794
+ locate: plan2.locate,
795
+ executor: async () => {
796
+ }
797
+ };
798
+ tasks.push(taskActionFalsyConditionStatement);
772
799
  } else {
773
800
  throw new Error(`Unknown or unsupported task type: ${plan2.type}`);
774
801
  }
@@ -888,6 +915,9 @@ var PageTaskExecutor = class {
888
915
  const errorMsg = "Replanning too many times, please split the task into multiple steps";
889
916
  return this.appendErrorPlan(taskExecutor, errorMsg);
890
917
  }
918
+ if (replanCount > 0) {
919
+ await (0, import_utils3.sleep)(300);
920
+ }
891
921
  await taskExecutor.append(planningTask);
892
922
  const planResult = await taskExecutor.flush();
893
923
  if (taskExecutor.isInErrorState()) {
@@ -1573,15 +1603,31 @@ var Page = class {
1573
1603
  scrollUntilBottom() {
1574
1604
  return this.mouse.wheel(0, 9999999);
1575
1605
  }
1576
- async scrollUpOneScreen() {
1606
+ scrollUntilLeft() {
1607
+ return this.mouse.wheel(-9999999, 0);
1608
+ }
1609
+ scrollUntilRight() {
1610
+ return this.mouse.wheel(9999999, 0);
1611
+ }
1612
+ async scrollUp(distance) {
1577
1613
  const innerHeight = await this.evaluate(() => window.innerHeight);
1578
- const distance = innerHeight * 0.7;
1579
- await this.mouse.wheel(0, -distance);
1614
+ const scrollDistance = distance || innerHeight * 0.7;
1615
+ await this.mouse.wheel(0, -scrollDistance);
1580
1616
  }
1581
- async scrollDownOneScreen() {
1617
+ async scrollDown(distance) {
1582
1618
  const innerHeight = await this.evaluate(() => window.innerHeight);
1583
- const distance = innerHeight * 0.7;
1584
- await this.mouse.wheel(0, distance);
1619
+ const scrollDistance = distance || innerHeight * 0.7;
1620
+ await this.mouse.wheel(0, scrollDistance);
1621
+ }
1622
+ async scrollLeft(distance) {
1623
+ const innerWidth = await this.evaluate(() => window.innerWidth);
1624
+ const scrollDistance = distance || innerWidth * 0.7;
1625
+ await this.mouse.wheel(-scrollDistance, 0);
1626
+ }
1627
+ async scrollRight(distance) {
1628
+ const innerWidth = await this.evaluate(() => window.innerWidth);
1629
+ const scrollDistance = distance || innerWidth * 0.7;
1630
+ await this.mouse.wheel(scrollDistance, 0);
1585
1631
  }
1586
1632
  async destroy() {
1587
1633
  }
@@ -717,26 +717,42 @@ var PageTaskExecutor = class {
717
717
  param: plan2.param,
718
718
  thought: plan2.thought,
719
719
  locate: plan2.locate,
720
- executor: async (taskParam) => {
721
- const scrollToEventName = taskParam.scrollType;
722
- switch (scrollToEventName) {
723
- case "scrollUntilTop":
724
- await this.page.scrollUntilTop();
725
- break;
726
- case "scrollUntilBottom":
727
- await this.page.scrollUntilBottom();
728
- break;
729
- case "scrollUpOneScreen":
730
- await this.page.scrollUpOneScreen();
731
- break;
732
- case "scrollDownOneScreen":
733
- await this.page.scrollDownOneScreen();
734
- break;
735
- default:
736
- console.error(
737
- "Unknown scroll event type:",
738
- scrollToEventName
720
+ executor: async (taskParam, { element }) => {
721
+ if (element) {
722
+ await this.page.mouse.move(
723
+ element.center[0],
724
+ element.center[1]
725
+ );
726
+ }
727
+ const scrollToEventName = taskParam == null ? void 0 : taskParam.scrollType;
728
+ if (scrollToEventName === "untilTop") {
729
+ await this.page.scrollUntilTop();
730
+ } else if (scrollToEventName === "untilBottom") {
731
+ await this.page.scrollUntilBottom();
732
+ } else if (scrollToEventName === "untilRight") {
733
+ await this.page.scrollUntilRight();
734
+ } else if (scrollToEventName === "untilLeft") {
735
+ await this.page.scrollUntilLeft();
736
+ } else if (scrollToEventName === "once") {
737
+ if (taskParam.direction === "down") {
738
+ await this.page.scrollDown(taskParam.distance || void 0);
739
+ } else if (taskParam.direction === "up") {
740
+ await this.page.scrollUp(taskParam.distance || void 0);
741
+ } else if (taskParam.direction === "left") {
742
+ await this.page.scrollLeft(taskParam.distance || void 0);
743
+ } else if (taskParam.direction === "right") {
744
+ await this.page.scrollRight(taskParam.distance || void 0);
745
+ } else {
746
+ throw new Error(
747
+ `Unknown scroll direction: ${taskParam.direction}`
739
748
  );
749
+ }
750
+ } else {
751
+ throw new Error(
752
+ `Unknown scroll event type: ${scrollToEventName}, taskParam: ${JSON.stringify(
753
+ taskParam
754
+ )}`
755
+ );
740
756
  }
741
757
  }
742
758
  };
@@ -765,6 +781,17 @@ var PageTaskExecutor = class {
765
781
  }
766
782
  };
767
783
  tasks.push(taskActionError);
784
+ } else if (plan2.type === "FalsyConditionStatement") {
785
+ const taskActionFalsyConditionStatement = {
786
+ type: "Action",
787
+ subType: "FalsyConditionStatement",
788
+ param: null,
789
+ thought: plan2.thought,
790
+ locate: plan2.locate,
791
+ executor: async () => {
792
+ }
793
+ };
794
+ tasks.push(taskActionFalsyConditionStatement);
768
795
  } else {
769
796
  throw new Error(`Unknown or unsupported task type: ${plan2.type}`);
770
797
  }
@@ -884,6 +911,9 @@ var PageTaskExecutor = class {
884
911
  const errorMsg = "Replanning too many times, please split the task into multiple steps";
885
912
  return this.appendErrorPlan(taskExecutor, errorMsg);
886
913
  }
914
+ if (replanCount > 0) {
915
+ await (0, import_utils3.sleep)(300);
916
+ }
887
917
  await taskExecutor.append(planningTask);
888
918
  const planResult = await taskExecutor.flush();
889
919
  if (taskExecutor.isInErrorState()) {
@@ -1417,15 +1447,31 @@ var Page = class {
1417
1447
  scrollUntilBottom() {
1418
1448
  return this.mouse.wheel(0, 9999999);
1419
1449
  }
1420
- async scrollUpOneScreen() {
1450
+ scrollUntilLeft() {
1451
+ return this.mouse.wheel(-9999999, 0);
1452
+ }
1453
+ scrollUntilRight() {
1454
+ return this.mouse.wheel(9999999, 0);
1455
+ }
1456
+ async scrollUp(distance) {
1421
1457
  const innerHeight = await this.evaluate(() => window.innerHeight);
1422
- const distance = innerHeight * 0.7;
1423
- await this.mouse.wheel(0, -distance);
1458
+ const scrollDistance = distance || innerHeight * 0.7;
1459
+ await this.mouse.wheel(0, -scrollDistance);
1424
1460
  }
1425
- async scrollDownOneScreen() {
1461
+ async scrollDown(distance) {
1426
1462
  const innerHeight = await this.evaluate(() => window.innerHeight);
1427
- const distance = innerHeight * 0.7;
1428
- await this.mouse.wheel(0, distance);
1463
+ const scrollDistance = distance || innerHeight * 0.7;
1464
+ await this.mouse.wheel(0, scrollDistance);
1465
+ }
1466
+ async scrollLeft(distance) {
1467
+ const innerWidth = await this.evaluate(() => window.innerWidth);
1468
+ const scrollDistance = distance || innerWidth * 0.7;
1469
+ await this.mouse.wheel(-scrollDistance, 0);
1470
+ }
1471
+ async scrollRight(distance) {
1472
+ const innerWidth = await this.evaluate(() => window.innerWidth);
1473
+ const scrollDistance = distance || innerWidth * 0.7;
1474
+ await this.mouse.wheel(scrollDistance, 0);
1429
1475
  }
1430
1476
  async destroy() {
1431
1477
  }
@@ -28,7 +28,7 @@ function typeStr(task) {
28
28
  return task.subType ? `${task.type} / ${task.subType || ""}` : task.type;
29
29
  }
30
30
  function paramStr(task) {
31
- var _a, _b, _c, _d, _e, _f, _g, _h;
31
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
32
32
  let value;
33
33
  if (task.type === "Planning") {
34
34
  value = (_a = task == null ? void 0 : task.param) == null ? void 0 : _a.userPrompt;
@@ -38,10 +38,15 @@ function paramStr(task) {
38
38
  }
39
39
  if (task.type === "Action") {
40
40
  const sleepMs = (_f = task == null ? void 0 : task.param) == null ? void 0 : _f.timeMs;
41
+ const scrollType = (_g = task == null ? void 0 : task.param) == null ? void 0 : _g.scrollType;
41
42
  if (sleepMs) {
42
43
  value = `${sleepMs}ms`;
44
+ } else if (scrollType) {
45
+ const scrollDirection = (_h = task == null ? void 0 : task.param) == null ? void 0 : _h.direction;
46
+ const scrollDistance = (_i = task == null ? void 0 : task.param) == null ? void 0 : _i.distance;
47
+ value = `${scrollDirection}, ${scrollType}, ${scrollDistance || "distance-not-set"}`;
43
48
  } else {
44
- value = ((_g = task == null ? void 0 : task.param) == null ? void 0 : _g.value) || ((_h = task == null ? void 0 : task.param) == null ? void 0 : _h.scrollType);
49
+ value = ((_j = task == null ? void 0 : task.param) == null ? void 0 : _j.value) || ((_k = task == null ? void 0 : task.param) == null ? void 0 : _k.scrollType);
45
50
  }
46
51
  if (!value) {
47
52
  value = task.thought;
@@ -1,6 +1,6 @@
1
- export { P as AppiumAgent } from './tasks-15aa1c35.js';
2
- export { P as AppiumPage } from './page-a10cd0ea.js';
3
- import '@midscene/core/dist/lib/types/types-7bcbf7fe';
1
+ export { P as AppiumAgent } from './tasks-969c0e3e.js';
2
+ export { P as AppiumPage } from './page-b9196527.js';
3
+ import '@midscene/core/dist/lib/types/types-55182ae1';
4
4
  import '@midscene/core';
5
5
  import '@midscene/shared/fs';
6
6
  import 'playwright';
@@ -1,12 +1,12 @@
1
- import { C as ChromeExtensionProxyPage } from './page-a10cd0ea.js';
2
- export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from './page-a10cd0ea.js';
3
- import { P as PageAgent } from './tasks-15aa1c35.js';
1
+ import { C as ChromeExtensionProxyPage } from './page-b9196527.js';
2
+ export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from './page-b9196527.js';
3
+ import { P as PageAgent } from './tasks-969c0e3e.js';
4
4
  import 'playwright';
5
5
  import '@midscene/core/.';
6
6
  import 'puppeteer';
7
7
  import '@midscene/shared/constants';
8
8
  import '@midscene/core';
9
- import '@midscene/core/dist/lib/types/types-7bcbf7fe';
9
+ import '@midscene/core/dist/lib/types/types-55182ae1';
10
10
  import 'webdriverio';
11
11
  import '@midscene/shared/fs';
12
12
 
@@ -1,11 +1,11 @@
1
1
  import { writeFileSync } from 'node:fs';
2
- import { W as WebPage, E as ElementInfo } from './page-a10cd0ea.js';
2
+ import { W as WebPage, E as ElementInfo } from './page-b9196527.js';
3
3
  import 'playwright';
4
4
  import '@midscene/core/.';
5
5
  import 'puppeteer';
6
6
  import '@midscene/shared/constants';
7
7
  import '@midscene/core';
8
- import '@midscene/core/dist/lib/types/types-7bcbf7fe';
8
+ import '@midscene/core/dist/lib/types/types-55182ae1';
9
9
  import 'webdriverio';
10
10
 
11
11
  declare function generateExtractData(page: WebPage, targetDir: string, saveImgType?: {
@@ -1,6 +1,6 @@
1
1
  export { PlayWrightAiFixtureType, PlaywrightAiFixture } from './playwright.js';
2
- export { P as AppiumAgent, P as PlaywrightAgent } from './tasks-15aa1c35.js';
3
- export { P as AppiumPage } from './page-a10cd0ea.js';
2
+ export { P as AppiumAgent, P as PlaywrightAgent } from './tasks-969c0e3e.js';
3
+ export { P as AppiumPage } from './page-b9196527.js';
4
4
  export { StaticPageAgent } from './playground.js';
5
5
  export { PuppeteerAgent } from './puppeteer.js';
6
6
  export { generateExtractData } from './debug.js';
@@ -8,7 +8,7 @@ import '@midscene/core/.';
8
8
  import '@playwright/test';
9
9
  import 'playwright';
10
10
  import '@midscene/core';
11
- import '@midscene/core/dist/lib/types/types-7bcbf7fe';
11
+ import '@midscene/core/dist/lib/types/types-55182ae1';
12
12
  import '@midscene/shared/fs';
13
13
  import 'puppeteer';
14
14
  import '@midscene/shared/constants';
@@ -3,7 +3,7 @@ import { Size } from '@midscene/core/.';
3
3
  import { KeyInput, Page as Page$2 } from 'puppeteer';
4
4
  import { NodeType } from '@midscene/shared/constants';
5
5
  import { BaseElement, Rect, UIContext, PlaywrightParserOpt } from '@midscene/core';
6
- import * as _midscene_core_dist_lib_types_types_7bcbf7fe from '@midscene/core/dist/lib/types/types-7bcbf7fe';
6
+ import * as _midscene_core_dist_lib_types_types_55182ae1 from '@midscene/core/dist/lib/types/types-55182ae1';
7
7
  import { Browser } from 'webdriverio';
8
8
 
9
9
  declare class WebElementInfo implements BaseElement {
@@ -89,8 +89,12 @@ declare abstract class AbstractPage {
89
89
  clearInput(element: ElementInfo): Promise<void>;
90
90
  abstract scrollUntilTop(): Promise<void>;
91
91
  abstract scrollUntilBottom(): Promise<void>;
92
- abstract scrollUpOneScreen(): Promise<void>;
93
- abstract scrollDownOneScreen(): Promise<void>;
92
+ abstract scrollUntilLeft(): Promise<void>;
93
+ abstract scrollUntilRight(): Promise<void>;
94
+ abstract scrollUp(distance?: number): Promise<void>;
95
+ abstract scrollDown(distance?: number): Promise<void>;
96
+ abstract scrollLeft(distance?: number): Promise<void>;
97
+ abstract scrollRight(distance?: number): Promise<void>;
94
98
  abstract _forceUsePageContext?(): Promise<WebUIContext>;
95
99
  abstract waitUntilNetworkIdle?(options?: {
96
100
  idleTime?: number;
@@ -120,10 +124,14 @@ declare class Page$1 implements AbstractPage {
120
124
  };
121
125
  clearInput(element: ElementInfo): Promise<void>;
122
126
  url(): string;
123
- scrollUntilTop(): Promise<void>;
124
- scrollUntilBottom(): Promise<void>;
125
- scrollUpOneScreen(): Promise<void>;
126
- scrollDownOneScreen(): Promise<void>;
127
+ scrollUntilTop(distance?: number): Promise<void>;
128
+ scrollUntilBottom(distance?: number): Promise<void>;
129
+ scrollUntilLeft(distance?: number): Promise<void>;
130
+ scrollUntilRight(distance?: number): Promise<void>;
131
+ scrollUp(distance?: number): Promise<void>;
132
+ scrollDown(distance?: number): Promise<void>;
133
+ scrollLeft(distance?: number): Promise<void>;
134
+ scrollRight(distance?: number): Promise<void>;
127
135
  private keyboardType;
128
136
  private keyboardPress;
129
137
  private mouseClick;
@@ -150,8 +158,12 @@ declare class ChromeExtensionProxyPage implements AbstractPage {
150
158
  url(): Promise<string>;
151
159
  scrollUntilTop(): Promise<void>;
152
160
  scrollUntilBottom(): Promise<void>;
153
- scrollUpOneScreen(): Promise<void>;
154
- scrollDownOneScreen(): Promise<void>;
161
+ scrollUntilLeft(): Promise<void>;
162
+ scrollUntilRight(): Promise<void>;
163
+ scrollUp(distance?: number): Promise<void>;
164
+ scrollDown(distance?: number): Promise<void>;
165
+ scrollLeft(distance?: number): Promise<void>;
166
+ scrollRight(distance?: number): Promise<void>;
155
167
  clearInput(element: ElementInfo): Promise<void>;
156
168
  mouse: {
157
169
  click: (x: number, y: number) => Promise<void>;
@@ -170,13 +182,17 @@ declare class StaticPage implements AbstractPage {
170
182
  private uiContext;
171
183
  constructor(uiContext: WebUIContext);
172
184
  getElementInfos(): Promise<any>;
173
- size(): Promise<_midscene_core_dist_lib_types_types_7bcbf7fe.S>;
185
+ size(): Promise<_midscene_core_dist_lib_types_types_55182ae1.S>;
174
186
  screenshotBase64(): Promise<string>;
175
187
  url(): Promise<string>;
176
188
  scrollUntilTop(): Promise<any>;
177
189
  scrollUntilBottom(): Promise<any>;
178
- scrollUpOneScreen(): Promise<any>;
179
- scrollDownOneScreen(): Promise<any>;
190
+ scrollUntilLeft(): Promise<any>;
191
+ scrollUntilRight(): Promise<any>;
192
+ scrollUp(distance?: number): Promise<any>;
193
+ scrollDown(distance?: number): Promise<any>;
194
+ scrollLeft(distance?: number): Promise<any>;
195
+ scrollRight(distance?: number): Promise<any>;
180
196
  clearInput(): Promise<any>;
181
197
  mouse: {
182
198
  click: any;
@@ -217,8 +233,12 @@ declare class Page<AgentType extends 'puppeteer' | 'playwright', PageType extend
217
233
  clearInput(element: ElementInfo): Promise<void>;
218
234
  scrollUntilTop(): Promise<void>;
219
235
  scrollUntilBottom(): Promise<void>;
220
- scrollUpOneScreen(): Promise<void>;
221
- scrollDownOneScreen(): Promise<void>;
236
+ scrollUntilLeft(): Promise<void>;
237
+ scrollUntilRight(): Promise<void>;
238
+ scrollUp(distance?: number): Promise<void>;
239
+ scrollDown(distance?: number): Promise<void>;
240
+ scrollLeft(distance?: number): Promise<void>;
241
+ scrollRight(distance?: number): Promise<void>;
222
242
  destroy(): Promise<void>;
223
243
  }
224
244
 
@@ -1,12 +1,12 @@
1
- import { S as StaticPage } from './page-a10cd0ea.js';
2
- export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from './page-a10cd0ea.js';
3
- import { P as PageAgent } from './tasks-15aa1c35.js';
1
+ import { S as StaticPage } from './page-b9196527.js';
2
+ export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED } from './page-b9196527.js';
3
+ import { P as PageAgent } from './tasks-969c0e3e.js';
4
4
  import 'playwright';
5
5
  import '@midscene/core/.';
6
6
  import 'puppeteer';
7
7
  import '@midscene/shared/constants';
8
8
  import '@midscene/core';
9
- import '@midscene/core/dist/lib/types/types-7bcbf7fe';
9
+ import '@midscene/core/dist/lib/types/types-55182ae1';
10
10
  import 'webdriverio';
11
11
  import '@midscene/shared/fs';
12
12
 
@@ -1,11 +1,11 @@
1
1
  import { AgentWaitForOpt } from '@midscene/core/.';
2
2
  import { TestInfo } from '@playwright/test';
3
3
  import { Page } from 'playwright';
4
- import { b as PageTaskExecutor } from './tasks-15aa1c35.js';
5
- export { P as PlaywrightAgent } from './tasks-15aa1c35.js';
6
- export { c as PlaywrightWebPage } from './page-a10cd0ea.js';
4
+ import { b as PageTaskExecutor } from './tasks-969c0e3e.js';
5
+ export { P as PlaywrightAgent } from './tasks-969c0e3e.js';
6
+ export { c as PlaywrightWebPage } from './page-b9196527.js';
7
7
  export { overrideAIConfig } from '@midscene/core';
8
- import '@midscene/core/dist/lib/types/types-7bcbf7fe';
8
+ import '@midscene/core/dist/lib/types/types-55182ae1';
9
9
  import '@midscene/shared/fs';
10
10
  import 'puppeteer';
11
11
  import '@midscene/shared/constants';
@@ -1,8 +1,8 @@
1
- import { P as PageAgent, a as PageAgentOpt } from './tasks-15aa1c35.js';
1
+ import { P as PageAgent, a as PageAgentOpt } from './tasks-969c0e3e.js';
2
2
  import { Page } from 'puppeteer';
3
- export { a as PuppeteerWebPage } from './page-a10cd0ea.js';
3
+ export { a as PuppeteerWebPage } from './page-b9196527.js';
4
4
  export { overrideAIConfig } from '@midscene/core';
5
- import '@midscene/core/dist/lib/types/types-7bcbf7fe';
5
+ import '@midscene/core/dist/lib/types/types-55182ae1';
6
6
  import '@midscene/shared/fs';
7
7
  import 'playwright';
8
8
  import '@midscene/core/.';
@@ -1,5 +1,5 @@
1
- import * as _midscene_core_dist_lib_types_types_7bcbf7fe from '@midscene/core/dist/lib/types/types-7bcbf7fe';
2
- import { d as WebUIContext, W as WebPage, e as WebElementInfo } from './page-a10cd0ea.js';
1
+ import * as _midscene_core_dist_lib_types_types_55182ae1 from '@midscene/core/dist/lib/types/types-55182ae1';
2
+ import { d as WebUIContext, W as WebPage, e as WebElementInfo } from './page-b9196527.js';
3
3
  import { PlanningAIResponse, AIElementIdResponse, Insight, GroupedActionDump, InsightAction, ExecutionDump, ExecutionTaskProgressOptions, AgentAssertOpt, AgentWaitForOpt, InsightExtractParam, InsightAssertionResponse, PlanningActionParamWaitFor, Executor } from '@midscene/core';
4
4
  import { getRunningPkgInfo } from '@midscene/shared/fs';
5
5
 
@@ -107,7 +107,7 @@ declare class PageAgent {
107
107
  writeOutActionDumps(): void;
108
108
  aiAction(taskPrompt: string, options?: ExecutionTaskProgressOptions): Promise<void>;
109
109
  aiQuery(demand: any): Promise<any>;
110
- aiAssert(assertion: string, msg?: string, opt?: AgentAssertOpt): Promise<_midscene_core_dist_lib_types_types_7bcbf7fe.o | undefined>;
110
+ aiAssert(assertion: string, msg?: string, opt?: AgentAssertOpt): Promise<_midscene_core_dist_lib_types_types_55182ae1.o | undefined>;
111
111
  aiWaitFor(assertion: string, opt?: AgentWaitForOpt): Promise<void>;
112
112
  ai(taskPrompt: string, type?: string): Promise<any>;
113
113
  destroy(): Promise<void>;
@@ -1,8 +1,8 @@
1
1
  import '@midscene/core';
2
- export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED, d as WebUIContext, i as generateCacheId, h as getCurrentExecutionFile, g as getExtraReturnLogic, p as parseContextFromWebPage, f as printReportMsg, r as reportFileName } from './page-a10cd0ea.js';
2
+ export { b as ERROR_CODE_NOT_IMPLEMENTED_AS_DESIGNED, d as WebUIContext, i as generateCacheId, h as getCurrentExecutionFile, g as getExtraReturnLogic, p as parseContextFromWebPage, f as printReportMsg, r as reportFileName } from './page-b9196527.js';
3
3
  import 'playwright';
4
4
  import '@midscene/core/.';
5
5
  import 'puppeteer';
6
6
  import '@midscene/shared/constants';
7
- import '@midscene/core/dist/lib/types/types-7bcbf7fe';
7
+ import '@midscene/core/dist/lib/types/types-55182ae1';
8
8
  import 'webdriverio';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@midscene/web",
3
3
  "description": "An AI-powered automation SDK can control the page, perform assertions, and extract data in JSON format using natural language. See https://midscenejs.com/ for details.",
4
- "version": "0.8.6",
4
+ "version": "0.8.7",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "jsnext:source": "./src/index.ts",
@@ -72,8 +72,8 @@
72
72
  "express": "4.21.1",
73
73
  "inquirer": "10.1.5",
74
74
  "openai": "4.57.1",
75
- "@midscene/core": "0.8.6",
76
- "@midscene/shared": "0.8.6"
75
+ "@midscene/shared": "0.8.7",
76
+ "@midscene/core": "0.8.7"
77
77
  },
78
78
  "devDependencies": {
79
79
  "@modern-js/module-tools": "2.60.6",