@empiricalrun/test-gen 0.38.25 → 0.38.27

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,17 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.38.27
4
+
5
+ ### Patch Changes
6
+
7
+ - 931191c: fix: avoid enriching description of annotated elements if already provided
8
+
9
+ ## 0.38.26
10
+
11
+ ### Patch Changes
12
+
13
+ - 05b8b6c: feat: removed checks in canRunMasterAgent
14
+
3
15
  ## 0.38.25
4
16
 
5
17
  ### Patch Changes
@@ -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;AAK3D,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAiBvD,OAAO,EAAe,aAAa,EAAE,MAAM,aAAa,CAAC;AAMzD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM,CAKhD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,UAIvD;AA6FD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,aAAa,EACxB,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,MAAM,CAAC,CA0DjB;AAyBD,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,iBAuHxD;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,gBAA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GG;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,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"}
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TeardownManager = exports.getPromptForNextAction = exports.detectProjectName = exports.readPlaywrightConfig = exports.canRunMasterAgent = exports.injectPwLocatorGenerator = exports.prepareFileForMasterAgent = exports.prepareBrowsingAgentTask = exports.isRegExp = void 0;
7
7
  const llm_1 = require("@empiricalrun/llm");
8
- const child_process_1 = require("child_process");
9
8
  const fs_extra_1 = __importDefault(require("fs-extra"));
10
9
  const minimatch_1 = require("minimatch");
11
10
  const path_1 = __importDefault(require("path"));
@@ -277,22 +276,6 @@ function canRunMasterAgent(filePath) {
277
276
  if (!fs_extra_1.default.existsSync(filePath)) {
278
277
  throw new Error(`File for master agent to run not found: ${filePath}`);
279
278
  }
280
- const { dependencies: installedPackages } = JSON.parse((0, child_process_1.execSync)("npm ls --json").toString());
281
- const hasPwTestInstalled = installedPackages["@playwright/test"];
282
- const testGenInstalled = installedPackages["@empiricalrun/test-gen"];
283
- const linterInstalled = installedPackages["eslint"] ||
284
- installedPackages["@empiricalrun/eslint-config"];
285
- const testGenVersion = testGenInstalled.version;
286
- const latestTestGenVersion = (0, child_process_1.execSync)("npm view @empiricalrun/test-gen version")
287
- .toString()
288
- .trim();
289
- if (!hasPwTestInstalled || !testGenInstalled || !linterInstalled) {
290
- throw new Error(`Missing packages: browsing agent requires playwright, linter, and @empiricalrun/test-gen to be installed`);
291
- }
292
- if (testGenVersion !== latestTestGenVersion) {
293
- const logger = new logger_1.CustomLogger();
294
- logger.warn(`Outdated @empiricalrun/test-gen package: expected ${latestTestGenVersion}, got ${testGenVersion}`);
295
- }
296
279
  }
297
280
  exports.canRunMasterAgent = canRunMasterAgent;
298
281
  /**
@@ -1 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2ChC,CAAC;AA4GF,wBAAsB,eAAe,CAAC,EACpC,IAAI,EACJ,eAAe,EACf,aAAa,EACb,OAAO,EACP,KAAK,EACL,GAAG,EACH,OAAO,EACP,cAAc,EACd,OAAO,EACP,aAAa,EACb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S,CAAC;CACpE,CA0GA,CAAC;AAGF,wBAAsB,4BAA4B,CAAC,EACjD,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;;;GAkVA"}
@@ -50,7 +50,7 @@ exports.AnnotationToolAction = {
50
50
  },
51
51
  description: {
52
52
  type: "string",
53
- description: "Detailed description for the element.",
53
+ description: "Detailed description for the element. Must not be NA",
54
54
  },
55
55
  },
56
56
  required: ["element_id", "description"],
@@ -102,7 +102,9 @@ Follow steps to fulfil your task:
102
102
 
103
103
  Note:
104
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
105
+ - Don't update the description if its already present in the given annotations
106
+ - Replace all the "NA" with description of the element. Its position, how does it look like etc.
107
+ - There should be no "NA" present in any of the element description
106
108
  `,
107
109
  };
108
110
  const userMessage = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.38.25",
3
+ "version": "0.38.27",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"