@midscene/core 0.26.7-beta-20250815153024.0 → 0.26.7-beta-20250818024834.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/common.mjs +37 -16
- package/dist/es/ai-model/common.mjs.map +1 -1
- package/dist/es/ai-model/index.mjs +2 -2
- package/dist/es/ai-model/llm-planning.mjs +1 -1
- package/dist/es/ai-model/llm-planning.mjs.map +1 -1
- package/dist/es/types.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/ai-model/common.js +36 -18
- package/dist/lib/ai-model/common.js.map +1 -1
- package/dist/lib/ai-model/index.js +1 -4
- package/dist/lib/ai-model/llm-planning.js +1 -1
- package/dist/lib/ai-model/llm-planning.js.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/ai-model/common.d.ts +2 -3
- package/dist/types/ai-model/index.d.ts +0 -1
- package/dist/types/types.d.ts +0 -1
- package/dist/types/yaml.d.ts +6 -5
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AIUsageInfo, BaseElement,
|
|
1
|
+
import type { AIUsageInfo, BaseElement, ElementTreeNode, MidsceneYamlFlowItem, PlanningAction, Rect, Size } from '../types';
|
|
2
2
|
import type { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources/index';
|
|
3
3
|
import type { PlanningLocateParam } from '../types';
|
|
4
4
|
export type AIArgs = [
|
|
@@ -12,7 +12,6 @@ export declare enum AIActionType {
|
|
|
12
12
|
PLAN = 3,
|
|
13
13
|
DESCRIBE_ELEMENT = 4
|
|
14
14
|
}
|
|
15
|
-
export declare const actionSpaceTypePrefix = "action_space_";
|
|
16
15
|
export declare function callAiFn<T>(msgs: AIArgs, AIActionTypeValue: AIActionType): Promise<{
|
|
17
16
|
content: T;
|
|
18
17
|
usage?: AIUsageInfo;
|
|
@@ -32,4 +31,4 @@ export declare function mergeRects(rects: Rect[]): {
|
|
|
32
31
|
};
|
|
33
32
|
export declare function expandSearchArea(rect: Rect, screenSize: Size): Rect;
|
|
34
33
|
export declare function markupImageForLLM(screenshotBase64: string, tree: ElementTreeNode<BaseElement>, size: Size): Promise<string>;
|
|
35
|
-
export declare function buildYamlFlowFromPlans(plans: PlanningAction[],
|
|
34
|
+
export declare function buildYamlFlowFromPlans(plans: PlanningAction[], sleep?: number): MidsceneYamlFlowItem[];
|
|
@@ -9,4 +9,3 @@ export { plan } from './llm-planning';
|
|
|
9
9
|
export { callAiFn, adaptBboxToRect, } from './common';
|
|
10
10
|
export { vlmPlanning, resizeImageForUiTars } from './ui-tars-planning';
|
|
11
11
|
export { AIActionType, type AIArgs } from './common';
|
|
12
|
-
export { actionSpaceTypePrefix } from './common';
|
package/dist/types/types.d.ts
CHANGED
|
@@ -390,7 +390,6 @@ export type TUserPrompt = string | ({
|
|
|
390
390
|
} & Partial<TMultimodalPrompt>);
|
|
391
391
|
export interface DeviceAction<ParamType = any> {
|
|
392
392
|
name: string;
|
|
393
|
-
interfaceAlias?: string;
|
|
394
393
|
description?: string;
|
|
395
394
|
paramSchema?: string;
|
|
396
395
|
paramDescription?: string;
|
package/dist/types/yaml.d.ts
CHANGED
|
@@ -110,15 +110,16 @@ export interface MidsceneYamlFlowItemAIHover extends LocateOption {
|
|
|
110
110
|
aiHover: TUserPrompt;
|
|
111
111
|
}
|
|
112
112
|
export interface MidsceneYamlFlowItemAIInput extends LocateOption {
|
|
113
|
-
aiInput:
|
|
114
|
-
|
|
113
|
+
aiInput: string;
|
|
114
|
+
locate: TUserPrompt;
|
|
115
115
|
}
|
|
116
116
|
export interface MidsceneYamlFlowItemAIKeyboardPress extends LocateOption {
|
|
117
|
-
aiKeyboardPress:
|
|
118
|
-
|
|
117
|
+
aiKeyboardPress: string;
|
|
118
|
+
locate?: TUserPrompt;
|
|
119
119
|
}
|
|
120
120
|
export interface MidsceneYamlFlowItemAIScroll extends LocateOption, ScrollParam {
|
|
121
|
-
aiScroll:
|
|
121
|
+
aiScroll: null;
|
|
122
|
+
locate?: TUserPrompt;
|
|
122
123
|
}
|
|
123
124
|
export interface MidsceneYamlFlowItemEvaluateJavaScript {
|
|
124
125
|
javascript: string;
|
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.26.7-beta-
|
|
4
|
+
"version": "0.26.7-beta-20250818024834.0",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"main": "./dist/lib/index.js",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"langsmith": "0.3.7",
|
|
61
61
|
"openai": "4.81.0",
|
|
62
62
|
"socks-proxy-agent": "8.0.4",
|
|
63
|
-
"@midscene/recorder": "0.26.7-beta-
|
|
64
|
-
"@midscene/shared": "0.26.7-beta-
|
|
63
|
+
"@midscene/recorder": "0.26.7-beta-20250818024834.0",
|
|
64
|
+
"@midscene/shared": "0.26.7-beta-20250818024834.0"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@microsoft/api-extractor": "^7.52.10",
|