@midscene/core 0.8.18 → 0.9.1-beta-20250110041124.0
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 +1 -1
- package/dist/lib/types/ai-model.d.ts +3 -3
- package/dist/lib/types/{automation-82a83ef4.d.ts → automation-81d96430.d.ts} +1 -1
- package/dist/lib/types/index.d.ts +11 -5
- package/dist/lib/types/{types-7702c41a.d.ts → types-05c1f241.d.ts} +2 -1
- package/dist/lib/types/utils.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- package/package.json +2 -2
- package/report/index.html +2 -2
package/dist/lib/index.js
CHANGED
|
@@ -5577,7 +5577,7 @@ function stringifyDumpData(data, indents) {
|
|
|
5577
5577
|
return JSON.stringify(data, replacerForPageObject, indents);
|
|
5578
5578
|
}
|
|
5579
5579
|
function getVersion() {
|
|
5580
|
-
return "0.
|
|
5580
|
+
return "0.9.1-beta-20250110041124.0";
|
|
5581
5581
|
}
|
|
5582
5582
|
|
|
5583
5583
|
// src/action/executor.ts
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { g as AIUsageInfo } from './types-
|
|
1
|
+
import { g as AIUsageInfo } from './types-05c1f241.js';
|
|
2
2
|
import { ChatCompletionMessageParam } from 'openai/resources';
|
|
3
3
|
export { ChatCompletionMessageParam } from 'openai/resources';
|
|
4
|
-
import { A as AIActionType } from './automation-
|
|
5
|
-
export { f as AiAssert, e as AiExtractElementInfo, b as AiInspectElement, c as callAiFn, d as describeUserPage, p as plan, t as transformElementPositionToId } from './automation-
|
|
4
|
+
import { A as AIActionType } from './automation-81d96430.js';
|
|
5
|
+
export { f as AiAssert, e as AiExtractElementInfo, b as AiInspectElement, c as callAiFn, d as describeUserPage, p as plan, t as transformElementPositionToId } from './automation-81d96430.js';
|
|
6
6
|
|
|
7
7
|
declare function callToGetJSONObject<T>(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType): Promise<{
|
|
8
8
|
content: T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as AIUsageInfo, B as BaseElement, U as UIContext, l as AIElementResponse, A as AISingleElementResponse, u as ElementById, m as AISectionParseResponse, n as AIAssertionResponse, z as PlanningAIResponse } from './types-
|
|
1
|
+
import { g as AIUsageInfo, B as BaseElement, U as UIContext, l as AIElementResponse, A as AISingleElementResponse, u as ElementById, m as AISectionParseResponse, n as AIAssertionResponse, z as PlanningAIResponse } from './types-05c1f241.js';
|
|
2
2
|
import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources';
|
|
3
3
|
|
|
4
4
|
type AIArgs = [
|
|
@@ -1,8 +1,8 @@
|
|
|
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, A as AISingleElementResponse, f as InsightAssertionResponse } from './types-
|
|
2
|
-
export { n as AIAssertionResponse, k as AIElementIdResponse, l as AIElementResponse, h as AIResponseFormat, m as AISectionParseResponse, i as AISingleElementResponseById, j as AISingleElementResponseByPosition, g as AIUsageInfo, w as AgentAssertOpt, v as AgentWaitForOpt,
|
|
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, A as AISingleElementResponse, f as InsightAssertionResponse } from './types-05c1f241.js';
|
|
2
|
+
export { n as AIAssertionResponse, k as AIElementIdResponse, l as AIElementResponse, h as AIResponseFormat, m as AISectionParseResponse, i as AISingleElementResponseById, j as AISingleElementResponseByPosition, g as AIUsageInfo, w as AgentAssertOpt, v as AgentWaitForOpt, X as BaseAgentParserOpt, C as CallAIFn, W as Color, q as DumpMeta, u as ElementById, o 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, s as InsightDump, p as InsightExtractParam, L as LiteUISection, O as OnTaskStartTip, t as PartialInsightDumpFromSDK, z as PlanningAIResponse, y as PlanningAction, N as PlanningActionParamAssert, T as PlanningActionParamError, J as PlanningActionParamHover, K as PlanningActionParamInputOrKeyPress, G as PlanningActionParamPlan, M as PlanningActionParamScroll, Q as PlanningActionParamSleep, H as PlanningActionParamTap, V as PlanningActionParamWaitFor, F as PlanningFurtherPlan, x as PlanningLocateParam, Z as PlaywrightParserOpt, P as Point, Y as PuppeteerParserOpt, R as Rect, r as ReportDumpWithAttributes, S as Size, a1 as TaskCacheInfo } from './types-05c1f241.js';
|
|
3
3
|
export { allAIConfig, getAIConfig, overrideAIConfig } from './env.js';
|
|
4
|
-
import { c as callAiFn, r as retrieveElement, a as retrieveSection } from './automation-
|
|
5
|
-
export { p as plan, t as transformElementPositionToId } from './automation-
|
|
4
|
+
import { c as callAiFn, r as retrieveElement, a as retrieveSection } from './automation-81d96430.js';
|
|
5
|
+
export { p as plan, t as transformElementPositionToId } from './automation-81d96430.js';
|
|
6
6
|
export { getLogDirByType, getVersion, setLogDir } from './utils.js';
|
|
7
7
|
import 'openai/resources';
|
|
8
8
|
|
|
@@ -14,20 +14,26 @@ interface MidsceneYamlScript {
|
|
|
14
14
|
interface MidsceneYamlTask {
|
|
15
15
|
name: string;
|
|
16
16
|
flow: MidsceneYamlFlowItem[];
|
|
17
|
+
continueOnError?: boolean;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
interface MidsceneYamlScriptEnv {
|
|
21
|
+
serve?: string;
|
|
20
22
|
url: string;
|
|
23
|
+
|
|
24
|
+
// puppeteer only
|
|
21
25
|
userAgent?: string;
|
|
22
26
|
viewportWidth?: number;
|
|
23
27
|
viewportHeight?: number;
|
|
24
28
|
viewportScale?: number;
|
|
25
|
-
serve?: string;
|
|
26
29
|
waitForNetworkIdle?: {
|
|
27
30
|
timeout?: number; // ms, 30000 for default, set to 0 to disable
|
|
28
31
|
continueOnNetworkIdleError?: boolean; // should continue if failed to wait for network idle, true for default
|
|
29
32
|
};
|
|
30
33
|
cookie?: string;
|
|
34
|
+
|
|
35
|
+
// bridge mode only
|
|
36
|
+
bridgeMode?: 'newTabWithUrl' | 'currentTab';
|
|
31
37
|
output?: string;
|
|
32
38
|
}
|
|
33
39
|
|
|
@@ -144,6 +144,7 @@ type InsightAssertionResponse = AIAssertionResponse;
|
|
|
144
144
|
/**
|
|
145
145
|
* agent
|
|
146
146
|
*/
|
|
147
|
+
type OnTaskStartTip = (tip: string) => Promise<void> | void;
|
|
147
148
|
interface AgentWaitForOpt {
|
|
148
149
|
checkIntervalMs?: number;
|
|
149
150
|
timeoutMs?: number;
|
|
@@ -300,4 +301,4 @@ interface GroupedActionDump {
|
|
|
300
301
|
executions: ExecutionDump[];
|
|
301
302
|
}
|
|
302
303
|
|
|
303
|
-
export { type
|
|
304
|
+
export { type ExecutionTaskType as $, type AISingleElementResponse as A, BaseElement as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type PlanningFurtherPlan as F, type PlanningActionParamPlan as G, type PlanningActionParamTap as H, type InsightAction as I, type PlanningActionParamHover as J, type PlanningActionParamInputOrKeyPress as K, type LiteUISection as L, type PlanningActionParamScroll as M, type PlanningActionParamAssert as N, type OnTaskStartTip as O, type Point as P, type PlanningActionParamSleep as Q, type Rect as R, type Size as S, type PlanningActionParamError as T, UIContext as U, type PlanningActionParamWaitFor as V, type Color as W, type BaseAgentParserOpt as X, type PuppeteerParserOpt as Y, type PlaywrightParserOpt as Z, type ExecutionRecorderItem as _, type ExecutionTaskProgressOptions as a, type ExecutorContext as a0, type TaskCacheInfo as a1, type ExecutionTaskReturn as a2, type ExecutionTaskInsightLocateParam as a3, type ExecutionTaskInsightLocateOutput as a4, type ExecutionTaskInsightDumpLog as a5, type ExecutionTaskInsightLocateApply as a6, type ExecutionTaskInsightLocate as a7, type ExecutionTaskInsightQueryParam as a8, type ExecutionTaskInsightQueryOutput as a9, type ExecutionTaskInsightQueryApply as aa, type ExecutionTaskInsightQuery as ab, type ExecutionTaskInsightAssertionParam as ac, type ExecutionTaskInsightAssertionApply as ad, type ExecutionTaskInsightAssertion as ae, type ExecutionTaskActionApply as af, type ExecutionTaskAction as ag, type ExecutionTaskPlanningApply as ah, type ExecutionTaskPlanning as ai, type GroupedActionDump as aj, type ExecutionTaskApply as b, type ExecutionDump as c, type InsightOptions as d, type InsightTaskInfo as e, type InsightAssertionResponse as f, type AIUsageInfo as g, AIResponseFormat as h, type AISingleElementResponseById as i, type AISingleElementResponseByPosition as j, type AIElementIdResponse as k, type AIElementResponse as l, type AISectionParseResponse as m, type AIAssertionResponse as n, type EnsureObject as o, type InsightExtractParam as p, type DumpMeta as q, type ReportDumpWithAttributes as r, type InsightDump as s, type PartialInsightDumpFromSDK as t, type ElementById as u, type AgentWaitForOpt as v, type AgentAssertOpt as w, type PlanningLocateParam as x, type PlanningAction as y, type PlanningAIResponse as z };
|
package/dist/lib/utils.js
CHANGED
|
@@ -303,7 +303,7 @@ function stringifyDumpData(data, indents) {
|
|
|
303
303
|
return JSON.stringify(data, replacerForPageObject, indents);
|
|
304
304
|
}
|
|
305
305
|
function getVersion() {
|
|
306
|
-
return "0.
|
|
306
|
+
return "0.9.1-beta-20250110041124.0";
|
|
307
307
|
}
|
|
308
308
|
function debugLog(...message) {
|
|
309
309
|
const debugMode = getAIConfig(MIDSCENE_DEBUG_MODE);
|
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.
|
|
4
|
+
"version": "0.9.1-beta-20250110041124.0",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"jsnext:source": "./src/index.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@langchain/core": "0.3.26",
|
|
42
42
|
"socks-proxy-agent": "8.0.4",
|
|
43
43
|
"openai": "4.57.1",
|
|
44
|
-
"@midscene/shared": "0.
|
|
44
|
+
"@midscene/shared": "0.9.1-beta-20250110041124.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@modern-js/module-tools": "2.60.6",
|