@empiricalrun/test-gen 0.47.3 → 0.47.4

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.
Files changed (52) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/agent/browsing/run.d.ts +4 -1
  3. package/dist/agent/browsing/run.d.ts.map +1 -1
  4. package/dist/agent/browsing/run.js +8 -3
  5. package/dist/agent/browsing/utils.d.ts +6 -13
  6. package/dist/agent/browsing/utils.d.ts.map +1 -1
  7. package/dist/agent/browsing/utils.js +9 -38
  8. package/dist/agent/chat.d.ts +7 -0
  9. package/dist/agent/chat.d.ts.map +1 -0
  10. package/dist/agent/chat.js +89 -0
  11. package/dist/agent/codegen/create-test-block.d.ts +2 -3
  12. package/dist/agent/codegen/create-test-block.d.ts.map +1 -1
  13. package/dist/agent/codegen/create-test-block.js +4 -9
  14. package/dist/agent/codegen/fix-ts-errors.d.ts +2 -3
  15. package/dist/agent/codegen/fix-ts-errors.d.ts.map +1 -1
  16. package/dist/agent/codegen/fix-ts-errors.js +4 -5
  17. package/dist/agent/codegen/run.d.ts +6 -4
  18. package/dist/agent/codegen/run.d.ts.map +1 -1
  19. package/dist/agent/codegen/run.js +8 -6
  20. package/dist/agent/codegen/update-flow.d.ts +7 -5
  21. package/dist/agent/codegen/update-flow.d.ts.map +1 -1
  22. package/dist/agent/codegen/update-flow.js +9 -49
  23. package/dist/agent/codegen/utils.d.ts +2 -4
  24. package/dist/agent/codegen/utils.d.ts.map +1 -1
  25. package/dist/agent/codegen/utils.js +1 -2
  26. package/dist/agent/diagnosis-agent/index.d.ts +2 -9
  27. package/dist/agent/diagnosis-agent/index.d.ts.map +1 -1
  28. package/dist/agent/diagnosis-agent/index.js +1 -8
  29. package/dist/agent/enrich-prompt/index.d.ts.map +1 -1
  30. package/dist/agent/enrich-prompt/index.js +0 -1
  31. package/dist/agent/infer-agent/index.d.ts.map +1 -1
  32. package/dist/agent/infer-agent/index.js +0 -9
  33. package/dist/bin/index.js +49 -34
  34. package/dist/bin/utils/index.d.ts +1 -0
  35. package/dist/bin/utils/index.d.ts.map +1 -1
  36. package/dist/bin/utils/index.js +9 -3
  37. package/dist/file/server.d.ts +2 -0
  38. package/dist/file/server.d.ts.map +1 -1
  39. package/dist/file/server.js +18 -1
  40. package/dist/tools/browser-agent.d.ts +16 -0
  41. package/dist/tools/browser-agent.d.ts.map +1 -0
  42. package/dist/tools/browser-agent.js +76 -0
  43. package/dist/tools/codegen-agent.d.ts +9 -0
  44. package/dist/tools/codegen-agent.d.ts.map +1 -0
  45. package/dist/tools/codegen-agent.js +44 -0
  46. package/dist/tools/test-run.d.ts +10 -0
  47. package/dist/tools/test-run.d.ts.map +1 -0
  48. package/dist/tools/test-run.js +35 -0
  49. package/dist/utils/git.d.ts +2 -0
  50. package/dist/utils/git.d.ts.map +1 -0
  51. package/dist/utils/git.js +11 -0
  52. package/package.json +3 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,25 @@
1
1
  # @empiricalrun/test-gen
2
2
 
3
+ ## 0.47.4
4
+
5
+ ### Patch Changes
6
+
7
+ - 007ef65: feat: master agent tool call returns git patch on successful runs
8
+ - c4ddc2c: feat: chat can use codegen agent as a tool call
9
+ - e1903b7: feat: add master agent as a tool call for chat
10
+ - 4b18733: chore: simplify interface to prepare for tool call
11
+ - 6328aaf: feat: test-gen can use test-run package as a tool call
12
+ - e4bf218: fix: update append-create-test prompt to emphasize task without location hints
13
+ - 7748c7b: chore: remove options from prepare file workflow
14
+ - 72a8cf2: feat: chat agent only needs prompt string
15
+ - d995e4c: feat: enable conversation along with test-run tool call
16
+ - 848cb88: fix: trace hierarchy in prep for master agent
17
+ - Updated dependencies [72a8cf2]
18
+ - Updated dependencies [242f659]
19
+ - Updated dependencies [6328aaf]
20
+ - Updated dependencies [d995e4c]
21
+ - @empiricalrun/test-run@0.7.1
22
+
3
23
  ## 0.47.3
4
24
 
5
25
  ### Patch Changes
@@ -14,6 +14,9 @@ type GenerateTestsType = {
14
14
  * filePathToUpdate,
15
15
  * }
16
16
  */
17
- export declare function generateTestsUsingMasterAgent({ testFilePath, filePathToUpdate, pwProjectsFilter, testGenToken, repoDir, }: GenerateTestsType): Promise<void>;
17
+ export declare function generateTestsUsingMasterAgent({ testFilePath, filePathToUpdate, pwProjectsFilter, testGenToken, repoDir, }: GenerateTestsType): Promise<{
18
+ isError: boolean;
19
+ error: string;
20
+ }>;
18
21
  export {};
19
22
  //# sourceMappingURL=run.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/run.ts"],"names":[],"mappings":"AAkBA,KAAK,iBAAiB,GAAG;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CAAC,EAClD,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,OAAO,GACR,EAAE,iBAAiB,iBA6EnB"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/run.ts"],"names":[],"mappings":"AAiBA,KAAK,iBAAiB,GAAG;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAsB,6BAA6B,CAAC,EAClD,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,OAAO,GACR,EAAE,iBAAiB;;;GAkFnB"}
@@ -20,9 +20,9 @@ const utils_1 = require("./utils");
20
20
  * }
21
21
  */
22
22
  async function generateTestsUsingMasterAgent({ testFilePath, filePathToUpdate, pwProjectsFilter, testGenToken, repoDir, }) {
23
- // valiate if the file path and file to update are valid
24
- // also warn users if they are on older version of test-gen
25
- (0, utils_1.canRunMasterAgent)(testFilePath);
23
+ if (!fs_extra_1.default.existsSync(testFilePath)) {
24
+ throw new Error(`File for master agent to run not found: ${testFilePath}`);
25
+ }
26
26
  // detect available http port on the machine
27
27
  const port = await (0, detect_port_1.default)(3030);
28
28
  // start a file service to handle file updates from agent
@@ -84,5 +84,10 @@ async function generateTestsUsingMasterAgent({ testFilePath, filePathToUpdate, p
84
84
  // throw the error because of which test gen failed
85
85
  throw Error(error);
86
86
  }
87
+ await fileService.stop();
88
+ return {
89
+ isError,
90
+ error,
91
+ };
87
92
  }
88
93
  exports.generateTestsUsingMasterAgent = generateTestsUsingMasterAgent;
@@ -1,22 +1,15 @@
1
1
  import { TraceClient } from "@empiricalrun/llm";
2
- import type { TestGenConfig } from "@empiricalrun/shared-types";
2
+ import type { TestCase } from "@empiricalrun/shared-types";
3
3
  import { Page } from "playwright";
4
4
  import { PlaywrightTestConfig } from "playwright/test";
5
5
  export declare function isRegExp(obj: any): obj is RegExp;
6
6
  export declare function prepareBrowsingAgentTask(steps: string[]): string;
7
- /**
8
- * Function to prepare test file for master agent to run
9
- * @param {TestGenConfig} genConfig
10
- * @return {*} {Promise<string>}
11
- */
12
- export declare function prepareFileForMasterAgent(genConfig: TestGenConfig, trace?: TraceClient): Promise<string>;
7
+ export declare function prepareFileForMasterAgent({ testCase, specPath, trace, }: {
8
+ testCase: TestCase;
9
+ specPath: string;
10
+ trace?: TraceClient;
11
+ }): Promise<string>;
13
12
  export declare function injectPwLocatorGenerator(page: Page): Promise<void>;
14
- /**
15
- * Function to validate if the test file path are valid.
16
- * @throws if there are any missing dependencies for master agent to run.
17
- * @param {string} filePath
18
- */
19
- export declare function canRunMasterAgent(filePath: string): void;
20
13
  /**
21
14
  * function to read playwright config from the source repo
22
15
  * @return {*} {Promise<PlaywrightTestConfig>}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAe,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAI7E,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAsBvD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM,CAKhD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,UAIvD;AAwGD;;;;GAIG;AACH,wBAAsB,yBAAyB,CAC7C,SAAS,EAAE,aAAa,EACxB,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,MAAM,CAAC,CA0DjB;AAyBD,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,iBA2HxD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,QAIjD;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,oBAAoB,CAAC,CAM/B;AAWD;;;;;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;IAuBb,SAAS;CAKjB"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/agent/browsing/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAe,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAIxE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAsBvD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,MAAM,CAKhD;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,EAAE,UAIvD;AA+FD,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;;;;;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;IAuBb,SAAS;CAKjB"}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.TeardownManager = exports.detectProjectName = exports.readPlaywrightConfig = exports.canRunMasterAgent = exports.injectPwLocatorGenerator = exports.prepareFileForMasterAgent = exports.prepareBrowsingAgentTask = exports.isRegExp = void 0;
6
+ exports.TeardownManager = exports.detectProjectName = exports.readPlaywrightConfig = exports.injectPwLocatorGenerator = exports.prepareFileForMasterAgent = exports.prepareBrowsingAgentTask = exports.isRegExp = void 0;
7
7
  const fs_extra_1 = __importDefault(require("fs-extra"));
8
8
  const minimatch_1 = require("minimatch");
9
9
  const path_1 = __importDefault(require("path"));
@@ -37,12 +37,7 @@ async function addImportForCreateTest(testFilePath) {
37
37
  }
38
38
  await fs_extra_1.default.writeFile(testFilePath, (0, web_1.addNewImport)(await fs_extra_1.default.readFile(testFilePath, "utf-8"), ["createTest"], importSource));
39
39
  }
40
- /**
41
- * Function to prepare test file for update scenarios for master agent to run
42
- * @param {TestGenConfig} genConfig
43
- */
44
- async function prepareFileForUpdateScenario(genConfig, trace) {
45
- const { specPath, testCase } = genConfig;
40
+ async function prepareFileForUpdateScenario({ testCase, specPath, trace, }) {
46
41
  const { name, suites } = testCase;
47
42
  await (0, web_1.addUserContextFixture)({
48
43
  scenarioName: name,
@@ -55,7 +50,6 @@ async function prepareFileForUpdateScenario(genConfig, trace) {
55
50
  testCase,
56
51
  file: specPath,
57
52
  validateTypes: false,
58
- options: genConfig.options,
59
53
  });
60
54
  const createTestFilePath = suggestion?.updatedFiles[0] || "";
61
55
  console.log("appending to existing test block");
@@ -78,15 +72,7 @@ async function prepareFileForUpdateScenario(genConfig, trace) {
78
72
  },
79
73
  });
80
74
  await (0, web_1.appendScopeToCreateTest)(createTestFilePath, scopeVariables);
81
- // extract the createTest function and pass the scoped vars
82
- const updateFileSpan = trace?.span({
83
- name: "update-file-span",
84
- input: {
85
- createTestFilePath,
86
- },
87
- });
88
75
  await addImportForCreateTest(createTestFilePath);
89
- updateFileSpan?.end();
90
76
  const { pomPrompt, nonSpecFilePrompt } = await (0, context_1.contextForGeneration)(createTestFilePath);
91
77
  await (0, fix_ts_errors_1.validateAndFixTypescriptErrors)({
92
78
  trace,
@@ -94,7 +80,6 @@ async function prepareFileForUpdateScenario(genConfig, trace) {
94
80
  pomCode: pomPrompt,
95
81
  nonSpecFileCode: nonSpecFilePrompt,
96
82
  testCase: testCase,
97
- options: genConfig.options,
98
83
  });
99
84
  const testFileContent = await fs_extra_1.default.readFile(specPath, "utf-8");
100
85
  const { testBlock, testNode } = (0, web_1.getTypescriptTestBlock)({
@@ -111,17 +96,11 @@ async function prepareFileForUpdateScenario(genConfig, trace) {
111
96
  }
112
97
  return createTestFilePath;
113
98
  }
114
- /**
115
- * Function to prepare test file for master agent to run
116
- * @param {TestGenConfig} genConfig
117
- * @return {*} {Promise<string>}
118
- */
119
- async function prepareFileForMasterAgent(genConfig, trace) {
99
+ async function prepareFileForMasterAgent({ testCase, specPath, trace, }) {
120
100
  const prepareFileSpan = trace?.span({
121
101
  name: "prepare-file-for-master-agent",
122
102
  });
123
103
  new logger_1.CustomLogger({ useReporter: true }).log(`Preparing file for master agent. [view trace](${trace?.getTraceUrl()})`);
124
- const { specPath, testCase } = genConfig;
125
104
  const { name, suites } = testCase;
126
105
  // check if the spec file exists
127
106
  // if no then create a new file with test and expect imports
@@ -144,9 +123,8 @@ async function prepareFileForMasterAgent(genConfig, trace) {
144
123
  if (!testBlock) {
145
124
  const newTestBlock = await (0, create_test_block_1.createEmptyTestCaseBlock)({
146
125
  trace: prepareFileSpan,
147
- testCase: genConfig.testCase,
126
+ testCase,
148
127
  file: specPath,
149
- options: genConfig.options,
150
128
  });
151
129
  await fs_extra_1.default.writeFile(specPath, `${existingContents} \n\n ${newTestBlock}`, "utf-8");
152
130
  const updatedContent = (0, web_1.injectCodeSnippetBySuiteChain)({
@@ -156,7 +134,11 @@ async function prepareFileForMasterAgent(genConfig, trace) {
156
134
  });
157
135
  await fs_extra_1.default.writeFile(specPath, updatedContent, "utf-8");
158
136
  }
159
- const updatePath = await prepareFileForUpdateScenario(genConfig, prepareFileSpan);
137
+ const updatePath = await prepareFileForUpdateScenario({
138
+ testCase,
139
+ specPath,
140
+ trace,
141
+ });
160
142
  return updatePath;
161
143
  }
162
144
  exports.prepareFileForMasterAgent = prepareFileForMasterAgent;
@@ -280,17 +262,6 @@ async function injectPwLocatorGenerator(page) {
280
262
  }
281
263
  }
282
264
  exports.injectPwLocatorGenerator = injectPwLocatorGenerator;
283
- /**
284
- * Function to validate if the test file path are valid.
285
- * @throws if there are any missing dependencies for master agent to run.
286
- * @param {string} filePath
287
- */
288
- function canRunMasterAgent(filePath) {
289
- if (!fs_extra_1.default.existsSync(filePath)) {
290
- throw new Error(`File for master agent to run not found: ${filePath}`);
291
- }
292
- }
293
- exports.canRunMasterAgent = canRunMasterAgent;
294
265
  /**
295
266
  * function to read playwright config from the source repo
296
267
  * @return {*} {Promise<PlaywrightTestConfig>}
@@ -0,0 +1,7 @@
1
+ import { TraceClient } from "@empiricalrun/llm";
2
+ import { ChatCompletionMessageParam } from "openai/resources/chat/completions.mjs";
3
+ export declare function chatAgent({ prompt, }: {
4
+ prompt: string;
5
+ trace?: TraceClient;
6
+ }): Promise<ChatCompletionMessageParam[]>;
7
+ //# sourceMappingURL=chat.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../src/agent/chat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EACL,0BAA0B,EAE3B,MAAM,uCAAuC,CAAC;AAsC/C,wBAAsB,SAAS,CAAC,EAC9B,MAAM,GACP,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,yCA6DA"}
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.chatAgent = void 0;
4
+ const llm_1 = require("@empiricalrun/llm");
5
+ const human_in_the_loop_1 = require("../human-in-the-loop");
6
+ const browser_agent_1 = require("../tools/browser-agent");
7
+ const codegen_agent_1 = require("../tools/codegen-agent");
8
+ const test_run_1 = require("../tools/test-run");
9
+ const systemPrompt = `
10
+ You are a helpful assistant that can answer questions and help with tasks.
11
+ You are given a set to tools to use to fulfill the user's request.
12
+
13
+ For example, if the user asks you to run a test, you should use the runTest tool.
14
+ Once the test is run, you will receive the results in the form of a JSON object.
15
+ Summarize the results in a few sentences.
16
+
17
+ Or if the user asks you to modify a test, you should use the
18
+ generateTestWithCodegen or the generateTestWithBrowserAgent tool. Read their
19
+ descriptions to understand what each tool does.
20
+ `;
21
+ const getToolExecutor = (toolName) => {
22
+ if (toolName === "runTest") {
23
+ return test_run_1.runTestTool;
24
+ }
25
+ else if (toolName === "generateTestWithCodegen") {
26
+ return codegen_agent_1.generateTestWithCodegenTool;
27
+ }
28
+ else if (toolName === "generateTestWithBrowserAgent") {
29
+ return browser_agent_1.generateTestWithBrowserAgentTool;
30
+ }
31
+ else {
32
+ throw new Error(`Tool name ${toolName} not found`);
33
+ }
34
+ };
35
+ async function chatAgent({ prompt, }) {
36
+ let userPrompt = prompt;
37
+ let chatHistory = [
38
+ { role: "system", content: systemPrompt },
39
+ { role: "user", content: userPrompt },
40
+ ];
41
+ const llm = new llm_1.LLM({ provider: "openai" });
42
+ let response;
43
+ let shouldAskUserForInput = false;
44
+ let pendingToolCalls = [];
45
+ while (!userPrompt.toLowerCase().includes("stop")) {
46
+ if (pendingToolCalls.length > 0) {
47
+ const toolCall = pendingToolCalls.shift();
48
+ if (!toolCall) {
49
+ throw new Error("No tool call found");
50
+ }
51
+ console.log("Executing tool call:", toolCall.function.name, "with args:", toolCall.function.arguments);
52
+ const toolExecutor = getToolExecutor(toolCall.function.name);
53
+ const toolArgs = JSON.parse(toolCall.function.arguments);
54
+ const toolResult = await toolExecutor(toolArgs);
55
+ chatHistory.push({
56
+ role: "tool",
57
+ content: JSON.stringify(toolResult),
58
+ tool_call_id: toolCall.id,
59
+ });
60
+ continue;
61
+ }
62
+ if (shouldAskUserForInput) {
63
+ userPrompt = await human_in_the_loop_1.humanLoop.getFeedback({
64
+ message: "Your response?",
65
+ });
66
+ chatHistory.push({ role: "user", content: userPrompt });
67
+ shouldAskUserForInput = false;
68
+ continue;
69
+ }
70
+ response = await llm.createChatCompletion({
71
+ model: "gpt-4o",
72
+ messages: chatHistory,
73
+ tools: [test_run_1.schema, codegen_agent_1.schema, browser_agent_1.schema],
74
+ });
75
+ if (!response) {
76
+ throw new Error("No response from LLM");
77
+ }
78
+ chatHistory.push(response);
79
+ if (response.tool_calls) {
80
+ pendingToolCalls.push(...response.tool_calls);
81
+ }
82
+ else if (response.content) {
83
+ console.log("Assistant response:", response.content);
84
+ shouldAskUserForInput = true;
85
+ }
86
+ }
87
+ return chatHistory;
88
+ }
89
+ exports.chatAgent = chatAgent;
@@ -1,9 +1,8 @@
1
1
  import { TraceClient } from "@empiricalrun/llm";
2
- import type { TestCase, TestGenConfigOptions } from "@empiricalrun/shared-types";
3
- export declare function createEmptyTestCaseBlock({ testCase, file, options, trace, }: {
2
+ import type { TestCase } from "@empiricalrun/shared-types";
3
+ export declare function createEmptyTestCaseBlock({ testCase, file, trace, }: {
4
4
  testCase: TestCase;
5
5
  file: string;
6
- options?: TestGenConfigOptions;
7
6
  trace?: TraceClient;
8
7
  }): Promise<string | undefined>;
9
8
  //# sourceMappingURL=create-test-block.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-test-block.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/create-test-block.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,QAAQ,EACR,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAcpC,wBAAsB,wBAAwB,CAAC,EAC7C,QAAQ,EACR,IAAI,EACJ,OAAO,EACP,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,+BAqDA"}
1
+ {"version":3,"file":"create-test-block.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/create-test-block.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAc3D,wBAAsB,wBAAwB,CAAC,EAC7C,QAAQ,EACR,IAAI,EACJ,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,+BA+CA"}
@@ -8,7 +8,7 @@ const web_1 = require("../../bin/utils/platform/web");
8
8
  const constants_1 = require("../../constants");
9
9
  const promptTemplate_0 = "{{#section \"system\"}}\nYou are a software test engineer who is given a task to write an empty test block.\nBased on the inputs you need to create an empty playwright test block with correctly imported fixture.\n\nThe test will contain a test name which you will need to use to build the empty test case block.\n\nYou will be provided with current tests, fixtures and page object models for you to use and create test case block as\nper the task provided to you.\n\nBefore responding you need to ensure that the code change is minimal and the change is reusable across tests. You need\nto ensure the code follows DRY principle.\n\nHere is the list of current tests and fixtures:\n\n{{testFiles}}\n\nHere is the list of current page object models:\n\n{{pageFiles}}\n{{/section}}\n\n{{#section \"user\"}}\nFollowing is the test scenario for which you need to write the empty test case block:\ntest name:\n{{scenarioName}}\n\ntask:\ncreate an empty test case block for the following test steps:\n{{scenario}}\n\ntest file path: {{scenarioFile}}\n\n------\n\nYou also need to ensure that the empty test case block has a starting page to begin test.\n\nIn order to identify the right page with which the test should start, follow the steps:\n- based on the similarities with other test cases mentioned in the file, identify the right page fixture to be imported\n- Read the page fixture methods step by step. Identify whether the fixture handles navigating to a page.\n- Identify whether other tests using the page fixture had to add separate steps for navigation or not\n- Based on the above analysis there will be following cases and choose either for the given test scenario:\n-- Case 1: if the test case scenario provided inside the task mentions about page navigation, then use that page\nnavigation. skip other cases if this case is satisfied.\n-- Case 2: refer other test cases which import similar fixtures and infer the first page navigation of this test case.\nYou should prefer tests which are in the same file. Tests within same file have higher overlaps in first page\nnavigation.\n- Once the page fixture is decided, look for userContext fixture in files. If its available then add \"userContext\" to\nthe test case block\n\n\n\nFollow these instructions before responding with output:\n- Read the code line by line and achieve the task provided to you\n- Read the dependencies of the code block by scanning through file paths and file provided to you. refer the same file\npath while responding with update\n- Focus only on the test case provided and associated JS methods called from the test case.\n- Respond only with the new empty test case block to be created and nothing else.\n- DO NOT respond with any backticks or markdown syntax\n- If \"userContext\" fixture is available in fixtures file, ensure importing that fixture in the test case block.\n- Provide a reason based on the test steps provided to you on why you chose the fixture or page.goto statement. The\nreason should be one of the list steps provided to you and mention why the case was chosen\n{{/section}}";
10
10
  const session_1 = require("../../session");
11
- async function createEmptyTestCaseBlock({ testCase, file, options, trace, }) {
11
+ async function createEmptyTestCaseBlock({ testCase, file, trace, }) {
12
12
  const logger = new logger_1.CustomLogger({ useReporter: false });
13
13
  logger.log("Creating new test block");
14
14
  const context = await (0, context_1.contextForGeneration)(file);
@@ -20,10 +20,6 @@ async function createEmptyTestCaseBlock({ testCase, file, options, trace, }) {
20
20
  name: "create-empty-test-block",
21
21
  id: crypto.randomUUID(),
22
22
  release: session.version,
23
- tags: [
24
- options?.metadata.projectName || "",
25
- options?.metadata.environment || "",
26
- ].filter((s) => !!s),
27
23
  });
28
24
  const promptSpan = trace?.span({
29
25
  name: "build-create-empty-test-case-prompt",
@@ -38,15 +34,14 @@ async function createEmptyTestCaseBlock({ testCase, file, options, trace, }) {
38
34
  promptSpan?.end({ output: { prompt } });
39
35
  const llm = new llm_1.LLM({
40
36
  trace,
41
- provider: options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER,
42
- defaultModel: options?.model || constants_1.DEFAULT_MODEL,
43
- providerApiKey: constants_1.MODEL_API_KEYS[options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER],
37
+ provider: constants_1.DEFAULT_MODEL_PROVIDER,
38
+ defaultModel: constants_1.DEFAULT_MODEL,
39
+ providerApiKey: constants_1.MODEL_API_KEYS[constants_1.DEFAULT_MODEL_PROVIDER],
44
40
  });
45
41
  const firstShotMessage = await llm.createChatCompletion({
46
42
  messages: prompt,
47
43
  modelParameters: {
48
44
  ...constants_1.DEFAULT_MODEL_PARAMETERS,
49
- ...options?.modelParameters,
50
45
  },
51
46
  });
52
47
  const markdownRemoverSpan = trace?.span({
@@ -1,13 +1,12 @@
1
1
  import { TraceClient } from "@empiricalrun/llm";
2
- import type { TestCase, TestGenConfigOptions } from "@empiricalrun/shared-types";
2
+ import type { TestCase } from "@empiricalrun/shared-types";
3
3
  import { CustomLogger } from "../../bin/logger";
4
- export declare function validateAndFixTypescriptErrors({ trace, logger, file, pomCode, nonSpecFileCode, testCase, options, }: {
4
+ export declare function validateAndFixTypescriptErrors({ trace, logger, file, pomCode, nonSpecFileCode, testCase, }: {
5
5
  trace?: TraceClient;
6
6
  logger?: CustomLogger;
7
7
  file: string;
8
8
  pomCode: string;
9
9
  nonSpecFileCode: string;
10
10
  testCase: TestCase;
11
- options?: TestGenConfigOptions;
12
11
  }): Promise<void>;
13
12
  //# sourceMappingURL=fix-ts-errors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fix-ts-errors.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/fix-ts-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EACV,QAAQ,EACR,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUhD,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,iBAwEA"}
1
+ {"version":3,"file":"fix-ts-errors.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/fix-ts-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUhD,wBAAsB,8BAA8B,CAAC,EACnD,KAAK,EACL,MAA2B,EAC3B,IAAI,EACJ,OAAO,EACP,eAAe,EACf,QAAQ,GACT,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;CACpB,iBAsEA"}
@@ -10,7 +10,7 @@ const logger_1 = require("../../bin/logger");
10
10
  const web_1 = require("../../bin/utils/platform/web");
11
11
  const constants_1 = require("../../constants");
12
12
  const promptTemplate_0 = "{{#section \"system\"}}\nYou are a software engineer who is given a task to fix semantic and syntactical errors in a typescript file\n'{{scenarioFile}}' provided to you.\nYou will be provided with fixtures and page object models to use and fix errors.\n\nHere is the list of fixtures available:\n\n{{fixtureFiles}}\n\nHere is the list of current page object models available to you:\n\n{{pageFiles}}\n\nUse the above files to fix the errors.\n\nFollow these guidelines before responding with output\n- Ensure there are no type issues in the given {{scenarioFile}} file\n- For the given file respond with only the code\n- Do not respond with markdown syntax or backticks\n- Do not modify anything else apart from the code required to fix typescript error\n- Do not modify any other scenarios apart from the provided scenario name\n- Do not respond with any explanation. Respond only with the updated code.\n{{/section}}\n\n{{#section \"user\"}}\n'{{scenarioFile}}' with scenario name '{{scenarioName}}', has following typescript errors which you need to fix:\n{{errors}}\n\nHere is the content of the '{{scenarioFile}}':\n\n{{fileContent}}\n{{/section}}";
13
- async function validateAndFixTypescriptErrors({ trace, logger = new logger_1.CustomLogger(), file, pomCode, nonSpecFileCode, testCase, options, }) {
13
+ async function validateAndFixTypescriptErrors({ trace, logger = new logger_1.CustomLogger(), file, pomCode, nonSpecFileCode, testCase, }) {
14
14
  const validateTypesSpan = trace?.span({ name: "detect-type-errors-in-file" });
15
15
  logger.log("Validating types...");
16
16
  let errors = (0, web_1.validateTypescript)(file);
@@ -46,15 +46,14 @@ async function validateAndFixTypescriptErrors({ trace, logger = new logger_1.Cus
46
46
  promptSpan?.end({ output: { instruction } });
47
47
  const llm = new llm_1.LLM({
48
48
  trace,
49
- provider: options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER,
50
- defaultModel: options?.model || constants_1.DEFAULT_MODEL,
51
- providerApiKey: constants_1.MODEL_API_KEYS[options?.modelProvider || constants_1.DEFAULT_MODEL_PROVIDER],
49
+ provider: constants_1.DEFAULT_MODEL_PROVIDER,
50
+ defaultModel: constants_1.DEFAULT_MODEL,
51
+ providerApiKey: constants_1.MODEL_API_KEYS[constants_1.DEFAULT_MODEL_PROVIDER],
52
52
  });
53
53
  const message = await llm.createChatCompletion({
54
54
  messages: instruction,
55
55
  modelParameters: {
56
56
  ...constants_1.DEFAULT_MODEL_PARAMETERS,
57
- ...options?.modelParameters,
58
57
  },
59
58
  });
60
59
  const response = message?.content || "";
@@ -1,18 +1,20 @@
1
1
  import { TraceClient } from "@empiricalrun/llm";
2
- import type { TestCase, TestGenConfigOptions } from "@empiricalrun/shared-types";
2
+ import type { TestCase } from "@empiricalrun/shared-types";
3
3
  import OpenAI from "openai";
4
- import { CustomLogger } from "../../bin/logger";
5
4
  import { CreateTestCodeUpdate } from "./types";
6
5
  export declare function createTestWithCodeAgent({ testCase, file, repoFiles, trace, }: {
7
6
  testCase: TestCase;
8
7
  file: string;
9
8
  repoFiles: string | undefined;
10
9
  trace?: TraceClient;
11
- logger?: CustomLogger;
12
10
  }): Promise<{
13
11
  prompt: OpenAI.Chat.Completions.ChatCompletionMessageParam[];
14
12
  agentResponse: string;
15
13
  fileChanges: CreateTestCodeUpdate[];
16
14
  }>;
17
- export declare function generateTest(testCase: TestCase, file: string, options: TestGenConfigOptions, trace?: TraceClient): Promise<TestCase[] | void>;
15
+ export declare function generateTestWithCodegen({ testCase, file, trace, }: {
16
+ testCase: TestCase;
17
+ file: string;
18
+ trace?: TraceClient;
19
+ }): Promise<TestCase[] | void>;
18
20
  //# sourceMappingURL=run.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,QAAQ,EACR,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAYhD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAQ/C,wBAAsB,uBAAuB,CAAC,EAC5C,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,GAAG,OAAO,CAAC;IACV,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,0BAA0B,EAAE,CAAC;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACrC,CAAC,CAyDD;AAED,wBAAsB,YAAY,CAChC,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,oBAAoB,EAC7B,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CA8D5B"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAE3D,OAAO,MAAM,MAAM,QAAQ,CAAC;AAc5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAQ/C,wBAAsB,uBAAuB,CAAC,EAC5C,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GAAG,OAAO,CAAC;IACV,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,0BAA0B,EAAE,CAAC;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,oBAAoB,EAAE,CAAC;CACrC,CAAC,CAyDD;AAED,wBAAsB,uBAAuB,CAAC,EAC5C,QAAQ,EACR,IAAI,EACJ,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GAAG,OAAO,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,CAgE7B"}
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.generateTest = exports.createTestWithCodeAgent = void 0;
6
+ exports.generateTestWithCodegen = exports.createTestWithCodeAgent = void 0;
7
7
  const llm_1 = require("@empiricalrun/llm");
8
8
  const fs_extra_1 = __importDefault(require("fs-extra"));
9
9
  const logger_1 = require("../../bin/logger");
@@ -65,7 +65,7 @@ ${testCase.steps.join("\n")}`;
65
65
  };
66
66
  }
67
67
  exports.createTestWithCodeAgent = createTestWithCodeAgent;
68
- async function generateTest(testCase, file, options, trace) {
68
+ async function generateTestWithCodegen({ testCase, file, trace, }) {
69
69
  const logger = new logger_1.CustomLogger();
70
70
  if (!fs_extra_1.default.existsSync(file)) {
71
71
  logger.log(`Creating a new spec file: ${file}`);
@@ -82,7 +82,11 @@ async function generateTest(testCase, file, options, trace) {
82
82
  const isUpdate = !!testBlock;
83
83
  if (isUpdate) {
84
84
  logger.log(`Updating the test '${testCase.name}': [View trace](${trace?.getTraceUrl()})`);
85
- return await (0, update_flow_1.updateTest)(testCase, file, options, true, true, trace);
85
+ return await (0, update_flow_1.updateTest)({
86
+ testCase,
87
+ file,
88
+ trace,
89
+ });
86
90
  }
87
91
  const testgenUpdatesReporter = new reporter_1.TestGenUpdatesReporter();
88
92
  void testgenUpdatesReporter.sendMessage(`Updating test code as per the task. \n View [trace](${trace?.getTraceUrl()})`);
@@ -94,7 +98,6 @@ async function generateTest(testCase, file, options, trace) {
94
98
  file,
95
99
  repoFiles,
96
100
  trace,
97
- logger,
98
101
  });
99
102
  await (0, utils_1.applyFileChangesForCreateTest)({
100
103
  trace,
@@ -114,6 +117,5 @@ async function generateTest(testCase, file, options, trace) {
114
117
  }
115
118
  })();
116
119
  }));
117
- await (0, llm_1.flushAllTraces)();
118
120
  }
119
- exports.generateTest = generateTest;
121
+ exports.generateTestWithCodegen = generateTestWithCodegen;
@@ -15,19 +15,21 @@ export declare function getUpdateTestCodeCompletion({ testCase, testFileContent,
15
15
  agentResponse: string;
16
16
  fileChanges: CodeUpdate[];
17
17
  }>;
18
- export declare function updateTest(testCase: TestCase, file: string, options: TestGenConfigOptions | undefined, logging?: boolean, validate?: boolean, trace?: TraceClient): Promise<UpdatedTestCase[]>;
19
- export declare function getAppendCreateTestBlockCompletion({ testFiles, pageFiles, testCase, testFilePath, options, trace, }: {
18
+ export declare function updateTest({ testCase, file, trace, }: {
19
+ testCase: TestCase;
20
+ file: string;
21
+ trace?: TraceClient;
22
+ }): Promise<UpdatedTestCase[]>;
23
+ export declare function getAppendCreateTestBlockCompletion({ testFiles, pageFiles, testCase, testFilePath, trace, }: {
20
24
  trace?: TraceClient;
21
25
  pageFiles?: string;
22
26
  testFiles: string;
23
27
  testCase: TestCase;
24
- options?: TestGenConfigOptions;
25
28
  testFilePath: string;
26
29
  }): Promise<string>;
27
- export declare function appendCreateTestBlock({ testCase, file, options, trace, validateTypes, }: {
30
+ export declare function appendCreateTestBlock({ testCase, file, trace, validateTypes, }: {
28
31
  testCase: TestCase;
29
32
  file: string;
30
- options?: TestGenConfigOptions;
31
33
  trace?: TraceClient;
32
34
  validateTypes?: boolean;
33
35
  }): Promise<UpdatedTestCase[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"update-flow.d.ts","sourceRoot":"","sources":["../../../src/agent/codegen/update-flow.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,WAAW,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACV,QAAQ,EACR,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAexE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAQtD,wBAAsB,2BAA2B,CAAC,EAChD,QAAQ,EACR,eAAe,EACf,SAAS,EACT,SAAS,EACT,YAAY,EACZ,OAAO,EACP,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,QAAQ,CAAC;IACnB,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