@midscene/core 0.10.2 → 0.10.3

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.
@@ -188,7 +188,7 @@ function stringifyDumpData(data, indents) {
188
188
  return JSON.stringify(data, replacerForPageObject, indents);
189
189
  }
190
190
  function getVersion() {
191
- return "0.10.2";
191
+ return "0.10.3";
192
192
  }
193
193
  function debugLog(...message) {
194
194
  const debugMode = _chunkJP3JBDZSjs.getAIConfig.call(void 0, _chunkJP3JBDZSjs.MIDSCENE_DEBUG_MODE);
package/dist/lib/index.js CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkMTBFUT2Hjs = require('./chunk-MTBFUT2H.js');
9
+ var _chunkRBGSZQYRjs = require('./chunk-RBGSZQYR.js');
10
10
 
11
11
 
12
12
 
@@ -169,7 +169,7 @@ ${(_b = this.latestErrorTask()) == null ? void 0 : _b.errorStack}`
169
169
  }
170
170
  dump() {
171
171
  const dumpData = {
172
- sdkVersion: _chunkMTBFUT2Hjs.getVersion.call(void 0, ),
172
+ sdkVersion: _chunkRBGSZQYRjs.getVersion.call(void 0, ),
173
173
  model_name: _chunkJP3JBDZSjs.getAIConfig.call(void 0, _chunkJP3JBDZSjs.MIDSCENE_MODEL_NAME) || "",
174
174
  logTime: Date.now(),
175
175
  name: this.name,
@@ -192,14 +192,14 @@ var logFileName = "";
192
192
  var logContent = [];
193
193
  var logIdIndexMap = {};
194
194
  var { pid } = process;
195
- var logFileExt = _chunkMTBFUT2Hjs.insightDumpFileExt;
195
+ var logFileExt = _chunkRBGSZQYRjs.insightDumpFileExt;
196
196
  var ifInBrowser = typeof window !== "undefined";
197
197
  function writeInsightDump(data, logId, dumpSubscriber) {
198
- const logDir = _chunkMTBFUT2Hjs.getLogDir.call(void 0, );
198
+ const logDir = _chunkRBGSZQYRjs.getLogDir.call(void 0, );
199
199
  _assert2.default.call(void 0, logDir, "logDir should be set before writing dump file");
200
200
  const id = logId || _utils.uuid.call(void 0, );
201
201
  const baseData = {
202
- sdkVersion: _chunkMTBFUT2Hjs.getVersion.call(void 0, ),
202
+ sdkVersion: _chunkRBGSZQYRjs.getVersion.call(void 0, ),
203
203
  logTime: Date.now(),
204
204
  model_name: _chunkJP3JBDZSjs.getAIConfig.call(void 0, _chunkJP3JBDZSjs.MIDSCENE_MODEL_NAME) || "",
205
205
  model_description: _chunkJP3JBDZSjs.getAIConfig.call(void 0, _chunkJP3JBDZSjs.MIDSCENE_USE_VLM_UI_TARS) ? "vlm-ui-tars enabled" : ""
@@ -210,7 +210,7 @@ function writeInsightDump(data, logId, dumpSubscriber) {
210
210
  ...data
211
211
  };
212
212
  dumpSubscriber == null ? void 0 : dumpSubscriber(finalData);
213
- const dataString = _chunkMTBFUT2Hjs.stringifyDumpData.call(void 0, finalData, 2);
213
+ const dataString = _chunkRBGSZQYRjs.stringifyDumpData.call(void 0, finalData, 2);
214
214
  if (typeof logIdIndexMap[id] === "number") {
215
215
  logContent[logIdIndexMap[id]] = dataString;
216
216
  } else {
@@ -224,7 +224,7 @@ function writeInsightDump(data, logId, dumpSubscriber) {
224
224
  logFileName = `${pid}_${baseData.logTime}-${Math.random()}`;
225
225
  }
226
226
  }
227
- _chunkMTBFUT2Hjs.writeLogFile.call(void 0, {
227
+ _chunkRBGSZQYRjs.writeLogFile.call(void 0, {
228
228
  fileName: logFileName,
229
229
  fileExt: logFileExt,
230
230
  fileContent: `[
@@ -450,4 +450,4 @@ var src_default = Insight;
450
450
 
451
451
 
452
452
 
453
- exports.AIResponseFormat = _chunk2SOSTOJYjs.AIResponseFormat; exports.BaseElement = _chunk2SOSTOJYjs.BaseElement; exports.Executor = Executor; exports.Insight = Insight; exports.UIContext = _chunk2SOSTOJYjs.UIContext; exports.default = src_default; exports.getLogDirByType = _chunkMTBFUT2Hjs.getLogDirByType; exports.getVersion = _chunkMTBFUT2Hjs.getVersion; exports.plan = _chunk2SOSTOJYjs.plan; exports.setLogDir = _chunkMTBFUT2Hjs.setLogDir; exports.transformElementPositionToId = _chunk2SOSTOJYjs.transformElementPositionToId;
453
+ exports.AIResponseFormat = _chunk2SOSTOJYjs.AIResponseFormat; exports.BaseElement = _chunk2SOSTOJYjs.BaseElement; exports.Executor = Executor; exports.Insight = Insight; exports.UIContext = _chunk2SOSTOJYjs.UIContext; exports.default = src_default; exports.getLogDirByType = _chunkRBGSZQYRjs.getLogDirByType; exports.getVersion = _chunkRBGSZQYRjs.getVersion; exports.plan = _chunk2SOSTOJYjs.plan; exports.setLogDir = _chunkRBGSZQYRjs.setLogDir; exports.transformElementPositionToId = _chunk2SOSTOJYjs.transformElementPositionToId;
package/dist/lib/utils.js CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
 
19
- var _chunkMTBFUT2Hjs = require('./chunk-MTBFUT2H.js');
19
+ var _chunkRBGSZQYRjs = require('./chunk-RBGSZQYR.js');
20
20
  require('./chunk-JP3JBDZS.js');
21
21
  require('./chunk-YSQDPG26.js');
22
22
 
@@ -37,4 +37,4 @@ require('./chunk-YSQDPG26.js');
37
37
 
38
38
 
39
39
 
40
- exports.getLogDir = _chunkMTBFUT2Hjs.getLogDir; exports.getLogDirByType = _chunkMTBFUT2Hjs.getLogDirByType; exports.getTmpDir = _chunkMTBFUT2Hjs.getTmpDir; exports.getTmpFile = _chunkMTBFUT2Hjs.getTmpFile; exports.getVersion = _chunkMTBFUT2Hjs.getVersion; exports.groupedActionDumpFileExt = _chunkMTBFUT2Hjs.groupedActionDumpFileExt; exports.insightDumpFileExt = _chunkMTBFUT2Hjs.insightDumpFileExt; exports.overlapped = _chunkMTBFUT2Hjs.overlapped; exports.replaceStringWithFirstAppearance = _chunkMTBFUT2Hjs.replaceStringWithFirstAppearance; exports.replacerForPageObject = _chunkMTBFUT2Hjs.replacerForPageObject; exports.reportHTMLContent = _chunkMTBFUT2Hjs.reportHTMLContent; exports.setLogDir = _chunkMTBFUT2Hjs.setLogDir; exports.sleep = _chunkMTBFUT2Hjs.sleep; exports.stringifyDumpData = _chunkMTBFUT2Hjs.stringifyDumpData; exports.uploadTestInfoToServer = _chunkMTBFUT2Hjs.uploadTestInfoToServer; exports.writeDumpReport = _chunkMTBFUT2Hjs.writeDumpReport; exports.writeLogFile = _chunkMTBFUT2Hjs.writeLogFile;
40
+ exports.getLogDir = _chunkRBGSZQYRjs.getLogDir; exports.getLogDirByType = _chunkRBGSZQYRjs.getLogDirByType; exports.getTmpDir = _chunkRBGSZQYRjs.getTmpDir; exports.getTmpFile = _chunkRBGSZQYRjs.getTmpFile; exports.getVersion = _chunkRBGSZQYRjs.getVersion; exports.groupedActionDumpFileExt = _chunkRBGSZQYRjs.groupedActionDumpFileExt; exports.insightDumpFileExt = _chunkRBGSZQYRjs.insightDumpFileExt; exports.overlapped = _chunkRBGSZQYRjs.overlapped; exports.replaceStringWithFirstAppearance = _chunkRBGSZQYRjs.replaceStringWithFirstAppearance; exports.replacerForPageObject = _chunkRBGSZQYRjs.replacerForPageObject; exports.reportHTMLContent = _chunkRBGSZQYRjs.reportHTMLContent; exports.setLogDir = _chunkRBGSZQYRjs.setLogDir; exports.sleep = _chunkRBGSZQYRjs.sleep; exports.stringifyDumpData = _chunkRBGSZQYRjs.stringifyDumpData; exports.uploadTestInfoToServer = _chunkRBGSZQYRjs.uploadTestInfoToServer; exports.writeDumpReport = _chunkRBGSZQYRjs.writeDumpReport; exports.writeLogFile = _chunkRBGSZQYRjs.writeLogFile;
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": "0.10.2",
4
+ "version": "0.10.3",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "jsnext:source": "./src/index.ts",
@@ -42,7 +42,7 @@
42
42
  "@langchain/core": "0.3.26",
43
43
  "socks-proxy-agent": "8.0.4",
44
44
  "openai": "4.57.1",
45
- "@midscene/shared": "0.10.2"
45
+ "@midscene/shared": "0.10.3"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@modern-js/module-tools": "2.60.6",
@@ -68,7 +68,7 @@
68
68
  "build:watch": "modern build -w",
69
69
  "new": "modern new",
70
70
  "upgrade": "modern upgrade",
71
- "test": "vitest --run",
71
+ "test": "vitest --run -u",
72
72
  "test:ai": "AITEST=true npm run test",
73
73
  "computer": "TEST_COMPUTER=true npm run test:ai -- tests/ai/evaluate/computer.test.ts",
74
74
  "test:parse-action": "npm run test:ai -- tests/ai/parse-action.test.ts",