@midscene/core 1.0.1-beta-20251204032807.0 → 1.0.1-beta-20251204075416.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/tasks.mjs +5 -2
- package/dist/es/agent/tasks.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/ai-model/prompt/llm-planning.mjs +7 -94
- package/dist/es/ai-model/prompt/llm-planning.mjs.map +1 -1
- package/dist/es/ai-model/service-caller/index.mjs +1 -32
- package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/agent/tasks.js +5 -2
- package/dist/lib/agent/tasks.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/ai-model/prompt/llm-planning.js +7 -97
- package/dist/lib/ai-model/prompt/llm-planning.js.map +1 -1
- package/dist/lib/ai-model/service-caller/index.js +0 -34
- package/dist/lib/ai-model/service-caller/index.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/ai-model/prompt/llm-planning.d.ts +0 -2
- package/dist/types/ai-model/service-caller/index.d.ts +1 -3
- package/package.json +2 -2
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { DeviceAction } from '../../types';
|
|
2
2
|
import type { TVlModeTypes } from '@midscene/shared/env';
|
|
3
|
-
import type { ResponseFormatJSONSchema } from 'openai/resources/index';
|
|
4
3
|
export declare const descriptionForAction: (action: DeviceAction<any>, locatorSchemaTypeDescription: string) => string;
|
|
5
4
|
export declare function systemPromptToTaskPlanning({ actionSpace, vlMode, includeBbox, }: {
|
|
6
5
|
actionSpace: DeviceAction<any>[];
|
|
7
6
|
vlMode: TVlModeTypes | undefined;
|
|
8
7
|
includeBbox: boolean;
|
|
9
8
|
}): Promise<string>;
|
|
10
|
-
export declare const planSchema: ResponseFormatJSONSchema;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type AIUsageInfo } from '../../types';
|
|
2
2
|
import type { StreamingCallback } from '../../types';
|
|
3
3
|
import { type IModelConfig, type TVlModeTypes } from '@midscene/shared/env';
|
|
4
|
-
import OpenAI from 'openai';
|
|
5
4
|
import type { ChatCompletionMessageParam } from 'openai/resources/index';
|
|
6
|
-
import { AIActionType,
|
|
5
|
+
import type { AIActionType, AIArgs } from '../../common';
|
|
7
6
|
export declare function callAI(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType, modelConfig: IModelConfig, options?: {
|
|
8
7
|
stream?: boolean;
|
|
9
8
|
onChunk?: StreamingCallback;
|
|
@@ -12,7 +11,6 @@ export declare function callAI(messages: ChatCompletionMessageParam[], AIActionT
|
|
|
12
11
|
usage?: AIUsageInfo;
|
|
13
12
|
isStreamed: boolean;
|
|
14
13
|
}>;
|
|
15
|
-
export declare const getResponseFormat: (modelName: string, AIActionTypeValue: AIActionType) => OpenAI.ChatCompletionCreateParams["response_format"] | OpenAI.ResponseFormatJSONObject;
|
|
16
14
|
export declare function callAIWithObjectResponse<T>(messages: ChatCompletionMessageParam[], AIActionTypeValue: AIActionType, modelConfig: IModelConfig): Promise<{
|
|
17
15
|
content: T;
|
|
18
16
|
contentString: 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": "1.0.1-beta-
|
|
4
|
+
"version": "1.0.1-beta-20251204075416.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
|
"js-yaml": "4.1.0",
|
|
90
90
|
"zod": "3.24.3",
|
|
91
91
|
"socks-proxy-agent": "8.0.4",
|
|
92
|
-
"@midscene/shared": "1.0.1-beta-
|
|
92
|
+
"@midscene/shared": "1.0.1-beta-20251204075416.0"
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
95
|
"@rslib/core": "^0.18.2",
|