@midscene/core 0.27.4-beta-20250826022234.0 → 0.27.4-beta-20250826061259.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.map +1 -1
- package/dist/es/agent/common.mjs +0 -0
- package/dist/es/agent/index.mjs +3 -3
- package/dist/es/agent/tasks.mjs +0 -13
- package/dist/es/agent/tasks.mjs.map +1 -1
- package/dist/es/agent/ui-utils.mjs +1 -32
- package/dist/es/agent/ui-utils.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +3 -148
- package/dist/es/agent/utils.mjs.map +1 -1
- package/dist/es/ai-model/service-caller/index.mjs +1 -1
- package/dist/es/ai-model/service-caller/index.mjs.map +1 -1
- package/dist/es/device/index.mjs +91 -17
- package/dist/es/device/index.mjs.map +1 -1
- package/dist/es/types.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/common.js +5 -0
- package/dist/lib/agent/index.js +2 -8
- package/dist/lib/agent/tasks.js +0 -13
- package/dist/lib/agent/tasks.js.map +1 -1
- package/dist/lib/agent/ui-utils.js +0 -34
- package/dist/lib/agent/ui-utils.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -149
- package/dist/lib/agent/utils.js.map +1 -1
- package/dist/lib/ai-model/service-caller/index.js +1 -1
- package/dist/lib/ai-model/service-caller/index.js.map +1 -1
- package/dist/lib/device/index.js +139 -20
- package/dist/lib/device/index.js.map +1 -1
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/agent/agent.d.ts +2 -2
- package/dist/types/agent/common.d.ts +0 -0
- package/dist/types/agent/index.d.ts +1 -2
- package/dist/types/agent/tasks.d.ts +3 -3
- package/dist/types/agent/ui-utils.d.ts +0 -4
- package/dist/types/agent/utils.d.ts +3 -4
- package/dist/types/device/index.d.ts +2240 -46
- package/dist/types/types.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AgentAssertOpt, type AgentDescribeElementAtPointResult, type AgentWaitForOpt, type DeviceAction, type ExecutionDump, type GroupedActionDump, Insight, type InsightAction, type InsightExtractOption, type InsightExtractParam, type LocateOption, type LocateResultElement, type LocateValidatorResult, type LocatorValidatorOption, type OnTaskStartTip, type ScrollParam, type TUserPrompt, type UIContext } from '../index';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AbstractDevice } from '../device';
|
|
3
3
|
import { type TModelConfigFn } from '@midscene/shared/env';
|
|
4
4
|
import { TaskCache } from './task-cache';
|
|
5
5
|
import { PageTaskExecutor } from './tasks';
|
|
@@ -15,7 +15,7 @@ export interface PageAgentOpt {
|
|
|
15
15
|
reportFileName?: string;
|
|
16
16
|
modelConfig?: TModelConfigFn;
|
|
17
17
|
}
|
|
18
|
-
export declare class Agent<PageType extends
|
|
18
|
+
export declare class Agent<PageType extends AbstractDevice = AbstractDevice> {
|
|
19
19
|
page: PageType;
|
|
20
20
|
insight: Insight;
|
|
21
21
|
dump: GroupedActionDump;
|
|
File without changes
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export { Agent, type PageAgentOpt } from './agent';
|
|
2
|
-
export {
|
|
2
|
+
export { commonContextParser } from './utils';
|
|
3
3
|
export { getReportFileName, printReportMsg, } from './utils';
|
|
4
4
|
export { locateParamStr, paramStr, taskTitleStr, typeStr } from './ui-utils';
|
|
5
5
|
export { type LocateCache, type PlanningCache, TaskCache } from './task-cache';
|
|
6
6
|
export { cacheFileExt } from './task-cache';
|
|
7
7
|
export { PageTaskExecutor } from './tasks';
|
|
8
|
-
export { getKeyCommands } from './ui-utils';
|
|
9
8
|
export { getCurrentExecutionFile, trimContextByViewport, } from './utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ChatCompletionMessageParam } from '../ai-model';
|
|
2
|
-
import type {
|
|
2
|
+
import type { AbstractDevice } from '../device';
|
|
3
3
|
import { type DetailedLocateParam, type ExecutionTaskApply, type ExecutionTaskProgressOptions, Executor, type Insight, type InsightExtractOption, type InsightExtractParam, type MidsceneYamlFlowItem, type PlanningAction, type PlanningActionParamWaitFor, type PlanningLocateParam, type TMultimodalPrompt, type TUserPrompt } from '../index';
|
|
4
4
|
import type { TaskCache } from './task-cache';
|
|
5
5
|
interface ExecutionResult<OutputType = any> {
|
|
@@ -9,12 +9,12 @@ interface ExecutionResult<OutputType = any> {
|
|
|
9
9
|
}
|
|
10
10
|
export declare function locatePlanForLocate(param: string | DetailedLocateParam): PlanningAction<PlanningLocateParam>;
|
|
11
11
|
export declare class PageTaskExecutor {
|
|
12
|
-
page:
|
|
12
|
+
page: AbstractDevice;
|
|
13
13
|
insight: Insight;
|
|
14
14
|
taskCache?: TaskCache;
|
|
15
15
|
conversationHistory: ChatCompletionMessageParam[];
|
|
16
16
|
onTaskStartCallback?: ExecutionTaskProgressOptions['onTaskStart'];
|
|
17
|
-
constructor(page:
|
|
17
|
+
constructor(page: AbstractDevice, insight: Insight, opts: {
|
|
18
18
|
taskCache?: TaskCache;
|
|
19
19
|
onTaskStart?: ExecutionTaskProgressOptions['onTaskStart'];
|
|
20
20
|
});
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import type { AndroidPullParam, DetailedLocateParam, ExecutionTask, ScrollParam } from '../index';
|
|
2
2
|
export declare function typeStr(task: ExecutionTask): any;
|
|
3
|
-
export declare function getKeyCommands(value: string | string[]): Array<{
|
|
4
|
-
key: string;
|
|
5
|
-
command?: string;
|
|
6
|
-
}>;
|
|
7
3
|
export declare function locateParamStr(locate?: DetailedLocateParam): string;
|
|
8
4
|
export declare function scrollParamStr(scrollParam?: ScrollParam): string;
|
|
9
5
|
export declare function pullParamStr(pullParam?: AndroidPullParam): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BaseElement,
|
|
1
|
+
import type { AbstractDevice } from '../device';
|
|
2
|
+
import type { BaseElement, ElementTreeNode, ExecutionDump, ExecutorContext, PlanningLocateParam, TMultimodalPrompt, TUserPrompt, UIContext } from '../index';
|
|
3
3
|
import type { PageTaskExecutor } from './tasks';
|
|
4
|
-
export declare function commonContextParser(page:
|
|
4
|
+
export declare function commonContextParser(page: AbstractDevice): Promise<UIContext>;
|
|
5
5
|
export declare function getReportFileName(tag?: string): string;
|
|
6
6
|
export declare function printReportMsg(filepath: string): void;
|
|
7
7
|
/**
|
|
@@ -46,4 +46,3 @@ export declare const parsePrompt: (prompt: TUserPrompt) => {
|
|
|
46
46
|
textPrompt: string;
|
|
47
47
|
multimodalPrompt?: TMultimodalPrompt;
|
|
48
48
|
};
|
|
49
|
-
export declare const commonWebActionsForWebPage: <T extends AbstractPage>(page: T) => DeviceAction<any>[];
|