@midscene/core 1.1.1-beta-20260106151323.0 → 1.1.1-beta-20260107032519.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/agent/task-builder.mjs +1 -1
- package/dist/es/agent/task-builder.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/ai-model/index.mjs +2 -2
- package/dist/es/ai-model/inspect.mjs +5 -5
- package/dist/es/ai-model/inspect.mjs.map +1 -1
- package/dist/es/ai-model/llm-planning.mjs +2 -2
- package/dist/es/ai-model/llm-planning.mjs.map +1 -1
- package/dist/es/ai-model/prompt/playwright-generator.mjs +4 -4
- package/dist/es/ai-model/prompt/playwright-generator.mjs.map +1 -1
- package/dist/es/ai-model/prompt/yaml-generator.mjs +4 -4
- package/dist/es/ai-model/prompt/yaml-generator.mjs.map +1 -1
- package/dist/es/ai-model/service-caller/index.mjs +6 -7
- package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
- package/dist/es/ai-model/ui-tars-planning.mjs +1 -2
- package/dist/es/ai-model/ui-tars-planning.mjs.map +1 -1
- package/dist/es/common.mjs +2 -11
- package/dist/es/common.mjs.map +1 -1
- package/dist/es/device/index.mjs +1 -1
- package/dist/es/device/index.mjs.map +1 -1
- package/dist/es/service/index.mjs +2 -2
- package/dist/es/service/index.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/agent/task-builder.js +1 -1
- package/dist/lib/agent/task-builder.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/ai-model/index.js +11 -14
- package/dist/lib/ai-model/inspect.js +4 -4
- package/dist/lib/ai-model/inspect.js.map +1 -1
- package/dist/lib/ai-model/llm-planning.js +1 -1
- package/dist/lib/ai-model/llm-planning.js.map +1 -1
- package/dist/lib/ai-model/prompt/playwright-generator.js +3 -3
- package/dist/lib/ai-model/prompt/playwright-generator.js.map +1 -1
- package/dist/lib/ai-model/prompt/yaml-generator.js +3 -3
- package/dist/lib/ai-model/prompt/yaml-generator.js.map +1 -1
- package/dist/lib/ai-model/service-caller/index.js +6 -7
- package/dist/lib/ai-model/service-caller/index.js.map +1 -1
- package/dist/lib/ai-model/ui-tars-planning.js +1 -2
- package/dist/lib/ai-model/ui-tars-planning.js.map +1 -1
- package/dist/lib/common.js +2 -14
- package/dist/lib/common.js.map +1 -1
- package/dist/lib/device/index.js +1 -1
- package/dist/lib/device/index.js.map +1 -1
- package/dist/lib/service/index.js +1 -1
- package/dist/lib/service/index.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/ai-model/index.d.ts +1 -1
- package/dist/types/ai-model/service-caller/index.d.ts +4 -4
- package/dist/types/common.d.ts +0 -8
- package/package.json +2 -2
|
@@ -9,5 +9,5 @@ export { plan } from './llm-planning';
|
|
|
9
9
|
export { adaptBboxToRect } from '../common';
|
|
10
10
|
export { uiTarsPlanning, resizeImageForUiTars } from './ui-tars-planning';
|
|
11
11
|
export { ConversationHistory, type ConversationHistoryOptions, } from './conversation-history';
|
|
12
|
-
export {
|
|
12
|
+
export type { AIArgs } from '../common';
|
|
13
13
|
export { getMidsceneLocationSchema, type MidsceneLocationResultType, PointSchema, SizeSchema, RectSchema, TMultimodalPromptSchema, TUserPromptSchema, type TMultimodalPrompt, type TUserPrompt, findAllMidsceneLocatorField, dumpActionParam, loadActionParam, parseActionParam, } from '../common';
|
|
@@ -2,8 +2,8 @@ import { type AIUsageInfo, type DeepThinkOption } from '../../types';
|
|
|
2
2
|
import type { StreamingCallback } from '../../types';
|
|
3
3
|
import { type IModelConfig, type TVlModeTypes } from '@midscene/shared/env';
|
|
4
4
|
import type { ChatCompletionMessageParam } from 'openai/resources/index';
|
|
5
|
-
import type {
|
|
6
|
-
export declare function callAI(messages: ChatCompletionMessageParam[],
|
|
5
|
+
import type { AIArgs } from '../../common';
|
|
6
|
+
export declare function callAI(messages: ChatCompletionMessageParam[], modelConfig: IModelConfig, options?: {
|
|
7
7
|
stream?: boolean;
|
|
8
8
|
onChunk?: StreamingCallback;
|
|
9
9
|
deepThink?: DeepThinkOption;
|
|
@@ -13,7 +13,7 @@ export declare function callAI(messages: ChatCompletionMessageParam[], AIActionT
|
|
|
13
13
|
usage?: AIUsageInfo;
|
|
14
14
|
isStreamed: boolean;
|
|
15
15
|
}>;
|
|
16
|
-
export declare function callAIWithObjectResponse<T>(messages: ChatCompletionMessageParam[],
|
|
16
|
+
export declare function callAIWithObjectResponse<T>(messages: ChatCompletionMessageParam[], modelConfig: IModelConfig, options?: {
|
|
17
17
|
deepThink?: DeepThinkOption;
|
|
18
18
|
}): Promise<{
|
|
19
19
|
content: T;
|
|
@@ -21,7 +21,7 @@ export declare function callAIWithObjectResponse<T>(messages: ChatCompletionMess
|
|
|
21
21
|
usage?: AIUsageInfo;
|
|
22
22
|
reasoning_content?: string;
|
|
23
23
|
}>;
|
|
24
|
-
export declare function callAIWithStringResponse(msgs: AIArgs,
|
|
24
|
+
export declare function callAIWithStringResponse(msgs: AIArgs, modelConfig: IModelConfig): Promise<{
|
|
25
25
|
content: string;
|
|
26
26
|
usage?: AIUsageInfo;
|
|
27
27
|
}>;
|
package/dist/types/common.d.ts
CHANGED
|
@@ -4,14 +4,6 @@ import type { PlanningLocateParam } from './types';
|
|
|
4
4
|
import type { TVlModeTypes } from '@midscene/shared/env';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
export type AIArgs = ChatCompletionMessageParam[];
|
|
7
|
-
export declare enum AIActionType {
|
|
8
|
-
ASSERT = 0,
|
|
9
|
-
INSPECT_ELEMENT = 1,
|
|
10
|
-
EXTRACT_DATA = 2,
|
|
11
|
-
PLAN = 3,
|
|
12
|
-
DESCRIBE_ELEMENT = 4,
|
|
13
|
-
TEXT = 5
|
|
14
|
-
}
|
|
15
7
|
type AdaptBboxInput = number[] | string[] | string | (number[] | string[])[];
|
|
16
8
|
export declare function fillBboxParam(locate: PlanningLocateParam, width: number, height: number, rightLimit: number, bottomLimit: number, vlMode: TVlModeTypes | undefined): PlanningLocateParam;
|
|
17
9
|
export declare function adaptQwen2_5Bbox(bbox: number[]): [number, number, number, number];
|
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": "1.1.1-beta-
|
|
4
|
+
"version": "1.1.1-beta-20260107032519.0",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"main": "./dist/lib/index.js",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"semver": "7.5.2",
|
|
90
90
|
"js-yaml": "4.1.0",
|
|
91
91
|
"zod": "3.24.3",
|
|
92
|
-
"@midscene/shared": "1.1.1-beta-
|
|
92
|
+
"@midscene/shared": "1.1.1-beta-20260107032519.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@rslib/core": "^0.18.3",
|