@midscene/core 0.21.4-beta-20250711063424.0 → 0.21.4-beta-20250715053831.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 +36 -24
- package/dist/es/ai-model.js +5 -1
- package/dist/es/{chunk-QT5OZCDN.js → chunk-NQHZHZRA.js} +408 -224
- package/dist/es/chunk-NQHZHZRA.js.map +1 -0
- package/dist/es/{chunk-2CMOAEAS.js → chunk-NSQ46QDR.js} +3 -3
- package/dist/es/index.d.ts +4 -4
- package/dist/es/index.js +2 -2
- package/dist/es/{llm-planning-fe687364.d.ts → llm-planning-b342ff86.d.ts} +1 -1
- package/dist/es/{types-b0b4c68e.d.ts → types-05553e39.d.ts} +32 -1
- package/dist/es/utils.d.ts +1 -1
- package/dist/es/utils.js +1 -1
- package/dist/lib/ai-model.d.ts +36 -24
- package/dist/lib/ai-model.js +6 -2
- package/dist/lib/{chunk-QT5OZCDN.js → chunk-NQHZHZRA.js} +417 -233
- package/dist/lib/chunk-NQHZHZRA.js.map +1 -0
- package/dist/lib/{chunk-2CMOAEAS.js → chunk-NSQ46QDR.js} +3 -3
- package/dist/lib/index.d.ts +4 -4
- package/dist/lib/index.js +12 -12
- package/dist/lib/{llm-planning-fe687364.d.ts → llm-planning-b342ff86.d.ts} +1 -1
- package/dist/lib/{types-b0b4c68e.d.ts → types-05553e39.d.ts} +32 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/ai-model.d.ts +36 -24
- package/dist/types/index.d.ts +4 -4
- package/dist/types/{llm-planning-fe687364.d.ts → llm-planning-b342ff86.d.ts} +1 -1
- package/dist/types/{types-b0b4c68e.d.ts → types-05553e39.d.ts} +32 -1
- package/dist/types/utils.d.ts +1 -1
- package/package.json +3 -3
- package/dist/es/chunk-QT5OZCDN.js.map +0 -1
- package/dist/lib/chunk-QT5OZCDN.js.map +0 -1
- /package/dist/es/{chunk-2CMOAEAS.js.map → chunk-NSQ46QDR.js.map} +0 -0
- /package/dist/lib/{chunk-2CMOAEAS.js.map → chunk-NSQ46QDR.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, aa as ExecutionTaskHitBy, 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,
|
|
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-05553e39.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, ay as CodeGenerationChunk, a3 as Color, G as DumpMeta, K as ElementById, z as EnsureObject, a7 as ExecutionRecorderItem, ap as ExecutionTaskAction, ao as ExecutionTaskActionApply, aa as ExecutionTaskHitBy, 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, aY as FreeFn, au as GroupedActionDump, H as InsightDump, B as InsightExtractParam, J as LiteUISection, aA as LocateOption, F as LocateResultElement, x as LocateValidatorResult, w as LocatorValidatorOption, j as MidsceneYamlFlowItem, aH as MidsceneYamlFlowItemAIAction, aM as MidsceneYamlFlowItemAIAsk, aI as MidsceneYamlFlowItemAIAssert, aN as MidsceneYamlFlowItemAIBoolean, aR as MidsceneYamlFlowItemAIHover, aS as MidsceneYamlFlowItemAIInput, aT as MidsceneYamlFlowItemAIKeyboardPress, aO as MidsceneYamlFlowItemAILocate, aK as MidsceneYamlFlowItemAINumber, aJ as MidsceneYamlFlowItemAIQuery, k as MidsceneYamlFlowItemAIRightClick, aU as MidsceneYamlFlowItemAIScroll, aL as MidsceneYamlFlowItemAIString, aQ as MidsceneYamlFlowItemAITap, aP as MidsceneYamlFlowItemAIWaitFor, aV as MidsceneYamlFlowItemEvaluateJavaScript, aX as MidsceneYamlFlowItemLogScreenshot, aW as MidsceneYamlFlowItemSleep, M as MidsceneYamlScript, aF as MidsceneYamlScriptAndroidEnv, aG as MidsceneYamlScriptEnv, aD as MidsceneYamlScriptEnvBase, aE 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, aB as ReferenceImage, R as ReportDumpWithAttributes, a_ as ScriptPlayerStatusValue, aZ as ScriptPlayerTaskStatus, az as StreamingAIResponse, ax as StreamingCallback, aw as StreamingCodeGenerationOptions, aC as scrollParam } from './types-05553e39.js';
|
|
3
|
+
import { c as callAiFn } from './llm-planning-b342ff86.js';
|
|
4
|
+
export { a as AiAssert, A as AiLocateElement, d as describeUserPage, p as plan } from './llm-planning-b342ff86.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 _chunkNSQ46QDRjs = require('./chunk-NSQ46QDR.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -11,7 +11,7 @@ var _chunk2CMOAEASjs = require('./chunk-2CMOAEAS.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkNQHZHZRAjs = require('./chunk-NQHZHZRA.js');
|
|
15
15
|
|
|
16
16
|
// src/ai-model/action-executor.ts
|
|
17
17
|
|
|
@@ -171,7 +171,7 @@ ${_optionalChain([this, 'access', _7 => _7.latestErrorTask, 'call', _8 => _8(),
|
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
173
|
const dumpData = {
|
|
174
|
-
sdkVersion:
|
|
174
|
+
sdkVersion: _chunkNSQ46QDRjs.getVersion.call(void 0, ),
|
|
175
175
|
model_name: _env.getAIConfig.call(void 0, _env.MIDSCENE_MODEL_NAME) || "",
|
|
176
176
|
model_description: modelDescription,
|
|
177
177
|
logTime: Date.now(),
|
|
@@ -219,7 +219,7 @@ var _logger = require('@midscene/shared/logger');
|
|
|
219
219
|
|
|
220
220
|
function emitInsightDump(data, dumpSubscriber) {
|
|
221
221
|
const baseData = {
|
|
222
|
-
sdkVersion:
|
|
222
|
+
sdkVersion: _chunkNSQ46QDRjs.getVersion.call(void 0, ),
|
|
223
223
|
logTime: Date.now(),
|
|
224
224
|
model_name: _env.getAIConfig.call(void 0, _env.MIDSCENE_MODEL_NAME) || ""
|
|
225
225
|
};
|
|
@@ -235,7 +235,7 @@ function emitInsightDump(data, dumpSubscriber) {
|
|
|
235
235
|
var debug = _logger.getDebug.call(void 0, "ai:insight");
|
|
236
236
|
var Insight = class {
|
|
237
237
|
constructor(context, opt) {
|
|
238
|
-
this.aiVendorFn =
|
|
238
|
+
this.aiVendorFn = _chunkNQHZHZRAjs.callAiFn;
|
|
239
239
|
_utils.assert.call(void 0, context, "context is required for Insight");
|
|
240
240
|
if (typeof context === "function") {
|
|
241
241
|
this.contextRetrieverFn = context;
|
|
@@ -278,7 +278,7 @@ var Insight = class {
|
|
|
278
278
|
let searchAreaUsage = void 0;
|
|
279
279
|
let searchAreaResponse = void 0;
|
|
280
280
|
if (searchAreaPrompt) {
|
|
281
|
-
searchAreaResponse = await
|
|
281
|
+
searchAreaResponse = await _chunkNQHZHZRAjs.AiLocateSection.call(void 0, {
|
|
282
282
|
context,
|
|
283
283
|
sectionDescription: searchAreaPrompt
|
|
284
284
|
});
|
|
@@ -291,7 +291,7 @@ var Insight = class {
|
|
|
291
291
|
searchArea = searchAreaResponse.rect;
|
|
292
292
|
}
|
|
293
293
|
const startTime = Date.now();
|
|
294
|
-
const { parseResult, rect, elementById, rawResponse, usage } = await
|
|
294
|
+
const { parseResult, rect, elementById, rawResponse, usage } = await _chunkNQHZHZRAjs.AiLocateElement.call(void 0, {
|
|
295
295
|
callAI: callAI || this.aiVendorFn,
|
|
296
296
|
context,
|
|
297
297
|
targetElementDescription: queryPrompt,
|
|
@@ -379,7 +379,7 @@ ${parseResult.errors.join("\n")}`;
|
|
|
379
379
|
this.onceDumpUpdatedFn = void 0;
|
|
380
380
|
const context = await this.contextRetrieverFn("extract");
|
|
381
381
|
const startTime = Date.now();
|
|
382
|
-
const { parseResult, usage } = await
|
|
382
|
+
const { parseResult, usage } = await _chunkNQHZHZRAjs.AiExtractElementInfo.call(void 0, {
|
|
383
383
|
context,
|
|
384
384
|
dataQuery: dataDemand,
|
|
385
385
|
extractOption: opt
|
|
@@ -431,7 +431,7 @@ ${parseResult.errors.join("\n")}`;
|
|
|
431
431
|
this.onceDumpUpdatedFn = void 0;
|
|
432
432
|
const context = await this.contextRetrieverFn("assert");
|
|
433
433
|
const startTime = Date.now();
|
|
434
|
-
const assertResult = await
|
|
434
|
+
const assertResult = await _chunkNQHZHZRAjs.AiAssert.call(void 0, {
|
|
435
435
|
assertion,
|
|
436
436
|
context
|
|
437
437
|
});
|
|
@@ -485,7 +485,7 @@ ${parseResult.errors.join("\n")}`;
|
|
|
485
485
|
borderThickness: 3
|
|
486
486
|
});
|
|
487
487
|
if (_optionalChain([opt, 'optionalAccess', _22 => _22.deepThink])) {
|
|
488
|
-
const searchArea =
|
|
488
|
+
const searchArea = _chunkNQHZHZRAjs.expandSearchArea.call(void 0, targetRect, context.size);
|
|
489
489
|
debug("describe: set searchArea", searchArea);
|
|
490
490
|
imagePayload = await _img.cropByRect.call(void 0,
|
|
491
491
|
imagePayload,
|
|
@@ -508,7 +508,7 @@ ${parseResult.errors.join("\n")}`;
|
|
|
508
508
|
]
|
|
509
509
|
}
|
|
510
510
|
];
|
|
511
|
-
const callAIFn = this.aiVendorFn ||
|
|
511
|
+
const callAIFn = this.aiVendorFn || _chunkNQHZHZRAjs.callToGetJSONObject;
|
|
512
512
|
const res = await callAIFn(msgs, 4 /* DESCRIBE_ELEMENT */);
|
|
513
513
|
const { content } = res;
|
|
514
514
|
_utils.assert.call(void 0, !content.error, `describe failed: ${content.error}`);
|
|
@@ -531,6 +531,6 @@ var src_default = Insight;
|
|
|
531
531
|
|
|
532
532
|
|
|
533
533
|
|
|
534
|
-
exports.AiAssert =
|
|
534
|
+
exports.AiAssert = _chunkNQHZHZRAjs.AiAssert; exports.AiLocateElement = _chunkNQHZHZRAjs.AiLocateElement; exports.Executor = Executor; exports.Insight = Insight; exports.MIDSCENE_MODEL_NAME = _env.MIDSCENE_MODEL_NAME; exports.default = src_default; exports.describeUserPage = _chunkNQHZHZRAjs.describeUserPage; exports.getAIConfig = _env.getAIConfig; exports.getVersion = _chunkNSQ46QDRjs.getVersion; exports.plan = _chunkNQHZHZRAjs.plan;
|
|
535
535
|
|
|
536
536
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as AIUsageInfo, U as UIContext,
|
|
1
|
+
import { l as AIUsageInfo, U as UIContext, aB 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-05553e39.js';
|
|
2
2
|
import { Rect, ElementTreeNode, BaseElement } from '@midscene/shared/types';
|
|
3
3
|
import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources';
|
|
4
4
|
|
|
@@ -467,5 +467,36 @@ interface GroupedActionDump {
|
|
|
467
467
|
executions: ExecutionDump[];
|
|
468
468
|
}
|
|
469
469
|
type PageType = 'puppeteer' | 'playwright' | 'static' | 'chrome-extension-proxy' | 'android';
|
|
470
|
+
interface StreamingCodeGenerationOptions {
|
|
471
|
+
/** Whether to enable streaming output */
|
|
472
|
+
stream?: boolean;
|
|
473
|
+
/** Callback function to handle streaming chunks */
|
|
474
|
+
onChunk?: StreamingCallback;
|
|
475
|
+
/** Callback function to handle streaming completion */
|
|
476
|
+
onComplete?: (finalCode: string) => void;
|
|
477
|
+
/** Callback function to handle streaming errors */
|
|
478
|
+
onError?: (error: Error) => void;
|
|
479
|
+
}
|
|
480
|
+
type StreamingCallback = (chunk: CodeGenerationChunk) => void;
|
|
481
|
+
interface CodeGenerationChunk {
|
|
482
|
+
/** The incremental content chunk */
|
|
483
|
+
content: string;
|
|
484
|
+
/** The reasoning content */
|
|
485
|
+
reasoning_content: string;
|
|
486
|
+
/** The accumulated content so far */
|
|
487
|
+
accumulated: string;
|
|
488
|
+
/** Whether this is the final chunk */
|
|
489
|
+
isComplete: boolean;
|
|
490
|
+
/** Token usage information if available */
|
|
491
|
+
usage?: AIUsageInfo;
|
|
492
|
+
}
|
|
493
|
+
interface StreamingAIResponse {
|
|
494
|
+
/** The final accumulated content */
|
|
495
|
+
content: string;
|
|
496
|
+
/** Token usage information */
|
|
497
|
+
usage?: AIUsageInfo;
|
|
498
|
+
/** Whether the response was streamed */
|
|
499
|
+
isStreamed: boolean;
|
|
500
|
+
}
|
|
470
501
|
|
|
471
|
-
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
|
|
502
|
+
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 LocateOption as aA, type ReferenceImage as aB, type scrollParam as aC, type MidsceneYamlScriptEnvBase as aD, type MidsceneYamlScriptWebEnv as aE, type MidsceneYamlScriptAndroidEnv as aF, type MidsceneYamlScriptEnv as aG, type MidsceneYamlFlowItemAIAction as aH, type MidsceneYamlFlowItemAIAssert as aI, type MidsceneYamlFlowItemAIQuery as aJ, type MidsceneYamlFlowItemAINumber as aK, type MidsceneYamlFlowItemAIString as aL, type MidsceneYamlFlowItemAIAsk as aM, type MidsceneYamlFlowItemAIBoolean as aN, type MidsceneYamlFlowItemAILocate as aO, type MidsceneYamlFlowItemAIWaitFor as aP, type MidsceneYamlFlowItemAITap as aQ, type MidsceneYamlFlowItemAIHover as aR, type MidsceneYamlFlowItemAIInput as aS, type MidsceneYamlFlowItemAIKeyboardPress as aT, type MidsceneYamlFlowItemAIScroll as aU, type MidsceneYamlFlowItemEvaluateJavaScript as aV, type MidsceneYamlFlowItemSleep as aW, type MidsceneYamlFlowItemLogScreenshot as aX, type FreeFn as aY, type ScriptPlayerTaskStatus as aZ, type ScriptPlayerStatusValue as a_, type ExecutionTaskHitBy 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 StreamingCodeGenerationOptions as aw, type StreamingCallback as ax, type CodeGenerationChunk as ay, type StreamingAIResponse 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 _chunkNSQ46QDRjs = require('./chunk-NSQ46QDR.js');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -27,4 +27,4 @@ var _chunk2CMOAEASjs = require('./chunk-2CMOAEAS.js');
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
exports.getTmpDir =
|
|
30
|
+
exports.getTmpDir = _chunkNSQ46QDRjs.getTmpDir; exports.getTmpFile = _chunkNSQ46QDRjs.getTmpFile; exports.getVersion = _chunkNSQ46QDRjs.getVersion; exports.groupedActionDumpFileExt = _chunkNSQ46QDRjs.groupedActionDumpFileExt; exports.insertScriptBeforeClosingHtml = _chunkNSQ46QDRjs.insertScriptBeforeClosingHtml; exports.overlapped = _chunkNSQ46QDRjs.overlapped; exports.replacerForPageObject = _chunkNSQ46QDRjs.replacerForPageObject; exports.reportHTMLContent = _chunkNSQ46QDRjs.reportHTMLContent; exports.sleep = _chunkNSQ46QDRjs.sleep; exports.stringifyDumpData = _chunkNSQ46QDRjs.stringifyDumpData; exports.uploadTestInfoToServer = _chunkNSQ46QDRjs.uploadTestInfoToServer; exports.writeDumpReport = _chunkNSQ46QDRjs.writeDumpReport; exports.writeLogFile = _chunkNSQ46QDRjs.writeLogFile;
|
package/dist/types/ai-model.d.ts
CHANGED
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { l as AIUsageInfo, T as PlanningAction, j as MidsceneYamlFlowItem } from './types-
|
|
1
|
+
import { ax as StreamingCallback, l as AIUsageInfo, aw as StreamingCodeGenerationOptions, az as StreamingAIResponse, T as PlanningAction, j as MidsceneYamlFlowItem } from './types-05553e39.js';
|
|
2
2
|
import OpenAI from 'openai';
|
|
3
3
|
import { ChatCompletionMessageParam } from 'openai/resources';
|
|
4
4
|
export { ChatCompletionMessageParam } from 'openai/resources';
|
|
5
|
-
import { b as AIActionType } from './llm-planning-
|
|
6
|
-
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-
|
|
5
|
+
import { b as AIActionType } from './llm-planning-b342ff86.js';
|
|
6
|
+
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-b342ff86.js';
|
|
7
7
|
import { vlLocateMode } from '@midscene/shared/env';
|
|
8
|
-
import { ChromeRecordedEvent as ChromeRecordedEvent$1 } from '@midscene/recorder';
|
|
9
8
|
import { actionParser } from '@ui-tars/action-parser';
|
|
10
9
|
import { Size } from '@midscene/shared/types';
|
|
11
10
|
import '@midscene/shared/constants';
|
|
12
11
|
|
|
13
|
-
declare function call(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType, responseFormat?: OpenAI.ChatCompletionCreateParams['response_format'] | OpenAI.ResponseFormatJSONObject
|
|
12
|
+
declare function call(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType, responseFormat?: OpenAI.ChatCompletionCreateParams['response_format'] | OpenAI.ResponseFormatJSONObject, options?: {
|
|
13
|
+
stream?: boolean;
|
|
14
|
+
onChunk?: StreamingCallback;
|
|
15
|
+
}): Promise<{
|
|
14
16
|
content: string;
|
|
15
17
|
usage?: AIUsageInfo;
|
|
18
|
+
isStreamed: boolean;
|
|
16
19
|
}>;
|
|
17
20
|
declare function callToGetJSONObject<T>(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType): Promise<{
|
|
18
21
|
content: T;
|
|
@@ -21,19 +24,6 @@ declare function callToGetJSONObject<T>(messages: ChatCompletionMessageParam[],
|
|
|
21
24
|
|
|
22
25
|
declare function systemPromptToLocateElement(vlMode: ReturnType<typeof vlLocateMode>): string;
|
|
23
26
|
|
|
24
|
-
interface PlaywrightGenerationOptions {
|
|
25
|
-
testName?: string;
|
|
26
|
-
includeScreenshots?: boolean;
|
|
27
|
-
includeTimestamps?: boolean;
|
|
28
|
-
maxScreenshots?: number;
|
|
29
|
-
description?: string;
|
|
30
|
-
viewportSize?: {
|
|
31
|
-
width: number;
|
|
32
|
-
height: number;
|
|
33
|
-
};
|
|
34
|
-
waitForNetworkIdle?: boolean;
|
|
35
|
-
waitForNetworkIdleTimeout?: number;
|
|
36
|
-
}
|
|
37
27
|
interface ChromeRecordedEvent {
|
|
38
28
|
type: string;
|
|
39
29
|
timestamp: number;
|
|
@@ -47,21 +37,43 @@ interface ChromeRecordedEvent {
|
|
|
47
37
|
screenshotAfter?: string;
|
|
48
38
|
screenshotWithBox?: string;
|
|
49
39
|
}
|
|
40
|
+
interface YamlGenerationOptions {
|
|
41
|
+
testName?: string;
|
|
42
|
+
includeTimestamps?: boolean;
|
|
43
|
+
maxScreenshots?: number;
|
|
44
|
+
description?: string;
|
|
45
|
+
}
|
|
50
46
|
/**
|
|
51
|
-
* Generates
|
|
47
|
+
* Generates YAML test configuration from recorded events using AI
|
|
52
48
|
*/
|
|
53
|
-
declare const
|
|
49
|
+
declare const generateYamlTest: (events: ChromeRecordedEvent[], options?: YamlGenerationOptions) => Promise<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Generates YAML test configuration from recorded events using AI with streaming support
|
|
52
|
+
*/
|
|
53
|
+
declare const generateYamlTestStream: (events: ChromeRecordedEvent[], options?: YamlGenerationOptions & StreamingCodeGenerationOptions) => Promise<StreamingAIResponse>;
|
|
54
54
|
|
|
55
|
-
interface
|
|
55
|
+
interface PlaywrightGenerationOptions {
|
|
56
56
|
testName?: string;
|
|
57
|
+
includeScreenshots?: boolean;
|
|
57
58
|
includeTimestamps?: boolean;
|
|
58
59
|
maxScreenshots?: number;
|
|
59
60
|
description?: string;
|
|
61
|
+
viewportSize?: {
|
|
62
|
+
width: number;
|
|
63
|
+
height: number;
|
|
64
|
+
};
|
|
65
|
+
waitForNetworkIdle?: boolean;
|
|
66
|
+
waitForNetworkIdleTimeout?: number;
|
|
60
67
|
}
|
|
68
|
+
|
|
61
69
|
/**
|
|
62
|
-
* Generates
|
|
70
|
+
* Generates Playwright test code from recorded events
|
|
71
|
+
*/
|
|
72
|
+
declare const generatePlaywrightTest: (events: ChromeRecordedEvent[], options?: PlaywrightGenerationOptions) => Promise<string>;
|
|
73
|
+
/**
|
|
74
|
+
* Generates Playwright test code from recorded events with streaming support
|
|
63
75
|
*/
|
|
64
|
-
declare const
|
|
76
|
+
declare const generatePlaywrightTestStream: (events: ChromeRecordedEvent[], options?: PlaywrightGenerationOptions & StreamingCodeGenerationOptions) => Promise<StreamingAIResponse>;
|
|
65
77
|
|
|
66
78
|
declare function vlmPlanning(options: {
|
|
67
79
|
userInstruction: string;
|
|
@@ -78,4 +90,4 @@ declare function vlmPlanning(options: {
|
|
|
78
90
|
}>;
|
|
79
91
|
declare function resizeImageForUiTars(imageBase64: string, size: Size): Promise<string>;
|
|
80
92
|
|
|
81
|
-
export { AIActionType, call as callAi, callToGetJSONObject, generatePlaywrightTest, generateYamlTest, resizeImageForUiTars, systemPromptToLocateElement, vlmPlanning };
|
|
93
|
+
export { AIActionType, call as callAi, callToGetJSONObject, generatePlaywrightTest, generatePlaywrightTestStream, generateYamlTest, generateYamlTestStream, resizeImageForUiTars, systemPromptToLocateElement, vlmPlanning };
|
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, aa as ExecutionTaskHitBy, 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,
|
|
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-05553e39.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, ay as CodeGenerationChunk, a3 as Color, G as DumpMeta, K as ElementById, z as EnsureObject, a7 as ExecutionRecorderItem, ap as ExecutionTaskAction, ao as ExecutionTaskActionApply, aa as ExecutionTaskHitBy, 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, aY as FreeFn, au as GroupedActionDump, H as InsightDump, B as InsightExtractParam, J as LiteUISection, aA as LocateOption, F as LocateResultElement, x as LocateValidatorResult, w as LocatorValidatorOption, j as MidsceneYamlFlowItem, aH as MidsceneYamlFlowItemAIAction, aM as MidsceneYamlFlowItemAIAsk, aI as MidsceneYamlFlowItemAIAssert, aN as MidsceneYamlFlowItemAIBoolean, aR as MidsceneYamlFlowItemAIHover, aS as MidsceneYamlFlowItemAIInput, aT as MidsceneYamlFlowItemAIKeyboardPress, aO as MidsceneYamlFlowItemAILocate, aK as MidsceneYamlFlowItemAINumber, aJ as MidsceneYamlFlowItemAIQuery, k as MidsceneYamlFlowItemAIRightClick, aU as MidsceneYamlFlowItemAIScroll, aL as MidsceneYamlFlowItemAIString, aQ as MidsceneYamlFlowItemAITap, aP as MidsceneYamlFlowItemAIWaitFor, aV as MidsceneYamlFlowItemEvaluateJavaScript, aX as MidsceneYamlFlowItemLogScreenshot, aW as MidsceneYamlFlowItemSleep, M as MidsceneYamlScript, aF as MidsceneYamlScriptAndroidEnv, aG as MidsceneYamlScriptEnv, aD as MidsceneYamlScriptEnvBase, aE 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, aB as ReferenceImage, R as ReportDumpWithAttributes, a_ as ScriptPlayerStatusValue, aZ as ScriptPlayerTaskStatus, az as StreamingAIResponse, ax as StreamingCallback, aw as StreamingCodeGenerationOptions, aC as scrollParam } from './types-05553e39.js';
|
|
3
|
+
import { c as callAiFn } from './llm-planning-b342ff86.js';
|
|
4
|
+
export { a as AiAssert, A as AiLocateElement, d as describeUserPage, p as plan } from './llm-planning-b342ff86.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, aB 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-05553e39.js';
|
|
2
2
|
import { Rect, ElementTreeNode, BaseElement } from '@midscene/shared/types';
|
|
3
3
|
import { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources';
|
|
4
4
|
|
|
@@ -467,5 +467,36 @@ interface GroupedActionDump {
|
|
|
467
467
|
executions: ExecutionDump[];
|
|
468
468
|
}
|
|
469
469
|
type PageType = 'puppeteer' | 'playwright' | 'static' | 'chrome-extension-proxy' | 'android';
|
|
470
|
+
interface StreamingCodeGenerationOptions {
|
|
471
|
+
/** Whether to enable streaming output */
|
|
472
|
+
stream?: boolean;
|
|
473
|
+
/** Callback function to handle streaming chunks */
|
|
474
|
+
onChunk?: StreamingCallback;
|
|
475
|
+
/** Callback function to handle streaming completion */
|
|
476
|
+
onComplete?: (finalCode: string) => void;
|
|
477
|
+
/** Callback function to handle streaming errors */
|
|
478
|
+
onError?: (error: Error) => void;
|
|
479
|
+
}
|
|
480
|
+
type StreamingCallback = (chunk: CodeGenerationChunk) => void;
|
|
481
|
+
interface CodeGenerationChunk {
|
|
482
|
+
/** The incremental content chunk */
|
|
483
|
+
content: string;
|
|
484
|
+
/** The reasoning content */
|
|
485
|
+
reasoning_content: string;
|
|
486
|
+
/** The accumulated content so far */
|
|
487
|
+
accumulated: string;
|
|
488
|
+
/** Whether this is the final chunk */
|
|
489
|
+
isComplete: boolean;
|
|
490
|
+
/** Token usage information if available */
|
|
491
|
+
usage?: AIUsageInfo;
|
|
492
|
+
}
|
|
493
|
+
interface StreamingAIResponse {
|
|
494
|
+
/** The final accumulated content */
|
|
495
|
+
content: string;
|
|
496
|
+
/** Token usage information */
|
|
497
|
+
usage?: AIUsageInfo;
|
|
498
|
+
/** Whether the response was streamed */
|
|
499
|
+
isStreamed: boolean;
|
|
500
|
+
}
|
|
470
501
|
|
|
471
|
-
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
|
|
502
|
+
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 LocateOption as aA, type ReferenceImage as aB, type scrollParam as aC, type MidsceneYamlScriptEnvBase as aD, type MidsceneYamlScriptWebEnv as aE, type MidsceneYamlScriptAndroidEnv as aF, type MidsceneYamlScriptEnv as aG, type MidsceneYamlFlowItemAIAction as aH, type MidsceneYamlFlowItemAIAssert as aI, type MidsceneYamlFlowItemAIQuery as aJ, type MidsceneYamlFlowItemAINumber as aK, type MidsceneYamlFlowItemAIString as aL, type MidsceneYamlFlowItemAIAsk as aM, type MidsceneYamlFlowItemAIBoolean as aN, type MidsceneYamlFlowItemAILocate as aO, type MidsceneYamlFlowItemAIWaitFor as aP, type MidsceneYamlFlowItemAITap as aQ, type MidsceneYamlFlowItemAIHover as aR, type MidsceneYamlFlowItemAIInput as aS, type MidsceneYamlFlowItemAIKeyboardPress as aT, type MidsceneYamlFlowItemAIScroll as aU, type MidsceneYamlFlowItemEvaluateJavaScript as aV, type MidsceneYamlFlowItemSleep as aW, type MidsceneYamlFlowItemLogScreenshot as aX, type FreeFn as aY, type ScriptPlayerTaskStatus as aZ, type ScriptPlayerStatusValue as a_, type ExecutionTaskHitBy 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 StreamingCodeGenerationOptions as aw, type StreamingCallback as ax, type CodeGenerationChunk as ay, type StreamingAIResponse 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.21.4-beta-
|
|
4
|
+
"version": "0.21.4-beta-20250715053831.0",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"jsnext:source": "./src/index.ts",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"langsmith": "0.3.7",
|
|
45
45
|
"openai": "4.81.0",
|
|
46
46
|
"socks-proxy-agent": "8.0.4",
|
|
47
|
-
"@midscene/recorder": "0.21.4-beta-
|
|
48
|
-
"@midscene/shared": "0.21.4-beta-
|
|
47
|
+
"@midscene/recorder": "0.21.4-beta-20250715053831.0",
|
|
48
|
+
"@midscene/shared": "0.21.4-beta-20250715053831.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@modern-js/module-tools": "2.60.6",
|