@midscene/core 0.12.2-beta-20250227014550.0 → 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.
package/dist/lib/index.js CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk6BLFIKCNjs = require('./chunk-6BLFIKCN.js');
5
+ var _chunkNETSG4MYjs = require('./chunk-NETSG4MY.js');
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkZDE6ABHPjs = require('./chunk-ZDE6ABHP.js');
10
+ var _chunk6DPWW5RJjs = require('./chunk-6DPWW5RJ.js');
11
11
 
12
12
 
13
13
 
@@ -17,7 +17,7 @@ var _chunkZDE6ABHPjs = require('./chunk-ZDE6ABHP.js');
17
17
 
18
18
 
19
19
 
20
- var _chunkK7RH3Z6Pjs = require('./chunk-K7RH3Z6P.js');
20
+ var _chunkXEGSHWMPjs = require('./chunk-XEGSHWMP.js');
21
21
 
22
22
 
23
23
 
@@ -40,4 +40,4 @@ require('./chunk-LQ2VYIYD.js');
40
40
 
41
41
 
42
42
 
43
- exports.AIResponseFormat = _chunkK7RH3Z6Pjs.AIResponseFormat; exports.AiAssert = _chunkK7RH3Z6Pjs.AiAssert; exports.AiInspectElement = _chunkK7RH3Z6Pjs.AiInspectElement; exports.BaseElement = _chunkK7RH3Z6Pjs.BaseElement; exports.Executor = _chunk6BLFIKCNjs.Executor; exports.Insight = _chunk6BLFIKCNjs.Insight; exports.MIDSCENE_MODEL_NAME = _chunkXBSEZM3Yjs.MIDSCENE_MODEL_NAME; exports.UIContext = _chunkK7RH3Z6Pjs.UIContext; exports.default = _chunk6BLFIKCNjs.src_default; exports.describeUserPage = _chunkK7RH3Z6Pjs.describeUserPage; exports.getAIConfig = _chunkXBSEZM3Yjs.getAIConfig; exports.getLogDirByType = _chunkZDE6ABHPjs.getLogDirByType; exports.getVersion = _chunkZDE6ABHPjs.getVersion; exports.plan = _chunkK7RH3Z6Pjs.plan; exports.setLogDir = _chunkZDE6ABHPjs.setLogDir; exports.transformElementPositionToId = _chunkK7RH3Z6Pjs.transformElementPositionToId;
43
+ exports.AIResponseFormat = _chunkXEGSHWMPjs.AIResponseFormat; exports.AiAssert = _chunkXEGSHWMPjs.AiAssert; exports.AiInspectElement = _chunkXEGSHWMPjs.AiInspectElement; exports.BaseElement = _chunkXEGSHWMPjs.BaseElement; exports.Executor = _chunkNETSG4MYjs.Executor; exports.Insight = _chunkNETSG4MYjs.Insight; exports.MIDSCENE_MODEL_NAME = _chunkXBSEZM3Yjs.MIDSCENE_MODEL_NAME; exports.UIContext = _chunkXEGSHWMPjs.UIContext; exports.default = _chunkNETSG4MYjs.src_default; exports.describeUserPage = _chunkXEGSHWMPjs.describeUserPage; exports.getAIConfig = _chunkXBSEZM3Yjs.getAIConfig; exports.getLogDirByType = _chunk6DPWW5RJjs.getLogDirByType; exports.getVersion = _chunk6DPWW5RJjs.getVersion; exports.plan = _chunkXEGSHWMPjs.plan; exports.setLogDir = _chunk6DPWW5RJjs.setLogDir; exports.transformElementPositionToId = _chunkXEGSHWMPjs.transformElementPositionToId;
@@ -1,8 +1,8 @@
1
- import { h as AIUsageInfo, F as PlanningAction } from './types-2d32ef6f.js';
1
+ import { h as AIUsageInfo, F as PlanningAction } from './types-f45a4ee7.js';
2
2
  import { ChatCompletionMessageParam } from 'openai/resources';
3
3
  export { ChatCompletionMessageParam } from 'openai/resources';
4
- import { b as AIActionType } from './llm-planning-6c9a8399.js';
5
- export { a as AiAssert, e as AiExtractElementInfo, A as AiInspectElement, c as callAiFn, d as describeUserPage, p as plan, t as transformElementPositionToId } from './llm-planning-6c9a8399.js';
4
+ import { b as AIActionType } from './llm-planning-e8b915d3.js';
5
+ export { a as AiAssert, e as AiExtractElementInfo, A as AiInspectElement, c as callAiFn, d as describeUserPage, p as plan, t as transformElementPositionToId } from './llm-planning-e8b915d3.js';
6
6
  import { actionParser } from '@ui-tars/action-parser';
7
7
  import '@midscene/shared/constants';
8
8
 
@@ -1,7 +1,7 @@
1
- import { E as ExecutionTask, a as ExecutionTaskProgressOptions, b as ExecutionTaskApply, c as ExecutionDump, B as BaseElement, U as UIContext, I as InsightAction, D as DumpSubscriber, d as InsightOptions, e as InsightTaskInfo, f as InsightAssertionResponse, A as AISingleElementResponse } from './types-2d32ef6f.js';
2
- export { p as AIAssertionResponse, m as AIElementCoordinatesResponse, l as AIElementIdResponse, n as AIElementResponse, i as AIResponseFormat, o as AISectionParseResponse, j as AISingleElementResponseById, k as AISingleElementResponseByPosition, h as AIUsageInfo, y as AgentAssertOpt, x as AgentWaitForOpt, X as BaseAgentParserOpt, C as CallAIFn, W as Color, s as DumpMeta, w as ElementById, g as ElementTreeNode, q as EnsureObject, _ as ExecutionRecorderItem, ag as ExecutionTaskAction, af as ExecutionTaskActionApply, ae as ExecutionTaskInsightAssertion, ad as ExecutionTaskInsightAssertionApply, ac as ExecutionTaskInsightAssertionParam, a5 as ExecutionTaskInsightDumpLog, a7 as ExecutionTaskInsightLocate, a6 as ExecutionTaskInsightLocateApply, a4 as ExecutionTaskInsightLocateOutput, a3 as ExecutionTaskInsightLocateParam, ab as ExecutionTaskInsightQuery, aa as ExecutionTaskInsightQueryApply, a9 as ExecutionTaskInsightQueryOutput, a8 as ExecutionTaskInsightQueryParam, ai as ExecutionTaskPlanning, ah as ExecutionTaskPlanningApply, a2 as ExecutionTaskReturn, $ as ExecutionTaskType, a0 as ExecutorContext, aj as GroupedActionDump, u as InsightDump, r as InsightExtractParam, L as LiteUISection, O as OnTaskStartTip, v as PartialInsightDumpFromSDK, G as PlanningAIResponse, F as PlanningAction, N as PlanningActionParamAssert, T as PlanningActionParamError, J as PlanningActionParamHover, K as PlanningActionParamInputOrKeyPress, M as PlanningActionParamScroll, Q as PlanningActionParamSleep, H as PlanningActionParamTap, V as PlanningActionParamWaitFor, z as PlanningLocateParam, Z as PlaywrightParserOpt, P as Point, Y as PuppeteerParserOpt, R as Rect, t as ReportDumpWithAttributes, S as Size, a1 as TaskCacheInfo } from './types-2d32ef6f.js';
3
- import { c as callAiFn } from './llm-planning-6c9a8399.js';
4
- export { a as AiAssert, A as AiInspectElement, d as describeUserPage, p as plan, t as transformElementPositionToId } from './llm-planning-6c9a8399.js';
1
+ import { E as ExecutionTask, a as ExecutionTaskProgressOptions, b as ExecutionTaskApply, c as ExecutionDump, B as BaseElement, U as UIContext, I as InsightAction, D as DumpSubscriber, d as InsightOptions, e as InsightTaskInfo, f as InsightAssertionResponse, A as AISingleElementResponse } from './types-f45a4ee7.js';
2
+ export { p as AIAssertionResponse, m as AIElementCoordinatesResponse, l as AIElementIdResponse, n as AIElementResponse, i as AIResponseFormat, o as AISectionParseResponse, j as AISingleElementResponseById, k as AISingleElementResponseByPosition, h as AIUsageInfo, y as AgentAssertOpt, x as AgentWaitForOpt, X as BaseAgentParserOpt, C as CallAIFn, W as Color, s as DumpMeta, w as ElementById, g as ElementTreeNode, q as EnsureObject, _ as ExecutionRecorderItem, ag as ExecutionTaskAction, af as ExecutionTaskActionApply, ae as ExecutionTaskInsightAssertion, ad as ExecutionTaskInsightAssertionApply, ac as ExecutionTaskInsightAssertionParam, a5 as ExecutionTaskInsightDumpLog, a7 as ExecutionTaskInsightLocate, a6 as ExecutionTaskInsightLocateApply, a4 as ExecutionTaskInsightLocateOutput, a3 as ExecutionTaskInsightLocateParam, ab as ExecutionTaskInsightQuery, aa as ExecutionTaskInsightQueryApply, a9 as ExecutionTaskInsightQueryOutput, a8 as ExecutionTaskInsightQueryParam, ai as ExecutionTaskPlanning, ah as ExecutionTaskPlanningApply, a2 as ExecutionTaskReturn, $ as ExecutionTaskType, a0 as ExecutorContext, aj as GroupedActionDump, u as InsightDump, r as InsightExtractParam, L as LiteUISection, O as OnTaskStartTip, v as PartialInsightDumpFromSDK, G as PlanningAIResponse, F as PlanningAction, N as PlanningActionParamAssert, T as PlanningActionParamError, J as PlanningActionParamHover, K as PlanningActionParamInputOrKeyPress, M as PlanningActionParamScroll, Q as PlanningActionParamSleep, H as PlanningActionParamTap, V as PlanningActionParamWaitFor, z as PlanningLocateParam, Z as PlaywrightParserOpt, P as Point, Y as PuppeteerParserOpt, R as Rect, t as ReportDumpWithAttributes, S as Size, a1 as TaskCacheInfo } from './types-f45a4ee7.js';
3
+ import { c as callAiFn } from './llm-planning-e8b915d3.js';
4
+ export { a as AiAssert, A as AiInspectElement, d as describeUserPage, p as plan, t as transformElementPositionToId } from './llm-planning-e8b915d3.js';
5
5
  export { getLogDirByType, getVersion, setLogDir } from './utils.js';
6
6
  export { MIDSCENE_MODEL_NAME, getAIConfig } from './env.js';
7
7
  import '@midscene/shared/constants';
@@ -1,4 +1,4 @@
1
- import { h as AIUsageInfo, B as BaseElement, U as UIContext, n as AIElementResponse, g as ElementTreeNode, l as AIElementIdResponse, A as AISingleElementResponse, k as AISingleElementResponseByPosition, w as ElementById, o as AISectionParseResponse, p as AIAssertionResponse, G as PlanningAIResponse } from './types-2d32ef6f.js';
1
+ import { h as AIUsageInfo, B as BaseElement, U as UIContext, n as AIElementResponse, g as ElementTreeNode, l as AIElementIdResponse, A as AISingleElementResponse, k as AISingleElementResponseByPosition, w as ElementById, o as AISectionParseResponse, p as AIAssertionResponse, G as PlanningAIResponse } from './types-f45a4ee7.js';
2
2
  import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources';
3
3
 
4
4
  type AIArgs = [
@@ -1,5 +1,5 @@
1
1
  import * as _midscene_shared_constants from '@midscene/shared/constants';
2
- import { B as BaseElement, g as ElementTreeNode } from './types-2d32ef6f.js';
2
+ import { B as BaseElement, g as ElementTreeNode } from './types-f45a4ee7.js';
3
3
  import 'openai/resources';
4
4
 
5
5
  declare function truncateText(text: string | number | object | undefined, maxLength?: number): string;
@@ -187,8 +187,7 @@ interface PlanningAction<ParamType = any> {
187
187
  interface PlanningAIResponse {
188
188
  action?: PlanningAction;
189
189
  actions?: PlanningAction[];
190
- more_actions_needed_by_instruction?: boolean;
191
- finish: boolean;
190
+ more_actions_needed_by_instruction: boolean;
192
191
  log: string;
193
192
  sleep?: number;
194
193
  error?: string;
@@ -1,4 +1,4 @@
1
- import { t as ReportDumpWithAttributes, R as Rect } from './types-2d32ef6f.js';
1
+ import { t as ReportDumpWithAttributes, R as Rect } from './types-f45a4ee7.js';
2
2
  import '@midscene/shared/constants';
3
3
  import 'openai/resources';
4
4
 
package/dist/lib/utils.js CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
 
17
17
 
18
- var _chunkZDE6ABHPjs = require('./chunk-ZDE6ABHP.js');
18
+ var _chunk6DPWW5RJjs = require('./chunk-6DPWW5RJ.js');
19
19
  require('./chunk-XBSEZM3Y.js');
20
20
  require('./chunk-LQ2VYIYD.js');
21
21
 
@@ -35,4 +35,4 @@ require('./chunk-LQ2VYIYD.js');
35
35
 
36
36
 
37
37
 
38
- exports.getLogDir = _chunkZDE6ABHPjs.getLogDir; exports.getLogDirByType = _chunkZDE6ABHPjs.getLogDirByType; exports.getTmpDir = _chunkZDE6ABHPjs.getTmpDir; exports.getTmpFile = _chunkZDE6ABHPjs.getTmpFile; exports.getVersion = _chunkZDE6ABHPjs.getVersion; exports.groupedActionDumpFileExt = _chunkZDE6ABHPjs.groupedActionDumpFileExt; exports.overlapped = _chunkZDE6ABHPjs.overlapped; exports.replaceStringWithFirstAppearance = _chunkZDE6ABHPjs.replaceStringWithFirstAppearance; exports.replacerForPageObject = _chunkZDE6ABHPjs.replacerForPageObject; exports.reportHTMLContent = _chunkZDE6ABHPjs.reportHTMLContent; exports.setLogDir = _chunkZDE6ABHPjs.setLogDir; exports.sleep = _chunkZDE6ABHPjs.sleep; exports.stringifyDumpData = _chunkZDE6ABHPjs.stringifyDumpData; exports.uploadTestInfoToServer = _chunkZDE6ABHPjs.uploadTestInfoToServer; exports.writeDumpReport = _chunkZDE6ABHPjs.writeDumpReport; exports.writeLogFile = _chunkZDE6ABHPjs.writeLogFile;
38
+ exports.getLogDir = _chunk6DPWW5RJjs.getLogDir; exports.getLogDirByType = _chunk6DPWW5RJjs.getLogDirByType; exports.getTmpDir = _chunk6DPWW5RJjs.getTmpDir; exports.getTmpFile = _chunk6DPWW5RJjs.getTmpFile; exports.getVersion = _chunk6DPWW5RJjs.getVersion; exports.groupedActionDumpFileExt = _chunk6DPWW5RJjs.groupedActionDumpFileExt; exports.overlapped = _chunk6DPWW5RJjs.overlapped; exports.replaceStringWithFirstAppearance = _chunk6DPWW5RJjs.replaceStringWithFirstAppearance; exports.replacerForPageObject = _chunk6DPWW5RJjs.replacerForPageObject; exports.reportHTMLContent = _chunk6DPWW5RJjs.reportHTMLContent; exports.setLogDir = _chunk6DPWW5RJjs.setLogDir; exports.sleep = _chunk6DPWW5RJjs.sleep; exports.stringifyDumpData = _chunk6DPWW5RJjs.stringifyDumpData; exports.uploadTestInfoToServer = _chunk6DPWW5RJjs.uploadTestInfoToServer; exports.writeDumpReport = _chunk6DPWW5RJjs.writeDumpReport; exports.writeLogFile = _chunk6DPWW5RJjs.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.12.2-beta-20250227014550.0",
4
+ "version": "0.12.2",
5
5
  "repository": "https://github.com/web-infra-dev/midscene",
6
6
  "homepage": "https://midscenejs.com/",
7
7
  "jsnext:source": "./src/index.ts",
@@ -50,7 +50,7 @@
50
50
  "@ui-tars/action-parser": "1.0.1",
51
51
  "openai": "4.81.0",
52
52
  "socks-proxy-agent": "8.0.4",
53
- "@midscene/shared": "0.12.2-beta-20250227014550.0"
53
+ "@midscene/shared": "0.12.2"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@modern-js/module-tools": "2.60.6",