@empiricalrun/test-gen 0.33.16 → 0.34.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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.34.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [25f3601]
8
+ - @empiricalrun/llm@0.9.16
9
+
10
+ ## 0.34.0
11
+
12
+ ### Minor Changes
13
+
14
+ - b0c5c81: feat: expose hints workflow behind feature flag
15
+
3
16
  ## 0.33.16
4
17
 
5
18
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/actions/assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,6CAA6C,2BAChC,CAAC;AAE3B,eAAO,MAAM,mCAAmC,EAAE,yBAsDjD,CAAC"}
1
+ {"version":3,"file":"assert.d.ts","sourceRoot":"","sources":["../../src/actions/assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,6CAA6C,2BAChC,CAAC;AAE3B,eAAO,MAAM,mCAAmC,EAAE,yBAuDjD,CAAC"}
@@ -7,7 +7,7 @@ exports.PLAYWRIGHT_ASSERT_TEXT_VISIBILITY_ACTION_NAME = "assert_text_visibility"
7
7
  const assertTextVisibilityActionGenerator = (page) => {
8
8
  return {
9
9
  execute: async ({ args }) => {
10
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(args.css_selector, args.xpath, page);
10
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(args.css_selector, args.xpath, page, args?.elementAnnotation);
11
11
  const exec = new Function("page", `return page.${locator}.isVisible({ timeout: 3000 })`);
12
12
  await exec(page);
13
13
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../src/actions/click.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D,eAAO,MAAM,oBAAoB,EAAE,yBAsDlC,CAAC"}
1
+ {"version":3,"file":"click.d.ts","sourceRoot":"","sources":["../../src/actions/click.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D,eAAO,MAAM,oBAAoB,EAAE,yBAuDlC,CAAC"}
@@ -8,7 +8,7 @@ const clickActionGenerator = (page) => {
8
8
  return {
9
9
  execute: async ({ args }) => {
10
10
  const selector = args.css_selector;
11
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(selector, args.xpath, page);
11
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(selector, args.xpath, page, args?.elementAnnotation);
12
12
  const exec = new Function("page", `return page.${locator}.click({ timeout: 3000 })`);
13
13
  await exec(page);
14
14
  await page.waitForTimeout(3000);
@@ -1 +1 @@
1
- {"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../src/actions/fill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAGhE,eAAO,MAAM,mBAAmB,EAAE,yBAiFjC,CAAC"}
1
+ {"version":3,"file":"fill.d.ts","sourceRoot":"","sources":["../../src/actions/fill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAGhE,eAAO,MAAM,mBAAmB,EAAE,yBAkFjC,CAAC"}
@@ -11,7 +11,7 @@ const fillActionGenerator = (page, options) => {
11
11
  return {
12
12
  execute: async ({ args }) => {
13
13
  const css = args.css_selector;
14
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page);
14
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page, args?.elementAnnotation);
15
15
  const textToFill = options?.stateVariables[args.variable_name] || args.text;
16
16
  const exec = new Function("page", `return page.${locator}.fill("${textToFill}", { timeout: 3000 })`);
17
17
  await exec(page);
@@ -45,11 +45,11 @@ const fillActionGenerator = (page, options) => {
45
45
  variable_name: {
46
46
  type: "string",
47
47
  enum: stateVariableNames,
48
- description: `variable name whose value needs to be filled in the input element.
49
- The variable name and values are:
48
+ description: `variable name whose value needs to be filled in the input element.
49
+ The variable name and values are:
50
50
 
51
51
  ${JSON.stringify(stateVariableNames, null, 2)}
52
-
52
+
53
53
  - Choose the variable name based on the value above.
54
54
  - Set variable_name as 'NA' if there is no variable to be used.`,
55
55
  },
@@ -1 +1 @@
1
- {"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../src/actions/hover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D,eAAO,MAAM,oBAAoB,EAAE,yBAoDlC,CAAC"}
1
+ {"version":3,"file":"hover.d.ts","sourceRoot":"","sources":["../../src/actions/hover.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,4BAA4B,kBAAkB,CAAC;AAE5D,eAAO,MAAM,oBAAoB,EAAE,yBAqDlC,CAAC"}
@@ -8,7 +8,7 @@ const hoverActionGenerator = (page) => {
8
8
  return {
9
9
  execute: async ({ args }) => {
10
10
  const selector = args.css_selector;
11
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(selector, args.xpath, page);
11
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(selector, args.xpath, page, args?.elementAnnotation);
12
12
  const exec = new Function("page", `return page.${locator}.hover({ timeout: 3000 })`);
13
13
  await exec(page);
14
14
  await page.waitForTimeout(3000);
@@ -17,6 +17,10 @@ export declare const NextTaskAction: {
17
17
  type: string;
18
18
  description: string;
19
19
  };
20
+ elementAnnotation: {
21
+ type: string;
22
+ description: string;
23
+ };
20
24
  };
21
25
  required: string[];
22
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"next-task.d.ts","sourceRoot":"","sources":["../../src/actions/next-task.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;CA2B1B,CAAC"}
1
+ {"version":3,"file":"next-task.d.ts","sourceRoot":"","sources":["../../src/actions/next-task.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B1B,CAAC"}
@@ -19,12 +19,16 @@ exports.NextTaskAction = {
19
19
  action: {
20
20
  type: "string",
21
21
  description: `explain the next action in natural language.
22
- The next action should be as atomic as possible, precise and should contain enough details about the action to be performed.
23
- E.g. each click, key press, input, assert should be a separate action.
22
+ The next action should be as atomic as possible, precise and should contain enough details about the action to be performed.
23
+ E.g. each click, key press, input, assert should be a separate action.
24
24
  Each action should take the task to completion, if not the action is invalid.`,
25
25
  },
26
+ elementAnnotation: {
27
+ type: "string",
28
+ description: `look at the annotated screenshot and identify the element annotation (the one in the yellow box) on which next task needs to be performed`,
29
+ },
26
30
  },
27
- required: ["reason", "action"],
31
+ required: ["reason", "action", "elementAnnotation"],
28
32
  },
29
33
  },
30
34
  },
@@ -1 +1 @@
1
- {"version":3,"file":"text-content.d.ts","sourceRoot":"","sources":["../../src/actions/text-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAE1D,eAAO,MAAM,0BAA0B,EAAE,yBA6DxC,CAAC"}
1
+ {"version":3,"file":"text-content.d.ts","sourceRoot":"","sources":["../../src/actions/text-content.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAIrD,eAAO,MAAM,2BAA2B,iBAAiB,CAAC;AAE1D,eAAO,MAAM,0BAA0B,EAAE,yBA8DxC,CAAC"}
@@ -8,7 +8,7 @@ const textContentActionGenerator = (page, options) => {
8
8
  return {
9
9
  execute: async (args) => {
10
10
  const css = args.css_selector;
11
- const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page);
11
+ const locator = await (0, utils_1.getPlaywrightLocatorUsingCssSelector)(css, args.xpath, page, args?.elementAnnotation);
12
12
  const exec = new Function("page", `return page.${locator}.textContent()`);
13
13
  const value = (await exec(page));
14
14
  if (options) {
@@ -5,6 +5,6 @@ declare global {
5
5
  jQuery: any;
6
6
  }
7
7
  }
8
- export declare function getPlaywrightLocatorUsingCssSelector(cssSelector: string, xpath: string, page: Page): Promise<any>;
8
+ export declare function getPlaywrightLocatorUsingCssSelector(cssSelector: string, xpath: string, page: Page, elementAnnotation?: string): Promise<any>;
9
9
  export declare function getPageVarName(): string;
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,EAAE,GAAG,CAAC;QAChB,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAED,wBAAsB,oCAAoC,CACxD,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,gBAmEX;AAED,wBAAgB,cAAc,WAG7B"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/actions/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,UAAU,EAAE,GAAG,CAAC;QAChB,MAAM,EAAE,GAAG,CAAC;KACb;CACF;AAED,wBAAsB,oCAAoC,CACxD,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,IAAI,EACV,iBAAiB,CAAC,EAAE,MAAM,gBAkF3B;AAED,wBAAgB,cAAc,WAG7B"}
@@ -1,15 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getPageVarName = exports.getPlaywrightLocatorUsingCssSelector = void 0;
4
- async function getPlaywrightLocatorUsingCssSelector(cssSelector, xpath, page) {
4
+ async function getPlaywrightLocatorUsingCssSelector(cssSelector, xpath, page, elementAnnotation) {
5
5
  // TODO: analyse other solutions than just css. Also find other solutions to support :has-text -> prompting ?
6
6
  // jquery doesnt support :has-text. neither css. Only playwright locator supports this selector though.
7
7
  const sanitizedCssSelectorForJQuery = cssSelector
8
- .replaceAll(":has-text", ":contains")
9
- .replaceAll(":text", ":contains");
8
+ ?.replaceAll(":has-text", ":contains")
9
+ ?.replaceAll(":text", ":contains");
10
10
  return await page.evaluate((locator) => {
11
+ const elementAnnotation = locator?.elementAnnotation;
11
12
  let selectedElem;
12
- if (locator.xpath) {
13
+ if (elementAnnotation &&
14
+ // @ts-ignore
15
+ window?.annotationInstance?.annotations?.[elementAnnotation]) {
16
+ selectedElem =
17
+ // @ts-ignore
18
+ window?.annotationInstance?.annotations?.[elementAnnotation]?.node;
19
+ }
20
+ else if (locator.xpath) {
13
21
  try {
14
22
  const xpath = locator.xpath.replaceAll("text()", "normalize-space()");
15
23
  const result = document.evaluate(xpath, document, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null);
@@ -59,7 +67,12 @@ async function getPlaywrightLocatorUsingCssSelector(cssSelector, xpath, page) {
59
67
  throw Error(`Unable to find element, css: ${locator.css}`);
60
68
  }
61
69
  return window.playwright.generateLocator(selectedElem);
62
- }, { css: cssSelector, cssForJq: sanitizedCssSelectorForJQuery, xpath: xpath });
70
+ }, {
71
+ css: cssSelector,
72
+ cssForJq: sanitizedCssSelectorForJQuery,
73
+ xpath: xpath,
74
+ elementAnnotation,
75
+ });
63
76
  }
64
77
  exports.getPlaywrightLocatorUsingCssSelector = getPlaywrightLocatorUsingCssSelector;
65
78
  function getPageVarName() {
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAI3D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAgBvD,OAAO,EAAe,aAAa,EAAE,MAAM,aAAa,CAAC;AAKzD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM,CAKhD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,UAIvD;AA4ED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,aAAa,EACxB,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,MAAM,CAAC,CAuDjB;AAyBD,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,iBAiBxD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,QA+BjD;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,oBAAoB,CAAC,CAM1E;AAWD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,oBAAoB,EACtC,gBAAgB,GAAE,M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AAC,oBAAoB,CAAC,CAM1E;AAWD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CACrC,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,oBAAoB,EACtC,gBAAgB,GAAE,MAAM,EAAU,GACjC,OAAO,CAAC,MAAM,CAAC,CA+CjB;AAED,wBAAsB,sBAAsB,CAAC,EAC3C,YAAiB,EACjB,IAAS,EACT,eAAoB,EACpB,gBAAqB,EACrB,UAAyC,GAC1C,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,8EASA;AAED,qBAAa,eAAe;IACd,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,MAAM;IACrC,OAAO,CAAC,aAAa,CAAqB;YAE5B,mBAAmB;YAUnB,gBAAgB;IAsBjB,OAAO;IAuBb,SAAS;CAKjB"}
@@ -149,6 +149,7 @@ async function injectPwLocatorGenerator(page) {
149
149
  const scriptResps = await Promise.all([
150
150
  "https://assets-test.empirical.run/pw-selector.js",
151
151
  "https://code.jquery.com/jquery-3.7.1.min.js",
152
+ "https://assets-test.empirical.run/annotate-elements.js",
152
153
  ].map((url) => fetch(url)));
153
154
  const scripts = await Promise.all(scriptResps.map((s) => s.text()));
154
155
  page.on("load", async () => {
@@ -3,7 +3,7 @@ import { Page } from "playwright";
3
3
  import { PlaywrightActions } from "../../actions";
4
4
  import { TestCase } from "../../types";
5
5
  import { BrowsingAgentOptions } from "../browsing";
6
- export declare function getNextAction({ task, executedActions, failedActions, page, trace, llm, options, pageScreenshot, actions, disableSkills, }: {
6
+ export declare function getNextAction({ task, executedActions, failedActions, page, trace, llm, options, pageScreenshot, annotatedPageScreenshot, actions, disableSkills, useHints, }: {
7
7
  task: string;
8
8
  executedActions: string[];
9
9
  failedActions: any[];
@@ -12,8 +12,10 @@ export declare function getNextAction({ task, executedActions, failedActions, pa
12
12
  llm: LLM;
13
13
  options: BrowsingAgentOptions;
14
14
  pageScreenshot: string;
15
+ annotatedPageScreenshot?: string;
15
16
  actions: PlaywrightActions;
16
17
  disableSkills: boolean;
18
+ useHints: boolean;
17
19
  }): Promise<import("openai/resources/index.mjs").ChatCompletionMessageToolCall | undefined>;
18
20
  export declare function createTestUsingMasterAgent({ task, page, testCase, options, }: {
19
21
  task: string;
@@ -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;AAYlD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,oBAAoB,EAErB,MAAM,aAAa,CAAC;AAOrB,wBAAsB,aAAa,CAAC,EAClC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,IAAI,EACJ,KAAK,EACL,GAAG,EACH,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,GACd,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,oBAAoB,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,iBAAiB,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;CACxB,2FAwDA;AAED,wBAAsB,0BAA0B,CAAC,EAC/C,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,OAAO,GACR,EAAE;IACD,IAAI,EAAE,M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EAAE,oBAAoB,CAAC;CAC/B;;;GA8QA"}
@@ -14,30 +14,39 @@ const browsing_1 = require("../browsing");
14
14
  const utils_1 = require("../browsing/utils");
15
15
  const skills_retriever_1 = require("../codegen/skills-retriever");
16
16
  const verification_1 = require("../verification");
17
+ const with_hints_1 = require("./with-hints");
17
18
  const MAX_ERROR_COUNT = 2;
18
- async function getNextAction({ task, executedActions, failedActions, page, trace, llm, options, pageScreenshot, actions, disableSkills, }) {
19
+ async function getNextAction({ task, executedActions, failedActions, page, trace, llm, options, pageScreenshot, annotatedPageScreenshot, actions, disableSkills, useHints = false, }) {
19
20
  const promptSpan = trace?.span({ name: "master-agent-prompt" });
20
21
  const promptMessages = await (0, llm_1.getPrompt)("test-gen", {
21
22
  task,
22
23
  failedActions: failedActions.map((a) => a).join("\n"),
23
24
  executedActions: executedActions.map((a) => a).join("\n"),
24
25
  pageUrl: page.url(),
25
- }, 14);
26
+ }, useHints ? 16 : 14);
26
27
  // 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
27
28
  const userMessage = promptMessages.filter((m) => m.role === "user")[0];
28
29
  const systemMessage = promptMessages.filter((m) => m.role === "system")[0];
29
- userMessage.content = [
30
- {
31
- type: "text",
32
- text: userMessage.content,
33
- },
34
- {
35
- type: "image_url",
36
- image_url: {
37
- url: (0, vision_1.imageFormatForProvider)(options.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER, pageScreenshot),
38
- },
39
- },
40
- ];
30
+ userMessage.content =
31
+ useHints && annotatedPageScreenshot
32
+ ? (0, with_hints_1.getUserMessageWithForHints)({
33
+ userMessage: userMessage,
34
+ options,
35
+ pageScreenshot,
36
+ annotatedPageScreenshot,
37
+ })
38
+ : [
39
+ {
40
+ type: "text",
41
+ text: userMessage.content,
42
+ },
43
+ {
44
+ type: "image_url",
45
+ image_url: {
46
+ url: (0, vision_1.imageFormatForProvider)(options.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER, pageScreenshot),
47
+ },
48
+ },
49
+ ];
41
50
  const messages = [
42
51
  systemMessage,
43
52
  userMessage,
@@ -64,7 +73,9 @@ async function getNextAction({ task, executedActions, failedActions, page, trace
64
73
  return toolCall;
65
74
  }
66
75
  exports.getNextAction = getNextAction;
76
+ // let screenshotIndex = 0; // keeping this for local debugging
67
77
  async function createTestUsingMasterAgent({ task, page, testCase, options, }) {
78
+ const useHints = options?.useHints || false;
68
79
  const logger = new logger_1.CustomLogger({ useReporter: false });
69
80
  const testgenUpdatesReporter = new reporter_1.TestGenUpdatesReporter();
70
81
  // add timeout for the page to settle in
@@ -132,11 +143,46 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, }) {
132
143
  break;
133
144
  }
134
145
  }
135
- const buffer = await page.screenshot({ fullPage: true });
146
+ const buffer = await page.screenshot({
147
+ fullPage: true,
148
+ // path: `screenshots/screenshot-${screenshotIndex++}.png`, // enable this and screenshotIndex var for local debugging
149
+ });
136
150
  const testGenReporter = new reporter_1.TestGenUpdatesReporter();
137
151
  const testGenSnapshotUpdatePromise = testGenReporter.sendCurrentView(buffer);
138
152
  const pageScreenshot = buffer.toString("base64");
139
153
  let output;
154
+ let annotations;
155
+ let testGenAnnotatedSnapshotUpdatePromise;
156
+ let annotatedPageScreenshot;
157
+ if (useHints) {
158
+ await page.waitForTimeout(2000);
159
+ const annotationResult = await page.evaluate(() => {
160
+ // @ts-ignore
161
+ window.annotationInstance = window.annotateClickableElements();
162
+ // @ts-ignore
163
+ return window.annotationInstance;
164
+ });
165
+ annotations = annotationResult?.annotations || {};
166
+ await page.waitForTimeout(2000);
167
+ const annonationBuffer = await page.screenshot({
168
+ fullPage: true,
169
+ // path: `screenshots/screenshot-${screenshotIndex++}.png`,
170
+ });
171
+ await page.evaluate(() => {
172
+ console.log({
173
+ // @ts-ignore
174
+ disable: window?.annotationInstance?.disable,
175
+ });
176
+ // @ts-ignore
177
+ if (window?.annotationInstance && window?.annotationInstance?.destroy) {
178
+ // @ts-ignore
179
+ window?.annotationInstance?.destroy();
180
+ }
181
+ });
182
+ testGenAnnotatedSnapshotUpdatePromise =
183
+ testGenReporter.sendCurrentView(annonationBuffer);
184
+ annotatedPageScreenshot = annonationBuffer.toString("base64");
185
+ }
140
186
  if (await (0, session_1.shouldStopSession)()) {
141
187
  break;
142
188
  }
@@ -149,8 +195,10 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, }) {
149
195
  llm,
150
196
  options,
151
197
  pageScreenshot,
198
+ annotatedPageScreenshot,
152
199
  actions,
153
200
  disableSkills,
201
+ useHints,
154
202
  });
155
203
  if (await (0, session_1.shouldStopSession)()) {
156
204
  break;
@@ -165,12 +213,36 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, }) {
165
213
  action: JSON.parse(toolCall.function.arguments).action ||
166
214
  JSON.parse(toolCall.function.arguments).skill,
167
215
  reason: JSON.parse(toolCall.function.arguments).reason,
216
+ elementAnnotation: JSON.parse(toolCall.function.arguments)
217
+ ?.elementAnnotation,
168
218
  };
219
+ let shouldTriggerHintsFlow;
220
+ let hintsExecutionCompletion;
221
+ if (useHints) {
222
+ const result = await (0, with_hints_1.triggerHintsFlow)({
223
+ outputFromGetNextAction: output,
224
+ generatedAnnotations: annotations,
225
+ page,
226
+ llm,
227
+ });
228
+ shouldTriggerHintsFlow = result.shouldTriggerHintsFlow;
229
+ hintsExecutionCompletion = result.hintsExecutionCompletion;
230
+ }
169
231
  void testGenReporter.sendMessage(output.reason);
170
232
  logger.log(`Next Action: ${output.action}`);
171
233
  if (toolCall.function.name === skill_1.SKILL_USAGE) {
172
234
  await actions.executeAction(toolCall.function.name, args, masterAgentActionSpan);
173
235
  }
236
+ else if (shouldTriggerHintsFlow && hintsExecutionCompletion) {
237
+ const toolCalls = hintsExecutionCompletion?.tool_calls || [];
238
+ for (const i in toolCalls) {
239
+ const currentToolCall = toolCalls[i];
240
+ await actions.executeAction(currentToolCall.function.name, {
241
+ ...JSON.parse(currentToolCall.function.arguments),
242
+ ...args,
243
+ });
244
+ }
245
+ }
174
246
  else {
175
247
  await (0, browsing_1.executeTaskUsingBrowsingAgent)({
176
248
  trace: masterAgentActionSpan,
@@ -226,6 +298,9 @@ async function createTestUsingMasterAgent({ task, page, testCase, options, }) {
226
298
  }
227
299
  trace.update({ input: { task }, output: { output } });
228
300
  await testGenSnapshotUpdatePromise;
301
+ if (testGenAnnotatedSnapshotUpdatePromise) {
302
+ await testGenAnnotatedSnapshotUpdatePromise;
303
+ }
229
304
  masterAgentSpan.end({
230
305
  output: { action: output.action, reason: output.reason },
231
306
  });
@@ -0,0 +1,23 @@
1
+ import { LLM } from "@empiricalrun/llm";
2
+ import OpenAI from "openai";
3
+ import { Page } from "playwright";
4
+ import { BrowsingAgentOptions } from "../browsing";
5
+ export declare const getUserMessageWithForHints: ({ userMessage, options, pageScreenshot, annotatedPageScreenshot, }: {
6
+ userMessage: OpenAI.ChatCompletionUserMessageParam;
7
+ options: BrowsingAgentOptions;
8
+ pageScreenshot: string;
9
+ annotatedPageScreenshot: string;
10
+ }) => string | OpenAI.ChatCompletionContentPart[];
11
+ export declare const triggerHintsFlow: ({ outputFromGetNextAction, generatedAnnotations, page, llm, }: {
12
+ outputFromGetNextAction: {
13
+ action: string;
14
+ elementAnnotation?: string;
15
+ };
16
+ generatedAnnotations: Record<string, any>;
17
+ page: Page;
18
+ llm: LLM;
19
+ }) => Promise<{
20
+ shouldTriggerHintsFlow: boolean;
21
+ hintsExecutionCompletion: OpenAI.ChatCompletionMessage | undefined;
22
+ }>;
23
+ //# sourceMappingURL=with-hints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"with-hints.d.ts","sourceRoot":"","sources":["../../../src/agent/master/with-hints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAExC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAIlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,0BAA0B;iBAMxB,OAAO,8BAA8B;aACzC,oBAAoB;oBACb,MAAM;6BACG,MAAM;MAC7B,MAAM,GAAG,OAAO,yBAAyB,EAiC5C,CAAC;AAEF,eAAO,MAAM,gBAAgB;6BAMF;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;0BACqB,OAAO,MAAM,EAAE,GAAG,CAAC;UACnC,IAAI;SACL,GAAG;MACN,QAAQ;IACV,sBAAsB,EAAE,OAAO,CAAC;IAChC,wBAAwB,EAAE,OAAO,qBAAqB,GAAG,SAAS,CAAC;CACpE,CAgFA,CAAC"}
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.triggerHintsFlow = exports.getUserMessageWithForHints = void 0;
4
+ const vision_1 = require("@empiricalrun/llm/vision");
5
+ const actions_1 = require("../../actions");
6
+ const constants_1 = require("../../constants");
7
+ const getUserMessageWithForHints = ({ userMessage, options, pageScreenshot, annotatedPageScreenshot, }) => {
8
+ return [
9
+ {
10
+ type: "text",
11
+ text: userMessage.content,
12
+ },
13
+ {
14
+ type: "text",
15
+ text: "Screenshot in normal mode 👇",
16
+ },
17
+ {
18
+ type: "image_url",
19
+ image_url: {
20
+ url: (0, vision_1.imageFormatForProvider)(options.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER, pageScreenshot),
21
+ },
22
+ },
23
+ {
24
+ type: "text",
25
+ text: "Screenshot in annotated mode 👇",
26
+ },
27
+ {
28
+ type: "image_url",
29
+ image_url: {
30
+ url: (0, vision_1.imageFormatForProvider)(options.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER, annotatedPageScreenshot),
31
+ },
32
+ },
33
+ ];
34
+ };
35
+ exports.getUserMessageWithForHints = getUserMessageWithForHints;
36
+ const triggerHintsFlow = async ({ outputFromGetNextAction, generatedAnnotations, page, llm, }) => {
37
+ try {
38
+ const hasElementAnnotation = outputFromGetNextAction?.elementAnnotation?.length &&
39
+ outputFromGetNextAction?.elementAnnotation?.trim()?.length &&
40
+ outputFromGetNextAction?.elementAnnotation in
41
+ (generatedAnnotations || {});
42
+ if (!hasElementAnnotation) {
43
+ return {
44
+ shouldTriggerHintsFlow: false,
45
+ hintsExecutionCompletion: undefined,
46
+ };
47
+ }
48
+ const actions = new actions_1.PlaywrightActions(page);
49
+ const completion = await llm.createChatCompletion({
50
+ messages: [
51
+ {
52
+ role: "system",
53
+ 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.
54
+
55
+ You need to pick the next step to achieve the task. Remember that the goal must be achieved.
56
+
57
+ Based on the goal and available tool calls you need to pick the appropriate tool call.
58
+
59
+
60
+ Instructions:
61
+ - Take actions one at a time. Do not try to take multiple actions
62
+ - You can respond with multiple assertions in one shot
63
+ - Stick to the task provided to you and mark the task done once the task is complete
64
+ - Do not execute any action which is not mentioned in the task`,
65
+ },
66
+ {
67
+ role: "user",
68
+ content: [
69
+ {
70
+ type: "text",
71
+ text: `Task: ${outputFromGetNextAction?.action}`,
72
+ },
73
+ ],
74
+ },
75
+ ],
76
+ tools: actions
77
+ .getBrowsingActionSchemas()
78
+ .filter((action) => action.function.name !== "skill_usage"),
79
+ model: "gpt-4o-2024-08-06",
80
+ modelParameters: {
81
+ temperature: 0.5,
82
+ max_completion_tokens: 4000,
83
+ tool_choice: "required",
84
+ },
85
+ });
86
+ const canTriggerHintsFlow = completion?.tool_calls?.some((currentToolCall) => currentToolCall.function.name === "fill_input_element" ||
87
+ currentToolCall.function.name === "click_element");
88
+ if (!canTriggerHintsFlow) {
89
+ return {
90
+ shouldTriggerHintsFlow: false,
91
+ hintsExecutionCompletion: undefined,
92
+ };
93
+ }
94
+ return {
95
+ shouldTriggerHintsFlow: true,
96
+ // @ts-ignore
97
+ hintsExecutionCompletion: completion,
98
+ };
99
+ }
100
+ catch (e) {
101
+ console.error("Error in triggerHintsFlow", e);
102
+ return {
103
+ shouldTriggerHintsFlow: false,
104
+ hintsExecutionCompletion: undefined,
105
+ };
106
+ }
107
+ };
108
+ exports.triggerHintsFlow = triggerHintsFlow;
@@ -16,6 +16,7 @@ export type TestGenConfigOptions = {
16
16
  model: LLMModel;
17
17
  modelProvider: LLMProvider;
18
18
  modelParameters?: ModelParameters;
19
+ useHints?: boolean;
19
20
  metadata: {
20
21
  testSessionId: number;
21
22
  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;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAElC,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,CAAC;AAE/C,MAAM,MAAM,oBAAoB,GAAG;IACjC,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,QAAQ,CAAC;IAChB,aAAa,EAAE,WAAW,CAAC;IAC3B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,YAAY,EAAE,MAAM,CAAC;QACrB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE,aAAa,GAAG,YAAY,CAAC;KAC3C,CAAC;CACH,CAAC;AAEF,MAAM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C,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE;IACP,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACrC,KACE,MAAM,CAAC;AAEZ,MAAM,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.33.16",
3
+ "version": "0.34.1",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -44,7 +44,7 @@
44
44
  "ts-morph": "^23.0.0",
45
45
  "tsx": "^4.16.2",
46
46
  "typescript": "^5.3.3",
47
- "@empiricalrun/llm": "^0.9.15",
47
+ "@empiricalrun/llm": "^0.9.16",
48
48
  "@empiricalrun/r2-uploader": "^0.3.6",
49
49
  "@empiricalrun/reporter": "^0.21.2"
50
50
  },