@empiricalrun/test-gen 0.35.5 → 0.35.8
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 +18 -0
- package/browser-injected-scripts/annotate-elements.spec.ts +1 -1
- package/dist/agent/browsing/index.js +2 -2
- package/dist/agent/verification/index.js +1 -1
- package/dist/browser-injected-scripts/annotate-elements.spec.ts +1 -1
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +6 -1
- package/package.json +2 -2
- package/vitest.config.ts +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.35.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 461f3dd: fix: add logs for generation stopped due to stop session requested
|
|
8
|
+
|
|
9
|
+
## 0.35.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 2145207: fix: vitest config to exclude browser tests
|
|
14
|
+
|
|
15
|
+
## 0.35.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 948f534: fix: update verification agent prompt
|
|
20
|
+
|
|
3
21
|
## 0.35.5
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
@@ -157,7 +157,7 @@ test("should annotate all important items on quizizz page", async ({
|
|
|
157
157
|
(item) =>
|
|
158
158
|
item.innerText.includes("accommodations") &&
|
|
159
159
|
item.href ===
|
|
160
|
-
|
|
160
|
+
"https://quizizz.com/admin/differentiation/accommodations",
|
|
161
161
|
),
|
|
162
162
|
)
|
|
163
163
|
.toBeTruthy();
|
|
@@ -101,7 +101,7 @@ async function executeTaskUsingBrowsingAgent({ trace, action, logger, page, opti
|
|
|
101
101
|
await actions.executeAction(toolCall.function.name, JSON.parse(toolCall.function.arguments), toolCallsSpan);
|
|
102
102
|
executedActions.push({
|
|
103
103
|
isError: false,
|
|
104
|
-
action: JSON.
|
|
104
|
+
action: JSON.parse(toolCall.function.arguments)?.reason,
|
|
105
105
|
});
|
|
106
106
|
lastActionExecTrace = "";
|
|
107
107
|
}
|
|
@@ -109,7 +109,7 @@ async function executeTaskUsingBrowsingAgent({ trace, action, logger, page, opti
|
|
|
109
109
|
// TODO: implement feedback loop to llm
|
|
110
110
|
executedActions.push({
|
|
111
111
|
isError: true,
|
|
112
|
-
action: JSON.
|
|
112
|
+
action: JSON.parse(toolCall.function.arguments)?.reason,
|
|
113
113
|
});
|
|
114
114
|
lastActionExecTrace = e.message;
|
|
115
115
|
void testgenUpdatesReporter.sendMessage(e.message);
|
|
@@ -16,7 +16,7 @@ async function verificationAgent({ trace, task, conversation, }) {
|
|
|
16
16
|
const messages = await (0, llm_1.getPrompt)("agent-steps-verification", {
|
|
17
17
|
task,
|
|
18
18
|
conversation: conversation.join("\n"),
|
|
19
|
-
},
|
|
19
|
+
}, 5);
|
|
20
20
|
const llm = new llm_1.LLM({ provider: "openai" });
|
|
21
21
|
const response = await llm.createChatCompletion({
|
|
22
22
|
trace: verificationAgentSpan,
|
|
@@ -157,7 +157,7 @@ test("should annotate all important items on quizizz page", async ({
|
|
|
157
157
|
(item) =>
|
|
158
158
|
item.innerText.includes("accommodations") &&
|
|
159
159
|
item.href ===
|
|
160
|
-
|
|
160
|
+
"https://quizizz.com/admin/differentiation/accommodations",
|
|
161
161
|
),
|
|
162
162
|
)
|
|
163
163
|
.toBeTruthy();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAmBA,iBAAS,iBAAiB;;;;;EAOzB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,YAAY,EACZ,UAAU,EACV,eAAe,GAChB,EAAE;IACD,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB,QAIA;AAED,wBAAsB,iBAAiB,qBAStC;AAED,wBAAsB,eAAe,0DAqBpC;AAED,wBAAsB,UAAU,kBAqB/B;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
package/dist/session/index.js
CHANGED
|
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.getSessionDetails = exports.endSession = exports.getSessionState = exports.shouldStopSession = exports.setSessionDetails = void 0;
|
|
7
7
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
8
|
+
const logger_1 = require("../bin/logger");
|
|
8
9
|
const sessionDetails = {
|
|
9
10
|
sessionId: undefined,
|
|
10
11
|
version: package_json_1.default.version,
|
|
@@ -30,7 +31,11 @@ function setSessionDetails({ sessionId, generationId, testCaseId, projectRepoNam
|
|
|
30
31
|
exports.setSessionDetails = setSessionDetails;
|
|
31
32
|
async function shouldStopSession() {
|
|
32
33
|
const sessionState = await getSessionState();
|
|
33
|
-
|
|
34
|
+
const shouldStopSession = sessionState !== "started";
|
|
35
|
+
if (shouldStopSession) {
|
|
36
|
+
new logger_1.CustomLogger().warn(`Generation to be stopped due to session state marked as ${sessionState}`);
|
|
37
|
+
}
|
|
38
|
+
return shouldStopSession;
|
|
34
39
|
}
|
|
35
40
|
exports.shouldStopSession = shouldStopSession;
|
|
36
41
|
async function getSessionState() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.8",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"clean": "tsc --build --clean",
|
|
64
64
|
"lint": "eslint .",
|
|
65
65
|
"test": "vitest run",
|
|
66
|
-
"
|
|
66
|
+
"test-browser": "npx playwright test",
|
|
67
67
|
"test:watch": "vitest",
|
|
68
68
|
"test:watch-files": "vitest $0 --watch"
|
|
69
69
|
}
|