@autotest/agent 0.0.21 → 0.0.22
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/README.md +8 -9
- package/dist/.buildstamp +1 -0
- package/dist/autotest-cli.js +1 -1
- package/dist/common/config/config.yaml +144 -142
- package/dist/common/config/types.d.ts +2376 -2345
- package/dist/core/agent/layered_agent/execute_agent/agent_factory.d.ts +1 -1
- package/dist/core/agent/single_agent/agent.d.ts +4 -0
- package/dist/core/agent/single_agent/image_utils.d.ts +8 -0
- package/dist/core/agent/single_agent/llm_helper.d.ts +2 -0
- package/dist/core/agent/single_agent/scroll_search_agent.d.ts +15 -0
- package/dist/core/mcp/android_adapter.d.ts +1 -1
- package/dist/core/mcp/ios_adapter.d.ts +1 -1
- package/dist/core/memory/_utils.d.ts +1 -1
- package/dist/core/memory/tool_player_replan.d.ts +3 -4
- package/dist/generated/version.d.ts +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +1 -1
- package/dist/mcp-server/types.d.ts +120 -120
- package/dist/reporter/html_template/_cards.d.ts +21 -0
- package/dist/reporter/html_template/_markers.d.ts +11 -0
- package/dist/reporter/html_template/_scripts.d.ts +6 -0
- package/dist/reporter/html_template/_sidebar.d.ts +24 -0
- package/dist/reporter/html_template/_styles.d.ts +6 -0
- package/dist/reporter/html_template/_top_section.d.ts +33 -0
- package/dist/reporter/html_template/_utils.d.ts +87 -0
- package/dist/reporter/html_template/index.d.ts +2 -65
- package/dist/reporter/types.d.ts +14 -14
- package/dist/tools/batch_runner.d.ts +5 -0
- package/dist/tools/batch_runner.js +1 -1
- package/dist/tools/case_runner/runner.js +1 -1
- package/dist/tools/config/config_tool.js +1 -1
- package/dist/tools/gen_analysis_report.d.ts +12 -0
- package/dist/tools/gen_report.d.ts +13 -44
- package/dist/tools/prompt_compare/compare_runner.js +1 -1
- package/package.json +2 -2
- package/scripts/gen_analysis_report.js +0 -724
|
@@ -54,26 +54,26 @@ export declare const ClickInputSchema: z.ZodObject<{
|
|
|
54
54
|
x: z.ZodOptional<z.ZodNumber>;
|
|
55
55
|
y: z.ZodOptional<z.ZodNumber>;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
x?: number | undefined;
|
|
58
|
+
y?: number | undefined;
|
|
59
|
+
pos?: number[] | undefined;
|
|
60
60
|
}, {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
x?: number | undefined;
|
|
62
|
+
y?: number | undefined;
|
|
63
|
+
pos?: number[] | undefined;
|
|
64
64
|
}>;
|
|
65
65
|
export declare const DoubleClickInputSchema: z.ZodObject<{
|
|
66
66
|
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
67
67
|
x: z.ZodOptional<z.ZodNumber>;
|
|
68
68
|
y: z.ZodOptional<z.ZodNumber>;
|
|
69
69
|
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
x?: number | undefined;
|
|
71
|
+
y?: number | undefined;
|
|
72
|
+
pos?: number[] | undefined;
|
|
73
73
|
}, {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
x?: number | undefined;
|
|
75
|
+
y?: number | undefined;
|
|
76
|
+
pos?: number[] | undefined;
|
|
77
77
|
}>;
|
|
78
78
|
export declare const LongClickInputSchema: z.ZodObject<{
|
|
79
79
|
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
@@ -81,98 +81,98 @@ export declare const LongClickInputSchema: z.ZodObject<{
|
|
|
81
81
|
y: z.ZodOptional<z.ZodNumber>;
|
|
82
82
|
duration: z.ZodDefault<z.ZodNumber>;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
|
-
|
|
85
|
-
x?: number;
|
|
86
|
-
y?: number;
|
|
87
|
-
|
|
84
|
+
duration: number;
|
|
85
|
+
x?: number | undefined;
|
|
86
|
+
y?: number | undefined;
|
|
87
|
+
pos?: number[] | undefined;
|
|
88
88
|
}, {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
duration?: number;
|
|
89
|
+
x?: number | undefined;
|
|
90
|
+
y?: number | undefined;
|
|
91
|
+
pos?: number[] | undefined;
|
|
92
|
+
duration?: number | undefined;
|
|
93
93
|
}>;
|
|
94
94
|
export declare const SwipeInputSchema: z.ZodObject<{
|
|
95
95
|
start: z.ZodArray<z.ZodNumber, "many">;
|
|
96
96
|
end: z.ZodArray<z.ZodNumber, "many">;
|
|
97
97
|
direction: z.ZodOptional<z.ZodString>;
|
|
98
98
|
}, "strip", z.ZodTypeAny, {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
direction?: string;
|
|
99
|
+
end: number[];
|
|
100
|
+
start: number[];
|
|
101
|
+
direction?: string | undefined;
|
|
102
102
|
}, {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
direction?: string;
|
|
103
|
+
end: number[];
|
|
104
|
+
start: number[];
|
|
105
|
+
direction?: string | undefined;
|
|
106
106
|
}>;
|
|
107
107
|
export declare const DragInputSchema: z.ZodObject<{
|
|
108
108
|
start: z.ZodArray<z.ZodNumber, "many">;
|
|
109
109
|
end: z.ZodArray<z.ZodNumber, "many">;
|
|
110
110
|
}, "strip", z.ZodTypeAny, {
|
|
111
|
-
|
|
112
|
-
|
|
111
|
+
end: number[];
|
|
112
|
+
start: number[];
|
|
113
113
|
}, {
|
|
114
|
-
|
|
115
|
-
|
|
114
|
+
end: number[];
|
|
115
|
+
start: number[];
|
|
116
116
|
}>;
|
|
117
117
|
export declare const InputTextInputSchema: z.ZodObject<{
|
|
118
118
|
text: z.ZodString;
|
|
119
119
|
}, "strip", z.ZodTypeAny, {
|
|
120
|
-
text
|
|
120
|
+
text: string;
|
|
121
121
|
}, {
|
|
122
|
-
text
|
|
122
|
+
text: string;
|
|
123
123
|
}>;
|
|
124
124
|
export declare const ClearTextInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
125
125
|
export declare const GoBackInputSchema: z.ZodObject<{
|
|
126
126
|
times: z.ZodDefault<z.ZodNumber>;
|
|
127
127
|
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
times
|
|
128
|
+
times: number;
|
|
129
129
|
}, {
|
|
130
|
-
times?: number;
|
|
130
|
+
times?: number | undefined;
|
|
131
131
|
}>;
|
|
132
132
|
export declare const GoHomeInputSchema: z.ZodObject<{
|
|
133
133
|
times: z.ZodDefault<z.ZodNumber>;
|
|
134
134
|
}, "strip", z.ZodTypeAny, {
|
|
135
|
-
times
|
|
135
|
+
times: number;
|
|
136
136
|
}, {
|
|
137
|
-
times?: number;
|
|
137
|
+
times?: number | undefined;
|
|
138
138
|
}>;
|
|
139
139
|
export declare const StartAppInputSchema: z.ZodObject<{
|
|
140
140
|
app_name: z.ZodString;
|
|
141
141
|
cold_start: z.ZodDefault<z.ZodBoolean>;
|
|
142
142
|
}, "strip", z.ZodTypeAny, {
|
|
143
|
-
app_name
|
|
144
|
-
cold_start
|
|
143
|
+
app_name: string;
|
|
144
|
+
cold_start: boolean;
|
|
145
145
|
}, {
|
|
146
|
-
app_name
|
|
147
|
-
cold_start?: boolean;
|
|
146
|
+
app_name: string;
|
|
147
|
+
cold_start?: boolean | undefined;
|
|
148
148
|
}>;
|
|
149
149
|
export declare const StopAppInputSchema: z.ZodObject<{
|
|
150
150
|
app_name: z.ZodString;
|
|
151
151
|
}, "strip", z.ZodTypeAny, {
|
|
152
|
-
app_name
|
|
152
|
+
app_name: string;
|
|
153
153
|
}, {
|
|
154
|
-
app_name
|
|
154
|
+
app_name: string;
|
|
155
155
|
}>;
|
|
156
156
|
export declare const ClearAppDataInputSchema: z.ZodObject<{
|
|
157
157
|
app_name: z.ZodString;
|
|
158
158
|
}, "strip", z.ZodTypeAny, {
|
|
159
|
-
app_name
|
|
159
|
+
app_name: string;
|
|
160
160
|
}, {
|
|
161
|
-
app_name
|
|
161
|
+
app_name: string;
|
|
162
162
|
}>;
|
|
163
163
|
export declare const WaitInputSchema: z.ZodObject<{
|
|
164
164
|
duration: z.ZodDefault<z.ZodNumber>;
|
|
165
165
|
}, "strip", z.ZodTypeAny, {
|
|
166
|
-
duration
|
|
166
|
+
duration: number;
|
|
167
167
|
}, {
|
|
168
|
-
duration?: number;
|
|
168
|
+
duration?: number | undefined;
|
|
169
169
|
}>;
|
|
170
170
|
export declare const PressKeyInputSchema: z.ZodObject<{
|
|
171
171
|
key_name: z.ZodEnum<["home", "power", "volume_up", "volume_down"]>;
|
|
172
172
|
}, "strip", z.ZodTypeAny, {
|
|
173
|
-
key_name
|
|
173
|
+
key_name: "home" | "power" | "volume_up" | "volume_down";
|
|
174
174
|
}, {
|
|
175
|
-
key_name
|
|
175
|
+
key_name: "home" | "power" | "volume_up" | "volume_down";
|
|
176
176
|
}>;
|
|
177
177
|
export declare const ScreenOnInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
178
178
|
export declare const ScreenOffInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
@@ -183,25 +183,25 @@ export declare const GetCurrentAppInputSchema: z.ZodObject<{}, "strip", z.ZodTyp
|
|
|
183
183
|
export declare const ScreenshotInputSchema: z.ZodObject<{
|
|
184
184
|
save_path: z.ZodOptional<z.ZodString>;
|
|
185
185
|
}, "strip", z.ZodTypeAny, {
|
|
186
|
-
save_path?: string;
|
|
186
|
+
save_path?: string | undefined;
|
|
187
187
|
}, {
|
|
188
|
-
save_path?: string;
|
|
188
|
+
save_path?: string | undefined;
|
|
189
189
|
}>;
|
|
190
190
|
export declare const LayoutInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
191
191
|
export declare const McpCleanUpInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
192
192
|
export declare const OpenControlCenterInputSchema: z.ZodObject<{
|
|
193
193
|
full_screen: z.ZodDefault<z.ZodBoolean>;
|
|
194
194
|
}, "strip", z.ZodTypeAny, {
|
|
195
|
-
full_screen
|
|
195
|
+
full_screen: boolean;
|
|
196
196
|
}, {
|
|
197
|
-
full_screen?: boolean;
|
|
197
|
+
full_screen?: boolean | undefined;
|
|
198
198
|
}>;
|
|
199
199
|
export declare const OpenNotificationCenterInputSchema: z.ZodObject<{
|
|
200
200
|
full_screen: z.ZodDefault<z.ZodBoolean>;
|
|
201
201
|
}, "strip", z.ZodTypeAny, {
|
|
202
|
-
full_screen
|
|
202
|
+
full_screen: boolean;
|
|
203
203
|
}, {
|
|
204
|
-
full_screen?: boolean;
|
|
204
|
+
full_screen?: boolean | undefined;
|
|
205
205
|
}>;
|
|
206
206
|
export declare const PinchInInputSchema: z.ZodObject<{
|
|
207
207
|
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
@@ -210,17 +210,17 @@ export declare const PinchInInputSchema: z.ZodObject<{
|
|
|
210
210
|
radius: z.ZodDefault<z.ZodNumber>;
|
|
211
211
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
212
212
|
}, "strip", z.ZodTypeAny, {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
scale: number;
|
|
214
|
+
radius: number;
|
|
215
|
+
x?: number | undefined;
|
|
216
|
+
y?: number | undefined;
|
|
217
|
+
pos?: number[] | undefined;
|
|
218
218
|
}, {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
219
|
+
x?: number | undefined;
|
|
220
|
+
y?: number | undefined;
|
|
221
|
+
pos?: number[] | undefined;
|
|
222
|
+
scale?: number | undefined;
|
|
223
|
+
radius?: number | undefined;
|
|
224
224
|
}>;
|
|
225
225
|
export declare const PinchOutInputSchema: z.ZodObject<{
|
|
226
226
|
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
@@ -229,17 +229,17 @@ export declare const PinchOutInputSchema: z.ZodObject<{
|
|
|
229
229
|
radius: z.ZodDefault<z.ZodNumber>;
|
|
230
230
|
scale: z.ZodDefault<z.ZodNumber>;
|
|
231
231
|
}, "strip", z.ZodTypeAny, {
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
232
|
+
scale: number;
|
|
233
|
+
radius: number;
|
|
234
|
+
x?: number | undefined;
|
|
235
|
+
y?: number | undefined;
|
|
236
|
+
pos?: number[] | undefined;
|
|
237
237
|
}, {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
238
|
+
x?: number | undefined;
|
|
239
|
+
y?: number | undefined;
|
|
240
|
+
pos?: number[] | undefined;
|
|
241
|
+
scale?: number | undefined;
|
|
242
|
+
radius?: number | undefined;
|
|
243
243
|
}>;
|
|
244
244
|
export declare const RotateGestureInputSchema: z.ZodObject<{
|
|
245
245
|
pos: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
@@ -249,35 +249,35 @@ export declare const RotateGestureInputSchema: z.ZodObject<{
|
|
|
249
249
|
clockwise: z.ZodDefault<z.ZodBoolean>;
|
|
250
250
|
radius: z.ZodDefault<z.ZodNumber>;
|
|
251
251
|
}, "strip", z.ZodTypeAny, {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
252
|
+
angle: number;
|
|
253
|
+
clockwise: boolean;
|
|
254
|
+
radius: number;
|
|
255
|
+
x?: number | undefined;
|
|
256
|
+
y?: number | undefined;
|
|
257
|
+
pos?: number[] | undefined;
|
|
258
258
|
}, {
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
259
|
+
x?: number | undefined;
|
|
260
|
+
y?: number | undefined;
|
|
261
|
+
pos?: number[] | undefined;
|
|
262
|
+
angle?: number | undefined;
|
|
263
|
+
clockwise?: boolean | undefined;
|
|
264
|
+
radius?: number | undefined;
|
|
265
265
|
}>;
|
|
266
266
|
export declare const RotateScreenInputSchema: z.ZodObject<{
|
|
267
267
|
direction: z.ZodEnum<["portrait", "landscape"]>;
|
|
268
268
|
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
direction
|
|
269
|
+
direction: "portrait" | "landscape";
|
|
270
270
|
}, {
|
|
271
|
-
direction
|
|
271
|
+
direction: "portrait" | "landscape";
|
|
272
272
|
}>;
|
|
273
273
|
export declare const StopAllAppInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
274
274
|
export declare const StartListenToastInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
275
275
|
export declare const GetToastInputSchema: z.ZodObject<{
|
|
276
276
|
timeout: z.ZodDefault<z.ZodNumber>;
|
|
277
277
|
}, "strip", z.ZodTypeAny, {
|
|
278
|
-
timeout
|
|
278
|
+
timeout: number;
|
|
279
279
|
}, {
|
|
280
|
-
timeout?: number;
|
|
280
|
+
timeout?: number | undefined;
|
|
281
281
|
}>;
|
|
282
282
|
export declare const StartDataCollectInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
283
283
|
export declare const StopDataCollectInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
@@ -294,60 +294,60 @@ export declare const RunTaskInputSchema: z.ZodObject<{
|
|
|
294
294
|
feedbackMode: z.ZodDefault<z.ZodEnum<["poll", "stream", "callback"]>>;
|
|
295
295
|
callbackUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
296
296
|
}, "strip", z.ZodTypeAny, {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
callbackUrl?: string;
|
|
297
|
+
task: string;
|
|
298
|
+
platform: "harmony" | "android" | "ios";
|
|
299
|
+
agentMode: "single" | "hypium" | "layered";
|
|
300
|
+
deviceId: string;
|
|
301
|
+
feedbackMode: "stream" | "poll" | "callback";
|
|
302
|
+
promptVersion?: string | null | undefined;
|
|
303
|
+
reportDir?: string | null | undefined;
|
|
304
|
+
configOverrides?: Record<string, unknown> | null | undefined;
|
|
305
|
+
callbackUrl?: string | null | undefined;
|
|
306
306
|
}, {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
feedbackMode?: "
|
|
315
|
-
callbackUrl?: string;
|
|
307
|
+
task: string;
|
|
308
|
+
deviceId: string;
|
|
309
|
+
promptVersion?: string | null | undefined;
|
|
310
|
+
reportDir?: string | null | undefined;
|
|
311
|
+
platform?: "harmony" | "android" | "ios" | undefined;
|
|
312
|
+
configOverrides?: Record<string, unknown> | null | undefined;
|
|
313
|
+
agentMode?: "single" | "hypium" | "layered" | undefined;
|
|
314
|
+
feedbackMode?: "stream" | "poll" | "callback" | undefined;
|
|
315
|
+
callbackUrl?: string | null | undefined;
|
|
316
316
|
}>;
|
|
317
317
|
export declare const GetTaskResultInputSchema: z.ZodObject<{
|
|
318
318
|
taskId: z.ZodString;
|
|
319
319
|
}, "strip", z.ZodTypeAny, {
|
|
320
|
-
taskId
|
|
320
|
+
taskId: string;
|
|
321
321
|
}, {
|
|
322
|
-
taskId
|
|
322
|
+
taskId: string;
|
|
323
323
|
}>;
|
|
324
324
|
export declare const ResumeTaskInputSchema: z.ZodObject<{
|
|
325
325
|
taskId: z.ZodString;
|
|
326
326
|
startIndex: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
327
327
|
}, "strip", z.ZodTypeAny, {
|
|
328
|
-
taskId
|
|
329
|
-
startIndex?: number;
|
|
328
|
+
taskId: string;
|
|
329
|
+
startIndex?: number | null | undefined;
|
|
330
330
|
}, {
|
|
331
|
-
taskId
|
|
332
|
-
startIndex?: number;
|
|
331
|
+
taskId: string;
|
|
332
|
+
startIndex?: number | null | undefined;
|
|
333
333
|
}>;
|
|
334
334
|
export declare const AnalyzeFailureInputSchema: z.ZodObject<{
|
|
335
335
|
taskId: z.ZodString;
|
|
336
336
|
caseIdx: z.ZodNumber;
|
|
337
337
|
}, "strip", z.ZodTypeAny, {
|
|
338
|
-
taskId
|
|
339
|
-
caseIdx
|
|
338
|
+
taskId: string;
|
|
339
|
+
caseIdx: number;
|
|
340
340
|
}, {
|
|
341
|
-
taskId
|
|
342
|
-
caseIdx
|
|
341
|
+
taskId: string;
|
|
342
|
+
caseIdx: number;
|
|
343
343
|
}>;
|
|
344
344
|
export declare const GetConfigInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
345
345
|
export declare const UpdateConfigInputSchema: z.ZodObject<{
|
|
346
346
|
partial: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
347
347
|
}, "strip", z.ZodTypeAny, {
|
|
348
|
-
partial
|
|
348
|
+
partial: Record<string, unknown>;
|
|
349
349
|
}, {
|
|
350
|
-
partial
|
|
350
|
+
partial: Record<string, unknown>;
|
|
351
351
|
}>;
|
|
352
352
|
export declare const TOOL_DESCRIPTIONS: Record<string, string>;
|
|
353
353
|
export interface McpServerCapabilities {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StepGroup } from './_utils';
|
|
2
|
+
import type { ReportData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* 单个步骤卡片渲染入参:
|
|
5
|
+
* - data:完整报告数据(取步骤 Token 用量)
|
|
6
|
+
* - status:任务最终状态(供收尾卡片形态)
|
|
7
|
+
* - totalSteps:主步骤总数(末步判定)
|
|
8
|
+
* - resolveSrc:截图路径 → 内嵌/相对路径解析
|
|
9
|
+
* - debugMode:录制按钮显隐
|
|
10
|
+
*/
|
|
11
|
+
export interface StepCardContext {
|
|
12
|
+
data: ReportData;
|
|
13
|
+
status: string;
|
|
14
|
+
totalSteps: number;
|
|
15
|
+
resolveSrc: (p: string | null | undefined) => string;
|
|
16
|
+
debugMode: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** 主步骤列表 → stepCards HTML。 */
|
|
19
|
+
export declare function buildStepCardsHtml(steps: StepGroup[], ctx: StepCardContext): string;
|
|
20
|
+
/** 任务结果收尾卡片,语义对齐 Python _cards._get_task_end_card(绿色横幅 + end-box)。 */
|
|
21
|
+
export declare function buildTaskEndCardHtml(status: string, result: string, endTime?: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StepGroup } from './_utils';
|
|
2
|
+
/**
|
|
3
|
+
* 生成单个截图项上的操作标记 HTML。
|
|
4
|
+
* 对齐 Python _cards._get_screenshots_column 的标记语义:操作标记渲染在
|
|
5
|
+
* 「操作前」截图位(mcp_tool_start / model_action 动作截图),非该槽位不输出。
|
|
6
|
+
* 验证步骤的点击点(verifyClickPoint)同样落在「操作前」位。
|
|
7
|
+
*/
|
|
8
|
+
export declare function buildStepMarkersHtml(g: StepGroup, s: {
|
|
9
|
+
path: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
}, isSprite: boolean, idSuffix?: string): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { StepGroup } from './_utils';
|
|
2
|
+
import type { ReportData } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* 统计发生 COMPRESSION/REFLECTION 事件的步骤(事件已携带 eventType + stepNumber),
|
|
5
|
+
* 供侧栏导航项渲染记忆压缩/反思彩点,语义对齐 Python _sidebar._get_sidebar 的 step_memory_info。
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildStepMemoryInfo(data: ReportData): Map<number, Set<string>>;
|
|
8
|
+
/**
|
|
9
|
+
* 平均每步耗时:总时长("M:SS" 形态)除以步骤总数(主步骤 + 子步骤)。
|
|
10
|
+
* 语义对齐 Python _sidebar._get_sidebar 的 avg_step_duration:≥60s 以分钟显示,否则秒。
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeAvgPerStep(dur: string, mainSteps: number, subSteps: number): string;
|
|
13
|
+
/** 侧栏尾部 HTML 入参:指标区各格值 + 步骤导航项 HTML。 */
|
|
14
|
+
export interface SidebarHtmlOptions {
|
|
15
|
+
statusClass: string;
|
|
16
|
+
statusLabel: string;
|
|
17
|
+
duration: string;
|
|
18
|
+
avgPerStep: string;
|
|
19
|
+
totalSteps: number;
|
|
20
|
+
tokenTooltip: string;
|
|
21
|
+
tokenDisplay: string;
|
|
22
|
+
}
|
|
23
|
+
/** 侧栏整体:标题 + 指标网格 + 导航(任务描述/步骤导航/任务结果)。 */
|
|
24
|
+
export declare function buildSidebarHtml(o: SidebarHtmlOptions, steps: StepGroup[], stepMemoryInfo: Map<number, Set<string>>): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ReportData } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* 读取执行报告顶层的环境元数据(可选字段,缺失时 fail-soft 到空值):
|
|
4
|
+
* version/model_name/parse_mode/loaded_plugins。camelCase 别名兼容不同数据来源。
|
|
5
|
+
*/
|
|
6
|
+
export declare function readReportMeta(data: ReportData): {
|
|
7
|
+
version: string;
|
|
8
|
+
modelName: string;
|
|
9
|
+
parseMode: string;
|
|
10
|
+
loadedPlugins: Array<Record<string, unknown>>;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* 顶部 meta-info(版本/模型/解析模式)+ 插件 chips。
|
|
14
|
+
* 语义对齐 Python _top_section._get_main_content_start:空字段不渲染对应 item;
|
|
15
|
+
* loaded_plugins 为空数组(TS 无插件加载器时的常态)整体不渲染 chips 区块。
|
|
16
|
+
*/
|
|
17
|
+
export declare function buildMetaInfoHtml(data: ReportData): string;
|
|
18
|
+
/** 主区起始:main 容器 + 报告头(测试用例标题/副标题)+ 环境 meta 信息。 */
|
|
19
|
+
export declare function buildMainStartHtml(testCase: string, metaInfoHtml: string): string;
|
|
20
|
+
/** 顶部卡片区入参:任务描述 / 结果判定 / 判定截图 HTML。 */
|
|
21
|
+
export interface TopCardsOptions {
|
|
22
|
+
task: string;
|
|
23
|
+
statusClass: string;
|
|
24
|
+
statusLabel: string;
|
|
25
|
+
judgmentText: string;
|
|
26
|
+
resultText: string;
|
|
27
|
+
judgmentScreenshotHtml: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 浮动任务描述 + 顶部卡片行(任务描述卡 + 结果判定卡)。
|
|
31
|
+
* 语义对齐 Python _top_section._get_top_cards_row:判定区含状态徽章与判定观察截图。
|
|
32
|
+
*/
|
|
33
|
+
export declare function buildTopCardsHtml(o: TopCardsOptions): string;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ReportData } from '../types';
|
|
2
|
+
export interface StepGroup {
|
|
3
|
+
step: number;
|
|
4
|
+
thinking: string;
|
|
5
|
+
reasoning: string;
|
|
6
|
+
toolCall: {
|
|
7
|
+
name: string;
|
|
8
|
+
args: string;
|
|
9
|
+
} | null;
|
|
10
|
+
toolCallArgs: Record<string, unknown> | null;
|
|
11
|
+
observationScreenshot: string | null;
|
|
12
|
+
beforeScreenshot: string | null;
|
|
13
|
+
afterScreenshot: string | null;
|
|
14
|
+
fastScreenshot: string | null;
|
|
15
|
+
fastScreenshots: string[];
|
|
16
|
+
recordingFramePaths: string[];
|
|
17
|
+
recordingFrameTimestamps: string[];
|
|
18
|
+
verifyFrames: string[];
|
|
19
|
+
verifySprite: string | null;
|
|
20
|
+
autoVerifySprite: string | null;
|
|
21
|
+
verifyClickPoint: [number, number] | null;
|
|
22
|
+
spritePath: string | null;
|
|
23
|
+
videoPath: string | null;
|
|
24
|
+
toolResult: string;
|
|
25
|
+
toolResultData: Record<string, unknown> | null;
|
|
26
|
+
toolStartTime: string;
|
|
27
|
+
toolEndTime: string;
|
|
28
|
+
stepStartTime: string;
|
|
29
|
+
stepEndTime: string;
|
|
30
|
+
clickPoint: [number, number] | null;
|
|
31
|
+
swipeStart: [number, number] | null;
|
|
32
|
+
swipeEnd: [number, number] | null;
|
|
33
|
+
action: string | null;
|
|
34
|
+
subSteps: StepGroup[];
|
|
35
|
+
hasSubAgent: boolean;
|
|
36
|
+
hasPlannerEnd: boolean;
|
|
37
|
+
/** 上下文压缩/反思事件(CompressedSession 产生,eventType: compression|reflection)。
|
|
38
|
+
* groupSteps 按 stepNumber 归入对应步骤;step card 以可折叠 memory-detail 渲染,
|
|
39
|
+
* 对齐 Python reporter html_template._get_memory_detail。 */
|
|
40
|
+
memoryEvents: MemoryEvent[];
|
|
41
|
+
}
|
|
42
|
+
export interface MemoryEvent {
|
|
43
|
+
type: 'compression' | 'reflection';
|
|
44
|
+
summary: string;
|
|
45
|
+
detail?: string;
|
|
46
|
+
ratio?: number;
|
|
47
|
+
originalCount?: number;
|
|
48
|
+
compressedCount?: number;
|
|
49
|
+
tokenCount?: number;
|
|
50
|
+
}
|
|
51
|
+
export interface HtmlRenderOptions {
|
|
52
|
+
reportDir: string;
|
|
53
|
+
embedImages: boolean;
|
|
54
|
+
embedMaxPixels: number;
|
|
55
|
+
debugMode?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export declare function escapeHtml(text: string): string;
|
|
58
|
+
export declare function formatDuration(s: string | null, e: string | null): string;
|
|
59
|
+
export declare function formatTime(iso: string): string;
|
|
60
|
+
export declare function formatTokenCount(n: number): string;
|
|
61
|
+
/** 步骤耗时徽章文本,语义镜像 Python report_html_template/_utils.py 的 _calc_step_duration。 */
|
|
62
|
+
export declare function calcStepDuration(startTs: string | null | undefined, endTs: string | null | undefined): string;
|
|
63
|
+
export declare function stripTagMarkers(text: string): string;
|
|
64
|
+
/** 清理导航/标题显示中的 Markdown 标记(**粗体**、` 反引号、# 标题前缀),保留其余文本。 */
|
|
65
|
+
export declare function stripMarkdownMarkers(text: string): string;
|
|
66
|
+
export declare function normalizeThousandBasedValue(v: number): number;
|
|
67
|
+
export declare function toPercent(v: number): number;
|
|
68
|
+
export declare function asPoint2(v: unknown): [number, number] | null;
|
|
69
|
+
export declare function asPointFromXY(x: unknown, y: unknown): [number, number] | null;
|
|
70
|
+
export declare function toRelativePath(absPath: string | null | undefined, reportDir: string): string;
|
|
71
|
+
export declare function resolveImgSrc(relPath: string, opts: HtmlRenderOptions): Promise<string>;
|
|
72
|
+
export declare function extractStepTitle(g: StepGroup): string;
|
|
73
|
+
export declare function groupSteps(data: ReportData, reportDir: string): StepGroup[];
|
|
74
|
+
export declare function getStepTokens(data: ReportData, step: number): {
|
|
75
|
+
input: number;
|
|
76
|
+
output: number;
|
|
77
|
+
cached: number;
|
|
78
|
+
reasoning: number;
|
|
79
|
+
total: number;
|
|
80
|
+
normalized: number;
|
|
81
|
+
};
|
|
82
|
+
export declare function getFinalStatus(data: ReportData, reportDir: string): {
|
|
83
|
+
status: string;
|
|
84
|
+
result: string;
|
|
85
|
+
judgment: string;
|
|
86
|
+
screenshot: string;
|
|
87
|
+
};
|
|
@@ -1,67 +1,4 @@
|
|
|
1
|
+
import { type HtmlRenderOptions } from './_utils';
|
|
1
2
|
import type { ReportData } from '../types';
|
|
2
|
-
export
|
|
3
|
-
step: number;
|
|
4
|
-
thinking: string;
|
|
5
|
-
reasoning: string;
|
|
6
|
-
toolCall: {
|
|
7
|
-
name: string;
|
|
8
|
-
args: string;
|
|
9
|
-
} | null;
|
|
10
|
-
toolCallArgs: Record<string, unknown> | null;
|
|
11
|
-
observationScreenshot: string | null;
|
|
12
|
-
beforeScreenshot: string | null;
|
|
13
|
-
afterScreenshot: string | null;
|
|
14
|
-
fastScreenshot: string | null;
|
|
15
|
-
fastScreenshots: string[];
|
|
16
|
-
recordingFramePaths: string[];
|
|
17
|
-
recordingFrameTimestamps: string[];
|
|
18
|
-
verifyFrames: string[];
|
|
19
|
-
verifySprite: string | null;
|
|
20
|
-
autoVerifySprite: string | null;
|
|
21
|
-
verifyClickPoint: [number, number] | null;
|
|
22
|
-
spritePath: string | null;
|
|
23
|
-
videoPath: string | null;
|
|
24
|
-
toolResult: string;
|
|
25
|
-
toolStartTime: string;
|
|
26
|
-
toolEndTime: string;
|
|
27
|
-
stepStartTime: string;
|
|
28
|
-
stepEndTime: string;
|
|
29
|
-
clickPoint: [number, number] | null;
|
|
30
|
-
swipeStart: [number, number] | null;
|
|
31
|
-
swipeEnd: [number, number] | null;
|
|
32
|
-
action: string | null;
|
|
33
|
-
subSteps: StepGroup[];
|
|
34
|
-
hasSubAgent: boolean;
|
|
35
|
-
}
|
|
36
|
-
export interface HtmlRenderOptions {
|
|
37
|
-
reportDir: string;
|
|
38
|
-
embedImages: boolean;
|
|
39
|
-
embedMaxPixels: number;
|
|
40
|
-
debugMode?: boolean;
|
|
41
|
-
}
|
|
42
|
-
export declare function escapeHtml(text: string): string;
|
|
43
|
-
export declare function formatDuration(s: string | null, e: string | null): string;
|
|
44
|
-
export declare function formatTime(iso: string): string;
|
|
45
|
-
export declare function formatTokenCount(n: number): string;
|
|
46
|
-
export declare function stripTagMarkers(text: string): string;
|
|
47
|
-
export declare function asPoint2(v: unknown): [number, number] | null;
|
|
48
|
-
export declare function asPointFromXY(x: unknown, y: unknown): [number, number] | null;
|
|
49
|
-
export declare function toRelativePath(absPath: string | null | undefined, reportDir: string): string;
|
|
50
|
-
export declare function resolveImgSrc(relPath: string, opts: HtmlRenderOptions): Promise<string>;
|
|
51
|
-
export declare function extractStepTitle(g: StepGroup): string;
|
|
52
|
-
export declare function groupSteps(data: ReportData, reportDir: string): StepGroup[];
|
|
53
|
-
export declare function getStepTokens(data: ReportData, step: number): {
|
|
54
|
-
input: number;
|
|
55
|
-
output: number;
|
|
56
|
-
cached: number;
|
|
57
|
-
reasoning: number;
|
|
58
|
-
total: number;
|
|
59
|
-
normalized: number;
|
|
60
|
-
};
|
|
61
|
-
export declare function getFinalStatus(data: ReportData, reportDir: string): {
|
|
62
|
-
status: string;
|
|
63
|
-
result: string;
|
|
64
|
-
judgment: string;
|
|
65
|
-
screenshot: string;
|
|
66
|
-
};
|
|
3
|
+
export * from './_utils';
|
|
67
4
|
export declare function generateHtmlFromJson(data: ReportData, opts: HtmlRenderOptions): Promise<string>;
|