@midscene/core 0.26.7-beta-20250821134240.0 → 0.27.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/service-caller/index.mjs +15 -7
- package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
- package/dist/es/ai-model/ui-tars-planning.mjs +25 -81
- package/dist/es/ai-model/ui-tars-planning.mjs.map +1 -1
- package/dist/es/insight/index.mjs +4 -4
- package/dist/es/insight/index.mjs.map +1 -1
- package/dist/es/types.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/ai-model/service-caller/index.js +15 -7
- package/dist/lib/ai-model/service-caller/index.js.map +1 -1
- package/dist/lib/ai-model/ui-tars-planning.js +25 -81
- package/dist/lib/ai-model/ui-tars-planning.js.map +1 -1
- package/dist/lib/insight/index.js +4 -4
- package/dist/lib/insight/index.js.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/ai-model/ui-tars-planning.d.ts +2 -9
- package/dist/types/types.d.ts +3 -2
- package/package.json +3 -3
|
@@ -2,7 +2,7 @@ import type { AIUsageInfo, MidsceneYamlFlowItem, PlanningAction, Size } from '..
|
|
|
2
2
|
import { type IModelPreferences } from '@midscene/shared/env';
|
|
3
3
|
import { actionParser } from '@ui-tars/action-parser';
|
|
4
4
|
import type { ChatCompletionMessageParam } from 'openai/resources/index';
|
|
5
|
-
type ActionType = 'click' | 'drag' | 'type' | 'hotkey' | 'finished' | 'scroll' | 'wait'
|
|
5
|
+
type ActionType = 'click' | 'drag' | 'type' | 'hotkey' | 'finished' | 'scroll' | 'wait';
|
|
6
6
|
export declare function vlmPlanning(options: {
|
|
7
7
|
userInstruction: string;
|
|
8
8
|
conversationHistory: ChatCompletionMessageParam[];
|
|
@@ -66,13 +66,6 @@ interface FinishedAction extends BaseAction {
|
|
|
66
66
|
action_type: 'finished';
|
|
67
67
|
action_inputs: Record<string, never>;
|
|
68
68
|
}
|
|
69
|
-
|
|
70
|
-
action_type: 'androidLongPress';
|
|
71
|
-
action_inputs: {
|
|
72
|
-
start_coords: [number, number];
|
|
73
|
-
duration?: number;
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
export type Action = ClickAction | DragAction | TypeAction | HotkeyAction | ScrollAction | FinishedAction | WaitAction | AndroidLongPressAction;
|
|
69
|
+
export type Action = ClickAction | DragAction | TypeAction | HotkeyAction | ScrollAction | FinishedAction | WaitAction;
|
|
77
70
|
export declare function resizeImageForUiTars(imageBase64: string, size: Size, modelPreferences: IModelPreferences): Promise<string>;
|
|
78
71
|
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export type AIUsageInfo = Record<string, any> & {
|
|
|
12
12
|
total_tokens: number | undefined;
|
|
13
13
|
time_cost: number | undefined;
|
|
14
14
|
model_name: string | undefined;
|
|
15
|
+
model_description: string | undefined;
|
|
16
|
+
intent: string | undefined;
|
|
15
17
|
};
|
|
16
18
|
/**
|
|
17
19
|
* openai
|
|
@@ -329,8 +331,7 @@ export type ExecutionTaskPlanning = ExecutionTask<ExecutionTaskPlanningApply>;
|
|
|
329
331
|
export interface GroupedActionDump {
|
|
330
332
|
groupName: string;
|
|
331
333
|
groupDescription?: string;
|
|
332
|
-
|
|
333
|
-
modelDescription: string;
|
|
334
|
+
modelBriefs: string[];
|
|
334
335
|
executions: ExecutionDump[];
|
|
335
336
|
}
|
|
336
337
|
export type PageType = 'puppeteer' | 'playwright' | 'static' | 'chrome-extension-proxy' | 'android';
|
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.27.0",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"main": "./dist/lib/index.js",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"openai": "4.81.0",
|
|
62
62
|
"socks-proxy-agent": "8.0.4",
|
|
63
63
|
"zod": "3.24.3",
|
|
64
|
-
"@midscene/recorder": "0.
|
|
65
|
-
"@midscene/shared": "0.
|
|
64
|
+
"@midscene/recorder": "0.27.0",
|
|
65
|
+
"@midscene/shared": "0.27.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@microsoft/api-extractor": "^7.52.10",
|