@empiricalrun/test-gen 0.31.7 → 0.31.9

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.31.9
4
+
5
+ ### Patch Changes
6
+
7
+ - f2179f0: fix: upload test assets for error debugging
8
+
9
+ ## 0.31.8
10
+
11
+ ### Patch Changes
12
+
13
+ - 621c5f5: fix: spacing and format of browsing agent prompt
14
+
3
15
  ## 0.31.7
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"o1-completion.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/o1-completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AAKpC,wBAAsB,eAAe,CAAC,EACpC,QAAQ,EACR,KAAK,EACL,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,0BAA0B,EAAE,CAAC;IACvC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GAAG,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAiD7C"}
1
+ {"version":3,"file":"o1-completion.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/o1-completion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,qBAAqB,EACrB,0BAA0B,EAC1B,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AAKpC,wBAAsB,eAAe,CAAC,EACpC,QAAQ,EACR,KAAK,EACL,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,0BAA0B,EAAE,CAAC;IACvC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GAAG,OAAO,CAAC,qBAAqB,GAAG,SAAS,CAAC,CAoD7C"}
@@ -24,10 +24,13 @@ async function getO1Completion({ messages, tools, trace, }) {
24
24
  ${userInstruction?.content}
25
25
 
26
26
  You need to respond with one of the following tool call with provided schema:
27
- ${tools.map((tool) => JSON.stringify(tool)).join("\n --- \n")}
27
+ ${tools.map((tool) => JSON.stringify(tool, null, 2)).join("\n --- \n")}
28
+
29
+ ------
28
30
 
29
- Do not respond with markdown, respond only with the JSON object.
30
- Do not respond with any backticks.
31
+ Before responding, ensure the following:
32
+ - Do not respond with markdown, respond only with the JSON object.
33
+ - Do not respond with any backticks.
31
34
  `;
32
35
  const response = (await llm.createChatCompletion({
33
36
  messages: [userInstruction],
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,KAAK,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE1D,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,MAAM,EAAE,EACzB,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,oBAAoB,gBAyE9B"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AASlC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,KAAK,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;AAE1D,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,IAAI,EACV,eAAe,EAAE,MAAM,EAAE,EACzB,KAAK,EAAE,WAAW,EAClB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,oBAAoB,gBA0E9B"}
@@ -46,6 +46,7 @@ async function masterAgent(task, page, executedActions, trace, llm, options) {
46
46
  ...constants_1.DEFAULT_MODEL_PARAMETERS,
47
47
  ...options.modelParameters,
48
48
  tool_choice: "required",
49
+ temperature: 1,
49
50
  },
50
51
  trace,
51
52
  // @ts-ignore
package/dist/bin/index.js CHANGED
@@ -33,10 +33,6 @@ async function runAgent(testGenConfig) {
33
33
  testFilePath: specPath,
34
34
  filePathToUpdate,
35
35
  });
36
- await new reporter_1.TestGenUpdatesReporter().reportGenAssets({
37
- projectRepoName: testGenConfig.options.metadata.projectRepoName,
38
- testName: testCase.name,
39
- });
40
36
  }
41
37
  else {
42
38
  logger.success("Generating test using coding agent");
@@ -71,8 +67,12 @@ async function runAgent(testGenConfig) {
71
67
  }
72
68
  catch (e) {
73
69
  testGenFailed = true;
74
- new logger_1.CustomLogger().error(`Failed to run agent for the scenario`, e, process.env.LOG_URL ? `[view logs](${process.env.LOG_URL})` : "");
70
+ new logger_1.CustomLogger().error(`Failed to generate test for the scenario. ${process.env.LOG_URL ? `[view log](${process.env.LOG_URL})` : ""}`);
75
71
  }
72
+ await new reporter_1.TestGenUpdatesReporter().reportGenAssets({
73
+ projectRepoName: testGenConfig.options.metadata.projectRepoName,
74
+ testName: testGenConfig.testCase.name,
75
+ });
76
76
  // TODO: move these reporters to a better lifecycle
77
77
  await (0, ci_1.reportOnCI)(testGenConfig.testCase);
78
78
  await (0, llm_1.flushAllTraces)();
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/uploader/index.ts"],"names":[],"mappings":"AAWA,eAAO,MAA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7 +53,7 @@ async function uploadTestResultsUsingPrjRepo({ projectRepoName, testName, }) {
53
53
  });
54
54
  // fileNames are relative upload paths
55
55
  const fileNames = Object.keys(files);
56
- console.log("FileNames to be uploaded", fileNames);
56
+ console.log("Uploaded files", fileNames.map((f) => getFullUploadPath(f, uploadDir)));
57
57
  const defaultLocation = path_1.default.join(process.cwd(), "playwright-report", "summary.json");
58
58
  const results = (0, reporter_1.parseJsonReport)(defaultLocation);
59
59
  const flatTestsList = (0, reporter_1.getFlattenedTestList)(results.suites);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.31.7",
3
+ "version": "0.31.9",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"