@donggui/core 1.5.14 → 1.6.1
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 +187 -10
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/task-builder.mjs +46 -2
- package/dist/es/agent/task-builder.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/ai-model/assert.mjs +415 -0
- package/dist/es/ai-model/assert.mjs.map +1 -0
- package/dist/es/ai-model/index.mjs +2 -1
- package/dist/es/ai-model/prompt/cache-verify.mjs +34 -0
- package/dist/es/ai-model/prompt/cache-verify.mjs.map +1 -0
- package/dist/es/service/index.mjs +81 -6
- package/dist/es/service/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 +185 -8
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/task-builder.js +46 -2
- package/dist/lib/agent/task-builder.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/ai-model/assert.js +455 -0
- package/dist/lib/ai-model/assert.js.map +1 -0
- package/dist/lib/ai-model/index.js +18 -11
- package/dist/lib/ai-model/prompt/cache-verify.js +68 -0
- package/dist/lib/ai-model/prompt/cache-verify.js.map +1 -0
- package/dist/lib/service/index.js +81 -6
- package/dist/lib/service/index.js.map +1 -1
- package/dist/lib/types.js +3 -3
- package/dist/lib/types.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/agent/agent.d.ts +38 -2
- package/dist/types/ai-model/assert.d.ts +66 -0
- package/dist/types/ai-model/index.d.ts +2 -0
- package/dist/types/ai-model/prompt/cache-verify.d.ts +1 -0
- package/dist/types/service/index.d.ts +3 -2
- package/dist/types/types.d.ts +166 -0
- package/package.json +25 -44
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TUserPrompt } from '../ai-model/index';
|
|
2
2
|
import Service from '../service/index';
|
|
3
|
-
import { type ActionParam, type ActionReturn, type AgentAssertOpt, type AgentDescribeElementAtPointResult, type AgentOpt, type AgentWaitForOpt, type DeepThinkOption, type DeviceAction, ExecutionDump, GroupedActionDump, type LocateOption, type LocateResultElement, type LocateValidatorResult, type LocatorValidatorOption, type OnTaskStartTip, type ScrollParam, type ServiceAction, type ServiceExtractOption, type ServiceExtractParam, type UIContext } from '../types';
|
|
3
|
+
import { type ActionParam, type ActionReturn, type ActionScreenshotContext, type AgentAssertOpt, type AgentDescribeElementAtPointResult, type AgentOpt, type AgentWaitForOpt, type DeepThinkOption, type DeviceAction, ExecutionDump, GroupedActionDump, type LocateOption, type LocateResultElement, type LocateValidatorResult, type LocatorValidatorOption, type OnTaskStartTip, type ScrollParam, type ServiceAction, type ServiceExtractOption, type ServiceExtractParam, type UIContext } from '../types';
|
|
4
4
|
export type TestStatus = 'passed' | 'failed' | 'timedOut' | 'skipped' | 'interrupted';
|
|
5
5
|
import type { AbstractInterface } from '../device';
|
|
6
6
|
import type { TaskRunner } from '../task-runner';
|
|
@@ -45,6 +45,19 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
45
45
|
private executionDumpIndexByRunner;
|
|
46
46
|
private fullActionSpace;
|
|
47
47
|
private reportGenerator;
|
|
48
|
+
/**
|
|
49
|
+
* Action screenshot context history for assertion
|
|
50
|
+
* Stores the last N action screenshots for comparison in assertions
|
|
51
|
+
*/
|
|
52
|
+
private actionScreenshotHistory;
|
|
53
|
+
/**
|
|
54
|
+
* Maximum number of action screenshots to keep in history
|
|
55
|
+
*/
|
|
56
|
+
private readonly maxScreenshotHistoryLength;
|
|
57
|
+
/**
|
|
58
|
+
* Screenshot at the start of aiAct for flow-level assertion
|
|
59
|
+
*/
|
|
60
|
+
private aiActStartScreenshot;
|
|
48
61
|
get page(): InterfaceType;
|
|
49
62
|
/**
|
|
50
63
|
* Ensures VL model warning is shown once when needed
|
|
@@ -124,9 +137,32 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
124
137
|
aiLocate(prompt: TUserPrompt, opt?: LocateOption): Promise<Pick<LocateResultElement, "rect" | "center">>;
|
|
125
138
|
aiAssert(assertion: TUserPrompt, msg?: string, opt?: AgentAssertOpt & ServiceExtractOption): Promise<{
|
|
126
139
|
pass: boolean;
|
|
127
|
-
thought: string
|
|
140
|
+
thought: string;
|
|
141
|
+
reason: string | undefined;
|
|
142
|
+
systemCheckResults: any;
|
|
143
|
+
diffDetails: any;
|
|
128
144
|
message: string | undefined;
|
|
145
|
+
} | {
|
|
146
|
+
pass: boolean;
|
|
147
|
+
thought: string | undefined;
|
|
148
|
+
reason: string;
|
|
149
|
+
message: string;
|
|
150
|
+
systemCheckResults?: undefined;
|
|
151
|
+
diffDetails?: undefined;
|
|
129
152
|
} | undefined>;
|
|
153
|
+
/**
|
|
154
|
+
* Clear the action screenshot history
|
|
155
|
+
* Useful when starting a new test scenario
|
|
156
|
+
*/
|
|
157
|
+
clearActionScreenshotHistory(): void;
|
|
158
|
+
/**
|
|
159
|
+
* Get the last action screenshot context
|
|
160
|
+
*/
|
|
161
|
+
getLastActionScreenshotContext(): ActionScreenshotContext | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Get the flow start screenshot (from aiAct)
|
|
164
|
+
*/
|
|
165
|
+
getFlowStartScreenshot(): string | null;
|
|
130
166
|
aiWaitFor(assertion: TUserPrompt, opt?: AgentWaitForOpt): Promise<void>;
|
|
131
167
|
ai(...args: Parameters<typeof this.aiAct>): Promise<string | undefined>;
|
|
132
168
|
runYaml(yamlScriptContent: string): Promise<{
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { AIUsageInfo, DiffDetails, IgnoreRegion, ReferenceImage, SystemCheckResults, VideoAssertionOptions, VideoDetails } from '../types';
|
|
2
|
+
import type { IModelConfig } from '@midscene/shared/env';
|
|
3
|
+
export interface AiAssertOptions {
|
|
4
|
+
beforeScreenshot?: string;
|
|
5
|
+
afterScreenshot: string;
|
|
6
|
+
assertion: string;
|
|
7
|
+
businessContext?: string;
|
|
8
|
+
enableSystemCheck?: boolean;
|
|
9
|
+
customSystemCheckRules?: string;
|
|
10
|
+
modelConfig: IModelConfig;
|
|
11
|
+
abortSignal?: AbortSignal;
|
|
12
|
+
referenceImages?: ReferenceImage[];
|
|
13
|
+
diffThreshold?: number;
|
|
14
|
+
ignoreRegions?: IgnoreRegion[];
|
|
15
|
+
ignoreDynamicContent?: boolean;
|
|
16
|
+
strictMode?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface AIAssertionResponse {
|
|
19
|
+
pass: boolean;
|
|
20
|
+
thought: string;
|
|
21
|
+
reason?: string;
|
|
22
|
+
systemCheckResults?: SystemCheckResults;
|
|
23
|
+
diffDetails?: DiffDetails;
|
|
24
|
+
}
|
|
25
|
+
export declare function AiAssertElement(options: AiAssertOptions): Promise<{
|
|
26
|
+
pass: boolean;
|
|
27
|
+
thought: string;
|
|
28
|
+
reason?: string;
|
|
29
|
+
usage?: AIUsageInfo;
|
|
30
|
+
systemCheckResults?: SystemCheckResults;
|
|
31
|
+
rawResponse?: string;
|
|
32
|
+
}>;
|
|
33
|
+
export declare function AiAssertDiff(options: {
|
|
34
|
+
currentScreenshot: string;
|
|
35
|
+
referenceImages: ReferenceImage[];
|
|
36
|
+
assertion: string;
|
|
37
|
+
businessContext?: string;
|
|
38
|
+
diffThreshold?: number;
|
|
39
|
+
ignoreRegions?: IgnoreRegion[];
|
|
40
|
+
ignoreDynamicContent?: boolean;
|
|
41
|
+
strictMode?: boolean;
|
|
42
|
+
modelConfig: IModelConfig;
|
|
43
|
+
abortSignal?: AbortSignal;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
pass: boolean;
|
|
46
|
+
thought: string;
|
|
47
|
+
reason?: string;
|
|
48
|
+
diffDetails?: DiffDetails;
|
|
49
|
+
usage?: AIUsageInfo;
|
|
50
|
+
rawResponse?: string;
|
|
51
|
+
}>;
|
|
52
|
+
export declare function AiAssertVideo(options: {
|
|
53
|
+
currentVideoFrames: string[];
|
|
54
|
+
assertion: string;
|
|
55
|
+
businessContext?: string;
|
|
56
|
+
videoOptions?: VideoAssertionOptions;
|
|
57
|
+
modelConfig: IModelConfig;
|
|
58
|
+
abortSignal?: AbortSignal;
|
|
59
|
+
}): Promise<{
|
|
60
|
+
pass: boolean;
|
|
61
|
+
thought: string;
|
|
62
|
+
reason?: string;
|
|
63
|
+
videoDetails?: VideoDetails;
|
|
64
|
+
usage?: AIUsageInfo;
|
|
65
|
+
rawResponse?: string;
|
|
66
|
+
}>;
|
|
@@ -4,6 +4,8 @@ export { generatePlaywrightTest, generatePlaywrightTestStream, } from './prompt/
|
|
|
4
4
|
export { generateYamlTest, generateYamlTestStream, } from './prompt/yaml-generator';
|
|
5
5
|
export type { ChatCompletionMessageParam } from 'openai/resources/index';
|
|
6
6
|
export { AiLocateElement, AiExtractElementInfo, AiLocateSection, AiJudgeOrderSensitive, } from './inspect';
|
|
7
|
+
export { AiAssertElement, AiAssertDiff } from './assert';
|
|
8
|
+
export type { AiAssertOptions, AIAssertionResponse } from './assert';
|
|
7
9
|
export { plan } from './llm-planning';
|
|
8
10
|
export { autoGLMPlanning } from './auto-glm/planning';
|
|
9
11
|
export { adaptBboxToRect } from '../common';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cacheVerifyInstruction: () => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { AIDescribeElementResponse, DetailedLocateParam, LocateResultWithDump, Rect, ServiceExtractOption, ServiceExtractParam, ServiceExtractResult, ServiceTaskInfo, UIContext } from '../types';
|
|
1
|
+
import type { AIDescribeElementResponse, CacheVerificationResult, DetailedLocateParam, LocateResultWithDump, Rect, ServiceExtractOption, ServiceExtractParam, ServiceExtractResult, ServiceTaskInfo, UIContext } from '../types';
|
|
2
2
|
import type { IModelConfig } from '@midscene/shared/env';
|
|
3
|
-
import type { TMultimodalPrompt } from '../common';
|
|
3
|
+
import type { TMultimodalPrompt, TUserPrompt } from '../common';
|
|
4
4
|
export interface LocateOpts {
|
|
5
5
|
context?: UIContext;
|
|
6
6
|
}
|
|
@@ -19,5 +19,6 @@ export default class Service {
|
|
|
19
19
|
describe(target: Rect | [number, number], modelConfig: IModelConfig, opt?: {
|
|
20
20
|
deepLocate?: boolean;
|
|
21
21
|
}): Promise<Pick<AIDescribeElementResponse, 'description'>>;
|
|
22
|
+
verifyCachedElement(center: [number, number], targetPrompt: TUserPrompt, modelConfig: IModelConfig, uiContext?: UIContext): Promise<CacheVerificationResult>;
|
|
22
23
|
}
|
|
23
24
|
export {};
|
package/dist/types/types.d.ts
CHANGED
|
@@ -60,6 +60,16 @@ export interface LocateValidatorResult {
|
|
|
60
60
|
center: [number, number];
|
|
61
61
|
centerDistance?: number;
|
|
62
62
|
}
|
|
63
|
+
export interface CacheVerificationResult {
|
|
64
|
+
pass: boolean;
|
|
65
|
+
description?: string;
|
|
66
|
+
reason?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface CacheValidationOptions {
|
|
69
|
+
enableCoordOffsetCheck?: boolean;
|
|
70
|
+
coordOffsetThresholdPx?: number;
|
|
71
|
+
enableVisualVerify?: boolean;
|
|
72
|
+
}
|
|
63
73
|
export interface AgentDescribeElementAtPointResult {
|
|
64
74
|
prompt: string;
|
|
65
75
|
deepLocate: boolean;
|
|
@@ -135,6 +145,9 @@ export interface ServiceDump extends DumpMeta {
|
|
|
135
145
|
data: any;
|
|
136
146
|
assertionPass?: boolean;
|
|
137
147
|
assertionThought?: string;
|
|
148
|
+
assertionReason?: string;
|
|
149
|
+
beforeScreenshot?: string;
|
|
150
|
+
systemCheckResults?: SystemCheckResults;
|
|
138
151
|
taskInfo: ServiceTaskInfo;
|
|
139
152
|
error?: string;
|
|
140
153
|
output?: any;
|
|
@@ -172,8 +185,161 @@ export interface AgentWaitForOpt extends ServiceExtractOption {
|
|
|
172
185
|
checkIntervalMs?: number;
|
|
173
186
|
timeoutMs?: number;
|
|
174
187
|
}
|
|
188
|
+
export interface ReferenceImage {
|
|
189
|
+
name: string;
|
|
190
|
+
url: string;
|
|
191
|
+
}
|
|
192
|
+
export interface IgnoreRegion {
|
|
193
|
+
x: number;
|
|
194
|
+
y: number;
|
|
195
|
+
width: number;
|
|
196
|
+
height: number;
|
|
197
|
+
}
|
|
198
|
+
export interface VideoInput {
|
|
199
|
+
/** 视频帧列表(Base64 编码的图片),最多 150 帧(5秒 * 30fps) */
|
|
200
|
+
frames: string[];
|
|
201
|
+
/** 视频时长(秒),最大 5 秒 */
|
|
202
|
+
duration?: number;
|
|
203
|
+
/** 帧率,默认 30 */
|
|
204
|
+
fps?: number;
|
|
205
|
+
/** 视频格式,默认 'frames' */
|
|
206
|
+
format?: 'frames' | 'base64' | 'url';
|
|
207
|
+
/** 视频 URL(当 format 为 'url' 时使用) */
|
|
208
|
+
url?: string;
|
|
209
|
+
}
|
|
210
|
+
export interface VideoAssertionOptions {
|
|
211
|
+
/** 是否验证动画流畅度,默认 true */
|
|
212
|
+
checkSmoothness?: boolean;
|
|
213
|
+
/** 流畅度阈值(0-100),默认 60 */
|
|
214
|
+
smoothnessThreshold?: number;
|
|
215
|
+
/** 是否验证动画时长,默认 false */
|
|
216
|
+
checkDuration?: boolean;
|
|
217
|
+
/** 预期动画时长范围(秒) */
|
|
218
|
+
expectedDuration?: {
|
|
219
|
+
min?: number;
|
|
220
|
+
max?: number;
|
|
221
|
+
};
|
|
222
|
+
/** 是否验证动画完整性,默认 true */
|
|
223
|
+
checkCompleteness?: boolean;
|
|
224
|
+
/** 关键帧验证配置 */
|
|
225
|
+
keyframes?: {
|
|
226
|
+
/** 关键帧时间点(秒) */
|
|
227
|
+
timestamps: number[];
|
|
228
|
+
/** 关键帧描述 */
|
|
229
|
+
descriptions?: string[];
|
|
230
|
+
};
|
|
231
|
+
/** 是否忽略背景变化,默认 false */
|
|
232
|
+
ignoreBackgroundChanges?: boolean;
|
|
233
|
+
/** 动画类型,用于优化分析 */
|
|
234
|
+
animationType?: 'transition' | 'loading' | 'interaction' | 'auto';
|
|
235
|
+
}
|
|
236
|
+
export interface VideoDetails {
|
|
237
|
+
/** 动画流畅度评分(0-100) */
|
|
238
|
+
smoothnessScore: number;
|
|
239
|
+
/** 动画时长(秒) */
|
|
240
|
+
duration: number;
|
|
241
|
+
/** 动画是否完整 */
|
|
242
|
+
isComplete: boolean;
|
|
243
|
+
/** 关键帧匹配结果 */
|
|
244
|
+
keyframeMatches?: {
|
|
245
|
+
timestamp: number;
|
|
246
|
+
matched: boolean;
|
|
247
|
+
description?: string;
|
|
248
|
+
}[];
|
|
249
|
+
/** 动画类型识别 */
|
|
250
|
+
detectedAnimationType: string;
|
|
251
|
+
/** 动画质量评估 */
|
|
252
|
+
qualityAssessment: {
|
|
253
|
+
/** 是否有卡顿 */
|
|
254
|
+
hasStuttering: boolean;
|
|
255
|
+
/** 是否有跳帧 */
|
|
256
|
+
hasFrameDropping: boolean;
|
|
257
|
+
/** 平均帧间隔(ms) */
|
|
258
|
+
averageFrameInterval: number;
|
|
259
|
+
/** 帧间隔标准差 */
|
|
260
|
+
frameIntervalStdDev: number;
|
|
261
|
+
};
|
|
262
|
+
/** 可接受的差异列表 */
|
|
263
|
+
acceptableDifferences: string[];
|
|
264
|
+
/** 不可接受的差异列表 */
|
|
265
|
+
unacceptableDifferences: string[];
|
|
266
|
+
}
|
|
267
|
+
export interface RetryOptions {
|
|
268
|
+
maxRetries: number;
|
|
269
|
+
retryInterval: number;
|
|
270
|
+
}
|
|
271
|
+
export interface DiffDetails {
|
|
272
|
+
layoutMatch: boolean;
|
|
273
|
+
colorMatch: boolean;
|
|
274
|
+
elementPositionMatch: boolean;
|
|
275
|
+
textContentMatch: boolean;
|
|
276
|
+
resourceMatch: boolean;
|
|
277
|
+
acceptableDifferences: string[];
|
|
278
|
+
unacceptableDifferences: string[];
|
|
279
|
+
}
|
|
280
|
+
export interface AssertSnapshot {
|
|
281
|
+
beforeScreenshot: string;
|
|
282
|
+
afterScreenshot: string;
|
|
283
|
+
timestamp: number;
|
|
284
|
+
assertion: string;
|
|
285
|
+
}
|
|
175
286
|
export interface AgentAssertOpt {
|
|
176
287
|
keepRawResponse?: boolean;
|
|
288
|
+
/** 启用系统级校验(白屏、遮挡等),默认 true */
|
|
289
|
+
enableSystemCheck?: boolean;
|
|
290
|
+
/** 自定义系统校验规则 */
|
|
291
|
+
customSystemCheckRules?: string;
|
|
292
|
+
/** 业务知识上下文 */
|
|
293
|
+
businessContext?: string;
|
|
294
|
+
/** 手动传入操作前截图(Base64) */
|
|
295
|
+
beforeScreenshot?: string;
|
|
296
|
+
/** 手动传入操作后截图(Base64) */
|
|
297
|
+
afterScreenshot?: string;
|
|
298
|
+
/**
|
|
299
|
+
* 截图模式
|
|
300
|
+
* - 'auto': 自动判断(默认)
|
|
301
|
+
* - 'lastAction': 使用最后一次 action 的前后截图
|
|
302
|
+
* - 'flow': 使用整个流程的开始和结束截图
|
|
303
|
+
* - 'manual': 使用手动传入的截图
|
|
304
|
+
* - 'currentOnly': 仅使用当前截图(无操作前截图)
|
|
305
|
+
* - 'diff': 与基准图片进行 Diff 对比
|
|
306
|
+
* - 'video': 与基准视频进行动画对比
|
|
307
|
+
*/
|
|
308
|
+
screenshotMode?: 'auto' | 'lastAction' | 'flow' | 'manual' | 'currentOnly' | 'diff' | 'video';
|
|
309
|
+
/** 基准图片列表(仅 Diff 模式) */
|
|
310
|
+
referenceImages?: ReferenceImage[];
|
|
311
|
+
/** Diff 差异阈值(0-1),默认 0.1 */
|
|
312
|
+
diffThreshold?: number;
|
|
313
|
+
/** 忽略对比的区域 */
|
|
314
|
+
ignoreRegions?: IgnoreRegion[];
|
|
315
|
+
/** 是否忽略动态内容,默认 false */
|
|
316
|
+
ignoreDynamicContent?: boolean;
|
|
317
|
+
/** 严格模式,任何差异都视为失败,默认 false */
|
|
318
|
+
strictMode?: boolean;
|
|
319
|
+
/** 视频断言配置(仅 Video 模式) */
|
|
320
|
+
videoOptions?: VideoAssertionOptions;
|
|
321
|
+
/** 当前视频输入(仅 Video 模式),用户传入的视频帧或视频 URL */
|
|
322
|
+
currentVideo?: VideoInput;
|
|
323
|
+
/** 断言重试配置 */
|
|
324
|
+
retryOptions?: RetryOptions;
|
|
325
|
+
/** 是否保存快照,默认 false */
|
|
326
|
+
saveSnapshot?: boolean;
|
|
327
|
+
/** 快照保存路径 */
|
|
328
|
+
snapshotPath?: string;
|
|
329
|
+
}
|
|
330
|
+
export interface ActionScreenshotContext {
|
|
331
|
+
beforeScreenshot: string;
|
|
332
|
+
afterScreenshot: string;
|
|
333
|
+
actionType: string;
|
|
334
|
+
actionParam?: any;
|
|
335
|
+
timestamp: number;
|
|
336
|
+
}
|
|
337
|
+
export interface SystemCheckResults {
|
|
338
|
+
whiteScreen?: boolean;
|
|
339
|
+
layoutBlocked?: boolean;
|
|
340
|
+
loadingContent?: boolean;
|
|
341
|
+
errorPrompt?: boolean;
|
|
342
|
+
backendError?: boolean;
|
|
177
343
|
}
|
|
178
344
|
/**
|
|
179
345
|
* planning
|
package/package.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@donggui/core",
|
|
3
|
-
"description": "DongGUI Core -
|
|
4
|
-
"version": "1.
|
|
3
|
+
"description": "DongGUI Core - AI-powered automation SDK with enhanced assertion capabilities",
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"main": "./dist/lib/index.js",
|
|
8
8
|
"types": "./dist/types/index.d.ts",
|
|
9
9
|
"module": "./dist/es/index.mjs",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist",
|
|
12
|
-
"README.md"
|
|
13
|
-
],
|
|
10
|
+
"files": ["dist", "README.md"],
|
|
14
11
|
"exports": {
|
|
15
12
|
".": {
|
|
16
13
|
"types": "./dist/types/index.d.ts",
|
|
@@ -60,33 +57,28 @@
|
|
|
60
57
|
},
|
|
61
58
|
"typesVersions": {
|
|
62
59
|
"*": {
|
|
63
|
-
".": [
|
|
64
|
-
|
|
65
|
-
],
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
],
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
],
|
|
72
|
-
"tree": [
|
|
73
|
-
"./dist/types/tree.d.ts"
|
|
74
|
-
],
|
|
75
|
-
"device": [
|
|
76
|
-
"./dist/types/device.d.ts"
|
|
77
|
-
],
|
|
78
|
-
"agent": [
|
|
79
|
-
"./dist/types/agent.d.ts"
|
|
80
|
-
],
|
|
81
|
-
"yaml": [
|
|
82
|
-
"./dist/types/yaml.d.ts"
|
|
83
|
-
],
|
|
84
|
-
"mcp": [
|
|
85
|
-
"./dist/types/skill/index.d.ts"
|
|
86
|
-
]
|
|
60
|
+
".": ["./dist/types/index.d.ts"],
|
|
61
|
+
"utils": ["./dist/types/utils.d.ts"],
|
|
62
|
+
"ai-model": ["./dist/types/ai-model.d.ts"],
|
|
63
|
+
"tree": ["./dist/types/tree.d.ts"],
|
|
64
|
+
"device": ["./dist/types/device.d.ts"],
|
|
65
|
+
"agent": ["./dist/types/agent.d.ts"],
|
|
66
|
+
"yaml": ["./dist/types/yaml.d.ts"],
|
|
67
|
+
"mcp": ["./dist/types/skill/index.d.ts"]
|
|
87
68
|
}
|
|
88
69
|
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"dev": "npm run build:watch",
|
|
72
|
+
"build": "rslib build",
|
|
73
|
+
"build:watch": "USE_DEV_REPORT=1 rslib build --watch --no-clean",
|
|
74
|
+
"test": "vitest --run",
|
|
75
|
+
"test:u": "vitest --run -u",
|
|
76
|
+
"test:ai": "AITEST=true npm run test",
|
|
77
|
+
"computer": "TEST_COMPUTER=true npm run test:ai -- tests/ai/evaluate/computer.test.ts",
|
|
78
|
+
"test:parse-action": "npm run test:ai -- tests/ai/parse-action.test.ts"
|
|
79
|
+
},
|
|
89
80
|
"dependencies": {
|
|
81
|
+
"@midscene/shared": "workspace:*",
|
|
90
82
|
"@ui-tars/action-parser": "1.2.3",
|
|
91
83
|
"dayjs": "^1.11.11",
|
|
92
84
|
"dotenv": "^16.4.5",
|
|
@@ -96,8 +88,7 @@
|
|
|
96
88
|
"openai": "6.3.0",
|
|
97
89
|
"semver": "7.5.2",
|
|
98
90
|
"undici": "^6.0.0",
|
|
99
|
-
"zod": "3.24.3"
|
|
100
|
-
"@midscene/shared": "1.5.6"
|
|
91
|
+
"zod": "3.24.3"
|
|
101
92
|
},
|
|
102
93
|
"devDependencies": {
|
|
103
94
|
"@rslib/core": "^0.18.3",
|
|
@@ -116,15 +107,5 @@
|
|
|
116
107
|
"access": "public",
|
|
117
108
|
"registry": "https://registry.npmjs.org"
|
|
118
109
|
},
|
|
119
|
-
"license": "MIT"
|
|
120
|
-
|
|
121
|
-
"dev": "npm run build:watch",
|
|
122
|
-
"build": "rslib build",
|
|
123
|
-
"build:watch": "USE_DEV_REPORT=1 rslib build --watch --no-clean",
|
|
124
|
-
"test": "vitest --run",
|
|
125
|
-
"test:u": "vitest --run -u",
|
|
126
|
-
"test:ai": "AITEST=true npm run test",
|
|
127
|
-
"computer": "TEST_COMPUTER=true npm run test:ai -- tests/ai/evaluate/computer.test.ts",
|
|
128
|
-
"test:parse-action": "npm run test:ai -- tests/ai/parse-action.test.ts"
|
|
129
|
-
}
|
|
130
|
-
}
|
|
110
|
+
"license": "MIT"
|
|
111
|
+
}
|