@midscene/core 1.9.8 → 1.10.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/agent.mjs +26 -94
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/prompt-context.mjs +14 -0
- package/dist/es/agent/prompt-context.mjs.map +1 -0
- package/dist/es/agent/run-gherkin-scenario.mjs +114 -0
- package/dist/es/agent/run-gherkin-scenario.mjs.map +1 -0
- package/dist/es/agent/task-builder.mjs +4 -4
- package/dist/es/agent/task-builder.mjs.map +1 -1
- package/dist/es/agent/tasks.mjs +4 -8
- package/dist/es/agent/tasks.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +15 -3
- package/dist/es/agent/utils.mjs.map +1 -1
- package/dist/es/ai-model/index.mjs +1 -2
- package/dist/es/ai-model/inspect.mjs +77 -50
- package/dist/es/ai-model/inspect.mjs.map +1 -1
- package/dist/es/ai-model/llm-planning.mjs +10 -26
- package/dist/es/ai-model/llm-planning.mjs.map +1 -1
- package/dist/es/ai-model/model-adapter/chat-completion.mjs +46 -0
- package/dist/es/ai-model/model-adapter/chat-completion.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/index.mjs +2 -0
- package/dist/es/ai-model/model-adapter/locate.mjs +33 -0
- package/dist/es/ai-model/model-adapter/locate.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/planning.mjs +44 -0
- package/dist/es/ai-model/model-adapter/planning.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/resolve.mjs +43 -0
- package/dist/es/ai-model/model-adapter/resolve.mjs.map +1 -0
- package/dist/es/ai-model/model-adapter/types.mjs +0 -0
- package/dist/es/ai-model/models/auto-glm/actions.mjs +19 -31
- package/dist/es/ai-model/models/auto-glm/actions.mjs.map +1 -1
- package/dist/es/ai-model/models/auto-glm/adapter.mjs +8 -16
- package/dist/es/ai-model/models/auto-glm/adapter.mjs.map +1 -1
- package/dist/es/ai-model/models/auto-glm/locate.mjs +6 -108
- package/dist/es/ai-model/models/auto-glm/locate.mjs.map +1 -1
- package/dist/es/ai-model/models/auto-glm/parser.mjs +19 -41
- package/dist/es/ai-model/models/auto-glm/parser.mjs.map +1 -1
- package/dist/es/ai-model/models/auto-glm/planning.mjs +27 -70
- package/dist/es/ai-model/models/auto-glm/planning.mjs.map +1 -1
- package/dist/es/ai-model/models/default.mjs.map +1 -1
- package/dist/es/ai-model/models/doubao.mjs.map +1 -1
- package/dist/es/ai-model/models/gemini.mjs +1 -1
- package/dist/es/ai-model/models/gemini.mjs.map +1 -1
- package/dist/es/ai-model/models/glm.mjs.map +1 -1
- package/dist/es/ai-model/models/gpt.mjs.map +1 -1
- package/dist/es/ai-model/models/kimi.mjs.map +1 -1
- package/dist/es/ai-model/models/mimo.mjs.map +1 -1
- package/dist/es/ai-model/models/qwen.mjs.map +1 -1
- package/dist/es/ai-model/models/registry.mjs +1 -1
- package/dist/es/ai-model/models/registry.mjs.map +1 -1
- package/dist/es/ai-model/models/ui-tars/actions.mjs +147 -0
- package/dist/es/ai-model/models/ui-tars/actions.mjs.map +1 -0
- package/dist/es/ai-model/models/ui-tars/adapter.mjs +2 -2
- package/dist/es/ai-model/models/ui-tars/adapter.mjs.map +1 -1
- package/dist/es/ai-model/models/ui-tars/parser.mjs +40 -0
- package/dist/es/ai-model/models/ui-tars/parser.mjs.map +1 -0
- package/dist/es/ai-model/models/ui-tars/planning.mjs +19 -230
- package/dist/es/ai-model/models/ui-tars/planning.mjs.map +1 -1
- package/dist/es/ai-model/{prompt/ui-tars-planning.mjs → models/ui-tars/prompt.mjs} +1 -1
- package/dist/es/ai-model/models/ui-tars/prompt.mjs.map +1 -0
- package/dist/es/ai-model/service-caller/index.mjs +1 -3
- package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
- package/dist/es/ai-model/shared/model-locate-result/coordinate-distance.mjs +10 -0
- package/dist/es/ai-model/shared/model-locate-result/coordinate-distance.mjs.map +1 -0
- package/dist/es/ai-model/shared/model-locate-result/factory.mjs +1 -3
- package/dist/es/ai-model/shared/model-locate-result/factory.mjs.map +1 -1
- package/dist/es/ai-model/shared/model-locate-result/index.mjs +3 -2
- package/dist/es/ai-model/shared/planning-action.mjs +6 -0
- package/dist/es/ai-model/shared/planning-action.mjs.map +1 -0
- package/dist/es/ai-model/workflows/inspect/planning-action-locate.mjs +95 -0
- package/dist/es/ai-model/workflows/inspect/planning-action-locate.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/custom-planning.mjs +126 -0
- package/dist/es/ai-model/workflows/planning/custom-planning.mjs.map +1 -0
- package/dist/es/ai-model/workflows/planning/locate-normalization.mjs +31 -0
- package/dist/es/ai-model/workflows/planning/locate-normalization.mjs.map +1 -0
- package/dist/es/common.mjs +10 -6
- package/dist/es/common.mjs.map +1 -1
- package/dist/es/element-describer.mjs +180 -0
- package/dist/es/element-describer.mjs.map +1 -0
- package/dist/es/index.mjs +2 -1
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/report-generator.mjs +3 -5
- package/dist/es/report-generator.mjs.map +1 -1
- package/dist/es/service/index.mjs +3 -2
- package/dist/es/service/index.mjs.map +1 -1
- package/dist/es/skill/index.mjs +1 -1
- package/dist/es/skill/index.mjs.map +1 -1
- package/dist/es/types.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/es/yaml/player.mjs +7 -0
- package/dist/es/yaml/player.mjs.map +1 -1
- package/dist/lib/agent/agent.js +25 -93
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/{ai-model/models/chat-content.js → agent/prompt-context.js} +13 -13
- package/dist/lib/agent/prompt-context.js.map +1 -0
- package/dist/lib/agent/run-gherkin-scenario.js +151 -0
- package/dist/lib/agent/run-gherkin-scenario.js.map +1 -0
- package/dist/lib/agent/task-builder.js +4 -4
- package/dist/lib/agent/task-builder.js.map +1 -1
- package/dist/lib/agent/tasks.js +4 -8
- package/dist/lib/agent/tasks.js.map +1 -1
- package/dist/lib/agent/utils.js +14 -2
- package/dist/lib/agent/utils.js.map +1 -1
- package/dist/lib/ai-model/index.js +0 -10
- package/dist/lib/ai-model/inspect.js +77 -50
- package/dist/lib/ai-model/inspect.js.map +1 -1
- package/dist/lib/ai-model/llm-planning.js +9 -25
- package/dist/lib/ai-model/llm-planning.js.map +1 -1
- package/dist/lib/ai-model/model-adapter/chat-completion.js +83 -0
- package/dist/lib/ai-model/model-adapter/chat-completion.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/custom-planning-types.js +20 -0
- package/dist/lib/ai-model/model-adapter/custom-planning-types.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/index.js +38 -0
- package/dist/lib/ai-model/model-adapter/index.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/locate.js +67 -0
- package/dist/lib/ai-model/model-adapter/locate.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/planning.js +81 -0
- package/dist/lib/ai-model/model-adapter/planning.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/resolve.js +77 -0
- package/dist/lib/ai-model/model-adapter/resolve.js.map +1 -0
- package/dist/lib/ai-model/model-adapter/types.js.map +1 -0
- package/dist/lib/ai-model/models/auto-glm/actions.js +19 -31
- package/dist/lib/ai-model/models/auto-glm/actions.js.map +1 -1
- package/dist/lib/ai-model/models/auto-glm/adapter.js +6 -14
- package/dist/lib/ai-model/models/auto-glm/adapter.js.map +1 -1
- package/dist/lib/ai-model/models/auto-glm/locate.js +8 -110
- package/dist/lib/ai-model/models/auto-glm/locate.js.map +1 -1
- package/dist/lib/ai-model/models/auto-glm/parser.js +24 -46
- package/dist/lib/ai-model/models/auto-glm/parser.js.map +1 -1
- package/dist/lib/ai-model/models/auto-glm/planning.js +28 -71
- package/dist/lib/ai-model/models/auto-glm/planning.js.map +1 -1
- package/dist/lib/ai-model/models/default.js.map +1 -1
- package/dist/lib/ai-model/models/doubao.js.map +1 -1
- package/dist/lib/ai-model/models/gemini.js +2 -2
- package/dist/lib/ai-model/models/gemini.js.map +1 -1
- package/dist/lib/ai-model/models/glm.js.map +1 -1
- package/dist/lib/ai-model/models/gpt.js.map +1 -1
- package/dist/lib/ai-model/models/kimi.js.map +1 -1
- package/dist/lib/ai-model/models/mimo.js.map +1 -1
- package/dist/lib/ai-model/models/qwen.js.map +1 -1
- package/dist/lib/ai-model/models/registry.js +2 -2
- package/dist/lib/ai-model/models/registry.js.map +1 -1
- package/dist/lib/ai-model/models/ui-tars/actions.js +181 -0
- package/dist/lib/ai-model/models/ui-tars/actions.js.map +1 -0
- package/dist/lib/ai-model/models/ui-tars/adapter.js +1 -1
- package/dist/lib/ai-model/models/ui-tars/adapter.js.map +1 -1
- package/dist/lib/ai-model/models/ui-tars/parser.js +74 -0
- package/dist/lib/ai-model/models/ui-tars/parser.js.map +1 -0
- package/dist/lib/ai-model/models/ui-tars/planning.js +21 -232
- package/dist/lib/ai-model/models/ui-tars/planning.js.map +1 -1
- package/dist/lib/ai-model/{prompt/ui-tars-planning.js → models/ui-tars/prompt.js} +1 -1
- package/dist/lib/ai-model/models/ui-tars/prompt.js.map +1 -0
- package/dist/lib/ai-model/service-caller/index.js +1 -3
- package/dist/lib/ai-model/service-caller/index.js.map +1 -1
- package/dist/lib/ai-model/shared/model-locate-result/coordinate-distance.js +44 -0
- package/dist/lib/ai-model/shared/model-locate-result/coordinate-distance.js.map +1 -0
- package/dist/lib/ai-model/shared/model-locate-result/factory.js +5 -4
- package/dist/lib/ai-model/shared/model-locate-result/factory.js.map +1 -1
- package/dist/lib/ai-model/shared/model-locate-result/index.js +7 -0
- package/dist/lib/ai-model/shared/planning-action.js +40 -0
- package/dist/lib/ai-model/shared/planning-action.js.map +1 -0
- package/dist/lib/ai-model/workflows/inspect/planning-action-locate.js +129 -0
- package/dist/lib/ai-model/workflows/inspect/planning-action-locate.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/custom-planning.js +163 -0
- package/dist/lib/ai-model/workflows/planning/custom-planning.js.map +1 -0
- package/dist/lib/ai-model/workflows/planning/locate-normalization.js +65 -0
- package/dist/lib/ai-model/workflows/planning/locate-normalization.js.map +1 -0
- package/dist/lib/common.js +13 -6
- package/dist/lib/common.js.map +1 -1
- package/dist/lib/element-describer.js +223 -0
- package/dist/lib/element-describer.js.map +1 -0
- package/dist/lib/index.js +14 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/report-generator.js +4 -6
- package/dist/lib/report-generator.js.map +1 -1
- package/dist/lib/service/index.js +3 -2
- package/dist/lib/service/index.js.map +1 -1
- package/dist/lib/skill/index.js +1 -1
- package/dist/lib/skill/index.js.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/lib/yaml/player.js +7 -0
- package/dist/lib/yaml/player.js.map +1 -1
- package/dist/types/agent/agent.d.ts +4 -18
- package/dist/types/agent/index.d.ts +3 -2
- package/dist/types/agent/prompt-context.d.ts +2 -0
- package/dist/types/agent/run-gherkin-scenario.d.ts +26 -0
- package/dist/types/agent/tasks.d.ts +3 -1
- package/dist/types/ai-model/index.d.ts +0 -2
- package/dist/types/ai-model/inspect.d.ts +3 -2
- package/dist/types/ai-model/model-adapter/chat-completion.d.ts +3 -0
- package/dist/types/ai-model/model-adapter/custom-planning-types.d.ts +32 -0
- package/dist/types/ai-model/model-adapter/index.d.ts +2 -0
- package/dist/types/ai-model/model-adapter/locate.d.ts +3 -0
- package/dist/types/ai-model/model-adapter/planning.d.ts +4 -0
- package/dist/types/ai-model/{models → model-adapter}/types.d.ts +39 -4
- package/dist/types/ai-model/models/auto-glm/actions.d.ts +8 -5
- package/dist/types/ai-model/models/auto-glm/adapter.d.ts +1 -1
- package/dist/types/ai-model/models/auto-glm/locate.d.ts +2 -3
- package/dist/types/ai-model/models/auto-glm/parser.d.ts +6 -10
- package/dist/types/ai-model/models/auto-glm/planning.d.ts +5 -4
- package/dist/types/ai-model/models/default.d.ts +1 -1
- package/dist/types/ai-model/models/doubao.d.ts +1 -1
- package/dist/types/ai-model/models/gemini.d.ts +1 -1
- package/dist/types/ai-model/models/glm.d.ts +1 -1
- package/dist/types/ai-model/models/gpt.d.ts +1 -1
- package/dist/types/ai-model/models/index.d.ts +1 -1
- package/dist/types/ai-model/models/kimi.d.ts +1 -1
- package/dist/types/ai-model/models/mimo.d.ts +1 -1
- package/dist/types/ai-model/models/qwen.d.ts +1 -1
- package/dist/types/ai-model/models/registry.d.ts +10 -10
- package/dist/types/ai-model/models/ui-tars/actions.d.ts +3 -0
- package/dist/types/ai-model/models/ui-tars/adapter.d.ts +1 -1
- package/dist/types/ai-model/models/ui-tars/parser.d.ts +72 -0
- package/dist/types/ai-model/models/ui-tars/planning.d.ts +3 -68
- package/dist/types/ai-model/service-caller/index.d.ts +4 -5
- package/dist/types/ai-model/shared/model-locate-result/coordinate-distance.d.ts +4 -0
- package/dist/types/ai-model/shared/model-locate-result/factory.d.ts +2 -1
- package/dist/types/ai-model/shared/model-locate-result/index.d.ts +4 -2
- package/dist/types/ai-model/shared/model-locate-result/types.d.ts +0 -1
- package/dist/types/ai-model/shared/planning-action.d.ts +20 -0
- package/dist/types/ai-model/workflows/inspect/planning-action-locate.d.ts +4 -0
- package/dist/types/ai-model/workflows/inspect/types.d.ts +21 -2
- package/dist/types/ai-model/workflows/planning/custom-planning.d.ts +7 -0
- package/dist/types/ai-model/workflows/planning/locate-normalization.d.ts +9 -0
- package/dist/types/common.d.ts +1 -0
- package/dist/types/device/index.d.ts +17 -17
- package/dist/types/element-describer.d.ts +46 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/service/index.d.ts +3 -1
- package/dist/types/types.d.ts +5 -0
- package/dist/types/yaml.d.ts +4 -1
- package/package.json +3 -3
- package/dist/es/ai-model/models/chat-content.mjs +0 -14
- package/dist/es/ai-model/models/chat-content.mjs.map +0 -1
- package/dist/es/ai-model/models/resolved.mjs +0 -107
- package/dist/es/ai-model/models/resolved.mjs.map +0 -1
- package/dist/es/ai-model/prompt/recorder-ui-describer.mjs +0 -56
- package/dist/es/ai-model/prompt/recorder-ui-describer.mjs.map +0 -1
- package/dist/es/ai-model/prompt/ui-tars-planning.mjs.map +0 -1
- package/dist/es/recorder-ui-describer.mjs +0 -379
- package/dist/es/recorder-ui-describer.mjs.map +0 -1
- package/dist/lib/ai-model/models/chat-content.js.map +0 -1
- package/dist/lib/ai-model/models/resolved.js +0 -141
- package/dist/lib/ai-model/models/resolved.js.map +0 -1
- package/dist/lib/ai-model/models/types.js.map +0 -1
- package/dist/lib/ai-model/prompt/recorder-ui-describer.js +0 -90
- package/dist/lib/ai-model/prompt/recorder-ui-describer.js.map +0 -1
- package/dist/lib/ai-model/prompt/ui-tars-planning.js.map +0 -1
- package/dist/lib/recorder-ui-describer.js +0 -419
- package/dist/lib/recorder-ui-describer.js.map +0 -1
- package/dist/types/ai-model/models/chat-content.d.ts +0 -2
- package/dist/types/ai-model/prompt/recorder-ui-describer.d.ts +0 -1
- package/dist/types/recorder-ui-describer.d.ts +0 -20
- /package/dist/es/ai-model/{models/types.mjs → model-adapter/custom-planning-types.mjs} +0 -0
- /package/dist/lib/ai-model/{models → model-adapter}/types.js +0 -0
- /package/dist/types/ai-model/{models/resolved.d.ts → model-adapter/resolve.d.ts} +0 -0
- /package/dist/types/ai-model/{prompt/ui-tars-planning.d.ts → models/ui-tars/prompt.d.ts} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
1
|
+
import type { CustomPlanningDefinition } from '../../model-adapter/custom-planning-types';
|
|
2
|
+
import { parseAutoGLMPlanningResponse } from './parser';
|
|
3
|
+
type AutoGLMParsedResponse = ReturnType<typeof parseAutoGLMPlanningResponse>;
|
|
4
|
+
export declare function createAutoGlmPlanner(isMultilingual: boolean): CustomPlanningDefinition<AutoGLMParsedResponse>;
|
|
5
|
+
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { ModelAdapterDefinition } from '
|
|
1
|
+
import type { ModelAdapterDefinition } from '../model-adapter/types';
|
|
2
2
|
export declare const defaultOpenAICompatibleAdapterConfig: ModelAdapterDefinition;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { JsonParserContext, JsonParserSource, ModelAdapterDefinition } from '../model-adapter/types';
|
|
1
2
|
import { type LocateResultValue } from '../shared/model-locate-result';
|
|
2
|
-
import type { JsonParserContext, JsonParserSource, ModelAdapterDefinition } from './types';
|
|
3
3
|
export declare function normalizeDoubaoJsonObject(obj: any, context?: Pick<JsonParserContext, 'preserveStringValueKeys'>): any;
|
|
4
4
|
export declare function shouldRepairDoubaoLocateJson(source: JsonParserSource): source is "planning-action-param" | "locate" | "section-locator";
|
|
5
5
|
export declare function preprocessDoubaoLocateJson(input: string): string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type OpenAI from 'openai';
|
|
2
|
-
import type { ChatCompletionCallContext, ChatCompletionContentSource, ChatCompletionParamsResult, ContentAndReasoning } from '
|
|
2
|
+
import type { ChatCompletionCallContext, ChatCompletionContentSource, ChatCompletionParamsResult, ContentAndReasoning } from '../model-adapter/types';
|
|
3
3
|
type GeminiContentPart = Record<string, unknown> & {
|
|
4
4
|
text?: string;
|
|
5
5
|
thought?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChatCompletionCallContext, ChatCompletionParamsResult, ImageDetail } from '
|
|
1
|
+
import type { ChatCompletionCallContext, ChatCompletionParamsResult, ImageDetail } from '../model-adapter/types';
|
|
2
2
|
export declare const gptAdapters: {
|
|
3
3
|
'gpt-5': {
|
|
4
4
|
chatCompletion: {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { getModelAdapter, getModelRuntime, } from './registry';
|
|
2
|
-
export type { ModelRuntime } from '
|
|
2
|
+
export type { ModelRuntime } from '../model-adapter/types';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { ChatCompletionCallContext, ChatCompletionParamsResult, ModelAdapterDefinition } from '../model-adapter/types';
|
|
1
2
|
import { type LocateResultValue, type PixelBbox } from '../shared/model-locate-result';
|
|
2
|
-
import type { ChatCompletionCallContext, ChatCompletionParamsResult, ModelAdapterDefinition } from './types';
|
|
3
3
|
declare function parseQwen25RawLocateValue(input: unknown): LocateResultValue;
|
|
4
4
|
declare function normalizeQwen25ResultToPixelBbox(result: LocateResultValue): PixelBbox;
|
|
5
5
|
export declare const qwenAdapters: {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { IModelConfig, TModelFamily } from '@midscene/shared/env';
|
|
2
|
-
import type { ModelAdapter, ModelAdapterDefinition, ModelRuntime } from '
|
|
2
|
+
import type { ModelAdapter, ModelAdapterDefinition, ModelRuntime } from '../model-adapter/types';
|
|
3
3
|
export declare const MODEL_ADAPTER_CONFIGS: {
|
|
4
4
|
'xiaomi-mimo': {
|
|
5
5
|
chatCompletion: {
|
|
6
6
|
unsupportedUserConfig: ("reasoningEffort" | "reasoningBudget")[];
|
|
7
|
-
buildChatCompletionParams: (input: import("
|
|
7
|
+
buildChatCompletionParams: (input: import("../model-adapter/types").ChatCompletionCallContext) => import("../model-adapter/types").ChatCompletionParamsResult;
|
|
8
8
|
};
|
|
9
9
|
};
|
|
10
10
|
kimi: {
|
|
11
11
|
chatCompletion: {
|
|
12
12
|
unsupportedUserConfig: ("reasoningEffort" | "reasoningBudget")[];
|
|
13
|
-
buildChatCompletionParams: (input: import("
|
|
13
|
+
buildChatCompletionParams: (input: import("../model-adapter/types").ChatCompletionCallContext) => import("../model-adapter/types").ChatCompletionParamsResult;
|
|
14
14
|
};
|
|
15
15
|
locate: {
|
|
16
16
|
resultAdapter: {
|
|
@@ -25,8 +25,8 @@ export declare const MODEL_ADAPTER_CONFIGS: {
|
|
|
25
25
|
'gpt-5': {
|
|
26
26
|
chatCompletion: {
|
|
27
27
|
unsupportedUserConfig: "reasoningBudget"[];
|
|
28
|
-
buildChatCompletionParams: (input: import("
|
|
29
|
-
resolveImageDetail: (input: import("
|
|
28
|
+
buildChatCompletionParams: (input: import("../model-adapter/types").ChatCompletionCallContext) => import("../model-adapter/types").ChatCompletionParamsResult;
|
|
29
|
+
resolveImageDetail: (input: import("../model-adapter/types").ChatCompletionCallContext) => import("../model-adapter/types").ImageDetail | undefined;
|
|
30
30
|
};
|
|
31
31
|
locate: {
|
|
32
32
|
resultAdapter: {
|
|
@@ -42,7 +42,7 @@ export declare const MODEL_ADAPTER_CONFIGS: {
|
|
|
42
42
|
'glm-v': {
|
|
43
43
|
chatCompletion: {
|
|
44
44
|
unsupportedUserConfig: ("reasoningEffort" | "reasoningBudget")[];
|
|
45
|
-
buildChatCompletionParams: (input: import("
|
|
45
|
+
buildChatCompletionParams: (input: import("../model-adapter/types").ChatCompletionCallContext) => import("../model-adapter/types").ChatCompletionParamsResult;
|
|
46
46
|
};
|
|
47
47
|
locate: {
|
|
48
48
|
resultAdapter: {
|
|
@@ -60,8 +60,8 @@ export declare const MODEL_ADAPTER_CONFIGS: {
|
|
|
60
60
|
gemini: {
|
|
61
61
|
chatCompletion: {
|
|
62
62
|
unsupportedUserConfig: ("reasoningEnabled" | "reasoningBudget")[];
|
|
63
|
-
buildChatCompletionParams: (input: import("
|
|
64
|
-
extractContentAndReasoning: (message: (import("
|
|
63
|
+
buildChatCompletionParams: (input: import("../model-adapter/types").ChatCompletionCallContext) => import("../model-adapter/types").ChatCompletionParamsResult;
|
|
64
|
+
extractContentAndReasoning: (message: (import("../model-adapter/types").ChatCompletionContentSource | (Omit<import("openai/resources/index.mjs").ChatCompletionMessage, "content"> & {
|
|
65
65
|
content: string | null | (Record<string, unknown> & {
|
|
66
66
|
text?: string;
|
|
67
67
|
thought?: boolean;
|
|
@@ -75,7 +75,7 @@ export declare const MODEL_ADAPTER_CONFIGS: {
|
|
|
75
75
|
})[];
|
|
76
76
|
reasoning_content?: string;
|
|
77
77
|
extra_content?: unknown;
|
|
78
|
-
})) | undefined) => import("
|
|
78
|
+
})) | undefined) => import("../model-adapter/types").ContentAndReasoning;
|
|
79
79
|
};
|
|
80
80
|
locate: {
|
|
81
81
|
resultAdapter: {
|
|
@@ -92,7 +92,7 @@ export declare const MODEL_ADAPTER_CONFIGS: {
|
|
|
92
92
|
'qwen2.5-vl': {
|
|
93
93
|
chatCompletion: {
|
|
94
94
|
unsupportedUserConfig: ("reasoningEnabled" | "reasoningEffort" | "reasoningBudget")[];
|
|
95
|
-
buildChatCompletionParams: (input: import("
|
|
95
|
+
buildChatCompletionParams: (input: import("../model-adapter/types").ChatCompletionCallContext) => import("../model-adapter/types").ChatCompletionParamsResult;
|
|
96
96
|
};
|
|
97
97
|
imagePreprocess: {
|
|
98
98
|
padBlockSize: number;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { Size } from '../../../types';
|
|
2
|
+
import type { UITarsModelVersion } from '@midscene/shared/env';
|
|
3
|
+
import { actionParser } from '@ui-tars/action-parser';
|
|
4
|
+
type ActionType = 'click' | 'left_double' | 'right_single' | 'drag' | 'type' | 'hotkey' | 'finished' | 'scroll' | 'wait';
|
|
5
|
+
export interface UiTarsParsedPlanningResponse {
|
|
6
|
+
rawResponse: string;
|
|
7
|
+
actions: ReturnType<typeof actionParser>['parsed'];
|
|
8
|
+
}
|
|
9
|
+
export declare function parseUiTarsPlanningResponse(rawResponse: string, shotSize: Size, uiTarsModelVersion: UITarsModelVersion): UiTarsParsedPlanningResponse;
|
|
10
|
+
interface BaseAction {
|
|
11
|
+
action_type: ActionType;
|
|
12
|
+
action_inputs: Record<string, any>;
|
|
13
|
+
reflection: string | null;
|
|
14
|
+
thought: string | null;
|
|
15
|
+
}
|
|
16
|
+
interface ClickAction extends BaseAction {
|
|
17
|
+
action_type: 'click';
|
|
18
|
+
action_inputs: {
|
|
19
|
+
start_box: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
interface DragAction extends BaseAction {
|
|
23
|
+
action_type: 'drag';
|
|
24
|
+
action_inputs: {
|
|
25
|
+
start_box: string;
|
|
26
|
+
end_box: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
interface WaitAction extends BaseAction {
|
|
30
|
+
action_type: 'wait';
|
|
31
|
+
action_inputs: {
|
|
32
|
+
time: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
interface LeftDoubleAction extends BaseAction {
|
|
36
|
+
action_type: 'left_double';
|
|
37
|
+
action_inputs: {
|
|
38
|
+
start_box: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
interface RightSingleAction extends BaseAction {
|
|
42
|
+
action_type: 'right_single';
|
|
43
|
+
action_inputs: {
|
|
44
|
+
start_box: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
interface TypeAction extends BaseAction {
|
|
48
|
+
action_type: 'type';
|
|
49
|
+
action_inputs: {
|
|
50
|
+
content: string;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
interface HotkeyAction extends BaseAction {
|
|
54
|
+
action_type: 'hotkey';
|
|
55
|
+
action_inputs: {
|
|
56
|
+
key: string;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
interface ScrollAction extends BaseAction {
|
|
60
|
+
action_type: 'scroll';
|
|
61
|
+
action_inputs: {
|
|
62
|
+
direction: 'up' | 'down';
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
interface FinishedAction extends BaseAction {
|
|
66
|
+
action_type: 'finished';
|
|
67
|
+
action_inputs: {
|
|
68
|
+
content?: string;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export type Action = ClickAction | LeftDoubleAction | RightSingleAction | DragAction | TypeAction | HotkeyAction | ScrollAction | FinishedAction | WaitAction;
|
|
72
|
+
export {};
|
|
@@ -1,69 +1,4 @@
|
|
|
1
|
-
import { type TUserPrompt } from '../../../common';
|
|
2
|
-
import type { PlanningAIResponse } from '../../../types';
|
|
3
1
|
import type { UITarsModelVersion } from '@midscene/shared/env';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
export declare function
|
|
7
|
-
interface BaseAction {
|
|
8
|
-
action_type: ActionType;
|
|
9
|
-
action_inputs: Record<string, any>;
|
|
10
|
-
reflection: string | null;
|
|
11
|
-
thought: string | null;
|
|
12
|
-
}
|
|
13
|
-
interface ClickAction extends BaseAction {
|
|
14
|
-
action_type: 'click';
|
|
15
|
-
action_inputs: {
|
|
16
|
-
start_box: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
interface DragAction extends BaseAction {
|
|
20
|
-
action_type: 'drag';
|
|
21
|
-
action_inputs: {
|
|
22
|
-
start_box: string;
|
|
23
|
-
end_box: string;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
interface WaitAction extends BaseAction {
|
|
27
|
-
action_type: 'wait';
|
|
28
|
-
action_inputs: {
|
|
29
|
-
time: string;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
interface LeftDoubleAction extends BaseAction {
|
|
33
|
-
action_type: 'left_double';
|
|
34
|
-
action_inputs: {
|
|
35
|
-
start_box: string;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
interface RightSingleAction extends BaseAction {
|
|
39
|
-
action_type: 'right_single';
|
|
40
|
-
action_inputs: {
|
|
41
|
-
start_box: string;
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
interface TypeAction extends BaseAction {
|
|
45
|
-
action_type: 'type';
|
|
46
|
-
action_inputs: {
|
|
47
|
-
content: string;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
interface HotkeyAction extends BaseAction {
|
|
51
|
-
action_type: 'hotkey';
|
|
52
|
-
action_inputs: {
|
|
53
|
-
key: string;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
interface ScrollAction extends BaseAction {
|
|
57
|
-
action_type: 'scroll';
|
|
58
|
-
action_inputs: {
|
|
59
|
-
direction: 'up' | 'down';
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
interface FinishedAction extends BaseAction {
|
|
63
|
-
action_type: 'finished';
|
|
64
|
-
action_inputs: {
|
|
65
|
-
content?: string;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export type Action = ClickAction | LeftDoubleAction | RightSingleAction | DragAction | TypeAction | HotkeyAction | ScrollAction | FinishedAction | WaitAction;
|
|
69
|
-
export {};
|
|
2
|
+
import type { CustomPlanningDefinition } from '../../model-adapter/custom-planning-types';
|
|
3
|
+
import { type UiTarsParsedPlanningResponse } from './parser';
|
|
4
|
+
export declare function createUiTarsPlanner(uiTarsModelVersion: UITarsModelVersion): CustomPlanningDefinition<UiTarsParsedPlanningResponse>;
|
|
@@ -26,12 +26,13 @@ export declare function createChatClient({ modelConfig, }: {
|
|
|
26
26
|
modelDescription: string;
|
|
27
27
|
modelFamily: TModelFamily | undefined;
|
|
28
28
|
}>;
|
|
29
|
-
|
|
29
|
+
interface CallAIOptions {
|
|
30
30
|
stream?: boolean;
|
|
31
31
|
onChunk?: StreamingCallback;
|
|
32
32
|
abortSignal?: AbortSignal;
|
|
33
33
|
requiresOriginalImageDetail?: boolean;
|
|
34
|
-
}
|
|
34
|
+
}
|
|
35
|
+
export declare function callAI(messages: ChatCompletionMessageParam[], modelRuntime: ModelRuntime, options?: CallAIOptions): Promise<{
|
|
35
36
|
content: string;
|
|
36
37
|
reasoning_content?: string;
|
|
37
38
|
rawChoiceMessage?: unknown;
|
|
@@ -48,9 +49,7 @@ export declare function callAIWithObjectResponse<T>(messages: ChatCompletionMess
|
|
|
48
49
|
reasoning_content?: string;
|
|
49
50
|
rawChoiceMessage?: unknown;
|
|
50
51
|
}>;
|
|
51
|
-
export declare function callAIWithStringResponse(msgs: AIArgs, modelRuntime: ModelRuntime, options?: {
|
|
52
|
-
abortSignal?: AbortSignal;
|
|
53
|
-
}): Promise<{
|
|
52
|
+
export declare function callAIWithStringResponse(msgs: AIArgs, modelRuntime: ModelRuntime, options?: Pick<CallAIOptions, 'abortSignal' | 'requiresOriginalImageDetail'>): Promise<{
|
|
54
53
|
content: string;
|
|
55
54
|
usage?: AIUsageInfo;
|
|
56
55
|
rawChoiceMessage?: unknown;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Size } from '../../../types';
|
|
2
|
+
import type { ResolvedLocateResultCoordinates } from './types';
|
|
3
|
+
export type CoordinateDistanceAxis = 'x' | 'y';
|
|
4
|
+
export declare function createCoordinateDistanceToPixels(size: Size, coordinateSystem: ResolvedLocateResultCoordinates): (delta: number, axis: CoordinateDistanceAxis) => number;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import type { LocateResultAdapter, LocateResultAdapterDefinition } from './types';
|
|
1
|
+
import type { LocateResultAdapter, LocateResultAdapterDefinition, LocateResultCoordinates, ResolvedLocateResultCoordinates } from './types';
|
|
2
|
+
export declare function resolveLocateResultCoordinates(coordinates: LocateResultCoordinates): ResolvedLocateResultCoordinates;
|
|
2
3
|
export declare function createLocateResultAdapter(config: LocateResultAdapterDefinition): LocateResultAdapter;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
export { createLocateResultAdapter } from './factory';
|
|
1
|
+
export { createLocateResultAdapter, resolveLocateResultCoordinates, } from './factory';
|
|
2
|
+
export { createCoordinateDistanceToPixels } from './coordinate-distance';
|
|
3
|
+
export type { CoordinateDistanceAxis } from './coordinate-distance';
|
|
2
4
|
export { unwrapCoordinateListLikeInput } from './parse';
|
|
3
|
-
export type { LocateResultBbox, PixelBbox, RawLocateValue, SectionLocatePixelBboxGroup, CustomLocateResultAdapterDefinition, LocateResultAdapter, LocateResultAdapterDefinition, LocateResultCoordinates, LocateResultContext, LocateResultShape, LocateResultPromptSpec, LocateResultValue, NonEmptyArray, StandardLocateResultAdapterDefinition, } from './types';
|
|
5
|
+
export type { LocateResultBbox, PixelBbox, RawLocateValue, SectionLocatePixelBboxGroup, CustomLocateResultAdapterDefinition, LocateResultAdapter, LocateResultAdapterDefinition, LocateResultCoordinates, LocateResultContext, LocateResultShape, LocateResultPromptSpec, LocateResultValue, NonEmptyArray, ResolvedLocateResultCoordinates, StandardLocateResultAdapterDefinition, } from './types';
|
|
@@ -35,7 +35,6 @@ export interface SectionLocatePixelBboxGroup {
|
|
|
35
35
|
references?: PixelBbox[];
|
|
36
36
|
}
|
|
37
37
|
export interface LocateResultAdapter {
|
|
38
|
-
kind: 'standard' | 'custom';
|
|
39
38
|
promptSpec: LocateResultPromptSpec;
|
|
40
39
|
/**
|
|
41
40
|
* Converts a locate payload to a pixel bbox. This adapter intentionally does
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { PixelBbox, PlanningAction, PlanningLocateParam } from '../../types';
|
|
2
|
+
export type LocateActionParam = {
|
|
3
|
+
locate: PlanningLocateParam;
|
|
4
|
+
};
|
|
5
|
+
export type LocatePlanningAction<TType extends string> = PlanningAction<LocateActionParam> & {
|
|
6
|
+
type: TType;
|
|
7
|
+
};
|
|
8
|
+
export type ScrollPlanningAction = PlanningAction<LocateActionParam & {
|
|
9
|
+
distance: number;
|
|
10
|
+
direction: 'up' | 'down' | 'left' | 'right';
|
|
11
|
+
}> & {
|
|
12
|
+
type: 'Scroll';
|
|
13
|
+
};
|
|
14
|
+
export type DragAndDropPlanningAction = PlanningAction<{
|
|
15
|
+
from: PlanningLocateParam;
|
|
16
|
+
to: PlanningLocateParam;
|
|
17
|
+
}> & {
|
|
18
|
+
type: 'DragAndDrop';
|
|
19
|
+
};
|
|
20
|
+
export declare function getTapLocatedPixelBbox(actions: PlanningAction[]): PixelBbox | undefined;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ResolvedCustomPlanningDefinition } from '../../model-adapter/custom-planning-types';
|
|
2
|
+
import type { PlanningTapLocatorDefinition } from '../../model-adapter/types';
|
|
3
|
+
import type { LocateFn } from './types';
|
|
4
|
+
export declare function resolvePlanningTapLocator<TParsed>(definition: PlanningTapLocatorDefinition, planner: ResolvedCustomPlanningDefinition<TParsed>): LocateFn;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { AIUsageInfo, Rect, UIContext } from '../../../types';
|
|
1
|
+
import type { AIUsageInfo, PixelBbox, Rect, UIContext } from '../../../types';
|
|
2
2
|
import type { LocateResultElement } from '@midscene/shared/types';
|
|
3
|
+
import type { ChatCompletionUserMessageParam } from 'openai/resources/index';
|
|
3
4
|
import type { TUserPrompt } from '../../../common';
|
|
4
5
|
import type { ModelRuntime } from '../../models';
|
|
5
6
|
export interface SearchAreaImageMapping {
|
|
@@ -24,6 +25,16 @@ export interface LocateOptions {
|
|
|
24
25
|
modelRuntime: ModelRuntime;
|
|
25
26
|
abortSignal?: AbortSignal;
|
|
26
27
|
}
|
|
28
|
+
export interface LocateRequestContext {
|
|
29
|
+
elementDescriptionText: string;
|
|
30
|
+
locateImage: {
|
|
31
|
+
imageBase64: string;
|
|
32
|
+
width: number;
|
|
33
|
+
height: number;
|
|
34
|
+
};
|
|
35
|
+
referenceImageMessages?: ChatCompletionUserMessageParam[];
|
|
36
|
+
options: LocateOptions;
|
|
37
|
+
}
|
|
27
38
|
export interface LocateResult {
|
|
28
39
|
parseResult: {
|
|
29
40
|
element?: LocateResultElement;
|
|
@@ -35,4 +46,12 @@ export interface LocateResult {
|
|
|
35
46
|
usage?: AIUsageInfo;
|
|
36
47
|
reasoning_content?: string;
|
|
37
48
|
}
|
|
38
|
-
export
|
|
49
|
+
export interface LocateModelResponse {
|
|
50
|
+
locatedPixelBbox?: PixelBbox;
|
|
51
|
+
rawResponse: string;
|
|
52
|
+
rawChoiceMessage?: unknown;
|
|
53
|
+
usage?: AIUsageInfo;
|
|
54
|
+
reasoningContent?: string;
|
|
55
|
+
errors?: string[];
|
|
56
|
+
}
|
|
57
|
+
export type LocateFn = (elementDescription: TUserPrompt, options: LocateOptions, locateRequest: LocateRequestContext) => Promise<LocateModelResponse>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type TUserPrompt } from '../../../common';
|
|
2
|
+
import type { PlanningAIResponse } from '../../../types';
|
|
3
|
+
import type { ChatCompletionMessageParam } from 'openai/resources/index';
|
|
4
|
+
import type { CustomPlanningInput, CustomPlanningMessageConfig, ResolvedCustomPlanningDefinition } from '../../model-adapter/custom-planning-types';
|
|
5
|
+
import type { PlanOptions } from './types';
|
|
6
|
+
export declare function buildCustomPlanningMessages<TParsed>(input: CustomPlanningInput, config: CustomPlanningMessageConfig<TParsed>): ChatCompletionMessageParam[];
|
|
7
|
+
export declare function runCustomPlanning<TParsed>(userInstruction: TUserPrompt, options: PlanOptions, config: ResolvedCustomPlanningDefinition<TParsed>): Promise<PlanningAIResponse>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { DeviceAction } from '../../../device';
|
|
2
|
+
import type { PlanningAction } from '../../../types';
|
|
3
|
+
import type { LocateResultAdapter, LocateResultContext } from '../../shared/model-locate-result/types';
|
|
4
|
+
export declare function normalizePlanningActionLocateFields(actions: PlanningAction[], { actionSpace, includeLocateInPlanning, locateResultAdapter, locateResultContext, }: {
|
|
5
|
+
actionSpace: DeviceAction[];
|
|
6
|
+
includeLocateInPlanning: boolean;
|
|
7
|
+
locateResultAdapter?: LocateResultAdapter;
|
|
8
|
+
locateResultContext: LocateResultContext;
|
|
9
|
+
}): void;
|
package/dist/types/common.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { z } from 'zod';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare function expandSearchArea(rect: Rect, screenSize: Size): Rect;
|
|
16
16
|
export declare function markupImageForLLM(screenshotBase64: string, tree: ElementTreeNode<BaseElement>, size: Size): Promise<string>;
|
|
17
|
+
export declare function findActionInActionSpaceOrThrow(planType: string, actionSpace: DeviceAction<any>[]): DeviceAction<any>;
|
|
17
18
|
export declare function buildYamlFlowFromPlans(plans: PlanningAction[], actionSpace: DeviceAction<any>[]): MidsceneYamlFlowItem[];
|
|
18
19
|
export declare const PointSchema: z.ZodObject<{
|
|
19
20
|
left: z.ZodNumber;
|
|
@@ -302,8 +302,8 @@ export declare const actionTapParamSchema: z.ZodObject<{
|
|
|
302
302
|
}[] | undefined;
|
|
303
303
|
convertHttpImage2Base64?: boolean | undefined;
|
|
304
304
|
});
|
|
305
|
-
deepThink?: boolean | undefined;
|
|
306
305
|
deepLocate?: boolean | undefined;
|
|
306
|
+
deepThink?: boolean | undefined;
|
|
307
307
|
cacheable?: boolean | undefined;
|
|
308
308
|
xpath?: string | boolean | undefined;
|
|
309
309
|
} & {
|
|
@@ -320,8 +320,8 @@ export declare const actionTapParamSchema: z.ZodObject<{
|
|
|
320
320
|
}[] | undefined;
|
|
321
321
|
convertHttpImage2Base64?: boolean | undefined;
|
|
322
322
|
});
|
|
323
|
-
deepThink?: boolean | undefined;
|
|
324
323
|
deepLocate?: boolean | undefined;
|
|
324
|
+
deepThink?: boolean | undefined;
|
|
325
325
|
cacheable?: boolean | undefined;
|
|
326
326
|
xpath?: string | boolean | undefined;
|
|
327
327
|
} & {
|
|
@@ -453,8 +453,8 @@ export declare const actionRightClickParamSchema: z.ZodObject<{
|
|
|
453
453
|
}[] | undefined;
|
|
454
454
|
convertHttpImage2Base64?: boolean | undefined;
|
|
455
455
|
});
|
|
456
|
-
deepThink?: boolean | undefined;
|
|
457
456
|
deepLocate?: boolean | undefined;
|
|
457
|
+
deepThink?: boolean | undefined;
|
|
458
458
|
cacheable?: boolean | undefined;
|
|
459
459
|
xpath?: string | boolean | undefined;
|
|
460
460
|
} & {
|
|
@@ -471,8 +471,8 @@ export declare const actionRightClickParamSchema: z.ZodObject<{
|
|
|
471
471
|
}[] | undefined;
|
|
472
472
|
convertHttpImage2Base64?: boolean | undefined;
|
|
473
473
|
});
|
|
474
|
-
deepThink?: boolean | undefined;
|
|
475
474
|
deepLocate?: boolean | undefined;
|
|
475
|
+
deepThink?: boolean | undefined;
|
|
476
476
|
cacheable?: boolean | undefined;
|
|
477
477
|
xpath?: string | boolean | undefined;
|
|
478
478
|
} & {
|
|
@@ -604,8 +604,8 @@ export declare const actionDoubleClickParamSchema: z.ZodObject<{
|
|
|
604
604
|
}[] | undefined;
|
|
605
605
|
convertHttpImage2Base64?: boolean | undefined;
|
|
606
606
|
});
|
|
607
|
-
deepThink?: boolean | undefined;
|
|
608
607
|
deepLocate?: boolean | undefined;
|
|
608
|
+
deepThink?: boolean | undefined;
|
|
609
609
|
cacheable?: boolean | undefined;
|
|
610
610
|
xpath?: string | boolean | undefined;
|
|
611
611
|
} & {
|
|
@@ -622,8 +622,8 @@ export declare const actionDoubleClickParamSchema: z.ZodObject<{
|
|
|
622
622
|
}[] | undefined;
|
|
623
623
|
convertHttpImage2Base64?: boolean | undefined;
|
|
624
624
|
});
|
|
625
|
-
deepThink?: boolean | undefined;
|
|
626
625
|
deepLocate?: boolean | undefined;
|
|
626
|
+
deepThink?: boolean | undefined;
|
|
627
627
|
cacheable?: boolean | undefined;
|
|
628
628
|
xpath?: string | boolean | undefined;
|
|
629
629
|
} & {
|
|
@@ -755,8 +755,8 @@ export declare const actionHoverParamSchema: z.ZodObject<{
|
|
|
755
755
|
}[] | undefined;
|
|
756
756
|
convertHttpImage2Base64?: boolean | undefined;
|
|
757
757
|
});
|
|
758
|
-
deepThink?: boolean | undefined;
|
|
759
758
|
deepLocate?: boolean | undefined;
|
|
759
|
+
deepThink?: boolean | undefined;
|
|
760
760
|
cacheable?: boolean | undefined;
|
|
761
761
|
xpath?: string | boolean | undefined;
|
|
762
762
|
} & {
|
|
@@ -773,8 +773,8 @@ export declare const actionHoverParamSchema: z.ZodObject<{
|
|
|
773
773
|
}[] | undefined;
|
|
774
774
|
convertHttpImage2Base64?: boolean | undefined;
|
|
775
775
|
});
|
|
776
|
-
deepThink?: boolean | undefined;
|
|
777
776
|
deepLocate?: boolean | undefined;
|
|
777
|
+
deepThink?: boolean | undefined;
|
|
778
778
|
cacheable?: boolean | undefined;
|
|
779
779
|
xpath?: string | boolean | undefined;
|
|
780
780
|
} & {
|
|
@@ -1375,9 +1375,9 @@ export declare const actionScrollParamSchema: z.ZodObject<{
|
|
|
1375
1375
|
cacheable: z.ZodOptional<z.ZodBoolean>;
|
|
1376
1376
|
xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
1377
1377
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
1378
|
+
distance?: number | null | undefined;
|
|
1378
1379
|
direction?: "left" | "right" | "up" | "down" | undefined;
|
|
1379
1380
|
scrollType?: "singleAction" | "scrollToBottom" | "scrollToTop" | "scrollToRight" | "scrollToLeft" | undefined;
|
|
1380
|
-
distance?: number | null | undefined;
|
|
1381
1381
|
}>;
|
|
1382
1382
|
export declare const defineActionScroll: (scroll: ScrollInputPrimitives["scroll"]) => DeviceAction<ActionScrollParam>;
|
|
1383
1383
|
export declare const actionDragAndDropParamSchema: z.ZodObject<{
|
|
@@ -1610,8 +1610,8 @@ export declare const actionDragAndDropParamSchema: z.ZodObject<{
|
|
|
1610
1610
|
}[] | undefined;
|
|
1611
1611
|
convertHttpImage2Base64?: boolean | undefined;
|
|
1612
1612
|
});
|
|
1613
|
-
deepThink?: boolean | undefined;
|
|
1614
1613
|
deepLocate?: boolean | undefined;
|
|
1614
|
+
deepThink?: boolean | undefined;
|
|
1615
1615
|
cacheable?: boolean | undefined;
|
|
1616
1616
|
xpath?: string | boolean | undefined;
|
|
1617
1617
|
} & {
|
|
@@ -1627,8 +1627,8 @@ export declare const actionDragAndDropParamSchema: z.ZodObject<{
|
|
|
1627
1627
|
}[] | undefined;
|
|
1628
1628
|
convertHttpImage2Base64?: boolean | undefined;
|
|
1629
1629
|
});
|
|
1630
|
-
deepThink?: boolean | undefined;
|
|
1631
1630
|
deepLocate?: boolean | undefined;
|
|
1631
|
+
deepThink?: boolean | undefined;
|
|
1632
1632
|
cacheable?: boolean | undefined;
|
|
1633
1633
|
xpath?: string | boolean | undefined;
|
|
1634
1634
|
} & {
|
|
@@ -1645,8 +1645,8 @@ export declare const actionDragAndDropParamSchema: z.ZodObject<{
|
|
|
1645
1645
|
}[] | undefined;
|
|
1646
1646
|
convertHttpImage2Base64?: boolean | undefined;
|
|
1647
1647
|
});
|
|
1648
|
-
deepThink?: boolean | undefined;
|
|
1649
1648
|
deepLocate?: boolean | undefined;
|
|
1649
|
+
deepThink?: boolean | undefined;
|
|
1650
1650
|
cacheable?: boolean | undefined;
|
|
1651
1651
|
xpath?: string | boolean | undefined;
|
|
1652
1652
|
} & {
|
|
@@ -1662,8 +1662,8 @@ export declare const actionDragAndDropParamSchema: z.ZodObject<{
|
|
|
1662
1662
|
}[] | undefined;
|
|
1663
1663
|
convertHttpImage2Base64?: boolean | undefined;
|
|
1664
1664
|
});
|
|
1665
|
-
deepThink?: boolean | undefined;
|
|
1666
1665
|
deepLocate?: boolean | undefined;
|
|
1666
|
+
deepThink?: boolean | undefined;
|
|
1667
1667
|
cacheable?: boolean | undefined;
|
|
1668
1668
|
xpath?: string | boolean | undefined;
|
|
1669
1669
|
} & {
|
|
@@ -1797,8 +1797,8 @@ export declare const ActionLongPressParamSchema: z.ZodObject<{
|
|
|
1797
1797
|
}[] | undefined;
|
|
1798
1798
|
convertHttpImage2Base64?: boolean | undefined;
|
|
1799
1799
|
});
|
|
1800
|
-
deepThink?: boolean | undefined;
|
|
1801
1800
|
deepLocate?: boolean | undefined;
|
|
1801
|
+
deepThink?: boolean | undefined;
|
|
1802
1802
|
cacheable?: boolean | undefined;
|
|
1803
1803
|
xpath?: string | boolean | undefined;
|
|
1804
1804
|
} & {
|
|
@@ -1816,8 +1816,8 @@ export declare const ActionLongPressParamSchema: z.ZodObject<{
|
|
|
1816
1816
|
}[] | undefined;
|
|
1817
1817
|
convertHttpImage2Base64?: boolean | undefined;
|
|
1818
1818
|
});
|
|
1819
|
-
deepThink?: boolean | undefined;
|
|
1820
1819
|
deepLocate?: boolean | undefined;
|
|
1820
|
+
deepThink?: boolean | undefined;
|
|
1821
1821
|
cacheable?: boolean | undefined;
|
|
1822
1822
|
xpath?: string | boolean | undefined;
|
|
1823
1823
|
} & {
|
|
@@ -2056,8 +2056,8 @@ export declare const ActionSwipeParamSchema: z.ZodObject<{
|
|
|
2056
2056
|
}, "strip", z.ZodTypeAny, {
|
|
2057
2057
|
duration: number;
|
|
2058
2058
|
repeat?: number | undefined;
|
|
2059
|
-
direction?: "left" | "right" | "up" | "down" | undefined;
|
|
2060
2059
|
distance?: number | undefined;
|
|
2060
|
+
direction?: "left" | "right" | "up" | "down" | undefined;
|
|
2061
2061
|
start?: z.objectOutputType<{
|
|
2062
2062
|
prompt: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|
|
2063
2063
|
prompt: z.ZodString;
|
|
@@ -2134,8 +2134,8 @@ export declare const ActionSwipeParamSchema: z.ZodObject<{
|
|
|
2134
2134
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
2135
2135
|
}, {
|
|
2136
2136
|
repeat?: number | undefined;
|
|
2137
|
-
direction?: "left" | "right" | "up" | "down" | undefined;
|
|
2138
2137
|
distance?: number | undefined;
|
|
2138
|
+
direction?: "left" | "right" | "up" | "down" | undefined;
|
|
2139
2139
|
duration?: number | undefined;
|
|
2140
2140
|
start?: z.objectInputType<{
|
|
2141
2141
|
prompt: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{
|