@empiricalrun/test-gen 0.52.9 → 0.53.0
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 +28 -0
- package/dist/agent/browsing/utils.d.ts.map +1 -1
- package/dist/agent/browsing/utils.js +2 -1
- package/dist/agent/chat/index.d.ts.map +1 -1
- package/dist/agent/chat/index.js +23 -15
- package/dist/tools/test-run.d.ts.map +1 -1
- package/dist/tools/test-run.js +2 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.53.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d1d682d: feat: added typescript validation check in editor tools for gemini
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [d1d682d]
|
|
12
|
+
- Updated dependencies [8533602]
|
|
13
|
+
- Updated dependencies [e8035d6]
|
|
14
|
+
- @empiricalrun/llm@0.14.0
|
|
15
|
+
|
|
16
|
+
## 0.52.11
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- ac2c8af: feat: made claude gemini handle parallel tool calling
|
|
21
|
+
- Updated dependencies [ac2c8af]
|
|
22
|
+
- @empiricalrun/llm@0.13.8
|
|
23
|
+
|
|
24
|
+
## 0.52.10
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies [ae08b74]
|
|
29
|
+
- @empiricalrun/llm@0.13.7
|
|
30
|
+
|
|
3
31
|
## 0.52.9
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,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AAc,EAAE,MAAM,EAAE,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAoBA;AAED,wBAAsB,yBAAyB,CAAC,EAC9C,QAAQ,EACR,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GAAG,OAAO,CAAC,MAAM,CAAC,CAyDlB;AAyBD,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,iBA2HxD;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,oBAAoB,CAAC,CAM/B;AAWD,wBAAsB,oBAAoB,CACxC,gBAAgB,EAAE,oBAAoB,GACrC,OAAO,CAAC,MAAM,EAAE,CAAC,CAQnB;AAED;;;;;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,qBAAa,eAAe;IACd,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,MAAM;IACrC,OAAO,CAAC,aAAa,CAAqB;YAE5B,mBAAmB;YAUnB,gBAAgB;IAsBjB,OAAO;IAoBb,SAAS;CAKjB"}
|
|
@@ -97,7 +97,8 @@ async function replaceTodoWithCreateTest({ testFilePath, testCaseName, testCaseS
|
|
|
97
97
|
if (!todoMatch) {
|
|
98
98
|
throw new Error(`No "// TODO(agent):" comment found in file: ${testFilePath}`);
|
|
99
99
|
}
|
|
100
|
-
|
|
100
|
+
// TODO: figure out correct page variable name
|
|
101
|
+
await fs_extra_1.default.writeFile(testFilePath, fileContent.replace(todoRegex, (_, todoText) => `await createTest("${todoText.replace(/"/g, '\\"')}", extPage);`));
|
|
101
102
|
await addImportForCreateTest(testFilePath);
|
|
102
103
|
await markTestAsOnly({
|
|
103
104
|
testCaseName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/chat/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/chat/index.ts"],"names":[],"mappings":"AAqFA,wBAAsB,SAAS,CAAC,EAC9B,aAA4C,EAC5C,mBAA2B,EAC3B,oBAAoB,GACrB,EAAE;IACD,aAAa,CAAC,EACV,4BAA4B,GAC5B,4BAA4B,GAC5B,8BAA8B,CAAC;IACnC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,mBAuFA"}
|
package/dist/agent/chat/index.js
CHANGED
|
@@ -21,6 +21,10 @@ function getTools(selectedModel) {
|
|
|
21
21
|
];
|
|
22
22
|
if (selectedModel.startsWith("gemini")) {
|
|
23
23
|
// Claude will have its own built-in text editor tools
|
|
24
|
+
chat_1.textEditorTools.forEach((tool) => {
|
|
25
|
+
const originalExecute = tool.execute;
|
|
26
|
+
tool.execute = (input) => originalExecute(input, web_1.validateTypescript);
|
|
27
|
+
});
|
|
24
28
|
tools.push(...chat_1.textEditorTools);
|
|
25
29
|
}
|
|
26
30
|
const toolExecutors = {
|
|
@@ -96,22 +100,26 @@ async function chatAgent({ selectedModel = "claude-3-7-sonnet-20250219", useDisk
|
|
|
96
100
|
chatModel.pushUserMessage(userPrompt);
|
|
97
101
|
continue;
|
|
98
102
|
}
|
|
99
|
-
const
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
const toolCalls = chatModel.getPendingToolCalls();
|
|
104
|
+
if (toolCalls.length) {
|
|
105
|
+
const toolResults = [];
|
|
106
|
+
for (const call of toolCalls) {
|
|
107
|
+
const args = JSON.stringify(call.input);
|
|
108
|
+
console.log(`Executing tool ${call.name} with args: ${args}`);
|
|
109
|
+
const toolExecutor = toolExecutors[call.name];
|
|
110
|
+
if (!toolExecutor) {
|
|
111
|
+
throw new Error(`Tool ${call.name} not found`);
|
|
112
|
+
}
|
|
113
|
+
const callResponse = await toolExecutor(call.input);
|
|
114
|
+
if (callResponse.isError) {
|
|
115
|
+
ora(`Tool ${call.name} failed: ${callResponse.result}`).fail();
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
ora(`Tool ${call.name} completed`).succeed();
|
|
119
|
+
}
|
|
120
|
+
toolResults.push(callResponse);
|
|
112
121
|
}
|
|
113
|
-
chatModel.
|
|
114
|
-
continue;
|
|
122
|
+
chatModel.pushToolResultsMessage(toolCalls, toolResults);
|
|
115
123
|
}
|
|
116
124
|
const spinner = ora(`${getModelName(selectedModel)} is working...`).start();
|
|
117
125
|
const response = await chatModel.getLLMResponse({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-run.d.ts","sourceRoot":"","sources":["../../src/tools/test-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAuBnD,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"test-run.d.ts","sourceRoot":"","sources":["../../src/tools/test-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAuBnD,eAAO,MAAM,WAAW,EAAE,IAgCzB,CAAC"}
|
package/dist/tools/test-run.js
CHANGED
|
@@ -26,6 +26,8 @@ exports.runTestTool = {
|
|
|
26
26
|
execute: async (input) => {
|
|
27
27
|
const { testName, suites, fileName, project, headed } = input;
|
|
28
28
|
try {
|
|
29
|
+
// {"project":"chromium","suites":[],"fileName":"tests/quizizz-for-work/group.spec.ts","testName":"Create a group"}
|
|
30
|
+
// This runs all tests - TODO: Debug this, should only run the testName
|
|
29
31
|
const result = await (0, test_run_1.runSingleTest)({
|
|
30
32
|
testName,
|
|
31
33
|
suites,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.53.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"tsx": "^4.16.2",
|
|
69
69
|
"typescript": "^5.3.3",
|
|
70
70
|
"zod": "^3.23.8",
|
|
71
|
-
"@empiricalrun/llm": "^0.
|
|
71
|
+
"@empiricalrun/llm": "^0.14.0",
|
|
72
72
|
"@empiricalrun/r2-uploader": "^0.3.8",
|
|
73
73
|
"@empiricalrun/test-run": "^0.7.6"
|
|
74
74
|
},
|