@empiricalrun/test-gen 0.51.4 → 0.51.5

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,16 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.51.5
4
+
5
+ ### Patch Changes
6
+
7
+ - ae47eed: feat: add type checking to text editor tool call
8
+ - beb704e: chore: move claude chat stuff to make space for gemini
9
+ - 3d9c868: fix: system prompt for computer use agent
10
+ - Updated dependencies [beb704e]
11
+ - Updated dependencies [f283696]
12
+ - @empiricalrun/llm@0.11.4
13
+
3
14
  ## 0.51.4
4
15
 
5
16
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ts"],"names":[],"mappings":"AA6FA,wBAAsB,SAAS,CAAC,EAC9B,SAAwC,EACxC,mBAAmB,GACpB,EAAE;IACD,SAAS,CAAC,EAAE,4BAA4B,GAAG,4BAA4B,CAAC;IACxE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,mBAkHA"}
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ts"],"names":[],"mappings":"AA+FA,wBAAsB,SAAS,CAAC,EAC9B,SAAwC,EACxC,mBAAmB,GACpB,EAAE;IACD,SAAS,CAAC,EAAE,4BAA4B,GAAG,4BAA4B,CAAC;IACxE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,mBAkHA"}
@@ -4,9 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.chatAgent = void 0;
7
- const claude_1 = require("@empiricalrun/llm/claude");
7
+ const chat_1 = require("@empiricalrun/llm/chat");
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const picocolors_1 = require("picocolors");
10
+ const web_1 = require("../bin/utils/platform/web");
10
11
  const human_in_the_loop_1 = require("../human-in-the-loop");
11
12
  const diagnosis_fetcher_1 = require("../tools/diagnosis-fetcher");
12
13
  const grep_1 = require("../tools/grep");
@@ -84,12 +85,12 @@ const tools = [
84
85
  ];
85
86
  const toolExecutors = {
86
87
  ...Object.fromEntries(tools.map((tool) => [tool.schema.name, tool.execute])),
87
- str_replace_editor: claude_1.strReplaceEditorTool,
88
+ str_replace_editor: (input) => (0, chat_1.strReplaceEditorTool)(input, web_1.validateTypescript),
88
89
  };
89
90
  async function chatAgent({ chatModel = "claude-3-7-sonnet-20250219", useDiskForChatState, }) {
90
91
  const ora = (await import("ora")).default;
91
92
  let userPrompt = undefined;
92
- let chatState = useDiskForChatState ? claude_1.ChatState.load() : new claude_1.ChatState(false);
93
+ let chatState = useDiskForChatState ? chat_1.ChatState.load() : new chat_1.ChatState(false);
93
94
  const handleSigInt = () => {
94
95
  console.log(`\n${(0, picocolors_1.gray)("Usage summary -> " + chatState.getUsageSummary())}`);
95
96
  process.exit(0);
@@ -163,10 +164,10 @@ async function chatAgent({ chatModel = "claude-3-7-sonnet-20250219", useDiskForC
163
164
  continue;
164
165
  }
165
166
  const spinner = ora("Claude is working...").start();
166
- const response = await (0, claude_1.createClaudeMessage)({
167
+ const response = await (0, chat_1.createClaudeMessage)({
167
168
  systemPrompt,
168
169
  messages: chatState.getMessagesForCreateCompletion(),
169
- tools: tools.map((tool) => (0, claude_1.convertOpenAISchemaToAnthropic)((0, zod_schema_1.zodToOpenAITool)(tool.schema))),
170
+ tools: tools.map((tool) => (0, chat_1.convertOpenAISchemaToAnthropic)((0, zod_schema_1.zodToOpenAITool)(tool.schema))),
170
171
  model: chatModel,
171
172
  withStrReplaceEditor: true,
172
173
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/cua/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAWlC,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,IAAI,iBAoBtD;AAED;;GAEG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,IAAI,EACJ,IAAI,GACL,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC,CAkGD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/cua/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAWlC,wBAAsB,sBAAsB,CAAC,IAAI,EAAE,IAAI,iBAoBtD;AAED;;GAEG;AACH,wBAAsB,+BAA+B,CAAC,EACpD,IAAI,EACJ,IAAI,GACL,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,OAAO,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC,CAmGD"}
@@ -110,6 +110,7 @@ async function createTestUsingComputerUseAgent({ page, task, }) {
110
110
  environment: "browser",
111
111
  },
112
112
  ],
113
+ instructions: INSTRUCTIONS,
113
114
  input: [
114
115
  {
115
116
  call_id: lastCallId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/test-gen",
3
- "version": "0.51.4",
3
+ "version": "0.51.5",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -74,7 +74,7 @@
74
74
  "tsx": "^4.16.2",
75
75
  "typescript": "^5.3.3",
76
76
  "zod": "^3.23.8",
77
- "@empiricalrun/llm": "^0.11.3",
77
+ "@empiricalrun/llm": "^0.11.4",
78
78
  "@empiricalrun/r2-uploader": "^0.3.8",
79
79
  "@empiricalrun/reporter": "^0.23.2",
80
80
  "@empiricalrun/test-run": "^0.7.6"