@midscene/core 0.17.5 → 0.17.6-beta-20250607054355.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/es/ai-model.d.ts +3 -3
- package/dist/es/{chunk-IOBWFLAD.js → chunk-XIJPQF2G.js} +3 -3
- package/dist/es/index.d.ts +4 -4
- package/dist/es/index.js +1 -1
- package/dist/{lib/llm-planning-573b9b34.d.ts → es/llm-planning-453ffce5.d.ts} +1 -1
- package/dist/{types/types-8c197f92.d.ts → es/types-00c9086f.d.ts} +14 -5
- package/dist/es/utils.d.ts +1 -1
- package/dist/es/utils.js +1 -1
- package/dist/lib/ai-model.d.ts +3 -3
- package/dist/lib/{chunk-IOBWFLAD.js → chunk-XIJPQF2G.js} +3 -3
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +4 -4
- package/dist/{types/llm-planning-573b9b34.d.ts → lib/llm-planning-453ffce5.d.ts} +1 -1
- package/dist/lib/{types-8c197f92.d.ts → types-00c9086f.d.ts} +14 -5
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/ai-model.d.ts +3 -3
- package/dist/types/index.d.ts +4 -4
- package/dist/{es/llm-planning-573b9b34.d.ts → types/llm-planning-453ffce5.d.ts} +1 -1
- package/dist/{es/types-8c197f92.d.ts → types/types-00c9086f.d.ts} +14 -5
- package/dist/types/utils.d.ts +1 -1
- package/package.json +2 -2
- /package/dist/es/{chunk-IOBWFLAD.js.map → chunk-XIJPQF2G.js.map} +0 -0
- /package/dist/lib/{chunk-IOBWFLAD.js.map → chunk-XIJPQF2G.js.map} +0 -0
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as ExecutionTask, a as ExecutionTaskProgressOptions, b as ExecutionTaskApply, c as ExecutionDump, U as UIContext, I as InsightAction, D as DumpSubscriber, d as InsightTaskInfo, e as InsightOptions, f as DetailedLocateParam, L as LocateResult, g as InsightExtractOption, h as InsightAssertionResponse, A as AIDescribeElementResponse } from './types-
|
|
2
|
-
export { v as AIAssertionResponse, t as AIDataExtractionResponse, r as AIElementCoordinatesResponse, q as AIElementLocatorResponse, s as AIElementResponse, m as AIResponseFormat, u as AISectionLocatorResponse, p as AISingleElementResponse, n as AISingleElementResponseById, o as AISingleElementResponseByPosition, l as AIUsageInfo, Q as AgentAssertOpt, y as AgentDescribeElementAtPointResult, N as AgentWaitForOpt, a4 as BaseAgentParserOpt, C as CallAIFn, a3 as Color, G as DumpMeta, K as ElementById, z as EnsureObject, a7 as ExecutionRecorderItem, ap as ExecutionTaskAction, ao as ExecutionTaskActionApply, an as ExecutionTaskInsightAssertion, am as ExecutionTaskInsightAssertionApply, al as ExecutionTaskInsightAssertionParam, ae as ExecutionTaskInsightDumpLog, ag as ExecutionTaskInsightLocate, af as ExecutionTaskInsightLocateApply, ad as ExecutionTaskInsightLocateOutput, ac as ExecutionTaskInsightLocateParam, ak as ExecutionTaskInsightQuery, aj as ExecutionTaskInsightQueryApply, ai as ExecutionTaskInsightQueryOutput, ah as ExecutionTaskInsightQueryParam, ar as
|
|
3
|
-
import { c as callAiFn } from './llm-planning-
|
|
4
|
-
export { a as AiAssert, A as AiLocateElement, d as describeUserPage, p as plan } from './llm-planning-
|
|
1
|
+
import { E as ExecutionTask, a as ExecutionTaskProgressOptions, b as ExecutionTaskApply, c as ExecutionDump, U as UIContext, I as InsightAction, D as DumpSubscriber, d as InsightTaskInfo, e as InsightOptions, f as DetailedLocateParam, L as LocateResult, g as InsightExtractOption, h as InsightAssertionResponse, A as AIDescribeElementResponse } from './types-00c9086f.js';
|
|
2
|
+
export { v as AIAssertionResponse, t as AIDataExtractionResponse, r as AIElementCoordinatesResponse, q as AIElementLocatorResponse, s as AIElementResponse, m as AIResponseFormat, u as AISectionLocatorResponse, p as AISingleElementResponse, n as AISingleElementResponseById, o as AISingleElementResponseByPosition, l as AIUsageInfo, Q as AgentAssertOpt, y as AgentDescribeElementAtPointResult, N as AgentWaitForOpt, a4 as BaseAgentParserOpt, C as CallAIFn, a3 as Color, G as DumpMeta, K as ElementById, z as EnsureObject, a7 as ExecutionRecorderItem, ap as ExecutionTaskAction, ao as ExecutionTaskActionApply, an as ExecutionTaskInsightAssertion, am as ExecutionTaskInsightAssertionApply, al as ExecutionTaskInsightAssertionParam, ae as ExecutionTaskInsightDumpLog, ag as ExecutionTaskInsightLocate, af as ExecutionTaskInsightLocateApply, ad as ExecutionTaskInsightLocateOutput, ac as ExecutionTaskInsightLocateParam, ak as ExecutionTaskInsightQuery, aj as ExecutionTaskInsightQueryApply, ai as ExecutionTaskInsightQueryOutput, ah as ExecutionTaskInsightQueryParam, ar as ExecutionTaskLog, aq as ExecutionTaskLogApply, at as ExecutionTaskPlanning, as as ExecutionTaskPlanningApply, ab as ExecutionTaskReturn, a8 as ExecutionTaskType, a9 as ExecutorContext, aT as FreeFn, au as GroupedActionDump, H as InsightDump, B as InsightExtractParam, J as LiteUISection, aw as LocateOption, F as LocateResultElement, x as LocateValidatorResult, w as LocatorValidatorOption, j as MidsceneYamlFlowItem, aD as MidsceneYamlFlowItemAIAction, aE as MidsceneYamlFlowItemAIAssert, aI as MidsceneYamlFlowItemAIBoolean, aM as MidsceneYamlFlowItemAIHover, aN as MidsceneYamlFlowItemAIInput, aO as MidsceneYamlFlowItemAIKeyboardPress, aJ as MidsceneYamlFlowItemAILocate, aH as MidsceneYamlFlowItemAINString, aG as MidsceneYamlFlowItemAINumber, aF as MidsceneYamlFlowItemAIQuery, k as MidsceneYamlFlowItemAIRightClick, aP as MidsceneYamlFlowItemAIScroll, aL as MidsceneYamlFlowItemAITap, aK as MidsceneYamlFlowItemAIWaitFor, aQ as MidsceneYamlFlowItemEvaluateJavaScript, aS as MidsceneYamlFlowItemLogScreenshot, aR as MidsceneYamlFlowItemSleep, M as MidsceneYamlScript, aB as MidsceneYamlScriptAndroidEnv, aC as MidsceneYamlScriptEnv, az as MidsceneYamlScriptEnvBase, aA as MidsceneYamlScriptWebEnv, i as MidsceneYamlTask, O as OnTaskStartTip, av as PageType, P as PartialInsightDumpFromSDK, V as PlanningAIResponse, T as PlanningAction, $ as PlanningActionParamAssert, a1 as PlanningActionParamError, X as PlanningActionParamHover, Z as PlanningActionParamInputOrKeyPress, Y as PlanningActionParamRightClick, _ as PlanningActionParamScroll, a0 as PlanningActionParamSleep, W as PlanningActionParamTap, a2 as PlanningActionParamWaitFor, S as PlanningLocateParam, a6 as PlaywrightParserOpt, a5 as PuppeteerParserOpt, ax as ReferenceImage, R as ReportDumpWithAttributes, aV as ScriptPlayerStatusValue, aU as ScriptPlayerTaskStatus, aa as TaskCacheInfo, ay as scrollParam } from './types-00c9086f.js';
|
|
3
|
+
import { c as callAiFn } from './llm-planning-453ffce5.js';
|
|
4
|
+
export { a as AiAssert, A as AiLocateElement, d as describeUserPage, p as plan } from './llm-planning-453ffce5.js';
|
|
5
5
|
import { BaseElement, Rect } from '@midscene/shared/types';
|
|
6
6
|
export { BaseElement, ElementTreeNode, Point, Rect, Size } from '@midscene/shared/types';
|
|
7
7
|
export { getVersion } from './utils.js';
|
package/dist/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkXIJPQF2Gjs = require('./chunk-XIJPQF2G.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -172,7 +172,7 @@ ${_optionalChain([this, 'access', _7 => _7.latestErrorTask, 'call', _8 => _8(),
|
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
const dumpData = {
|
|
175
|
-
sdkVersion:
|
|
175
|
+
sdkVersion: _chunkXIJPQF2Gjs.getVersion.call(void 0, ),
|
|
176
176
|
model_name: _env.getAIConfig.call(void 0, _env.MIDSCENE_MODEL_NAME) || "",
|
|
177
177
|
model_description: modelDescription,
|
|
178
178
|
logTime: Date.now(),
|
|
@@ -227,7 +227,7 @@ var _logger = require('@midscene/shared/logger');
|
|
|
227
227
|
|
|
228
228
|
function emitInsightDump(data, dumpSubscriber) {
|
|
229
229
|
const baseData = {
|
|
230
|
-
sdkVersion:
|
|
230
|
+
sdkVersion: _chunkXIJPQF2Gjs.getVersion.call(void 0, ),
|
|
231
231
|
logTime: Date.now(),
|
|
232
232
|
model_name: _env.getAIConfig.call(void 0, _env.MIDSCENE_MODEL_NAME) || ""
|
|
233
233
|
};
|
|
@@ -538,6 +538,6 @@ var src_default = Insight;
|
|
|
538
538
|
|
|
539
539
|
|
|
540
540
|
|
|
541
|
-
exports.AiAssert = _chunk7MNTWX2Ajs.AiAssert; exports.AiLocateElement = _chunk7MNTWX2Ajs.AiLocateElement; exports.Executor = Executor; exports.Insight = Insight; exports.MIDSCENE_MODEL_NAME = _env.MIDSCENE_MODEL_NAME; exports.default = src_default; exports.describeUserPage = _chunk7MNTWX2Ajs.describeUserPage; exports.getAIConfig = _env.getAIConfig; exports.getVersion =
|
|
541
|
+
exports.AiAssert = _chunk7MNTWX2Ajs.AiAssert; exports.AiLocateElement = _chunk7MNTWX2Ajs.AiLocateElement; exports.Executor = Executor; exports.Insight = Insight; exports.MIDSCENE_MODEL_NAME = _env.MIDSCENE_MODEL_NAME; exports.default = src_default; exports.describeUserPage = _chunk7MNTWX2Ajs.describeUserPage; exports.getAIConfig = _env.getAIConfig; exports.getVersion = _chunkXIJPQF2Gjs.getVersion; exports.plan = _chunk7MNTWX2Ajs.plan;
|
|
542
542
|
|
|
543
543
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as AIUsageInfo, U as UIContext,
|
|
1
|
+
import { l as AIUsageInfo, U as UIContext, ax as ReferenceImage, q as AIElementLocatorResponse, K as ElementById, g as InsightExtractOption, t as AIDataExtractionResponse, v as AIAssertionResponse, av as PageType, V as PlanningAIResponse } from './types-00c9086f.js';
|
|
2
2
|
import { Rect, ElementTreeNode, BaseElement } from '@midscene/shared/types';
|
|
3
3
|
import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources';
|
|
4
4
|
|
|
@@ -123,7 +123,11 @@ interface MidsceneYamlFlowItemEvaluateJavaScript {
|
|
|
123
123
|
interface MidsceneYamlFlowItemSleep {
|
|
124
124
|
sleep: number;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
interface MidsceneYamlFlowItemLogScreenshot {
|
|
127
|
+
logScreenshot?: string;
|
|
128
|
+
content?: string;
|
|
129
|
+
}
|
|
130
|
+
type MidsceneYamlFlowItem = MidsceneYamlFlowItemAIAction | MidsceneYamlFlowItemAIAssert | MidsceneYamlFlowItemAIQuery | MidsceneYamlFlowItemAIWaitFor | MidsceneYamlFlowItemAITap | MidsceneYamlFlowItemAIRightClick | MidsceneYamlFlowItemAIHover | MidsceneYamlFlowItemAIInput | MidsceneYamlFlowItemAIKeyboardPress | MidsceneYamlFlowItemAIScroll | MidsceneYamlFlowItemSleep | MidsceneYamlFlowItemLogScreenshot;
|
|
127
131
|
interface FreeFn {
|
|
128
132
|
name: string;
|
|
129
133
|
fn: () => void;
|
|
@@ -180,8 +184,8 @@ interface AIElementCoordinatesResponse {
|
|
|
180
184
|
errors?: string[];
|
|
181
185
|
}
|
|
182
186
|
type AIElementResponse = AIElementLocatorResponse | AIElementCoordinatesResponse;
|
|
183
|
-
interface AIDataExtractionResponse<
|
|
184
|
-
data:
|
|
187
|
+
interface AIDataExtractionResponse<DataDemand> {
|
|
188
|
+
data: DataDemand;
|
|
185
189
|
errors?: string[];
|
|
186
190
|
}
|
|
187
191
|
interface AISectionLocatorResponse {
|
|
@@ -339,6 +343,7 @@ type PlanningActionParamHover = null;
|
|
|
339
343
|
type PlanningActionParamRightClick = null;
|
|
340
344
|
interface PlanningActionParamInputOrKeyPress {
|
|
341
345
|
value: string;
|
|
346
|
+
autoDismissKeyboard?: boolean;
|
|
342
347
|
}
|
|
343
348
|
type PlanningActionParamScroll = scrollParam;
|
|
344
349
|
interface PlanningActionParamAssert {
|
|
@@ -377,7 +382,7 @@ interface ExecutionRecorderItem {
|
|
|
377
382
|
screenshot?: string;
|
|
378
383
|
timing?: string;
|
|
379
384
|
}
|
|
380
|
-
type ExecutionTaskType = 'Planning' | 'Insight' | 'Action' | 'Assertion';
|
|
385
|
+
type ExecutionTaskType = 'Planning' | 'Insight' | 'Action' | 'Assertion' | 'Log';
|
|
381
386
|
interface ExecutorContext {
|
|
382
387
|
task: ExecutionTask;
|
|
383
388
|
element?: LocateResultElement | null;
|
|
@@ -441,6 +446,10 @@ type ExecutionTaskInsightAssertionApply = ExecutionTaskApply<'Insight', Executio
|
|
|
441
446
|
type ExecutionTaskInsightAssertion = ExecutionTask<ExecutionTaskInsightAssertionApply>;
|
|
442
447
|
type ExecutionTaskActionApply<ActionParam = any> = ExecutionTaskApply<'Action', ActionParam, void, void>;
|
|
443
448
|
type ExecutionTaskAction = ExecutionTask<ExecutionTaskActionApply>;
|
|
449
|
+
type ExecutionTaskLogApply<LogParam = {
|
|
450
|
+
content: string;
|
|
451
|
+
}> = ExecutionTaskApply<'Log', LogParam, void, void>;
|
|
452
|
+
type ExecutionTaskLog = ExecutionTask<ExecutionTaskLogApply>;
|
|
444
453
|
type ExecutionTaskPlanningApply = ExecutionTaskApply<'Planning', {
|
|
445
454
|
userInstruction: string;
|
|
446
455
|
log?: string;
|
|
@@ -453,4 +462,4 @@ interface GroupedActionDump {
|
|
|
453
462
|
}
|
|
454
463
|
type PageType = 'puppeteer' | 'playwright' | 'static' | 'chrome-extension-proxy' | 'android';
|
|
455
464
|
|
|
456
|
-
export { type PlanningActionParamAssert as $, type AIDescribeElementResponse as A, type InsightExtractParam as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type LocateResultElement as F, type DumpMeta as G, type InsightDump as H, type InsightAction as I, type LiteUISection as J, type ElementById as K, type LocateResult as L, type MidsceneYamlScript as M, type AgentWaitForOpt as N, type OnTaskStartTip as O, type PartialInsightDumpFromSDK as P, type AgentAssertOpt as Q, type ReportDumpWithAttributes as R, type PlanningLocateParam as S, type PlanningAction as T, UIContext as U, type PlanningAIResponse as V, type PlanningActionParamTap as W, type PlanningActionParamHover as X, type PlanningActionParamRightClick as Y, type PlanningActionParamInputOrKeyPress as Z, type PlanningActionParamScroll as _, type ExecutionTaskProgressOptions as a, type PlanningActionParamSleep as a0, type PlanningActionParamError as a1, type PlanningActionParamWaitFor as a2, type Color as a3, type BaseAgentParserOpt as a4, type PuppeteerParserOpt as a5, type PlaywrightParserOpt as a6, type ExecutionRecorderItem as a7, type ExecutionTaskType as a8, type ExecutorContext as a9, type
|
|
465
|
+
export { type PlanningActionParamAssert as $, type AIDescribeElementResponse as A, type InsightExtractParam as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type LocateResultElement as F, type DumpMeta as G, type InsightDump as H, type InsightAction as I, type LiteUISection as J, type ElementById as K, type LocateResult as L, type MidsceneYamlScript as M, type AgentWaitForOpt as N, type OnTaskStartTip as O, type PartialInsightDumpFromSDK as P, type AgentAssertOpt as Q, type ReportDumpWithAttributes as R, type PlanningLocateParam as S, type PlanningAction as T, UIContext as U, type PlanningAIResponse as V, type PlanningActionParamTap as W, type PlanningActionParamHover as X, type PlanningActionParamRightClick as Y, type PlanningActionParamInputOrKeyPress as Z, type PlanningActionParamScroll as _, type ExecutionTaskProgressOptions as a, type PlanningActionParamSleep as a0, type PlanningActionParamError as a1, type PlanningActionParamWaitFor as a2, type Color as a3, type BaseAgentParserOpt as a4, type PuppeteerParserOpt as a5, type PlaywrightParserOpt as a6, type ExecutionRecorderItem as a7, type ExecutionTaskType as a8, type ExecutorContext as a9, type MidsceneYamlScriptWebEnv as aA, type MidsceneYamlScriptAndroidEnv as aB, type MidsceneYamlScriptEnv as aC, type MidsceneYamlFlowItemAIAction as aD, type MidsceneYamlFlowItemAIAssert as aE, type MidsceneYamlFlowItemAIQuery as aF, type MidsceneYamlFlowItemAINumber as aG, type MidsceneYamlFlowItemAINString as aH, type MidsceneYamlFlowItemAIBoolean as aI, type MidsceneYamlFlowItemAILocate as aJ, type MidsceneYamlFlowItemAIWaitFor as aK, type MidsceneYamlFlowItemAITap as aL, type MidsceneYamlFlowItemAIHover as aM, type MidsceneYamlFlowItemAIInput as aN, type MidsceneYamlFlowItemAIKeyboardPress as aO, type MidsceneYamlFlowItemAIScroll as aP, type MidsceneYamlFlowItemEvaluateJavaScript as aQ, type MidsceneYamlFlowItemSleep as aR, type MidsceneYamlFlowItemLogScreenshot as aS, type FreeFn as aT, type ScriptPlayerTaskStatus as aU, type ScriptPlayerStatusValue as aV, type TaskCacheInfo as aa, type ExecutionTaskReturn as ab, type ExecutionTaskInsightLocateParam as ac, type ExecutionTaskInsightLocateOutput as ad, type ExecutionTaskInsightDumpLog as ae, type ExecutionTaskInsightLocateApply as af, type ExecutionTaskInsightLocate as ag, type ExecutionTaskInsightQueryParam as ah, type ExecutionTaskInsightQueryOutput as ai, type ExecutionTaskInsightQueryApply as aj, type ExecutionTaskInsightQuery as ak, type ExecutionTaskInsightAssertionParam as al, type ExecutionTaskInsightAssertionApply as am, type ExecutionTaskInsightAssertion as an, type ExecutionTaskActionApply as ao, type ExecutionTaskAction as ap, type ExecutionTaskLogApply as aq, type ExecutionTaskLog as ar, type ExecutionTaskPlanningApply as as, type ExecutionTaskPlanning as at, type GroupedActionDump as au, type PageType as av, type LocateOption as aw, type ReferenceImage as ax, type scrollParam as ay, type MidsceneYamlScriptEnvBase as az, type ExecutionTaskApply as b, type ExecutionDump as c, type InsightTaskInfo as d, type InsightOptions as e, type DetailedLocateParam as f, type InsightExtractOption as g, type InsightAssertionResponse as h, type MidsceneYamlTask as i, type MidsceneYamlFlowItem as j, type MidsceneYamlFlowItemAIRightClick as k, type AIUsageInfo as l, AIResponseFormat as m, type AISingleElementResponseById as n, type AISingleElementResponseByPosition as o, type AISingleElementResponse as p, type AIElementLocatorResponse as q, type AIElementCoordinatesResponse as r, type AIElementResponse as s, type AIDataExtractionResponse as t, type AISectionLocatorResponse as u, type AIAssertionResponse as v, type LocatorValidatorOption as w, type LocateValidatorResult as x, type AgentDescribeElementAtPointResult as y, type EnsureObject as z };
|
package/dist/lib/utils.d.ts
CHANGED
package/dist/lib/utils.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkXIJPQF2Gjs = require('./chunk-XIJPQF2G.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -27,4 +27,4 @@ var _chunkIOBWFLADjs = require('./chunk-IOBWFLAD.js');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
exports.getTmpDir =
|
|
30
|
+
exports.getTmpDir = _chunkXIJPQF2Gjs.getTmpDir; exports.getTmpFile = _chunkXIJPQF2Gjs.getTmpFile; exports.getVersion = _chunkXIJPQF2Gjs.getVersion; exports.groupedActionDumpFileExt = _chunkXIJPQF2Gjs.groupedActionDumpFileExt; exports.overlapped = _chunkXIJPQF2Gjs.overlapped; exports.replaceStringWithFirstAppearance = _chunkXIJPQF2Gjs.replaceStringWithFirstAppearance; exports.replacerForPageObject = _chunkXIJPQF2Gjs.replacerForPageObject; exports.reportHTMLContent = _chunkXIJPQF2Gjs.reportHTMLContent; exports.sleep = _chunkXIJPQF2Gjs.sleep; exports.stringifyDumpData = _chunkXIJPQF2Gjs.stringifyDumpData; exports.uploadTestInfoToServer = _chunkXIJPQF2Gjs.uploadTestInfoToServer; exports.writeDumpReport = _chunkXIJPQF2Gjs.writeDumpReport; exports.writeLogFile = _chunkXIJPQF2Gjs.writeLogFile;
|
package/dist/types/ai-model.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { l as AIUsageInfo, T as PlanningAction, j as MidsceneYamlFlowItem } from './types-
|
|
1
|
+
import { l as AIUsageInfo, T as PlanningAction, j as MidsceneYamlFlowItem } from './types-00c9086f.js';
|
|
2
2
|
import { ChatCompletionMessageParam } from 'openai/resources';
|
|
3
3
|
export { ChatCompletionMessageParam } from 'openai/resources';
|
|
4
|
-
import { b as AIActionType } from './llm-planning-
|
|
5
|
-
export { a as AiAssert, f as AiExtractElementInfo, A as AiLocateElement, g as AiLocateSection, h as adaptBboxToRect, c as callAiFn, d as describeUserPage, e as elementByPositionWithElementInfo, p as plan } from './llm-planning-
|
|
4
|
+
import { b as AIActionType } from './llm-planning-453ffce5.js';
|
|
5
|
+
export { a as AiAssert, f as AiExtractElementInfo, A as AiLocateElement, g as AiLocateSection, h as adaptBboxToRect, c as callAiFn, d as describeUserPage, e as elementByPositionWithElementInfo, p as plan } from './llm-planning-453ffce5.js';
|
|
6
6
|
import { vlLocateMode } from '@midscene/shared/env';
|
|
7
7
|
import { actionParser } from '@ui-tars/action-parser';
|
|
8
8
|
import { Size } from '@midscene/shared/types';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { E as ExecutionTask, a as ExecutionTaskProgressOptions, b as ExecutionTaskApply, c as ExecutionDump, U as UIContext, I as InsightAction, D as DumpSubscriber, d as InsightTaskInfo, e as InsightOptions, f as DetailedLocateParam, L as LocateResult, g as InsightExtractOption, h as InsightAssertionResponse, A as AIDescribeElementResponse } from './types-
|
|
2
|
-
export { v as AIAssertionResponse, t as AIDataExtractionResponse, r as AIElementCoordinatesResponse, q as AIElementLocatorResponse, s as AIElementResponse, m as AIResponseFormat, u as AISectionLocatorResponse, p as AISingleElementResponse, n as AISingleElementResponseById, o as AISingleElementResponseByPosition, l as AIUsageInfo, Q as AgentAssertOpt, y as AgentDescribeElementAtPointResult, N as AgentWaitForOpt, a4 as BaseAgentParserOpt, C as CallAIFn, a3 as Color, G as DumpMeta, K as ElementById, z as EnsureObject, a7 as ExecutionRecorderItem, ap as ExecutionTaskAction, ao as ExecutionTaskActionApply, an as ExecutionTaskInsightAssertion, am as ExecutionTaskInsightAssertionApply, al as ExecutionTaskInsightAssertionParam, ae as ExecutionTaskInsightDumpLog, ag as ExecutionTaskInsightLocate, af as ExecutionTaskInsightLocateApply, ad as ExecutionTaskInsightLocateOutput, ac as ExecutionTaskInsightLocateParam, ak as ExecutionTaskInsightQuery, aj as ExecutionTaskInsightQueryApply, ai as ExecutionTaskInsightQueryOutput, ah as ExecutionTaskInsightQueryParam, ar as
|
|
3
|
-
import { c as callAiFn } from './llm-planning-
|
|
4
|
-
export { a as AiAssert, A as AiLocateElement, d as describeUserPage, p as plan } from './llm-planning-
|
|
1
|
+
import { E as ExecutionTask, a as ExecutionTaskProgressOptions, b as ExecutionTaskApply, c as ExecutionDump, U as UIContext, I as InsightAction, D as DumpSubscriber, d as InsightTaskInfo, e as InsightOptions, f as DetailedLocateParam, L as LocateResult, g as InsightExtractOption, h as InsightAssertionResponse, A as AIDescribeElementResponse } from './types-00c9086f.js';
|
|
2
|
+
export { v as AIAssertionResponse, t as AIDataExtractionResponse, r as AIElementCoordinatesResponse, q as AIElementLocatorResponse, s as AIElementResponse, m as AIResponseFormat, u as AISectionLocatorResponse, p as AISingleElementResponse, n as AISingleElementResponseById, o as AISingleElementResponseByPosition, l as AIUsageInfo, Q as AgentAssertOpt, y as AgentDescribeElementAtPointResult, N as AgentWaitForOpt, a4 as BaseAgentParserOpt, C as CallAIFn, a3 as Color, G as DumpMeta, K as ElementById, z as EnsureObject, a7 as ExecutionRecorderItem, ap as ExecutionTaskAction, ao as ExecutionTaskActionApply, an as ExecutionTaskInsightAssertion, am as ExecutionTaskInsightAssertionApply, al as ExecutionTaskInsightAssertionParam, ae as ExecutionTaskInsightDumpLog, ag as ExecutionTaskInsightLocate, af as ExecutionTaskInsightLocateApply, ad as ExecutionTaskInsightLocateOutput, ac as ExecutionTaskInsightLocateParam, ak as ExecutionTaskInsightQuery, aj as ExecutionTaskInsightQueryApply, ai as ExecutionTaskInsightQueryOutput, ah as ExecutionTaskInsightQueryParam, ar as ExecutionTaskLog, aq as ExecutionTaskLogApply, at as ExecutionTaskPlanning, as as ExecutionTaskPlanningApply, ab as ExecutionTaskReturn, a8 as ExecutionTaskType, a9 as ExecutorContext, aT as FreeFn, au as GroupedActionDump, H as InsightDump, B as InsightExtractParam, J as LiteUISection, aw as LocateOption, F as LocateResultElement, x as LocateValidatorResult, w as LocatorValidatorOption, j as MidsceneYamlFlowItem, aD as MidsceneYamlFlowItemAIAction, aE as MidsceneYamlFlowItemAIAssert, aI as MidsceneYamlFlowItemAIBoolean, aM as MidsceneYamlFlowItemAIHover, aN as MidsceneYamlFlowItemAIInput, aO as MidsceneYamlFlowItemAIKeyboardPress, aJ as MidsceneYamlFlowItemAILocate, aH as MidsceneYamlFlowItemAINString, aG as MidsceneYamlFlowItemAINumber, aF as MidsceneYamlFlowItemAIQuery, k as MidsceneYamlFlowItemAIRightClick, aP as MidsceneYamlFlowItemAIScroll, aL as MidsceneYamlFlowItemAITap, aK as MidsceneYamlFlowItemAIWaitFor, aQ as MidsceneYamlFlowItemEvaluateJavaScript, aS as MidsceneYamlFlowItemLogScreenshot, aR as MidsceneYamlFlowItemSleep, M as MidsceneYamlScript, aB as MidsceneYamlScriptAndroidEnv, aC as MidsceneYamlScriptEnv, az as MidsceneYamlScriptEnvBase, aA as MidsceneYamlScriptWebEnv, i as MidsceneYamlTask, O as OnTaskStartTip, av as PageType, P as PartialInsightDumpFromSDK, V as PlanningAIResponse, T as PlanningAction, $ as PlanningActionParamAssert, a1 as PlanningActionParamError, X as PlanningActionParamHover, Z as PlanningActionParamInputOrKeyPress, Y as PlanningActionParamRightClick, _ as PlanningActionParamScroll, a0 as PlanningActionParamSleep, W as PlanningActionParamTap, a2 as PlanningActionParamWaitFor, S as PlanningLocateParam, a6 as PlaywrightParserOpt, a5 as PuppeteerParserOpt, ax as ReferenceImage, R as ReportDumpWithAttributes, aV as ScriptPlayerStatusValue, aU as ScriptPlayerTaskStatus, aa as TaskCacheInfo, ay as scrollParam } from './types-00c9086f.js';
|
|
3
|
+
import { c as callAiFn } from './llm-planning-453ffce5.js';
|
|
4
|
+
export { a as AiAssert, A as AiLocateElement, d as describeUserPage, p as plan } from './llm-planning-453ffce5.js';
|
|
5
5
|
import { BaseElement, Rect } from '@midscene/shared/types';
|
|
6
6
|
export { BaseElement, ElementTreeNode, Point, Rect, Size } from '@midscene/shared/types';
|
|
7
7
|
export { getVersion } from './utils.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as AIUsageInfo, U as UIContext,
|
|
1
|
+
import { l as AIUsageInfo, U as UIContext, ax as ReferenceImage, q as AIElementLocatorResponse, K as ElementById, g as InsightExtractOption, t as AIDataExtractionResponse, v as AIAssertionResponse, av as PageType, V as PlanningAIResponse } from './types-00c9086f.js';
|
|
2
2
|
import { Rect, ElementTreeNode, BaseElement } from '@midscene/shared/types';
|
|
3
3
|
import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources';
|
|
4
4
|
|
|
@@ -123,7 +123,11 @@ interface MidsceneYamlFlowItemEvaluateJavaScript {
|
|
|
123
123
|
interface MidsceneYamlFlowItemSleep {
|
|
124
124
|
sleep: number;
|
|
125
125
|
}
|
|
126
|
-
|
|
126
|
+
interface MidsceneYamlFlowItemLogScreenshot {
|
|
127
|
+
logScreenshot?: string;
|
|
128
|
+
content?: string;
|
|
129
|
+
}
|
|
130
|
+
type MidsceneYamlFlowItem = MidsceneYamlFlowItemAIAction | MidsceneYamlFlowItemAIAssert | MidsceneYamlFlowItemAIQuery | MidsceneYamlFlowItemAIWaitFor | MidsceneYamlFlowItemAITap | MidsceneYamlFlowItemAIRightClick | MidsceneYamlFlowItemAIHover | MidsceneYamlFlowItemAIInput | MidsceneYamlFlowItemAIKeyboardPress | MidsceneYamlFlowItemAIScroll | MidsceneYamlFlowItemSleep | MidsceneYamlFlowItemLogScreenshot;
|
|
127
131
|
interface FreeFn {
|
|
128
132
|
name: string;
|
|
129
133
|
fn: () => void;
|
|
@@ -180,8 +184,8 @@ interface AIElementCoordinatesResponse {
|
|
|
180
184
|
errors?: string[];
|
|
181
185
|
}
|
|
182
186
|
type AIElementResponse = AIElementLocatorResponse | AIElementCoordinatesResponse;
|
|
183
|
-
interface AIDataExtractionResponse<
|
|
184
|
-
data:
|
|
187
|
+
interface AIDataExtractionResponse<DataDemand> {
|
|
188
|
+
data: DataDemand;
|
|
185
189
|
errors?: string[];
|
|
186
190
|
}
|
|
187
191
|
interface AISectionLocatorResponse {
|
|
@@ -339,6 +343,7 @@ type PlanningActionParamHover = null;
|
|
|
339
343
|
type PlanningActionParamRightClick = null;
|
|
340
344
|
interface PlanningActionParamInputOrKeyPress {
|
|
341
345
|
value: string;
|
|
346
|
+
autoDismissKeyboard?: boolean;
|
|
342
347
|
}
|
|
343
348
|
type PlanningActionParamScroll = scrollParam;
|
|
344
349
|
interface PlanningActionParamAssert {
|
|
@@ -377,7 +382,7 @@ interface ExecutionRecorderItem {
|
|
|
377
382
|
screenshot?: string;
|
|
378
383
|
timing?: string;
|
|
379
384
|
}
|
|
380
|
-
type ExecutionTaskType = 'Planning' | 'Insight' | 'Action' | 'Assertion';
|
|
385
|
+
type ExecutionTaskType = 'Planning' | 'Insight' | 'Action' | 'Assertion' | 'Log';
|
|
381
386
|
interface ExecutorContext {
|
|
382
387
|
task: ExecutionTask;
|
|
383
388
|
element?: LocateResultElement | null;
|
|
@@ -441,6 +446,10 @@ type ExecutionTaskInsightAssertionApply = ExecutionTaskApply<'Insight', Executio
|
|
|
441
446
|
type ExecutionTaskInsightAssertion = ExecutionTask<ExecutionTaskInsightAssertionApply>;
|
|
442
447
|
type ExecutionTaskActionApply<ActionParam = any> = ExecutionTaskApply<'Action', ActionParam, void, void>;
|
|
443
448
|
type ExecutionTaskAction = ExecutionTask<ExecutionTaskActionApply>;
|
|
449
|
+
type ExecutionTaskLogApply<LogParam = {
|
|
450
|
+
content: string;
|
|
451
|
+
}> = ExecutionTaskApply<'Log', LogParam, void, void>;
|
|
452
|
+
type ExecutionTaskLog = ExecutionTask<ExecutionTaskLogApply>;
|
|
444
453
|
type ExecutionTaskPlanningApply = ExecutionTaskApply<'Planning', {
|
|
445
454
|
userInstruction: string;
|
|
446
455
|
log?: string;
|
|
@@ -453,4 +462,4 @@ interface GroupedActionDump {
|
|
|
453
462
|
}
|
|
454
463
|
type PageType = 'puppeteer' | 'playwright' | 'static' | 'chrome-extension-proxy' | 'android';
|
|
455
464
|
|
|
456
|
-
export { type PlanningActionParamAssert as $, type AIDescribeElementResponse as A, type InsightExtractParam as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type LocateResultElement as F, type DumpMeta as G, type InsightDump as H, type InsightAction as I, type LiteUISection as J, type ElementById as K, type LocateResult as L, type MidsceneYamlScript as M, type AgentWaitForOpt as N, type OnTaskStartTip as O, type PartialInsightDumpFromSDK as P, type AgentAssertOpt as Q, type ReportDumpWithAttributes as R, type PlanningLocateParam as S, type PlanningAction as T, UIContext as U, type PlanningAIResponse as V, type PlanningActionParamTap as W, type PlanningActionParamHover as X, type PlanningActionParamRightClick as Y, type PlanningActionParamInputOrKeyPress as Z, type PlanningActionParamScroll as _, type ExecutionTaskProgressOptions as a, type PlanningActionParamSleep as a0, type PlanningActionParamError as a1, type PlanningActionParamWaitFor as a2, type Color as a3, type BaseAgentParserOpt as a4, type PuppeteerParserOpt as a5, type PlaywrightParserOpt as a6, type ExecutionRecorderItem as a7, type ExecutionTaskType as a8, type ExecutorContext as a9, type
|
|
465
|
+
export { type PlanningActionParamAssert as $, type AIDescribeElementResponse as A, type InsightExtractParam as B, type CallAIFn as C, type DumpSubscriber as D, type ExecutionTask as E, type LocateResultElement as F, type DumpMeta as G, type InsightDump as H, type InsightAction as I, type LiteUISection as J, type ElementById as K, type LocateResult as L, type MidsceneYamlScript as M, type AgentWaitForOpt as N, type OnTaskStartTip as O, type PartialInsightDumpFromSDK as P, type AgentAssertOpt as Q, type ReportDumpWithAttributes as R, type PlanningLocateParam as S, type PlanningAction as T, UIContext as U, type PlanningAIResponse as V, type PlanningActionParamTap as W, type PlanningActionParamHover as X, type PlanningActionParamRightClick as Y, type PlanningActionParamInputOrKeyPress as Z, type PlanningActionParamScroll as _, type ExecutionTaskProgressOptions as a, type PlanningActionParamSleep as a0, type PlanningActionParamError as a1, type PlanningActionParamWaitFor as a2, type Color as a3, type BaseAgentParserOpt as a4, type PuppeteerParserOpt as a5, type PlaywrightParserOpt as a6, type ExecutionRecorderItem as a7, type ExecutionTaskType as a8, type ExecutorContext as a9, type MidsceneYamlScriptWebEnv as aA, type MidsceneYamlScriptAndroidEnv as aB, type MidsceneYamlScriptEnv as aC, type MidsceneYamlFlowItemAIAction as aD, type MidsceneYamlFlowItemAIAssert as aE, type MidsceneYamlFlowItemAIQuery as aF, type MidsceneYamlFlowItemAINumber as aG, type MidsceneYamlFlowItemAINString as aH, type MidsceneYamlFlowItemAIBoolean as aI, type MidsceneYamlFlowItemAILocate as aJ, type MidsceneYamlFlowItemAIWaitFor as aK, type MidsceneYamlFlowItemAITap as aL, type MidsceneYamlFlowItemAIHover as aM, type MidsceneYamlFlowItemAIInput as aN, type MidsceneYamlFlowItemAIKeyboardPress as aO, type MidsceneYamlFlowItemAIScroll as aP, type MidsceneYamlFlowItemEvaluateJavaScript as aQ, type MidsceneYamlFlowItemSleep as aR, type MidsceneYamlFlowItemLogScreenshot as aS, type FreeFn as aT, type ScriptPlayerTaskStatus as aU, type ScriptPlayerStatusValue as aV, type TaskCacheInfo as aa, type ExecutionTaskReturn as ab, type ExecutionTaskInsightLocateParam as ac, type ExecutionTaskInsightLocateOutput as ad, type ExecutionTaskInsightDumpLog as ae, type ExecutionTaskInsightLocateApply as af, type ExecutionTaskInsightLocate as ag, type ExecutionTaskInsightQueryParam as ah, type ExecutionTaskInsightQueryOutput as ai, type ExecutionTaskInsightQueryApply as aj, type ExecutionTaskInsightQuery as ak, type ExecutionTaskInsightAssertionParam as al, type ExecutionTaskInsightAssertionApply as am, type ExecutionTaskInsightAssertion as an, type ExecutionTaskActionApply as ao, type ExecutionTaskAction as ap, type ExecutionTaskLogApply as aq, type ExecutionTaskLog as ar, type ExecutionTaskPlanningApply as as, type ExecutionTaskPlanning as at, type GroupedActionDump as au, type PageType as av, type LocateOption as aw, type ReferenceImage as ax, type scrollParam as ay, type MidsceneYamlScriptEnvBase as az, type ExecutionTaskApply as b, type ExecutionDump as c, type InsightTaskInfo as d, type InsightOptions as e, type DetailedLocateParam as f, type InsightExtractOption as g, type InsightAssertionResponse as h, type MidsceneYamlTask as i, type MidsceneYamlFlowItem as j, type MidsceneYamlFlowItemAIRightClick as k, type AIUsageInfo as l, AIResponseFormat as m, type AISingleElementResponseById as n, type AISingleElementResponseByPosition as o, type AISingleElementResponse as p, type AIElementLocatorResponse as q, type AIElementCoordinatesResponse as r, type AIElementResponse as s, type AIDataExtractionResponse as t, type AISectionLocatorResponse as u, type AIAssertionResponse as v, type LocatorValidatorOption as w, type LocateValidatorResult as x, type AgentDescribeElementAtPointResult as y, type EnsureObject as z };
|
package/dist/types/utils.d.ts
CHANGED
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.17.
|
|
4
|
+
"version": "0.17.6-beta-20250607054355.0",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"jsnext:source": "./src/index.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"openai": "4.81.0",
|
|
46
46
|
"socks-proxy-agent": "8.0.4",
|
|
47
47
|
"xss": "1.0.15",
|
|
48
|
-
"@midscene/shared": "0.17.
|
|
48
|
+
"@midscene/shared": "0.17.6-beta-20250607054355.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@modern-js/module-tools": "2.60.6",
|
|
File without changes
|
|
File without changes
|