@empiricalrun/test-gen 0.38.23 → 0.38.25

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.38.25
4
+
5
+ ### Patch Changes
6
+
7
+ - d56544d: fix: send the last screenshot after generation
8
+
9
+ ## 0.38.24
10
+
11
+ ### Patch Changes
12
+
13
+ - 20455e2: fix: segregate master agent and annotation prompts
14
+ - 85c32a2: fix: failed action prompt
15
+
3
16
  ## 0.38.23
4
17
 
5
18
  ### Patch Changes
@@ -0,0 +1,88 @@
1
+ import { LLM, TraceClient } from "@empiricalrun/llm";
2
+ import OpenAI from "openai";
3
+ import { Page } from "playwright";
4
+ import { PlaywrightActions } from "../../actions";
5
+ import { TestGenPage } from "../../page";
6
+ import { ScopeVars, TestCase } from "../../types";
7
+ import { BrowsingAgentOptions } from "../browsing";
8
+ export declare const AnnotationToolAction: {
9
+ name: string;
10
+ schema: {
11
+ type: string;
12
+ function: {
13
+ name: string;
14
+ description: string;
15
+ parameters: {
16
+ type: string;
17
+ properties: {
18
+ enriched_annotations: {
19
+ type: string;
20
+ description: string;
21
+ items: {
22
+ type: string;
23
+ properties: {
24
+ element_id: {
25
+ type: string;
26
+ description: string;
27
+ };
28
+ description: {
29
+ type: string;
30
+ description: string;
31
+ };
32
+ };
33
+ required: string[];
34
+ };
35
+ };
36
+ reason: {
37
+ type: string;
38
+ description: string;
39
+ };
40
+ element_annotation: {
41
+ type: string;
42
+ description: string;
43
+ };
44
+ };
45
+ required: string[];
46
+ };
47
+ };
48
+ };
49
+ };
50
+ export declare function getNextActionV2({ task, executedActions, failedActions, pageUrl, trace, llm, options, pageScreenshot, actions, disableSkills, useHints, }: {
51
+ task: string;
52
+ executedActions: string[];
53
+ failedActions: any[];
54
+ pageUrl: string;
55
+ trace?: TraceClient;
56
+ llm?: LLM;
57
+ options?: BrowsingAgentOptions;
58
+ pageScreenshot: string;
59
+ annotatedPageScreenshot?: string;
60
+ actions: PlaywrightActions;
61
+ disableSkills: boolean;
62
+ useHints: boolean;
63
+ annotations?: string[];
64
+ }): Promise<import("openai/resources/index.mjs").ChatCompletionMessageToolCall | undefined>;
65
+ export declare const triggerHintsFlowV2: ({ outputFromGetNextAction, generatedAnnotations, page, llm, trace, }: {
66
+ outputFromGetNextAction: {
67
+ action: string;
68
+ elementAnnotation?: string;
69
+ };
70
+ generatedAnnotations: Record<string, any>;
71
+ page: TestGenPage;
72
+ llm: LLM;
73
+ trace?: TraceClient | undefined;
74
+ }) => Promise<{
75
+ shouldTriggerHintsFlow: boolean;
76
+ hintsExecutionCompletion: OpenAI.ChatCompletionMessage | undefined;
77
+ }>;
78
+ export declare function createTestUsingMasterAgentV2({ task, page, testCase, options, scopeVars, }: {
79
+ task: string;
80
+ page: Page;
81
+ testCase: TestCase;
82
+ options: BrowsingAgentOptions;
83
+ scopeVars?: ScopeVars;
84
+ }): Promise<{
85
+ code: string;
86
+ importPaths: string[];
87
+ }>;
88
+ //# sourceMappingURL=run-v2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-v2.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run-v2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAalD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAGzC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,oBAAoB,EAErB,MAAM,aAAa,CAAC;AAmBrB,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createTestUsingMasterAgentV2 = exports.triggerHintsFlowV2 = exports.getNextActionV2 = exports.AnnotationToolAction = void 0;
4
+ const llm_1 = require("@empiricalrun/llm");
5
+ const vision_1 = require("@empiricalrun/llm/vision");
6
+ const actions_1 = require("../../actions");
7
+ const click_1 = require("../../actions/click");
8
+ const fill_1 = require("../../actions/fill");
9
+ const hover_1 = require("../../actions/hover");
10
+ const skill_1 = require("../../actions/skill");
11
+ const utils_1 = require("../../actions/utils");
12
+ const logger_1 = require("../../bin/logger");
13
+ const constants_1 = require("../../constants");
14
+ const page_1 = require("../../page");
15
+ const reporter_1 = require("../../reporter");
16
+ const session_1 = require("../../session");
17
+ const browsing_1 = require("../browsing");
18
+ const utils_2 = require("../browsing/utils");
19
+ const skills_retriever_1 = require("../codegen/skills-retriever");
20
+ const run_time_planner_1 = require("../planner/run-time-planner");
21
+ const MAX_ERROR_COUNT = 2;
22
+ function getPageVariables(stateVariables) {
23
+ const keys = Object.keys(stateVariables);
24
+ const pageVariables = keys.filter((key) => key.endsWith("Page") || key.endsWith("page"));
25
+ const pages = pageVariables.reduce((acc, key) => {
26
+ acc[key] = stateVariables[key];
27
+ return acc;
28
+ }, {});
29
+ return pages;
30
+ }
31
+ exports.AnnotationToolAction = {
32
+ name: "element_annotation",
33
+ schema: {
34
+ type: "function",
35
+ function: {
36
+ name: "element_annotation",
37
+ description: "Handles annotations for elements and enriched annotations.",
38
+ parameters: {
39
+ type: "object",
40
+ properties: {
41
+ enriched_annotations: {
42
+ type: "array",
43
+ description: "List of enriched annotations for elements.",
44
+ items: {
45
+ type: "object",
46
+ properties: {
47
+ element_id: {
48
+ type: "string",
49
+ description: "Unique element ID for the element.",
50
+ },
51
+ description: {
52
+ type: "string",
53
+ description: "Detailed description for the element.",
54
+ },
55
+ },
56
+ required: ["element_id", "description"],
57
+ },
58
+ },
59
+ reason: {
60
+ type: "string",
61
+ description: "Explain why this element is selected. The reason should be clear and align with the task or purpose.",
62
+ },
63
+ element_annotation: {
64
+ type: "string",
65
+ description: "Return the unique element ID for the element on which the action needs to be performed.",
66
+ },
67
+ },
68
+ required: ["enriched_annotations", "reason", "element_annotation"],
69
+ },
70
+ },
71
+ },
72
+ };
73
+ async function getElementAnnotation({ elementDescription, annotations, annotatedScreenshot, trace, llm, options, }) {
74
+ const annotationsSpan = trace?.span({
75
+ name: "get-element-annotation",
76
+ input: {
77
+ elementDescription,
78
+ annotations,
79
+ annotatedScreenshot,
80
+ },
81
+ });
82
+ const systemMessage = {
83
+ role: "system",
84
+ content: `You are an expert in describing the images and it's content. You need to provide the descriptions of annotated elements present in the image.
85
+
86
+ You will be provided with an annotated screenshot where interact-able / clickable elements are annotated. The annotation is done by drawing a red box around the element and a small yellow box on it which contains unique element id.
87
+
88
+ You are given a Annotations which contains list of unique element id and description of the element separated by ":".
89
+
90
+ You are also given the description of the element on which the action needs to be taken. The description includes information about how the element looks, it's position etc.
91
+
92
+ Your task is to provide the annotation of the element on which the action needs to be performed based on the element description.
93
+
94
+ Follow steps to fulfil your task:
95
+ - Using the list of all element Ids provided to you, map all the element Ids on the annotated screen and describe each element.
96
+ - For describing each element Id
97
+ -- iterate over each element Id in annotation list
98
+ -- check if the description is already present for the element Id in the Annotation provided to you. If present skip describing it and use it as is.
99
+ -- if the description is NA, then identify the element in the annotated screenshot and describe it using the image or icon enclosed in the element.
100
+ - Respond with the mapped element Ids as "enriched_annotations"
101
+ - Based on the description provided to you and the enriched annotations, first identify the element Id whose description matches the task provided
102
+
103
+ Note:
104
+ - Ensure providing the description of all the elements in the list.
105
+ - There should be no "NA" present in element description for enriched_annotations
106
+ `,
107
+ };
108
+ const userMessage = {
109
+ role: "user",
110
+ content: [
111
+ {
112
+ type: "text",
113
+ text: `
114
+ Element description:
115
+ ${elementDescription}
116
+
117
+ Annotations:
118
+ ${annotations}`,
119
+ },
120
+ {
121
+ type: "image_url",
122
+ image_url: {
123
+ url: (0, vision_1.imageFormatForProvider)(options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER, annotatedScreenshot),
124
+ },
125
+ },
126
+ ],
127
+ };
128
+ const messages = [
129
+ systemMessage,
130
+ userMessage,
131
+ ];
132
+ llm =
133
+ llm ||
134
+ new llm_1.LLM({
135
+ provider: options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER,
136
+ defaultModel: options?.model || constants_1.DEFAULT_MODEL,
137
+ });
138
+ const completion = await llm.createChatCompletion({
139
+ messages,
140
+ modelParameters: {
141
+ ...constants_1.DEFAULT_MODEL_PARAMETERS,
142
+ ...options?.modelParameters,
143
+ tool_choice: "required",
144
+ temperature: 1,
145
+ },
146
+ trace: annotationsSpan,
147
+ traceName: "get-element-from-action",
148
+ //@ts-ignore
149
+ tools: [exports.AnnotationToolAction.schema],
150
+ });
151
+ const toolCall = completion?.tool_calls?.[0];
152
+ annotationsSpan?.end({ output: toolCall });
153
+ const args = JSON.parse(toolCall.function.arguments);
154
+ return args.element_annotation;
155
+ }
156
+ async function getNextActionV2({ task, executedActions, failedActions, pageUrl, trace, llm, options, pageScreenshot, actions, disableSkills, useHints = false, }) {
157
+ const nextActionSpan = trace?.span({
158
+ name: "master-agent-next-action",
159
+ input: {
160
+ task,
161
+ executedActions,
162
+ failedActions,
163
+ pageUrl,
164
+ options,
165
+ pageScreenshot,
166
+ disableSkills,
167
+ useHints,
168
+ skills: skill_1.testCaseSkills.getAvailableSkills(),
169
+ },
170
+ });
171
+ const promptSpan = nextActionSpan?.span({
172
+ name: "master-agent-prompt",
173
+ });
174
+ // assuming there is only one user message in the prompt. if there is a change in langfuse prompt format, this will need to be updated
175
+ const systemMessage = {
176
+ role: "system",
177
+ content: `You are an web automation tool which is given a task to complete. You need to execute the task provided to you with the help of web page screenshot, a browser automation tool or skills which are learnt while writing previous tests.
178
+
179
+ Browser automation tool is a tool which uses Playwright and browser to execute action using next_action tool call.
180
+ Skill usage is a tool which helps to execute previously known pieces of code to achieve a task.
181
+
182
+ You will be provided with a screenshot of the webpage which you will use to extract the action that needs to be taken.
183
+
184
+ You will be provided with previously executed actions by the browser automation tool and based on the current screenshot and previously executed actions, you need to predict the next action to be taken.
185
+
186
+ You will also be provided with failed next action predicted by you, so that you can avoid suggesting the same action again - which failed.
187
+
188
+ The next action should be as atomic as possible.
189
+ e.g: click on an element, fill an input element, assert, extract text from an element are valid next action as they are atomic in nature.
190
+
191
+ You will also be provided with skill usage tool which you can use to execute action. These skills are compound functions which helps you to complete your action.
192
+
193
+ You need to respond with either:
194
+ - Next action to be taken by a browser automation tool
195
+ - Use previously learnt skills in the form of tool call.
196
+
197
+ You need to make a decision whether the given skill can be reused if "YES" respond with the skill else respond with the next action.`,
198
+ };
199
+ const userMessage = {
200
+ role: "user",
201
+ content: [
202
+ {
203
+ type: "text",
204
+ text: `Task:
205
+ ${task}
206
+
207
+ ----
208
+
209
+ Previous executed actions:
210
+ ${executedActions.map((a) => a).join("\n")}
211
+
212
+ ----
213
+
214
+ Previous failed actions:
215
+ ${failedActions.map((a) => a).join("\n")}
216
+
217
+ ----
218
+ You are also provided with a page screenshot for you to decide the next action.
219
+
220
+ Current page URL: ${pageUrl}
221
+
222
+
223
+ Follow the instructions before responding:
224
+ - Divide the task into sub tasks
225
+ - Using previously executed actions, identify tasks are complete and which tasks needs to be executed next.
226
+ - You will be provided a skill usage action, if the testStep matches the next action then respond with the skill usage.
227
+ - If responding with next action, ensure next action to be detailed and explicit about what action needs to be done. Provide all the information which can be extracted from the screenshot as a part of next action.
228
+ - Mark task as complete only when executed actions provided to you indicates that the task is done.
229
+ - Refer to the text and references available in the screenshot to create the next action.
230
+ - Do not take any extra actions which are not required for the execution of the task
231
+ - If there are no further actions required based on the task, then respond with task as done.
232
+ - Do not recommend actions which are not available in the screenshot
233
+ `,
234
+ },
235
+ {
236
+ type: "text",
237
+ text: "Screenshot in normal mode 👇",
238
+ },
239
+ {
240
+ type: "image_url",
241
+ image_url: {
242
+ url: (0, vision_1.imageFormatForProvider)(options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER, pageScreenshot),
243
+ },
244
+ },
245
+ ],
246
+ };
247
+ const messages = [
248
+ systemMessage,
249
+ userMessage,
250
+ ];
251
+ const actionSchemas = disableSkills || skill_1.testCaseSkills.getAvailableSkills().length === 0
252
+ ? []
253
+ : actions.getMasterActionSchemas();
254
+ const actionToolCall = {
255
+ name: "next_task",
256
+ schema: {
257
+ type: "function",
258
+ function: {
259
+ name: "next_task",
260
+ description: "take the next action base on the provided task",
261
+ parameters: {
262
+ type: "object",
263
+ properties: {
264
+ reason: {
265
+ type: "string",
266
+ description: "explain how this action will help to complete the task. the reason should align with the task provided",
267
+ },
268
+ action: {
269
+ type: "string",
270
+ description: `explain the next action in natural language.
271
+ The next action should be as atomic as possible, precise and should contain enough details about the action to be performed.
272
+ E.g. each click, key press, input, assert should be a separate action.
273
+ Each action should take the task to completion, if not the action is invalid.`,
274
+ },
275
+ element_description: {
276
+ type: "string",
277
+ description: "The description of the element on which action needs to be taken, including its position, appearance, etc.",
278
+ },
279
+ },
280
+ required: ["reason", "action", "element_description"],
281
+ },
282
+ },
283
+ },
284
+ };
285
+ const tools = [actionToolCall.schema, ...actionSchemas];
286
+ promptSpan?.end({ output: { messages } });
287
+ llm =
288
+ llm ||
289
+ new llm_1.LLM({
290
+ provider: options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER,
291
+ defaultModel: options?.model || constants_1.DEFAULT_MODEL,
292
+ });
293
+ const completion = await llm.createChatCompletion({
294
+ messages,
295
+ modelParameters: {
296
+ ...constants_1.DEFAULT_MODEL_PARAMETERS,
297
+ ...options?.modelParameters,
298
+ tool_choice: "required",
299
+ temperature: 1,
300
+ },
301
+ trace: nextActionSpan,
302
+ traceName: "master-agent-llm",
303
+ // @ts-ignore
304
+ tools,
305
+ });
306
+ const toolCall = completion?.tool_calls?.[0];
307
+ nextActionSpan?.end({ output: toolCall });
308
+ return toolCall;
309
+ }
310
+ exports.getNextActionV2 = getNextActionV2;
311
+ const triggerHintsFlowV2 = async ({ outputFromGetNextAction, generatedAnnotations, page, llm, trace, }) => {
312
+ try {
313
+ const hasElementAnnotation = outputFromGetNextAction?.elementAnnotation?.length &&
314
+ outputFromGetNextAction?.elementAnnotation?.trim()?.length &&
315
+ generatedAnnotations.some(
316
+ //@ts-ignore
317
+ (annotation) => annotation.elementID === outputFromGetNextAction?.elementAnnotation);
318
+ trace?.event({
319
+ name: "has-element-annotation",
320
+ output: {
321
+ hasElementAnnotation,
322
+ generatedAnnotations,
323
+ },
324
+ });
325
+ if (!hasElementAnnotation) {
326
+ return {
327
+ shouldTriggerHintsFlow: false,
328
+ hintsExecutionCompletion: undefined,
329
+ };
330
+ }
331
+ const actions = new actions_1.PlaywrightActions(page);
332
+ const completion = await llm.createChatCompletion({
333
+ messages: [
334
+ {
335
+ role: "system",
336
+ content: `You are a browser automation agent who is given a task to generate code for navigation and assertion. This task is your goal and you must achieve it.
337
+
338
+ You need to pick the next step to achieve the task. Remember that the goal must be achieved.
339
+
340
+ Based on the goal and available tool calls you need to pick the appropriate tool call.
341
+
342
+
343
+ Instructions:
344
+ - Take actions one at a time. Do not try to take multiple actions
345
+ - You can respond with multiple assertions in one shot
346
+ - Stick to the task provided to you and mark the task done once the task is complete
347
+ - Do not execute any action which is not mentioned in the task`,
348
+ },
349
+ {
350
+ role: "user",
351
+ content: [
352
+ {
353
+ type: "text",
354
+ text: `Task: ${outputFromGetNextAction?.action}`,
355
+ },
356
+ ],
357
+ },
358
+ ],
359
+ tools: actions.getBrowsingActionSchemas(),
360
+ modelParameters: {
361
+ temperature: 0.5,
362
+ max_completion_tokens: 4000,
363
+ tool_choice: "required",
364
+ },
365
+ trace,
366
+ });
367
+ const canTriggerHintsFlow = completion?.tool_calls?.some((currentToolCall) => currentToolCall.function.name === fill_1.PLAYWRIGHT_FILL_ACTION_NAME ||
368
+ currentToolCall.function.name === click_1.PLAYWRIGHT_CLICK_ACTION_NAME ||
369
+ currentToolCall.function.name === hover_1.PLAYWRIGHT_HOVER_ACTION_NAME);
370
+ trace?.event({
371
+ name: "can-trigger-hints-flow",
372
+ output: {
373
+ canTriggerHintsFlow,
374
+ },
375
+ });
376
+ if (!canTriggerHintsFlow) {
377
+ return {
378
+ shouldTriggerHintsFlow: false,
379
+ hintsExecutionCompletion: undefined,
380
+ };
381
+ }
382
+ return {
383
+ shouldTriggerHintsFlow: true,
384
+ // @ts-ignore
385
+ hintsExecutionCompletion: completion,
386
+ };
387
+ }
388
+ catch (e) {
389
+ console.error("Error in triggerHintsFlow", e);
390
+ trace?.event({
391
+ name: "trigger-hints-flow-error",
392
+ output: {
393
+ errorMessage: e?.message,
394
+ errorStack: e?.stack,
395
+ },
396
+ });
397
+ return {
398
+ shouldTriggerHintsFlow: false,
399
+ hintsExecutionCompletion: undefined,
400
+ };
401
+ }
402
+ };
403
+ exports.triggerHintsFlowV2 = triggerHintsFlowV2;
404
+ // let screenshotIndex = 0; // keeping this for local debugging
405
+ async function createTestUsingMasterAgentV2({ task, page, testCase, options, scopeVars, }) {
406
+ const useHints = options?.useHints || false;
407
+ const logger = new logger_1.CustomLogger({ useReporter: false });
408
+ const testgenUpdatesReporter = new reporter_1.TestGenUpdatesReporter();
409
+ const session = (0, session_1.getSessionDetails)();
410
+ const testGenPage = new page_1.TestGenPage(page, (0, utils_1.getPageVarName)());
411
+ console.log("Using master agent v2");
412
+ // add timeout for the page to settle in
413
+ await page.waitForTimeout(3000);
414
+ const trace = llm_1.langfuseInstance?.trace({
415
+ name: "test-generator",
416
+ id: crypto.randomUUID(),
417
+ version: session.version,
418
+ metadata: {
419
+ generationId: session.generationId,
420
+ sessionId: session.sessionId,
421
+ testUrl: session.testUrl,
422
+ },
423
+ tags: [
424
+ options.metadata?.projectName,
425
+ options.metadata?.environment,
426
+ ].filter((s) => !!s),
427
+ });
428
+ if (trace) {
429
+ void testgenUpdatesReporter.sendMessage(`Starting master agent. [view trace](${trace?.getTraceUrl()})`);
430
+ logger.log(`Starting master agent: ${trace?.getTraceUrl()}`);
431
+ void testgenUpdatesReporter.sendAgentTraceUrl(trace.getTraceUrl());
432
+ }
433
+ const llm = new llm_1.LLM({
434
+ trace,
435
+ provider: options.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER,
436
+ defaultModel: options.model || constants_1.DEFAULT_MODEL,
437
+ providerApiKey: constants_1.MODEL_API_KEYS[options.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER],
438
+ // we will be using google model for larger context window, in such cases 1 million tokens is not enough
439
+ maxTokens: options.modelProvider === "google" ? 3000000 : 1000000,
440
+ });
441
+ const skills = await (0, skills_retriever_1.getAppropriateSkills)({
442
+ testCase,
443
+ trace,
444
+ //@ts-ignore
445
+ options,
446
+ });
447
+ skill_1.testCaseSkills.updateSkills(skills);
448
+ const actions = new actions_1.PlaywrightActions(testGenPage, scopeVars);
449
+ await (0, utils_2.injectPwLocatorGenerator)(page);
450
+ trace?.update({ input: { task } });
451
+ let isGivenTaskDone = false;
452
+ const masterAgentActions = [];
453
+ let failedActions = [];
454
+ let disableSkills = false;
455
+ while (!isGivenTaskDone) {
456
+ if (await (0, session_1.shouldStopSession)()) {
457
+ break;
458
+ }
459
+ const masterAgentSpan = trace?.span({
460
+ name: "master-agent",
461
+ input: {
462
+ task,
463
+ executedActions: masterAgentActions,
464
+ failedActions,
465
+ },
466
+ });
467
+ const plannerResp = await (0, run_time_planner_1.runtimePlanner)({
468
+ trace: masterAgentSpan,
469
+ task,
470
+ conversation: [...masterAgentActions],
471
+ pages: getPageVariables(actions.getStateVariables()),
472
+ currentPage: (0, utils_1.getPageVarName)(),
473
+ });
474
+ isGivenTaskDone = plannerResp.isDone;
475
+ if (isGivenTaskDone) {
476
+ await testgenUpdatesReporter.sendMessage(`${plannerResp.reason} Marking the task as done.`);
477
+ break;
478
+ }
479
+ if (actions.getStateVariables()[plannerResp.pageName]) {
480
+ // update page for the master agent
481
+ page = actions.getStateVariables()[plannerResp.pageName];
482
+ // update page in actions
483
+ testGenPage.updatePage({ page, name: plannerResp.pageName });
484
+ }
485
+ // inject scripts in the page
486
+ await (0, utils_2.injectPwLocatorGenerator)(testGenPage.pwPageInstance);
487
+ const buffer = await page.screenshot({
488
+ //This is done to improve element annotation accuracy, anyways it doesn't annotate elements which are out of viewport
489
+ // fullPage: true,
490
+ // path: `screenshots/screenshot-${screenshotIndex++}.png`, // enable this and screenshotIndex var for local debugging
491
+ });
492
+ const testGenReporter = new reporter_1.TestGenUpdatesReporter();
493
+ await testGenReporter.sendCurrentView(buffer);
494
+ const pageScreenshot = buffer.toString("base64");
495
+ let output;
496
+ let generatedCodeSteps = [];
497
+ if (await (0, session_1.shouldStopSession)()) {
498
+ break;
499
+ }
500
+ const toolCall = await getNextActionV2({
501
+ task,
502
+ executedActions: masterAgentActions,
503
+ failedActions,
504
+ pageUrl: page.url(),
505
+ trace: masterAgentSpan,
506
+ llm,
507
+ options,
508
+ pageScreenshot,
509
+ actions,
510
+ disableSkills,
511
+ useHints,
512
+ });
513
+ if (await (0, session_1.shouldStopSession)()) {
514
+ break;
515
+ }
516
+ if (toolCall) {
517
+ const args = JSON.parse(toolCall.function.arguments);
518
+ const masterAgentActionSpan = masterAgentSpan?.span({
519
+ name: "master-agent-execute-action",
520
+ });
521
+ try {
522
+ output = {
523
+ action: JSON.parse(toolCall.function.arguments).action ||
524
+ JSON.parse(toolCall.function.arguments).skill,
525
+ reason: JSON.parse(toolCall.function.arguments).reason,
526
+ };
527
+ void testGenReporter.sendMessage(output.reason);
528
+ logger.log(`Next Action: ${output.action}`);
529
+ if (toolCall.function.name === skill_1.SKILL_USAGE) {
530
+ const code = await actions.executeAction(toolCall.function.name, args, masterAgentActionSpan);
531
+ if (code) {
532
+ generatedCodeSteps.push(code);
533
+ }
534
+ }
535
+ else {
536
+ let shouldTriggerHintsFlow;
537
+ let hintsExecutionCompletion;
538
+ let annotationKeys = [];
539
+ let elementAnnotation;
540
+ if (useHints) {
541
+ await page.waitForTimeout(2000);
542
+ annotationKeys = await page.evaluate(() => {
543
+ // @ts-ignore
544
+ // eslint-disable-next-line no-undef
545
+ window.annotationInstance = annotateClickableElements();
546
+ const annotations = Object.entries(
547
+ // @ts-ignore
548
+ window.annotationInstance.annotations).map(([key, value]) => ({
549
+ elementID: key, // Assign the key to elementID
550
+ text:
551
+ //@ts-ignore
552
+ value.node.innerText?.trim() ||
553
+ //@ts-ignore
554
+ value.node.placeholder?.trim() ||
555
+ "NA",
556
+ }));
557
+ return annotations;
558
+ });
559
+ await page.waitForTimeout(2000);
560
+ let annotatedPageScreenshot;
561
+ const annonationBuffer = await page.screenshot({
562
+ //This is done to improve element annotation accuracy, anyways it doesn't annotate elements which are out of viewport
563
+ // fullPage: true,
564
+ // path: `screenshots/screenshot-${screenshotIndex++}.png`,
565
+ });
566
+ annotatedPageScreenshot = annonationBuffer.toString("base64");
567
+ await page.evaluate(() => {
568
+ console.log({
569
+ // @ts-ignore
570
+ disable: window?.annotationInstance?.disable,
571
+ });
572
+ if (
573
+ // @ts-ignore
574
+ window?.annotationInstance &&
575
+ // @ts-ignore
576
+ window?.annotationInstance?.destroy) {
577
+ // @ts-ignore
578
+ window?.annotationInstance?.destroy();
579
+ }
580
+ });
581
+ const annotationMapString = annotationKeys
582
+ ?.map((a) => `${a.elementID}:${a.text}`)
583
+ .join("\n");
584
+ elementAnnotation = await getElementAnnotation({
585
+ elementDescription: JSON.parse(toolCall.function.arguments)
586
+ .element_description,
587
+ annotations: annotationMapString,
588
+ annotatedScreenshot: annotatedPageScreenshot,
589
+ trace: masterAgentActionSpan,
590
+ llm,
591
+ });
592
+ output.elementAnnotation = elementAnnotation;
593
+ console.log("Output: ", output);
594
+ await testGenReporter.sendCurrentView(annonationBuffer);
595
+ const triggerHintsFlowSpan = masterAgentActionSpan?.span({
596
+ name: "trigger-hints-flow",
597
+ input: {
598
+ outputFromGetNextAction: output,
599
+ generatedAnnotations: annotationKeys,
600
+ },
601
+ });
602
+ const result = await (0, exports.triggerHintsFlowV2)({
603
+ outputFromGetNextAction: output,
604
+ generatedAnnotations: annotationKeys,
605
+ page: testGenPage,
606
+ llm,
607
+ trace: triggerHintsFlowSpan,
608
+ });
609
+ shouldTriggerHintsFlow = result.shouldTriggerHintsFlow;
610
+ hintsExecutionCompletion = result.hintsExecutionCompletion;
611
+ triggerHintsFlowSpan?.end({
612
+ output: result,
613
+ });
614
+ }
615
+ if (shouldTriggerHintsFlow && hintsExecutionCompletion) {
616
+ const toolCalls = hintsExecutionCompletion?.tool_calls || [];
617
+ for (const i in toolCalls) {
618
+ const currentToolCall = toolCalls[i];
619
+ const code = await actions.executeAction(currentToolCall.function.name, {
620
+ ...JSON.parse(currentToolCall.function.arguments),
621
+ elementAnnotation,
622
+ }, masterAgentActionSpan);
623
+ if (code) {
624
+ generatedCodeSteps.push(code);
625
+ }
626
+ }
627
+ if (actions.isStuckInLoop()) {
628
+ throw new Error("Agent is not able to figure out next action when using hints");
629
+ }
630
+ }
631
+ else {
632
+ generatedCodeSteps = await (0, browsing_1.executeTaskUsingBrowsingAgent)({
633
+ trace: masterAgentActionSpan,
634
+ action: output.action,
635
+ logger,
636
+ page,
637
+ options,
638
+ llm,
639
+ actions,
640
+ });
641
+ }
642
+ }
643
+ // resetting error count as there is a successful action
644
+ failedActions = [];
645
+ masterAgentActions.push(output.action);
646
+ masterAgentActionSpan?.end({
647
+ input: {
648
+ action: output.action,
649
+ reason: output.reason,
650
+ type: toolCall.function.name,
651
+ },
652
+ output: {
653
+ success: true,
654
+ },
655
+ });
656
+ // enable skills after success
657
+ disableSkills = false;
658
+ }
659
+ catch (e) {
660
+ if (toolCall.function.name === skill_1.SKILL_USAGE) {
661
+ logger.log("Disabling skill usage for next retry");
662
+ disableSkills = true;
663
+ }
664
+ masterAgentActionSpan?.end({
665
+ input: {
666
+ action: output.action,
667
+ reason: output.reason,
668
+ type: toolCall.function.name,
669
+ },
670
+ output: {
671
+ error: true,
672
+ errorSummary: e.message,
673
+ },
674
+ });
675
+ logger.error("Failed to run master agent's next task", JSON.stringify(toolCall, null, 2), e);
676
+ failedActions.push(output.action);
677
+ if (failedActions.length >= MAX_ERROR_COUNT) {
678
+ const error = "Agent is not able to figure out next action, marking task as done";
679
+ logger.error(error);
680
+ await testgenUpdatesReporter.sendMessage(error);
681
+ break;
682
+ }
683
+ }
684
+ }
685
+ trace?.update({ input: { task }, output: { output } });
686
+ masterAgentSpan?.end({
687
+ output: {
688
+ action: output.action,
689
+ reason: output.reason,
690
+ code: generatedCodeSteps,
691
+ },
692
+ });
693
+ }
694
+ const { code, importPaths } = actions.generateCode();
695
+ trace?.update({ input: { task }, output: { code } });
696
+ await new reporter_1.TestGenUpdatesReporter().sendCurrentView(await page.screenshot());
697
+ logger.success("Successfully generated code for the given task");
698
+ if (trace) {
699
+ await testgenUpdatesReporter.sendMessage(`Successfully generated code for the given task. \n View [trace](${trace.getTraceUrl()})`);
700
+ }
701
+ return {
702
+ code,
703
+ importPaths,
704
+ };
705
+ }
706
+ exports.createTestUsingMasterAgentV2 = createTestUsingMasterAgentV2;
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,GAAG,EACH,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAclD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EACL,oBAAoB,EAErB,MAAM,aAAa,CAAC;AAoBrB,wBAAsB,aAAa,CAAC,EAClC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,OAAO,EACP,KAAK,EACL,GAAG,EACH,OAAO,EACP,cAAc,EACd,uBAAuB,EACvB,OAAO,EACP,aAAa,EACb,QAAgB,EAChB,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAA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AM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,cAAc,EAAE,MAAM,CAAC;IACvB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,2FA2FA;AAGD,wBAAsB,0BAA0B,CAAC,EAC/C,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,oBAAoB,CAAC;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;;;GAuTA"}
@@ -358,7 +358,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, scope
358
358
  },
359
359
  });
360
360
  logger.error("Failed to run master agent's next task", JSON.stringify(toolCall, null, 2), e);
361
- failedActions.push(JSON.stringify(toolCall, null, 2));
361
+ failedActions.push(output.action);
362
362
  if (failedActions.length >= MAX_ERROR_COUNT) {
363
363
  const error = "Agent is not able to figure out next action, marking task as done";
364
364
  logger.error(error);
@@ -378,6 +378,7 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, scope
378
378
  }
379
379
  const { code, importPaths } = actions.generateCode();
380
380
  trace?.update({ input: { task }, output: { code } });
381
+ await new reporter_1.TestGenUpdatesReporter().sendCurrentView(await page.screenshot());
381
382
  logger.success("Successfully generated code for the given task");
382
383
  if (trace) {
383
384
  await testgenUpdatesReporter.sendMessage(`Successfully generated code for the given task. \n View [trace](${trace.getTraceUrl()})`);
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAQlC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAOpC,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,SAAS,iBAsC3E"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASlC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAOpC,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,SAAS,iBAsD3E"}
package/dist/index.js CHANGED
@@ -7,6 +7,7 @@ exports.createTest = void 0;
7
7
  const llm_1 = require("@empiricalrun/llm");
8
8
  const test_1 = __importDefault(require("playwright/test"));
9
9
  const run_1 = require("./agent/master/run");
10
+ const run_v2_1 = require("./agent/master/run-v2");
10
11
  const utils_1 = require("./bin/utils");
11
12
  const client_1 = __importDefault(require("./file/client"));
12
13
  const reporter_1 = require("./reporter");
@@ -33,20 +34,35 @@ async function createTest(task, page, scope) {
33
34
  projectRepoName: testGenConfig.options?.metadata.projectRepoName,
34
35
  });
35
36
  const fileService = new client_1.default(Number(port));
36
- const { code, importPaths } = await (0, run_1.createTestUsingMasterAgent)({
37
- testCase: testGenConfig.testCase,
38
- page,
39
- task,
40
- options: {
41
- htmlSanitize: {
42
- disallowedStrings: [
43
- "v-data-table__td v-data-table-column--align-start",
44
- ],
37
+ const { code, importPaths } = testGenConfig.options?.useMAV2
38
+ ? await (0, run_v2_1.createTestUsingMasterAgentV2)({
39
+ testCase: testGenConfig.testCase,
40
+ page,
41
+ task,
42
+ options: {
43
+ htmlSanitize: {
44
+ disallowedStrings: [
45
+ "v-data-table__td v-data-table-column--align-start",
46
+ ],
47
+ },
48
+ ...testGenConfig.options,
45
49
  },
46
- ...testGenConfig.options,
47
- },
48
- scopeVars: scope,
49
- });
50
+ scopeVars: scope,
51
+ })
52
+ : await (0, run_1.createTestUsingMasterAgent)({
53
+ testCase: testGenConfig.testCase,
54
+ page,
55
+ task,
56
+ options: {
57
+ htmlSanitize: {
58
+ disallowedStrings: [
59
+ "v-data-table__td v-data-table-column--align-start",
60
+ ],
61
+ },
62
+ ...testGenConfig.options,
63
+ },
64
+ scopeVars: scope,
65
+ });
50
66
  await fileService.updateTest({
51
67
  task,
52
68
  generatedCode: code,
@@ -17,6 +17,7 @@ export type TestGenConfigOptions = {
17
17
  modelProvider: LLMProvider;
18
18
  modelParameters?: ModelParameters;
19
19
  useHints?: boolean;
20
+ useMAV2?: boolean;
20
21
  metadata: {
21
22
  testSessionId: number;
22
23
  generationId: number;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,eAAe,EACf,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,oBAAoB,GAAG;I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AAM,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAAC;AAEtE,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,EAAE,CAAC,OAAO,EAAE;QACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC1B,KAAK,CAAC,EAAE,WAAW,CAAC;KACrB,KAAK,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IAC1C,QAAQ,EAAE,CACR,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,OAAO,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,KACzB;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.38.23",
3
+ "version": "0.38.25",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"