@empiricalrun/test-gen 0.50.0 → 0.50.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 +9 -0
- package/dist/agent/chat.d.ts.map +1 -1
- package/dist/agent/chat.js +6 -0
- package/dist/tools/test-run.d.ts.map +1 -1
- package/dist/tools/test-run.js +21 -11
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.50.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- b070af3: fix: error handling in test run tool
|
|
8
|
+
- a94ef14: fix: chat agent system prompt for proactiveness
|
|
9
|
+
- Updated dependencies [b070af3]
|
|
10
|
+
- @empiricalrun/test-run@0.7.4
|
|
11
|
+
|
|
3
12
|
## 0.50.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/dist/agent/chat.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AA8E1D,wBAAsB,SAAS,CAAC,EAC9B,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,8CAqEA"}
|
package/dist/agent/chat.js
CHANGED
|
@@ -53,6 +53,12 @@ ${(0, repo_tree_1.generateAsciiTree)(process.cwd())}
|
|
|
53
53
|
While specifying paths to files, use relative paths from the current working directory. For example:
|
|
54
54
|
- Correct path: "tests/lesson.spec.ts"
|
|
55
55
|
- Incorrect path: "/repo/tests/lesson.spec.ts" or "${path_1.default.basename(process.cwd())}/tests/lesson.spec.ts"
|
|
56
|
+
|
|
57
|
+
# Proactiveness
|
|
58
|
+
You are allowed to be proactive, but only when the user asks you to do something. You should strive to
|
|
59
|
+
strike a balance between:
|
|
60
|
+
1. Doing the right thing when asked, including taking actions and follow-up actions
|
|
61
|
+
2. Not surprising the user with actions you take without asking
|
|
56
62
|
`;
|
|
57
63
|
const tools = [
|
|
58
64
|
test_run_1.runTestTool,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-run.d.ts","sourceRoot":"","sources":["../../src/tools/test-run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAsBpC,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"test-run.d.ts","sourceRoot":"","sources":["../../src/tools/test-run.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAsBpC,eAAO,MAAM,WAAW,EAAE,IA8BzB,CAAC"}
|
package/dist/tools/test-run.js
CHANGED
|
@@ -26,16 +26,26 @@ exports.runTestTool = {
|
|
|
26
26
|
},
|
|
27
27
|
execute: async (input) => {
|
|
28
28
|
const { testName, suites, fileName, project, headed } = input;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
29
|
+
try {
|
|
30
|
+
const result = await (0, test_run_1.runSingleTest)({
|
|
31
|
+
testName,
|
|
32
|
+
suites,
|
|
33
|
+
fileName,
|
|
34
|
+
projects: [project],
|
|
35
|
+
headed,
|
|
36
|
+
});
|
|
37
|
+
return {
|
|
38
|
+
result: JSON.stringify(result),
|
|
39
|
+
isError: false,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
// Ensure we capture the full error message regardless of error type
|
|
44
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
45
|
+
return {
|
|
46
|
+
result: JSON.stringify({ error: errorMessage }),
|
|
47
|
+
isError: true,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
40
50
|
},
|
|
41
51
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.50.
|
|
3
|
+
"version": "0.50.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"tsx": "^4.16.2",
|
|
75
75
|
"typescript": "^5.3.3",
|
|
76
76
|
"zod": "^3.23.8",
|
|
77
|
-
"@empiricalrun/llm": "^0.10.1",
|
|
78
77
|
"@empiricalrun/r2-uploader": "^0.3.8",
|
|
79
78
|
"@empiricalrun/reporter": "^0.23.1",
|
|
80
|
-
"@empiricalrun/test-run": "^0.7.
|
|
79
|
+
"@empiricalrun/test-run": "^0.7.4",
|
|
80
|
+
"@empiricalrun/llm": "^0.10.1"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@playwright/test": "1.47.1",
|