@midscene/core 1.0.1-beta-20251028021317.0 → 1.0.1-beta-20251028121806.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 +15 -15
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/task-builder.mjs +9 -9
- package/dist/es/agent/task-builder.mjs.map +1 -1
- package/dist/es/agent/tasks.mjs +8 -8
- package/dist/es/agent/tasks.mjs.map +1 -1
- package/dist/es/agent/ui-utils.mjs +0 -1
- package/dist/es/agent/ui-utils.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/ai-model/inspect.mjs.map +1 -1
- package/dist/es/index.mjs +4 -4
- package/dist/es/index.mjs.map +1 -1
- package/dist/es/{insight → service}/index.mjs +13 -13
- package/dist/es/{insight → service}/index.mjs.map +1 -1
- package/dist/es/{insight → service}/utils.mjs +2 -2
- package/dist/es/service/utils.mjs.map +1 -0
- package/dist/es/task-runner.mjs +1 -1
- package/dist/es/task-runner.mjs.map +1 -1
- package/dist/es/types.mjs +3 -3
- package/dist/es/types.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/agent/agent.js +14 -14
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/task-builder.js +8 -8
- package/dist/lib/agent/task-builder.js.map +1 -1
- package/dist/lib/agent/tasks.js +7 -7
- package/dist/lib/agent/tasks.js.map +1 -1
- package/dist/lib/agent/ui-utils.js +0 -1
- package/dist/lib/agent/ui-utils.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/ai-model/inspect.js.map +1 -1
- package/dist/lib/index.js +10 -10
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/{insight → service}/index.js +11 -11
- package/dist/lib/{insight → service}/index.js.map +1 -1
- package/dist/lib/{insight → service}/utils.js +4 -4
- package/dist/lib/{insight → service}/utils.js.map +1 -1
- package/dist/lib/task-runner.js +1 -1
- package/dist/lib/task-runner.js.map +1 -1
- package/dist/lib/types.js +7 -7
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/agent/agent.d.ts +9 -9
- package/dist/types/agent/task-builder.d.ts +4 -4
- package/dist/types/agent/tasks.d.ts +5 -5
- package/dist/types/ai-model/inspect.d.ts +2 -2
- package/dist/types/index.d.ts +4 -4
- package/dist/types/{insight → service}/index.d.ts +8 -8
- package/dist/types/service/utils.d.ts +2 -0
- package/dist/types/types.d.ts +18 -18
- package/dist/types/yaml.d.ts +6 -6
- package/package.json +3 -3
- package/dist/es/insight/utils.mjs.map +0 -1
- package/dist/types/insight/utils.d.ts +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgentAssertOpt, type AgentDescribeElementAtPointResult, type AgentOpt, type AgentWaitForOpt, type DeviceAction, type ExecutionDump, type GroupedActionDump,
|
|
1
|
+
import { type AgentAssertOpt, type AgentDescribeElementAtPointResult, type AgentOpt, type AgentWaitForOpt, type DeviceAction, type ExecutionDump, type GroupedActionDump, type LocateOption, type LocateResultElement, type LocateValidatorResult, type LocatorValidatorOption, type OnTaskStartTip, type ScrollParam, Service, type ServiceAction, type ServiceExtractOption, type ServiceExtractParam, type TUserPrompt, type UIContext } from '../index';
|
|
2
2
|
export type TestStatus = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interrupted';
|
|
3
3
|
import type { AbstractInterface } from '../device';
|
|
4
4
|
import { ModelConfigManager } from '@midscene/shared/env';
|
|
@@ -6,7 +6,7 @@ import { TaskCache } from './task-cache';
|
|
|
6
6
|
import { TaskExecutor } from './tasks';
|
|
7
7
|
export declare class Agent<InterfaceType extends AbstractInterface = AbstractInterface> {
|
|
8
8
|
interface: InterfaceType;
|
|
9
|
-
|
|
9
|
+
service: Service;
|
|
10
10
|
dump: GroupedActionDump;
|
|
11
11
|
reportFile?: string | null;
|
|
12
12
|
reportFileName?: string;
|
|
@@ -48,7 +48,7 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
48
48
|
private getScreenshotScale;
|
|
49
49
|
constructor(interfaceInstance: InterfaceType, opts?: AgentOpt);
|
|
50
50
|
getActionSpace(): Promise<DeviceAction[]>;
|
|
51
|
-
getUIContext(action?:
|
|
51
|
+
getUIContext(action?: ServiceAction): Promise<UIContext>;
|
|
52
52
|
_snapshotContext(): Promise<UIContext>;
|
|
53
53
|
setAIActionContext(prompt: string): Promise<void>;
|
|
54
54
|
resetDump(): GroupedActionDump;
|
|
@@ -107,11 +107,11 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
107
107
|
} | {
|
|
108
108
|
yamlFlow?: import("../yaml").MidsceneYamlFlowItem[];
|
|
109
109
|
} | undefined>;
|
|
110
|
-
aiQuery<ReturnType = any>(demand:
|
|
111
|
-
aiBoolean(prompt: TUserPrompt, opt?:
|
|
112
|
-
aiNumber(prompt: TUserPrompt, opt?:
|
|
113
|
-
aiString(prompt: TUserPrompt, opt?:
|
|
114
|
-
aiAsk(prompt: TUserPrompt, opt?:
|
|
110
|
+
aiQuery<ReturnType = any>(demand: ServiceExtractParam, opt?: ServiceExtractOption): Promise<ReturnType>;
|
|
111
|
+
aiBoolean(prompt: TUserPrompt, opt?: ServiceExtractOption): Promise<boolean>;
|
|
112
|
+
aiNumber(prompt: TUserPrompt, opt?: ServiceExtractOption): Promise<number>;
|
|
113
|
+
aiString(prompt: TUserPrompt, opt?: ServiceExtractOption): Promise<string>;
|
|
114
|
+
aiAsk(prompt: TUserPrompt, opt?: ServiceExtractOption): Promise<string>;
|
|
115
115
|
describeElementAtPoint(center: [number, number], opt?: {
|
|
116
116
|
verifyPrompt?: boolean;
|
|
117
117
|
retryLimit?: number;
|
|
@@ -121,7 +121,7 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
121
121
|
aiLocate(prompt: TUserPrompt, opt?: LocateOption): Promise<Pick<LocateResultElement, "rect" | "center"> & {
|
|
122
122
|
dpr?: number;
|
|
123
123
|
}>;
|
|
124
|
-
aiAssert(assertion: TUserPrompt, msg?: string, opt?: AgentAssertOpt &
|
|
124
|
+
aiAssert(assertion: TUserPrompt, msg?: string, opt?: AgentAssertOpt & ServiceExtractOption): Promise<{
|
|
125
125
|
pass: boolean;
|
|
126
126
|
thought: string | undefined;
|
|
127
127
|
message: string | undefined;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { AbstractInterface } from '../device';
|
|
2
|
-
import type
|
|
2
|
+
import type Service from '../service';
|
|
3
3
|
import type { DetailedLocateParam, ExecutionTaskActionApply, ExecutionTaskApply, PlanningAction, PlanningActionParamSleep, PlanningLocateParam } from '../types';
|
|
4
4
|
import type { IModelConfig } from '@midscene/shared/env';
|
|
5
5
|
import type { TaskCache } from './task-cache';
|
|
6
6
|
export declare function locatePlanForLocate(param: string | DetailedLocateParam): PlanningAction<PlanningLocateParam>;
|
|
7
7
|
interface TaskBuilderDeps {
|
|
8
8
|
interfaceInstance: AbstractInterface;
|
|
9
|
-
|
|
9
|
+
service: Service;
|
|
10
10
|
taskCache?: TaskCache;
|
|
11
11
|
}
|
|
12
12
|
interface BuildOptions {
|
|
@@ -15,9 +15,9 @@ interface BuildOptions {
|
|
|
15
15
|
}
|
|
16
16
|
export declare class TaskBuilder {
|
|
17
17
|
private readonly interface;
|
|
18
|
-
private readonly
|
|
18
|
+
private readonly service;
|
|
19
19
|
private readonly taskCache?;
|
|
20
|
-
constructor({ interfaceInstance,
|
|
20
|
+
constructor({ interfaceInstance, service, taskCache }: TaskBuilderDeps);
|
|
21
21
|
build(plans: PlanningAction[], modelConfig: IModelConfig, options?: BuildOptions): Promise<{
|
|
22
22
|
tasks: ExecutionTaskApply[];
|
|
23
23
|
}>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { TMultimodalPrompt, TUserPrompt } from '../ai-model/common';
|
|
2
2
|
import type { AbstractInterface } from '../device';
|
|
3
|
-
import type
|
|
3
|
+
import type Service from '../service';
|
|
4
4
|
import type { TaskRunner } from '../task-runner';
|
|
5
|
-
import type { ExecutionTaskApply, ExecutionTaskProgressOptions,
|
|
5
|
+
import type { ExecutionTaskApply, ExecutionTaskProgressOptions, MidsceneYamlFlowItem, PlanningAction, PlanningActionParamSleep, PlanningActionParamWaitFor, ServiceExtractOption, ServiceExtractParam } from '../types';
|
|
6
6
|
import { type IModelConfig } from '@midscene/shared/env';
|
|
7
7
|
import type { TaskCache } from './task-cache';
|
|
8
8
|
export { locatePlanForLocate } from './task-builder';
|
|
@@ -13,14 +13,14 @@ interface ExecutionResult<OutputType = any> {
|
|
|
13
13
|
}
|
|
14
14
|
export declare class TaskExecutor {
|
|
15
15
|
interface: AbstractInterface;
|
|
16
|
-
|
|
16
|
+
service: Service;
|
|
17
17
|
taskCache?: TaskCache;
|
|
18
18
|
private readonly taskBuilder;
|
|
19
19
|
private conversationHistory;
|
|
20
20
|
onTaskStartCallback?: ExecutionTaskProgressOptions['onTaskStart'];
|
|
21
21
|
replanningCycleLimit?: number;
|
|
22
22
|
get page(): AbstractInterface;
|
|
23
|
-
constructor(interfaceInstance: AbstractInterface,
|
|
23
|
+
constructor(interfaceInstance: AbstractInterface, service: Service, opts: {
|
|
24
24
|
taskCache?: TaskCache;
|
|
25
25
|
onTaskStart?: ExecutionTaskProgressOptions['onTaskStart'];
|
|
26
26
|
replanningCycleLimit?: number;
|
|
@@ -42,7 +42,7 @@ export declare class TaskExecutor {
|
|
|
42
42
|
yamlFlow?: MidsceneYamlFlowItem[];
|
|
43
43
|
} | undefined>>;
|
|
44
44
|
private createTypeQueryTask;
|
|
45
|
-
createTypeQueryExecution<T>(type: 'Query' | 'Boolean' | 'Number' | 'String' | 'Assert', demand:
|
|
45
|
+
createTypeQueryExecution<T>(type: 'Query' | 'Boolean' | 'Number' | 'String' | 'Assert', demand: ServiceExtractParam, modelConfig: IModelConfig, opt?: ServiceExtractOption, multimodalPrompt?: TMultimodalPrompt): Promise<ExecutionResult<T>>;
|
|
46
46
|
private sleepPlan;
|
|
47
47
|
taskForSleep(timeMs: number, _modelConfig: IModelConfig): Promise<import("../types").ExecutionTaskActionApply<PlanningActionParamSleep>>;
|
|
48
48
|
waitFor(assertion: TUserPrompt, opt: PlanningActionParamWaitFor, modelConfig: IModelConfig): Promise<ExecutionResult<void>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AIDataExtractionResponse, AIElementResponse, AIUsageInfo,
|
|
1
|
+
import type { AIDataExtractionResponse, AIElementResponse, AIUsageInfo, Rect, ReferenceImage, ServiceExtractOption, UIContext } from '../types';
|
|
2
2
|
import type { IModelConfig } from '@midscene/shared/env';
|
|
3
3
|
import type { LocateResultElement } from '@midscene/shared/types';
|
|
4
4
|
import type { ChatCompletionSystemMessageParam, ChatCompletionUserMessageParam } from 'openai/resources/index';
|
|
@@ -40,7 +40,7 @@ export declare function AiExtractElementInfo<T>(options: {
|
|
|
40
40
|
multimodalPrompt?: TMultimodalPrompt;
|
|
41
41
|
context: UIContext;
|
|
42
42
|
pageDescription?: string;
|
|
43
|
-
extractOption?:
|
|
43
|
+
extractOption?: ServiceExtractOption;
|
|
44
44
|
modelConfig: IModelConfig;
|
|
45
45
|
}): Promise<{
|
|
46
46
|
parseResult: AIDataExtractionResponse<T>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import
|
|
2
|
+
import Service from './service/index';
|
|
3
3
|
import { TaskRunner } from './task-runner';
|
|
4
4
|
import { getVersion } from './utils';
|
|
5
5
|
export { plan, describeUserPage, AiLocateElement, getMidsceneLocationSchema, type MidsceneLocationResultType, PointSchema, SizeSchema, RectSchema, TMultimodalPromptSchema, TUserPromptSchema, type TMultimodalPrompt, type TUserPrompt, } from './ai-model/index';
|
|
6
6
|
export { MIDSCENE_MODEL_NAME, type CreateOpenAIClientFn, } from '@midscene/shared/env';
|
|
7
7
|
export type * from './types';
|
|
8
|
-
export {
|
|
8
|
+
export { ServiceError } from './types';
|
|
9
9
|
export { z };
|
|
10
|
-
export default
|
|
11
|
-
export { TaskRunner,
|
|
10
|
+
export default Service;
|
|
11
|
+
export { TaskRunner, Service, getVersion };
|
|
12
12
|
export type { MidsceneYamlScript, MidsceneYamlTask, MidsceneYamlFlowItem, MidsceneYamlConfigResult, MidsceneYamlConfig, MidsceneYamlScriptWebEnv, MidsceneYamlScriptAndroidEnv, MidsceneYamlScriptIOSEnv, MidsceneYamlScriptEnv, LocateOption, DetailedLocateParam, } from './yaml';
|
|
13
13
|
export { Agent, type AgentOpt, createAgent } from './agent';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { callAIWithObjectResponse } from '../ai-model/index';
|
|
2
|
-
import type { AIDescribeElementResponse, DetailedLocateParam,
|
|
2
|
+
import type { AIDescribeElementResponse, DetailedLocateParam, LocateResultWithDump, Rect, ServiceExtractOption, ServiceExtractParam, ServiceExtractResult, ServiceTaskInfo, UIContext } from '../types';
|
|
3
3
|
import { type IModelConfig } from '@midscene/shared/env';
|
|
4
4
|
import type { TMultimodalPrompt } from '../ai-model/common';
|
|
5
5
|
export interface LocateOpts {
|
|
@@ -8,17 +8,17 @@ export interface LocateOpts {
|
|
|
8
8
|
export type AnyValue<T> = {
|
|
9
9
|
[K in keyof T]: unknown extends T[K] ? any : T[K];
|
|
10
10
|
};
|
|
11
|
-
interface
|
|
12
|
-
taskInfo?: Omit<
|
|
11
|
+
interface ServiceOptions {
|
|
12
|
+
taskInfo?: Omit<ServiceTaskInfo, 'durationMs'>;
|
|
13
13
|
aiVendorFn?: typeof callAIWithObjectResponse;
|
|
14
14
|
}
|
|
15
|
-
export default class
|
|
15
|
+
export default class Service {
|
|
16
16
|
contextRetrieverFn: () => Promise<UIContext> | UIContext;
|
|
17
|
-
aiVendorFn: Exclude<
|
|
18
|
-
taskInfo?: Omit<
|
|
19
|
-
constructor(context: UIContext | (() => Promise<UIContext> | UIContext), opt?:
|
|
17
|
+
aiVendorFn: Exclude<ServiceOptions['aiVendorFn'], undefined>;
|
|
18
|
+
taskInfo?: Omit<ServiceTaskInfo, 'durationMs'>;
|
|
19
|
+
constructor(context: UIContext | (() => Promise<UIContext> | UIContext), opt?: ServiceOptions);
|
|
20
20
|
locate(query: DetailedLocateParam, opt: LocateOpts, modelConfig: IModelConfig): Promise<LocateResultWithDump>;
|
|
21
|
-
extract<T>(dataDemand:
|
|
21
|
+
extract<T>(dataDemand: ServiceExtractParam, modelConfig: IModelConfig, opt?: ServiceExtractOption, pageDescription?: string, multimodalPrompt?: TMultimodalPrompt): Promise<ServiceExtractResult<T>>;
|
|
22
22
|
describe(target: Rect | [number, number], modelConfig: IModelConfig, opt?: {
|
|
23
23
|
deepThink?: boolean;
|
|
24
24
|
}): Promise<Pick<AIDescribeElementResponse, 'description'>>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -89,14 +89,14 @@ export declare abstract class UIContext {
|
|
|
89
89
|
export type EnsureObject<T> = {
|
|
90
90
|
[K in keyof T]: any;
|
|
91
91
|
};
|
|
92
|
-
export type
|
|
93
|
-
export type
|
|
92
|
+
export type ServiceAction = 'locate' | 'extract' | 'assert' | 'describe';
|
|
93
|
+
export type ServiceExtractParam = string | Record<string, string>;
|
|
94
94
|
export type ElementCacheFeature = Record<string, unknown>;
|
|
95
95
|
export interface LocateResult {
|
|
96
96
|
element: LocateResultElement | null;
|
|
97
97
|
rect?: Rect;
|
|
98
98
|
}
|
|
99
|
-
export interface
|
|
99
|
+
export interface ServiceTaskInfo {
|
|
100
100
|
durationMs: number;
|
|
101
101
|
formatResponse?: string;
|
|
102
102
|
rawResponse?: string;
|
|
@@ -112,12 +112,12 @@ export interface ReportDumpWithAttributes {
|
|
|
112
112
|
dumpString: string;
|
|
113
113
|
attributes?: Record<string, any>;
|
|
114
114
|
}
|
|
115
|
-
export interface
|
|
115
|
+
export interface ServiceDump extends DumpMeta {
|
|
116
116
|
type: 'locate' | 'extract' | 'assert';
|
|
117
117
|
logId: string;
|
|
118
118
|
userQuery: {
|
|
119
119
|
element?: TUserPrompt;
|
|
120
|
-
dataDemand?:
|
|
120
|
+
dataDemand?: ServiceExtractParam;
|
|
121
121
|
assertion?: TUserPrompt;
|
|
122
122
|
};
|
|
123
123
|
matchedElement: LocateResultElement[];
|
|
@@ -126,23 +126,23 @@ export interface InsightDump extends DumpMeta {
|
|
|
126
126
|
data: any;
|
|
127
127
|
assertionPass?: boolean;
|
|
128
128
|
assertionThought?: string;
|
|
129
|
-
taskInfo:
|
|
129
|
+
taskInfo: ServiceTaskInfo;
|
|
130
130
|
error?: string;
|
|
131
131
|
output?: any;
|
|
132
132
|
}
|
|
133
|
-
export type
|
|
134
|
-
export interface
|
|
135
|
-
dump:
|
|
133
|
+
export type PartialServiceDumpFromSDK = Omit<ServiceDump, 'logTime' | 'logId' | 'model_name'>;
|
|
134
|
+
export interface ServiceResultBase {
|
|
135
|
+
dump: ServiceDump;
|
|
136
136
|
}
|
|
137
|
-
export type LocateResultWithDump = LocateResult &
|
|
138
|
-
export interface
|
|
137
|
+
export type LocateResultWithDump = LocateResult & ServiceResultBase;
|
|
138
|
+
export interface ServiceExtractResult<T> extends ServiceResultBase {
|
|
139
139
|
data: T;
|
|
140
140
|
thought?: string;
|
|
141
141
|
usage?: AIUsageInfo;
|
|
142
142
|
}
|
|
143
|
-
export declare class
|
|
144
|
-
dump:
|
|
145
|
-
constructor(message: string, dump:
|
|
143
|
+
export declare class ServiceError extends Error {
|
|
144
|
+
dump: ServiceDump;
|
|
145
|
+
constructor(message: string, dump: ServiceDump);
|
|
146
146
|
}
|
|
147
147
|
export interface LiteUISection {
|
|
148
148
|
name: string;
|
|
@@ -151,7 +151,7 @@ export interface LiteUISection {
|
|
|
151
151
|
textIds: string[];
|
|
152
152
|
}
|
|
153
153
|
export type ElementById = (id: string) => BaseElement | null;
|
|
154
|
-
export type
|
|
154
|
+
export type ServiceAssertionResponse = AIAssertionResponse & {
|
|
155
155
|
usage?: AIUsageInfo;
|
|
156
156
|
};
|
|
157
157
|
/**
|
|
@@ -279,11 +279,11 @@ export type ExecutionTaskInsightLocateParam = PlanningLocateParam;
|
|
|
279
279
|
export interface ExecutionTaskInsightLocateOutput {
|
|
280
280
|
element: LocateResultElement | null;
|
|
281
281
|
}
|
|
282
|
-
export type ExecutionTaskInsightDump =
|
|
282
|
+
export type ExecutionTaskInsightDump = ServiceDump;
|
|
283
283
|
export type ExecutionTaskInsightLocateApply = ExecutionTaskApply<'Insight', ExecutionTaskInsightLocateParam, ExecutionTaskInsightLocateOutput, ExecutionTaskInsightDump>;
|
|
284
284
|
export type ExecutionTaskInsightLocate = ExecutionTask<ExecutionTaskInsightLocateApply>;
|
|
285
285
|
export interface ExecutionTaskInsightQueryParam {
|
|
286
|
-
dataDemand:
|
|
286
|
+
dataDemand: ServiceExtractParam;
|
|
287
287
|
}
|
|
288
288
|
export interface ExecutionTaskInsightQueryOutput {
|
|
289
289
|
data: any;
|
|
@@ -293,7 +293,7 @@ export type ExecutionTaskInsightQuery = ExecutionTask<ExecutionTaskInsightQueryA
|
|
|
293
293
|
export interface ExecutionTaskInsightAssertionParam {
|
|
294
294
|
assertion: string;
|
|
295
295
|
}
|
|
296
|
-
export type ExecutionTaskInsightAssertionApply = ExecutionTaskApply<'Insight', ExecutionTaskInsightAssertionParam,
|
|
296
|
+
export type ExecutionTaskInsightAssertionApply = ExecutionTaskApply<'Insight', ExecutionTaskInsightAssertionParam, ServiceAssertionResponse, ExecutionTaskInsightDump>;
|
|
297
297
|
export type ExecutionTaskInsightAssertion = ExecutionTask<ExecutionTaskInsightAssertionApply>;
|
|
298
298
|
export type ExecutionTaskActionApply<ActionParam = any> = ExecutionTaskApply<'Action', ActionParam, void, void>;
|
|
299
299
|
export type ExecutionTaskAction = ExecutionTask<ExecutionTaskActionApply>;
|
package/dist/types/yaml.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export interface LocateOption {
|
|
|
9
9
|
xpath?: string;
|
|
10
10
|
uiContext?: UIContext;
|
|
11
11
|
}
|
|
12
|
-
export interface
|
|
12
|
+
export interface ServiceExtractOption {
|
|
13
13
|
domIncluded?: boolean | 'visible-only';
|
|
14
14
|
screenshotIncluded?: boolean;
|
|
15
15
|
doNotThrowError?: boolean;
|
|
@@ -89,23 +89,23 @@ export interface MidsceneYamlFlowItemAIAssert {
|
|
|
89
89
|
errorMessage?: string;
|
|
90
90
|
name?: string;
|
|
91
91
|
}
|
|
92
|
-
export interface MidsceneYamlFlowItemAIQuery extends
|
|
92
|
+
export interface MidsceneYamlFlowItemAIQuery extends ServiceExtractOption {
|
|
93
93
|
aiQuery: string;
|
|
94
94
|
name?: string;
|
|
95
95
|
}
|
|
96
|
-
export interface MidsceneYamlFlowItemAINumber extends
|
|
96
|
+
export interface MidsceneYamlFlowItemAINumber extends ServiceExtractOption {
|
|
97
97
|
aiNumber: string;
|
|
98
98
|
name?: string;
|
|
99
99
|
}
|
|
100
|
-
export interface MidsceneYamlFlowItemAIString extends
|
|
100
|
+
export interface MidsceneYamlFlowItemAIString extends ServiceExtractOption {
|
|
101
101
|
aiString: string;
|
|
102
102
|
name?: string;
|
|
103
103
|
}
|
|
104
|
-
export interface MidsceneYamlFlowItemAIAsk extends
|
|
104
|
+
export interface MidsceneYamlFlowItemAIAsk extends ServiceExtractOption {
|
|
105
105
|
aiAsk: string;
|
|
106
106
|
name?: string;
|
|
107
107
|
}
|
|
108
|
-
export interface MidsceneYamlFlowItemAIBoolean extends
|
|
108
|
+
export interface MidsceneYamlFlowItemAIBoolean extends ServiceExtractOption {
|
|
109
109
|
aiBoolean: string;
|
|
110
110
|
name?: string;
|
|
111
111
|
}
|
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-20251028121806.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,8 +89,8 @@
|
|
|
89
89
|
"zod": "3.24.3",
|
|
90
90
|
"semver": "7.5.2",
|
|
91
91
|
"js-yaml": "4.1.0",
|
|
92
|
-
"@midscene/recorder": "1.0.1-beta-
|
|
93
|
-
"@midscene/shared": "1.0.1-beta-
|
|
92
|
+
"@midscene/recorder": "1.0.1-beta-20251028121806.0",
|
|
93
|
+
"@midscene/shared": "1.0.1-beta-20251028121806.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@rslib/core": "^0.11.2",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"insight/utils.mjs","sources":["webpack://@midscene/core/./src/insight/utils.ts"],"sourcesContent":["import type { DumpMeta, InsightDump, PartialInsightDumpFromSDK } from '@/types';\nimport { uuid } from '@midscene/shared/utils';\n\nexport function createInsightDump(\n data: PartialInsightDumpFromSDK,\n): InsightDump {\n const baseData: DumpMeta = {\n logTime: Date.now(),\n };\n const finalData: InsightDump = {\n logId: uuid(),\n ...baseData,\n ...data,\n };\n\n return finalData;\n}\n"],"names":["createInsightDump","data","baseData","Date","finalData","uuid"],"mappings":";AAGO,SAASA,kBACdC,IAA+B;IAE/B,MAAMC,WAAqB;QACzB,SAASC,KAAK,GAAG;IACnB;IACA,MAAMC,YAAyB;QAC7B,OAAOC;QACP,GAAGH,QAAQ;QACX,GAAGD,IAAI;IACT;IAEA,OAAOG;AACT"}
|