@empiricalrun/test-gen 0.42.15 → 0.42.17
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 +15 -0
- package/dist/agent/codegen/fix-ts-errors.d.ts.map +1 -1
- package/dist/agent/codegen/fix-ts-errors.js +4 -0
- package/dist/agent/master/with-hints.d.ts +0 -7
- package/dist/agent/master/with-hints.d.ts.map +1 -1
- package/dist/agent/master/with-hints.js +1 -31
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.42.17
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 65e821a: chore: remove dead code around selector hints
|
|
8
|
+
- 286a1a5: fix: annotation test
|
|
9
|
+
|
|
10
|
+
## 0.42.16
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [9a81634]
|
|
15
|
+
- Updated dependencies [f2c3344]
|
|
16
|
+
- @empiricalrun/reporter@0.23.1
|
|
17
|
+
|
|
3
18
|
## 0.42.15
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fix-ts-errors.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/fix-ts-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQhD,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE7D,wBAAsB,8BAA8B,CAAC,EACnD,KAAK,EACL,MAA2B,EAC3B,IAAI,EACJ,OAAO,EACP,eAAe,EACf,QAAQ,EACR,OAAO,GACR,EAAE;IACD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,
|
|
1
|
+
{"version":3,"file":"fix-ts-errors.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/fix-ts-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAQhD,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE7D,wBAAsB,8BAA8B,CAAC,EACnD,KAAK,EACL,MAA2B,EAC3B,IAAI,EACJ,OAAO,EACP,eAAe,EACf,QAAQ,EACR,OAAO,GACR,EAAE;IACD,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,CAAC,EAAE,oBAAoB,CAAC;CAChC,iBA4EA"}
|
|
@@ -64,6 +64,10 @@ async function validateAndFixTypescriptErrors({ trace, logger = new logger_1.Cus
|
|
|
64
64
|
await (0, web_1.lintErrors)(file);
|
|
65
65
|
const validateTypesSpan = trace?.span({
|
|
66
66
|
name: "detect-type-errors-in-file",
|
|
67
|
+
input: {
|
|
68
|
+
filePath: file,
|
|
69
|
+
content: response,
|
|
70
|
+
},
|
|
67
71
|
});
|
|
68
72
|
errors = (0, web_1.validateTypescript)(file);
|
|
69
73
|
validateTypesSpan?.end({ output: { errors } });
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { LLM, TraceClient } from "@empiricalrun/llm";
|
|
2
2
|
import OpenAI from "openai";
|
|
3
3
|
import { PlaywrightActions } from "../../actions";
|
|
4
|
-
import { BrowsingAgentOptions } from "../browsing";
|
|
5
|
-
export declare const getUserMessageWithForHints: ({ userMessage, options, pageScreenshot, annotatedPageScreenshot, }: {
|
|
6
|
-
userMessage: OpenAI.ChatCompletionUserMessageParam;
|
|
7
|
-
options?: BrowsingAgentOptions | undefined;
|
|
8
|
-
pageScreenshot: string;
|
|
9
|
-
annotatedPageScreenshot: string;
|
|
10
|
-
}) => string | OpenAI.ChatCompletionContentPart[];
|
|
11
4
|
export declare const triggerHintsFlow: ({ outputFromGetNextAction, generatedAnnotations, actions, llm, trace, }: {
|
|
12
5
|
outputFromGetNextAction: {
|
|
13
6
|
action: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-hints.d.ts","sourceRoot":"","sources":["../../../src/agent/master/with-hints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"with-hints.d.ts","sourceRoot":"","sources":["../../../src/agent/master/with-hints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAOlD,eAAO,MAAM,gBAAgB;6BAOF;QACvB,MAAM,EAAE,MAAM,CAAC;QACf,iBAAiB,CAAC,EAAE,MAAM,CAAC;KAC5B;0BACqB,OAAO,MAAM,EAAE,GAAG,CAAC;aAChC,iBAAiB;SACrB,GAAG;;MAEN,QAAQ;IACV,sBAAsB,EAAE,OAAO,CAAC;IAChC,wBAAwB,EAAE,OAAO,qBAAqB,GAAG,SAAS,CAAC;CACpE,CAyGA,CAAC"}
|
|
@@ -1,41 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.triggerHintsFlow =
|
|
4
|
-
const vision_1 = require("@empiricalrun/llm/vision");
|
|
3
|
+
exports.triggerHintsFlow = void 0;
|
|
5
4
|
const assert_1 = require("../../actions/assert");
|
|
6
5
|
const click_1 = require("../../actions/click");
|
|
7
6
|
const fill_1 = require("../../actions/fill");
|
|
8
7
|
const hover_1 = require("../../actions/hover");
|
|
9
8
|
const constants_1 = require("../../constants");
|
|
10
|
-
const getUserMessageWithForHints = ({ userMessage, options, pageScreenshot, annotatedPageScreenshot, }) => {
|
|
11
|
-
return [
|
|
12
|
-
{
|
|
13
|
-
type: "text",
|
|
14
|
-
text: userMessage.content,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
type: "text",
|
|
18
|
-
text: "Screenshot in normal mode 👇",
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
type: "image_url",
|
|
22
|
-
image_url: {
|
|
23
|
-
url: (0, vision_1.imageFormatForProvider)(options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER, pageScreenshot),
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
type: "text",
|
|
28
|
-
text: "Screenshot in annotated mode 👇",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
type: "image_url",
|
|
32
|
-
image_url: {
|
|
33
|
-
url: (0, vision_1.imageFormatForProvider)(options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER, annotatedPageScreenshot),
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
};
|
|
38
|
-
exports.getUserMessageWithForHints = getUserMessageWithForHints;
|
|
39
9
|
const triggerHintsFlow = async ({ outputFromGetNextAction, generatedAnnotations, actions, llm, trace, }) => {
|
|
40
10
|
try {
|
|
41
11
|
const hasElementAnnotation = outputFromGetNextAction?.elementAnnotation?.length &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@empiricalrun/test-gen",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"typescript": "^5.3.3",
|
|
75
75
|
"@empiricalrun/llm": "^0.9.31",
|
|
76
76
|
"@empiricalrun/r2-uploader": "^0.3.8",
|
|
77
|
-
"@empiricalrun/reporter": "^0.23.
|
|
77
|
+
"@empiricalrun/reporter": "^0.23.1"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@playwright/test": "1.47.1",
|