@midscene/web 0.12.1 → 0.12.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.
Files changed (67) hide show
  1. package/dist/es/appium.js +15 -5
  2. package/dist/es/appium.js.map +1 -0
  3. package/dist/es/bridge-mode-browser.js +5 -3
  4. package/dist/es/bridge-mode-browser.js.map +1 -0
  5. package/dist/es/bridge-mode.js +17 -7
  6. package/dist/es/bridge-mode.js.map +1 -0
  7. package/dist/es/chrome-extension.js +16 -6
  8. package/dist/es/chrome-extension.js.map +1 -0
  9. package/dist/es/index.js +15 -5
  10. package/dist/es/index.js.map +1 -0
  11. package/dist/es/midscene-playground.js +15 -5
  12. package/dist/es/midscene-playground.js.map +1 -0
  13. package/dist/es/playground.js +15 -5
  14. package/dist/es/playground.js.map +1 -0
  15. package/dist/es/playwright-report.js +2 -0
  16. package/dist/es/playwright-report.js.map +1 -0
  17. package/dist/es/playwright.js +15 -5
  18. package/dist/es/playwright.js.map +1 -0
  19. package/dist/es/puppeteer.js +16 -5
  20. package/dist/es/puppeteer.js.map +1 -0
  21. package/dist/es/ui-utils.js +2 -0
  22. package/dist/es/ui-utils.js.map +1 -0
  23. package/dist/es/utils.js +2 -0
  24. package/dist/es/utils.js.map +1 -0
  25. package/dist/es/yaml.js +2 -0
  26. package/dist/es/yaml.js.map +1 -0
  27. package/dist/lib/appium.js +15 -5
  28. package/dist/lib/appium.js.map +1 -0
  29. package/dist/lib/bridge-mode-browser.js +5 -3
  30. package/dist/lib/bridge-mode-browser.js.map +1 -0
  31. package/dist/lib/bridge-mode.js +17 -7
  32. package/dist/lib/bridge-mode.js.map +1 -0
  33. package/dist/lib/chrome-extension.js +16 -6
  34. package/dist/lib/chrome-extension.js.map +1 -0
  35. package/dist/lib/index.js +15 -5
  36. package/dist/lib/index.js.map +1 -0
  37. package/dist/lib/midscene-playground.js +15 -5
  38. package/dist/lib/midscene-playground.js.map +1 -0
  39. package/dist/lib/playground.js +15 -5
  40. package/dist/lib/playground.js.map +1 -0
  41. package/dist/lib/playwright-report.js +2 -0
  42. package/dist/lib/playwright-report.js.map +1 -0
  43. package/dist/lib/playwright.js +15 -5
  44. package/dist/lib/playwright.js.map +1 -0
  45. package/dist/lib/puppeteer.js +16 -5
  46. package/dist/lib/puppeteer.js.map +1 -0
  47. package/dist/lib/ui-utils.js +2 -0
  48. package/dist/lib/ui-utils.js.map +1 -0
  49. package/dist/lib/utils.js +2 -0
  50. package/dist/lib/utils.js.map +1 -0
  51. package/dist/lib/yaml.js +2 -0
  52. package/dist/lib/yaml.js.map +1 -0
  53. package/dist/types/{agent-c2b81e5e.d.ts → agent-93ac4610.d.ts} +3 -3
  54. package/dist/types/appium.d.ts +3 -3
  55. package/dist/types/bridge-mode-browser.d.ts +3 -3
  56. package/dist/types/bridge-mode.d.ts +4 -4
  57. package/dist/types/{browser-97da85f7.d.ts → browser-3c8d24ff.d.ts} +1 -1
  58. package/dist/types/chrome-extension.d.ts +4 -4
  59. package/dist/types/index.d.ts +4 -4
  60. package/dist/types/{page-19506936.d.ts → page-09c548ff.d.ts} +2 -2
  61. package/dist/types/playground.d.ts +4 -4
  62. package/dist/types/playwright.d.ts +3 -3
  63. package/dist/types/puppeteer.d.ts +4 -3
  64. package/dist/types/{utils-40a29aea.d.ts → utils-c05abdf8.d.ts} +1 -1
  65. package/dist/types/utils.d.ts +2 -2
  66. package/dist/types/yaml.d.ts +4 -4
  67. package/package.json +4 -6
@@ -3879,7 +3879,15 @@ var PageTaskExecutor = class {
3879
3879
  log: param.log
3880
3880
  });
3881
3881
  }
3882
- const { actions, log: log2, finish, error, usage, rawResponse, sleep: sleep4 } = planResult;
3882
+ const {
3883
+ actions,
3884
+ log: log2,
3885
+ more_actions_needed_by_instruction,
3886
+ error,
3887
+ usage,
3888
+ rawResponse,
3889
+ sleep: sleep4
3890
+ } = planResult;
3883
3891
  let stopCollecting = false;
3884
3892
  let bboxCollected = false;
3885
3893
  let planParsingError = "";
@@ -3926,7 +3934,7 @@ var PageTaskExecutor = class {
3926
3934
  }
3927
3935
  if (finalActions.length === 0) {
3928
3936
  (0, import_node_assert3.default)(
3929
- finish,
3937
+ !more_actions_needed_by_instruction,
3930
3938
  error ? `Failed to plan: ${error}` : planParsingError || "No plan found"
3931
3939
  );
3932
3940
  }
@@ -3942,7 +3950,7 @@ var PageTaskExecutor = class {
3942
3950
  return {
3943
3951
  output: {
3944
3952
  actions: finalActions,
3945
- finish,
3953
+ more_actions_needed_by_instruction,
3946
3954
  log: log2
3947
3955
  },
3948
3956
  cache: {
@@ -4023,7 +4031,7 @@ var PageTaskExecutor = class {
4023
4031
  actions,
4024
4032
  thought: (_a = actions[0]) == null ? void 0 : _a.thought,
4025
4033
  actionType: actions[0].type,
4026
- finish: false,
4034
+ more_actions_needed_by_instruction: true,
4027
4035
  log: ""
4028
4036
  },
4029
4037
  cache: {
@@ -4080,7 +4088,7 @@ var PageTaskExecutor = class {
4080
4088
  if (planResult == null ? void 0 : planResult.log) {
4081
4089
  logLog.push(planResult.log);
4082
4090
  }
4083
- if (planResult.finish) {
4091
+ if (!planResult.more_actions_needed_by_instruction) {
4084
4092
  planningTask = null;
4085
4093
  break;
4086
4094
  }
@@ -4959,6 +4967,7 @@ async function puppeteerAgentForTarget(target, preference) {
4959
4967
  const agent = new PuppeteerAgent(page, {
4960
4968
  autoPrintReportMsg: false,
4961
4969
  testId: preference == null ? void 0 : preference.testId,
4970
+ cacheId: preference == null ? void 0 : preference.cacheId,
4962
4971
  forceSameTabNavigation: typeof target.forceSameTabNavigation !== "undefined" ? target.forceSameTabNavigation : true
4963
4972
  // true for default in yaml script
4964
4973
  });
@@ -5003,3 +5012,5 @@ var PuppeteerAgent = class extends PageAgent {
5003
5012
  js-yaml/dist/js-yaml.mjs:
5004
5013
  (*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
5005
5014
  */
5015
+
5016
+ //# sourceMappingURL=puppeteer.js.map