@empiricalrun/test-gen 0.76.0 → 0.77.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.
Files changed (230) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/agent/base/index.d.ts +25 -21
  3. package/dist/agent/base/index.d.ts.map +1 -1
  4. package/dist/agent/base/index.js +48 -37
  5. package/dist/agent/browsing/run.d.ts +1 -2
  6. package/dist/agent/browsing/run.d.ts.map +1 -1
  7. package/dist/agent/browsing/run.js +3 -9
  8. package/dist/agent/browsing/utils.d.ts +2 -9
  9. package/dist/agent/browsing/utils.d.ts.map +1 -1
  10. package/dist/agent/browsing/utils.js +5 -109
  11. package/dist/agent/chat/agent-loop.d.ts +5 -5
  12. package/dist/agent/chat/agent-loop.d.ts.map +1 -1
  13. package/dist/agent/chat/agent-loop.js +3 -8
  14. package/dist/agent/chat/exports.d.ts +5 -4
  15. package/dist/agent/chat/exports.d.ts.map +1 -1
  16. package/dist/agent/chat/exports.js +4 -7
  17. package/dist/agent/chat/index.d.ts +2 -2
  18. package/dist/agent/chat/index.d.ts.map +1 -1
  19. package/dist/agent/chat/index.js +23 -35
  20. package/dist/agent/chat/models.d.ts +0 -2
  21. package/dist/agent/chat/models.d.ts.map +1 -1
  22. package/dist/agent/chat/models.js +12 -26
  23. package/dist/agent/chat/prompt/pw-utils-docs.d.ts +1 -1
  24. package/dist/agent/chat/prompt/pw-utils-docs.d.ts.map +1 -1
  25. package/dist/agent/chat/prompt/pw-utils-docs.js +52 -0
  26. package/dist/agent/chat/prompt/repo.d.ts.map +1 -1
  27. package/dist/agent/chat/prompt/repo.js +11 -22
  28. package/dist/agent/chat/prompt/test-case-def.d.ts +2 -0
  29. package/dist/agent/chat/prompt/test-case-def.d.ts.map +1 -0
  30. package/dist/agent/chat/prompt/test-case-def.js +44 -0
  31. package/dist/agent/chat/state.d.ts +7 -6
  32. package/dist/agent/chat/state.d.ts.map +1 -1
  33. package/dist/agent/chat/state.js +15 -45
  34. package/dist/agent/chat/utils.d.ts +2 -2
  35. package/dist/agent/chat/utils.d.ts.map +1 -1
  36. package/dist/agent/chat/utils.js +14 -7
  37. package/dist/agent/cli.d.ts.map +1 -1
  38. package/dist/agent/cli.js +62 -58
  39. package/dist/agent/code-review/executor/index.d.ts +5 -0
  40. package/dist/agent/code-review/executor/index.d.ts.map +1 -0
  41. package/dist/agent/code-review/executor/index.js +13 -0
  42. package/dist/agent/code-review/index.d.ts +8 -3
  43. package/dist/agent/code-review/index.d.ts.map +1 -1
  44. package/dist/agent/code-review/index.js +115 -21
  45. package/dist/agent/code-review/parser.d.ts +5 -0
  46. package/dist/agent/code-review/parser.d.ts.map +1 -0
  47. package/dist/agent/code-review/parser.js +70 -0
  48. package/dist/agent/code-review/types.d.ts +36 -0
  49. package/dist/agent/code-review/types.d.ts.map +1 -0
  50. package/dist/agent/code-review/types.js +13 -0
  51. package/dist/agent/cua/index.d.ts.map +1 -1
  52. package/dist/agent/cua/index.js +18 -2
  53. package/dist/agent/cua/model.d.ts.map +1 -1
  54. package/dist/agent/cua/model.js +4 -1
  55. package/dist/agent/cua/pw-codegen/pw-pause/index.d.ts.map +1 -1
  56. package/dist/agent/triage/index.d.ts +2 -2
  57. package/dist/agent/triage/index.d.ts.map +1 -1
  58. package/dist/agent/triage/index.js +8 -7
  59. package/dist/agent/video-analysis/executor/index.d.ts +5 -0
  60. package/dist/agent/video-analysis/executor/index.d.ts.map +1 -0
  61. package/dist/agent/video-analysis/executor/index.js +10 -0
  62. package/dist/agent/video-analysis/index.d.ts +2 -2
  63. package/dist/agent/video-analysis/index.d.ts.map +1 -1
  64. package/dist/agent/video-analysis/index.js +38 -13
  65. package/dist/artifacts/index.d.ts +1 -1
  66. package/dist/artifacts/index.d.ts.map +1 -1
  67. package/dist/artifacts/index.js +3 -1
  68. package/dist/artifacts/utils.d.ts.map +1 -1
  69. package/dist/bin/index.js +66 -21
  70. package/dist/constants/index.d.ts +14 -0
  71. package/dist/constants/index.d.ts.map +1 -1
  72. package/dist/constants/index.js +33 -1
  73. package/dist/file/server.d.ts +1 -3
  74. package/dist/file/server.d.ts.map +1 -1
  75. package/dist/file/server.js +0 -13
  76. package/dist/file-info/adapters/file-system/index.d.ts.map +1 -1
  77. package/dist/file-info/adapters/file-system/reader.d.ts.map +1 -1
  78. package/dist/file-info/adapters/file-system/reader.js +8 -1
  79. package/dist/file-info/adapters/github/index.d.ts.map +1 -1
  80. package/dist/file-info/adapters/github/reader.d.ts +1 -1
  81. package/dist/file-info/adapters/github/reader.d.ts.map +1 -1
  82. package/dist/file-info/adapters/github/reader.js +8 -5
  83. package/dist/index.d.ts.map +1 -1
  84. package/dist/tools/analyse-video/index.d.ts +5 -0
  85. package/dist/tools/analyse-video/index.d.ts.map +1 -0
  86. package/dist/tools/analyse-video/index.js +50 -0
  87. package/dist/tools/create-pull-request/index.js +4 -6
  88. package/dist/tools/create-pull-request/utils.d.ts +1 -1
  89. package/dist/tools/definitions/{fetch-video-analysis.d.ts → analyse-video.d.ts} +13 -8
  90. package/dist/tools/definitions/analyse-video.d.ts.map +1 -0
  91. package/dist/tools/definitions/analyse-video.js +60 -0
  92. package/dist/tools/definitions/review-pull-request.d.ts +3 -0
  93. package/dist/tools/definitions/review-pull-request.d.ts.map +1 -0
  94. package/dist/tools/definitions/review-pull-request.js +16 -0
  95. package/dist/tools/definitions/str_replace_editor.d.ts +1 -0
  96. package/dist/tools/definitions/str_replace_editor.d.ts.map +1 -1
  97. package/dist/tools/definitions/str_replace_editor.js +4 -1
  98. package/dist/tools/definitions/test-gen-browser.d.ts +0 -3
  99. package/dist/tools/definitions/test-gen-browser.d.ts.map +1 -1
  100. package/dist/tools/definitions/test-gen-browser.js +33 -8
  101. package/dist/tools/delete-file/index.d.ts.map +1 -1
  102. package/dist/tools/delete-file/index.js +1 -19
  103. package/dist/tools/executor/base.d.ts +32 -0
  104. package/dist/tools/executor/base.d.ts.map +1 -0
  105. package/dist/tools/executor/base.js +114 -0
  106. package/dist/tools/executor/index.d.ts +3 -22
  107. package/dist/tools/executor/index.d.ts.map +1 -1
  108. package/dist/tools/executor/index.js +7 -100
  109. package/dist/tools/executor/utils/checkpoint.d.ts +1 -1
  110. package/dist/tools/executor/utils/checkpoint.d.ts.map +1 -1
  111. package/dist/tools/executor/utils/checkpoint.js +6 -2
  112. package/dist/tools/executor/utils/git.d.ts +2 -2
  113. package/dist/tools/executor/utils/git.d.ts.map +1 -1
  114. package/dist/tools/executor/utils/git.js +7 -3
  115. package/dist/tools/executor/utils/index.d.ts.map +1 -1
  116. package/dist/tools/executor/utils/index.js +1 -1
  117. package/dist/tools/fetch-session-diff/index.js +2 -2
  118. package/dist/tools/file-operations/create.d.ts.map +1 -1
  119. package/dist/tools/file-operations/create.js +1 -4
  120. package/dist/tools/file-operations/index.d.ts +2 -1
  121. package/dist/tools/file-operations/index.d.ts.map +1 -1
  122. package/dist/tools/file-operations/index.js +4 -1
  123. package/dist/tools/file-operations/insert.d.ts +1 -2
  124. package/dist/tools/file-operations/insert.d.ts.map +1 -1
  125. package/dist/tools/file-operations/insert.js +1 -4
  126. package/dist/tools/file-operations/replace.d.ts.map +1 -1
  127. package/dist/tools/file-operations/replace.js +1 -4
  128. package/dist/tools/grep/index.d.ts.map +1 -1
  129. package/dist/tools/grep/index.js +18 -11
  130. package/dist/tools/index.d.ts +5 -5
  131. package/dist/tools/index.d.ts.map +1 -1
  132. package/dist/tools/index.js +17 -16
  133. package/dist/tools/merge-conflicts/index.d.ts.map +1 -1
  134. package/dist/tools/merge-conflicts/index.js +1 -1
  135. package/dist/tools/rename-file/index.js +1 -1
  136. package/dist/tools/review-pull-request/index.d.ts.map +1 -1
  137. package/dist/tools/review-pull-request/index.js +45 -59
  138. package/dist/tools/run-test.d.ts.map +1 -1
  139. package/dist/tools/run-test.js +25 -3
  140. package/dist/tools/test-gen-browser.d.ts.map +1 -1
  141. package/dist/tools/test-gen-browser.js +51 -47
  142. package/dist/utils/artifact-paths.d.ts +20 -0
  143. package/dist/utils/artifact-paths.d.ts.map +1 -0
  144. package/dist/utils/artifact-paths.js +16 -0
  145. package/dist/utils/dedup-image-fs.d.ts +2 -16
  146. package/dist/utils/dedup-image-fs.d.ts.map +1 -1
  147. package/dist/utils/dedup-image-fs.js +12 -16
  148. package/dist/utils/dedup-image.d.ts +1 -14
  149. package/dist/utils/dedup-image.d.ts.map +1 -1
  150. package/dist/utils/dedup-image.js +7 -62
  151. package/dist/utils/{local-ffmpeg-client.d.ts → ffmpeg/index.d.ts} +6 -7
  152. package/dist/utils/ffmpeg/index.d.ts.map +1 -0
  153. package/dist/utils/{local-ffmpeg-client.js → ffmpeg/index.js} +169 -53
  154. package/dist/utils/find-threshold.d.ts +8 -0
  155. package/dist/utils/find-threshold.d.ts.map +1 -0
  156. package/dist/utils/find-threshold.js +55 -0
  157. package/dist/utils/hash.d.ts +2 -0
  158. package/dist/utils/hash.d.ts.map +1 -0
  159. package/dist/utils/hash.js +24 -0
  160. package/dist/utils/model.d.ts +1 -1
  161. package/dist/utils/model.d.ts.map +1 -1
  162. package/dist/utils/model.js +7 -5
  163. package/dist/utils/repo-tree.d.ts +0 -1
  164. package/dist/utils/repo-tree.d.ts.map +1 -1
  165. package/dist/utils/repo-tree.js +2 -14
  166. package/dist/utils/slug.js +1 -1
  167. package/dist/video-core/agent-orchestrator.d.ts +14 -0
  168. package/dist/video-core/agent-orchestrator.d.ts.map +1 -0
  169. package/dist/video-core/agent-orchestrator.js +78 -0
  170. package/dist/video-core/analysis-server.d.ts +24 -0
  171. package/dist/video-core/analysis-server.d.ts.map +1 -0
  172. package/dist/video-core/analysis-server.js +398 -0
  173. package/dist/video-core/analysis-viewer.html +1374 -0
  174. package/dist/video-core/index.d.ts +44 -0
  175. package/dist/video-core/index.d.ts.map +1 -0
  176. package/dist/video-core/index.js +204 -0
  177. package/dist/video-core/model-limits.d.ts +4 -0
  178. package/dist/video-core/model-limits.d.ts.map +1 -0
  179. package/dist/video-core/model-limits.js +67 -0
  180. package/dist/video-core/storage-manager.d.ts +5 -0
  181. package/dist/video-core/storage-manager.d.ts.map +1 -0
  182. package/dist/video-core/storage-manager.js +55 -0
  183. package/dist/video-core/types.d.ts +13 -0
  184. package/dist/video-core/types.d.ts.map +1 -0
  185. package/dist/video-core/types.js +2 -0
  186. package/dist/video-core/utils.d.ts +25 -0
  187. package/dist/video-core/utils.d.ts.map +1 -0
  188. package/dist/video-core/utils.js +211 -0
  189. package/dist/video-core/xml-parser.d.ts +3 -0
  190. package/dist/video-core/xml-parser.d.ts.map +1 -0
  191. package/dist/video-core/xml-parser.js +27 -0
  192. package/package.json +5 -6
  193. package/tsconfig.tsbuildinfo +1 -1
  194. package/dist/agent/chat/prompt/index.d.ts +0 -6
  195. package/dist/agent/chat/prompt/index.d.ts.map +0 -1
  196. package/dist/agent/chat/prompt/index.js +0 -200
  197. package/dist/agent/code-review/prompt.d.ts +0 -2
  198. package/dist/agent/code-review/prompt.d.ts.map +0 -1
  199. package/dist/agent/code-review/prompt.js +0 -55
  200. package/dist/agent/diagnosis-agent/index.d.ts +0 -11
  201. package/dist/agent/diagnosis-agent/index.d.ts.map +0 -1
  202. package/dist/agent/diagnosis-agent/index.js +0 -88
  203. package/dist/agent/diagnosis-agent/strict-mode-violation.d.ts +0 -10
  204. package/dist/agent/diagnosis-agent/strict-mode-violation.d.ts.map +0 -1
  205. package/dist/agent/diagnosis-agent/strict-mode-violation.js +0 -30
  206. package/dist/tools/definitions/extract-frames-from-video.d.ts +0 -39
  207. package/dist/tools/definitions/extract-frames-from-video.d.ts.map +0 -1
  208. package/dist/tools/definitions/extract-frames-from-video.js +0 -60
  209. package/dist/tools/definitions/fetch-video-analysis.d.ts.map +0 -1
  210. package/dist/tools/definitions/fetch-video-analysis.js +0 -61
  211. package/dist/tools/extract-frames-from-video/index.d.ts +0 -7
  212. package/dist/tools/extract-frames-from-video/index.d.ts.map +0 -1
  213. package/dist/tools/extract-frames-from-video/index.js +0 -145
  214. package/dist/tools/fetch-video-analysis/index.d.ts +0 -5
  215. package/dist/tools/fetch-video-analysis/index.d.ts.map +0 -1
  216. package/dist/tools/fetch-video-analysis/index.js +0 -149
  217. package/dist/tools/fetch-video-analysis/open-ai.d.ts +0 -6
  218. package/dist/tools/fetch-video-analysis/open-ai.d.ts.map +0 -1
  219. package/dist/tools/fetch-video-analysis/open-ai.js +0 -37
  220. package/dist/tools/fetch-video-analysis/utils.d.ts +0 -16
  221. package/dist/tools/fetch-video-analysis/utils.d.ts.map +0 -1
  222. package/dist/tools/fetch-video-analysis/utils.js +0 -121
  223. package/dist/tools/fetch-video-analysis/video-analysis.d.ts +0 -7
  224. package/dist/tools/fetch-video-analysis/video-analysis.d.ts.map +0 -1
  225. package/dist/tools/fetch-video-analysis/video-analysis.js +0 -70
  226. package/dist/tools/file-operations/shared/git-helper.d.ts +0 -4
  227. package/dist/tools/file-operations/shared/git-helper.d.ts.map +0 -1
  228. package/dist/tools/file-operations/shared/git-helper.js +0 -29
  229. package/dist/utils/local-ffmpeg-client.d.ts.map +0 -1
  230. package/eslint.config.mjs +0 -43
@@ -1,17 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ToolExecutor = void 0;
4
- const artifacts_1 = require("../../artifacts");
5
- const file_1 = require("../../utils/file");
4
+ const analyse_video_1 = require("../analyse-video");
6
5
  const create_pull_request_1 = require("../create-pull-request");
7
6
  const delete_file_1 = require("../delete-file");
8
7
  const diagnosis_fetcher_1 = require("../diagnosis-fetcher");
9
8
  const download_build_1 = require("../download-build");
10
- const extract_frames_from_video_1 = require("../extract-frames-from-video");
11
9
  const fetch_file_1 = require("../fetch-file");
12
10
  const fetch_last_successful_test_run_1 = require("../fetch-last-successful-test-run");
13
11
  const fetch_session_diff_1 = require("../fetch-session-diff");
14
- const fetch_video_analysis_1 = require("../fetch-video-analysis");
15
12
  const file_operations_1 = require("../file-operations");
16
13
  const grep_1 = require("../grep");
17
14
  const issues_1 = require("../issues");
@@ -27,24 +24,9 @@ const trace_dot_zip_1 = require("../trace-dot-zip");
27
24
  const triage_summary_1 = require("../triage-summary");
28
25
  const upgrade_packages_1 = require("../upgrade-packages");
29
26
  const view_failed_test_run_report_1 = require("../view-failed-test-run-report");
30
- const checkpoint_1 = require("./utils/checkpoint");
31
- class ToolExecutor {
32
- toolExecutors = {};
33
- chatSession;
34
- branchName;
35
- repoPath;
36
- apiClient;
37
- trace;
38
- featureFlags;
39
- environmentOverrides;
40
- constructor({ chatSession, branchName, repoPath, apiClient, trace, featureFlags, environmentOverrides = {}, }) {
41
- this.chatSession = chatSession;
42
- this.branchName = branchName;
43
- this.trace = trace;
44
- this.repoPath = repoPath;
45
- this.apiClient = apiClient;
46
- this.featureFlags = featureFlags;
47
- this.environmentOverrides = environmentOverrides;
27
+ const base_1 = require("./base");
28
+ class ToolExecutor extends base_1.BaseToolExecutor {
29
+ constructor(params) {
48
30
  // Found for "Tool Executor Tools List" and add any new tools to the list
49
31
  const tools = [
50
32
  grep_1.grepTool,
@@ -60,7 +42,7 @@ class ToolExecutor {
60
42
  download_build_1.downloadBuildTool,
61
43
  upgrade_packages_1.upgradePackagesTool,
62
44
  fetch_file_1.fetchFileTool,
63
- fetch_video_analysis_1.fetchVideoAnalysis,
45
+ analyse_video_1.analyseVideo,
64
46
  delete_file_1.deleteFileTool,
65
47
  rename_file_1.renameFileTool,
66
48
  trace_dot_zip_1.traceDotZipTool,
@@ -69,87 +51,12 @@ class ToolExecutor {
69
51
  fetch_last_successful_test_run_1.fetchLastSuccessfulTestRunTool,
70
52
  triage_summary_1.sendTriageSummaryTool,
71
53
  list_tests_and_projects_1.listProjectsTool,
72
- extract_frames_from_video_1.extractFramesFromVideo,
73
54
  fetch_session_diff_1.fetchSessionDiffTool,
74
55
  review_pull_request_1.reviewPullRequestTool,
56
+ list_tests_and_projects_1.listTestsForProjectTool,
75
57
  ...file_operations_1.textEditorTools,
76
58
  ];
77
- tools.forEach((tool) => {
78
- this.toolExecutors[tool.schema.name] = tool.execute;
79
- });
80
- this.toolExecutors = {
81
- ...this.toolExecutors,
82
- // Support for Claude 3x and 4: They use different tool names
83
- str_replace_editor: file_operations_1.strReplaceEditorExecutor,
84
- str_replace_based_edit_tool: file_operations_1.strReplaceEditorExecutor,
85
- };
86
- }
87
- async execute(toolCalls) {
88
- const executeSpan = this.trace?.span({
89
- name: "execute_tools",
90
- input: { toolCalls: toolCalls.map((tc) => ({ name: tc.name })) },
91
- });
92
- const toolResults = [];
93
- for (const toolCall of toolCalls) {
94
- const span = executeSpan?.span({
95
- name: `tool: ${toolCall.name}`,
96
- input: toolCall.input,
97
- });
98
- const uploadArtifactsQueue = new artifacts_1.UploadArtifactsQueue(this.repoPath, toolCall.id);
99
- const collectArtifactsFn = (artifactsInput, cleanUpDir) => {
100
- uploadArtifactsQueue
101
- .addTask(artifactsInput)
102
- .then(() => {
103
- if (cleanUpDir) {
104
- void (0, file_1.safeCleanupDirectory)(cleanUpDir);
105
- }
106
- })
107
- .catch((error) => {
108
- console.error("Error collecting artifacts:", error);
109
- });
110
- };
111
- const toolExecutor = this.toolExecutors[toolCall.name];
112
- if (!toolExecutor) {
113
- const errorResult = {
114
- isError: true,
115
- result: `Invalid function/tool call: ${toolCall.name} not found`,
116
- artifacts: null,
117
- };
118
- toolResults.push(errorResult);
119
- span?.end({ output: errorResult });
120
- continue;
121
- }
122
- try {
123
- const result = await toolExecutor({
124
- input: toolCall.input,
125
- repoPath: this.repoPath,
126
- apiClient: this.apiClient,
127
- trace: this.trace,
128
- chatSession: this.chatSession,
129
- collectArtifacts: collectArtifactsFn,
130
- environmentOverrides: this.environmentOverrides,
131
- featureFlags: this.featureFlags,
132
- });
133
- const artifacts = await uploadArtifactsQueue.waitForCompletion();
134
- toolResults.push({ ...result, artifacts });
135
- span?.end({ output: result });
136
- }
137
- catch (error) {
138
- const errorResult = {
139
- isError: true,
140
- result: error instanceof Error ? error.message : String(error),
141
- artifacts: null,
142
- };
143
- toolResults.push(errorResult);
144
- span?.end({ output: errorResult });
145
- }
146
- }
147
- (0, checkpoint_1.createCommitCheckpoint)({
148
- branchName: this.branchName,
149
- repoPath: this.repoPath,
150
- });
151
- executeSpan?.end({ output: { toolResults } });
152
- return toolResults;
59
+ super({ ...params, tools });
153
60
  }
154
61
  }
155
62
  exports.ToolExecutor = ToolExecutor;
@@ -1,5 +1,5 @@
1
1
  export declare function createCommitCheckpoint({ branchName, repoPath, }: {
2
2
  branchName: string;
3
3
  repoPath: string;
4
- }): void;
4
+ }): string | null;
5
5
  //# sourceMappingURL=checkpoint.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/checkpoint.ts"],"names":[],"mappings":"AAIA,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,QAsBA"}
1
+ {"version":3,"file":"checkpoint.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/checkpoint.ts"],"names":[],"mappings":"AAIA,wBAAgB,sBAAsB,CAAC,EACrC,UAAU,EACV,QAAQ,GACT,EAAE;IACD,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,GAAG,IAAI,CA2BhB"}
@@ -20,7 +20,11 @@ function createCommitCheckpoint({ branchName, repoPath, }) {
20
20
  });
21
21
  const commitMessage = commitMessages.join(", ");
22
22
  // Files are already staged by individual tools, just commit
23
- (0, git_1.commitAsBotUser)(commitMessage, repoPath);
24
- (0, child_process_1.execSync)(`git push origin ${branchName}`, { cwd: repoPath });
23
+ const commitSha = (0, git_1.commitAsBotUser)(commitMessage, repoPath);
24
+ if (commitSha) {
25
+ (0, child_process_1.execSync)(`git push origin ${branchName}`, { cwd: repoPath });
26
+ }
27
+ return commitSha;
25
28
  }
29
+ return null;
26
30
  }
@@ -4,14 +4,14 @@ export declare function getGitDiffStaged(filepath: string, cwd: string): string;
4
4
  export declare function getGitDiffForStagedOrUnstaged(filepath: string, cwd: string): string;
5
5
  export declare function getGitDiffForNewFile(filepath: string, cwd: string): string;
6
6
  export declare function checkoutBranch(branchName: string, cwd: string): Promise<void>;
7
- export declare function commitAsBotUser(commitMessage: string, cwd: string): boolean;
7
+ export declare function commitAsBotUser(commitMessage: string, cwd: string): string | null;
8
8
  export declare function getCurrentBranchName(repoPath: string): Promise<string>;
9
9
  export declare function pullBranch(branchName: string, cwd: string): Promise<void>;
10
10
  export declare function stageAndCommitFilesAsBotUser({ commitMessage, files, repoPath, }: {
11
11
  commitMessage: string;
12
12
  files: string[];
13
13
  repoPath: string;
14
- }): void;
14
+ }): string | null;
15
15
  export type FileChange = {
16
16
  type: "added" | "modified" | "removed" | "renamed";
17
17
  path: string;
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/git.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAMjE,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAMhE;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAMtE;AAED,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,GACV,MAAM,CAaR;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAe1E;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAMnE;AAED,wBAAgB,eAAe,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,WAcjE;AAED,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,mBAO1D;A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,MAAM,CAe1E;AAED,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAMnE;AAED,wBAAgB,eAAe,CAC7B,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,GACV,MAAM,GAAG,IAAI,CAkBf;AAED,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,mBAO1D;AAED,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,iBAE/D;AAED,wBAAgB,4BAA4B,CAAC,EAC3C,aAAa,EACb,KAAK,EACL,QAAQ,GACT,EAAE;IACD,aAAa,EAAE,MAAM,CAAC;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,MAAM,GAAG,IAAI,CAGhB;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,EAAE,CA6CxD;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAUrD;AAED,wBAAsB,gBAAgB,CAAC,EACrC,QAAQ,EACR,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,mBAAmB,CAAC;CAChC,oBA8BA"}
@@ -74,11 +74,15 @@ function commitAsBotUser(commitMessage, cwd) {
74
74
  cwd,
75
75
  });
76
76
  if (!status) {
77
- return false;
77
+ return null;
78
78
  }
79
79
  const commitMessageWithSkipCi = `${commitMessage} [skip ci]`;
80
80
  (0, child_process_1.execSync)(`git -c user.name="${GIT_USER_NAME}" -c user.email="${GIT_USER_EMAIL}" commit -m "${commitMessageWithSkipCi}"`, { cwd });
81
- return true;
81
+ const commitSha = (0, child_process_1.execSync)("git rev-parse HEAD", {
82
+ encoding: "utf-8",
83
+ cwd,
84
+ }).trim();
85
+ return commitSha;
82
86
  }
83
87
  async function getCurrentBranchName(repoPath) {
84
88
  const branchName = (0, child_process_1.execSync)("git branch --show-current", {
@@ -93,7 +97,7 @@ async function pullBranch(branchName, cwd) {
93
97
  }
94
98
  function stageAndCommitFilesAsBotUser({ commitMessage, files, repoPath, }) {
95
99
  (0, child_process_1.execSync)(`git add ${files.join(" ")}`, { cwd: repoPath });
96
- commitAsBotUser(commitMessage, repoPath);
100
+ return commitAsBotUser(commitMessage, repoPath);
97
101
  }
98
102
  function getStagedFiles(cwd) {
99
103
  const output = (0, child_process_1.execSync)("git diff --cached --name-status", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tools/executor/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAiB1D;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,IAAI,EAAE;QACJ,GAAG,EAAE,MAAM,CAAC;QACZ,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IAC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G,OAAO,CAAC;IAAE,EAAE,EAAE,eAAe,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC,CAoBnD"}
@@ -70,7 +70,7 @@ function getMergeableStateDescription(state) {
70
70
  return `The pull request has mergeable state: ${state}.`;
71
71
  }
72
72
  }
73
- async function createPullRequest({ owner, repo, title, head, base = "main", body, labels, apiClient, }) {
73
+ async function createPullRequest({ owner, repo, title, head, base, body, labels, apiClient, }) {
74
74
  const createPrBody = {
75
75
  title,
76
76
  head,
@@ -8,7 +8,7 @@ const SessionDiffInputSchema = zod_1.z.object({
8
8
  exports.fetchSessionDiffTool = {
9
9
  schema: {
10
10
  name: "fetchSessionDiff",
11
- description: `Extracts the session url and returns the code diff for the session.`,
11
+ description: `Extracts the session url and returns the code diff for the session along with pull request title and description, if available.`,
12
12
  parameters: SessionDiffInputSchema,
13
13
  },
14
14
  needsBrowser: false,
@@ -26,7 +26,7 @@ exports.fetchSessionDiffTool = {
26
26
  throw new Error("Dashboard API client is not available.");
27
27
  }
28
28
  const sessionId = sessionUrl.split("/").pop();
29
- const sessionDiffApiUrl = `/api/chat-sessions/${sessionId}/diff`;
29
+ const sessionDiffApiUrl = `/api/chat-sessions/${sessionId}/diff?is_line_annotated=true`;
30
30
  const sessionDiff = await apiClient.request(sessionDiffApiUrl, {
31
31
  method: "GET",
32
32
  });
@@ -1 +1 @@
1
- {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/tools/file-operations/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAO1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,iBAAe,kBAAkB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,GAAG,OAAO,CAAC,UAAU,CAAC,CA0DtB;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/tools/file-operations/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAO1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,iBAAe,kBAAkB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,GAAG,OAAO,CAAC,UAAU,CAAC,CAuDtB;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -8,7 +8,6 @@ const child_process_1 = require("child_process");
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const path_1 = __importDefault(require("path"));
10
10
  const web_1 = require("../../bin/utils/platform/web");
11
- const git_helper_1 = require("./shared/git-helper");
12
11
  async function fileCreateExecutor({ input, filePath, absoluteFilePath, repoDir, collectArtifacts, }) {
13
12
  if (input.file_text === undefined || input.file_text === null) {
14
13
  return {
@@ -45,13 +44,11 @@ the required directories recursively for the new file.`,
45
44
  fs_1.default.writeFileSync(absoluteFilePath, input.file_text);
46
45
  // Stage the file
47
46
  (0, child_process_1.execSync)(`git add "${filePath}"`, { cwd: repoDir });
48
- // Collect git patch artifact
49
- await (0, git_helper_1.collectGitPatchArtifact)(filePath, repoDir, "create", collectArtifacts);
50
47
  let tscResult = await (0, web_1.runTypescriptCompiler)(repoDir);
51
48
  if (!tscResult.success) {
52
49
  return {
53
50
  result: `File ${filePath} has been created. However, type checks are failing with errors:\n\n${tscResult.errors.join("\n")}`,
54
- isError: true,
51
+ isError: false,
55
52
  };
56
53
  }
57
54
  else {
@@ -11,5 +11,6 @@ declare function strReplaceEditorExecutor({ input, repoPath, collectArtifacts, a
11
11
  apiClient?: IDashboardAPIClient;
12
12
  }): Promise<ToolResult>;
13
13
  declare const textEditorTools: Tool[];
14
- export { strReplaceEditorExecutor, textEditorTools };
14
+ declare const viewOnlyTools: Tool[];
15
+ export { strReplaceEditorExecutor, textEditorTools, viewOnlyTools };
15
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/file-operations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,IAAI,EAEJ,UAAU,EACX,MAAM,4BAA4B,CAAC;AAQpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD;;;GAGG;AACH,iBAAe,wBAAwB,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,SAAS,GACV,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC,GAAG,OAAO,CAAC,UAAU,CAAC,CAoDtB;AA+ED,QAAA,MAAM,eAAe,EAAE,IAAI,EAK1B,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/file-operations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,IAAI,EAEJ,UAAU,EACX,MAAM,4BAA4B,CAAC;AAQpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD;;;GAGG;AACH,iBAAe,wBAAwB,CAAC,EACtC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,SAAS,GACV,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC,GAAG,OAAO,CAAC,UAAU,CAAC,CAoDtB;AAgFD,QAAA,MAAM,eAAe,EAAE,IAAI,EAK1B,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,IAAI,EAAmB,CAAC;AAE7C,OAAO,EAAE,wBAAwB,EAAE,eAAe,EAAE,aAAa,EAAE,CAAC"}
@@ -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.textEditorTools = void 0;
6
+ exports.viewOnlyTools = exports.textEditorTools = void 0;
7
7
  exports.strReplaceEditorExecutor = strReplaceEditorExecutor;
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const str_replace_editor_1 = require("../definitions/str_replace_editor");
@@ -127,6 +127,7 @@ const stringInsertTool = {
127
127
  command: "insert",
128
128
  path: input.path,
129
129
  insert_line: input.insert_line,
130
+ insert_text: input.insert_text,
130
131
  new_str: input.new_str,
131
132
  },
132
133
  repoPath,
@@ -141,3 +142,5 @@ const textEditorTools = [
141
142
  stringInsertTool,
142
143
  ];
143
144
  exports.textEditorTools = textEditorTools;
145
+ const viewOnlyTools = [fileViewTool];
146
+ exports.viewOnlyTools = viewOnlyTools;
@@ -1,11 +1,10 @@
1
1
  import { CollectArtifacts, ToolResult } from "@empiricalrun/shared-types";
2
2
  import { StrReplaceInputParams } from "./shared/helpers";
3
- declare function fileInsertExecutor({ input, filePath, absoluteFilePath, repoDir, collectArtifacts, }: {
3
+ export declare function fileInsertExecutor({ input, filePath, absoluteFilePath, repoDir, collectArtifacts, }: {
4
4
  input: StrReplaceInputParams;
5
5
  filePath: string;
6
6
  absoluteFilePath: string;
7
7
  repoDir: string;
8
8
  collectArtifacts?: CollectArtifacts;
9
9
  }): Promise<ToolResult>;
10
- export { fileInsertExecutor };
11
10
  //# sourceMappingURL=insert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../src/tools/file-operations/insert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,iBAAe,kBAAkB,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,GAAG,OAAO,CAAC,UAAU,CAAC,CAwDtB;AAED,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"insert.d.ts","sourceRoot":"","sources":["../../../src/tools/file-operations/insert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,wBAAsB,kBAAkB,CAAC,EACvC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,GAAG,OAAO,CAAC,UAAU,CAAC,CAqDtB"}
@@ -7,7 +7,6 @@ exports.fileInsertExecutor = fileInsertExecutor;
7
7
  const child_process_1 = require("child_process");
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const web_1 = require("../../bin/utils/platform/web");
10
- const git_helper_1 = require("./shared/git-helper");
11
10
  async function fileInsertExecutor({ input, filePath, absoluteFilePath, repoDir, collectArtifacts, }) {
12
11
  if (!fs_1.default.existsSync(absoluteFilePath)) {
13
12
  return {
@@ -46,13 +45,11 @@ async function fileInsertExecutor({ input, filePath, absoluteFilePath, repoDir,
46
45
  fs_1.default.writeFileSync(absoluteFilePath, lines.join("\n"));
47
46
  // Stage the file
48
47
  (0, child_process_1.execSync)(`git add "${filePath}"`, { cwd: repoDir });
49
- // Collect git patch artifact
50
- await (0, git_helper_1.collectGitPatchArtifact)(filePath, repoDir, "insert", collectArtifacts);
51
48
  let tscResult = await (0, web_1.runTypescriptCompiler)(repoDir);
52
49
  if (!tscResult.success) {
53
50
  return {
54
51
  result: `Insertion in file ${filePath} was applied. However, type checks are failing with errors:\n${tscResult.errors.join("\n")}`,
55
- isError: true,
52
+ isError: false,
56
53
  };
57
54
  }
58
55
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../../src/tools/file-operations/replace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAG9D,iBAAe,sBAAsB,CAAC,EACpC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,GAAG,OAAO,CAAC,UAAU,CAAC,CAoFtB;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
1
+ {"version":3,"file":"replace.d.ts","sourceRoot":"","sources":["../../../src/tools/file-operations/replace.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAM1E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAG9D,iBAAe,sBAAsB,CAAC,EACpC,KAAK,EACL,QAAQ,EACR,gBAAgB,EAChB,OAAO,EACP,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC,GAAG,OAAO,CAAC,UAAU,CAAC,CA4EtB;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
@@ -7,7 +7,6 @@ exports.fileStrReplaceExecutor = fileStrReplaceExecutor;
7
7
  const child_process_1 = require("child_process");
8
8
  const fs_1 = __importDefault(require("fs"));
9
9
  const web_1 = require("../../bin/utils/platform/web");
10
- const git_helper_1 = require("./shared/git-helper");
11
10
  const helpers_1 = require("./shared/helpers");
12
11
  async function fileStrReplaceExecutor({ input, filePath, absoluteFilePath, repoDir, collectArtifacts, }) {
13
12
  if (!fs_1.default.existsSync(absoluteFilePath)) {
@@ -64,13 +63,11 @@ async function fileStrReplaceExecutor({ input, filePath, absoluteFilePath, repoD
64
63
  fs_1.default.writeFileSync(absoluteFilePath, newContent);
65
64
  // Stage the file
66
65
  (0, child_process_1.execSync)(`git add "${filePath}"`, { cwd: repoDir });
67
- // Collect git patch artifact
68
- await (0, git_helper_1.collectGitPatchArtifact)(filePath, repoDir, "replace", collectArtifacts);
69
66
  let tscResult = await (0, web_1.runTypescriptCompiler)(repoDir);
70
67
  if (!tscResult.success) {
71
68
  return {
72
69
  result: `Edits to file ${filePath} have been applied. However, type checks are failing with errors:\n\n${tscResult.errors.join("\n")}`,
73
- isError: true,
70
+ isError: false,
74
71
  };
75
72
  }
76
73
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/grep/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,4BAA4B,CAAC;AA+HnE,eAAO,MAAM,QAAQ,EAAE,IAUtB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/grep/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,IAAI,EAAc,MAAM,4BAA4B,CAAC;AAkI3E,eAAO,MAAM,QAAQ,EAAE,IActB,CAAC"}
@@ -8,7 +8,7 @@ const child_process_1 = require("child_process");
8
8
  const path_1 = __importDefault(require("path"));
9
9
  const util_1 = require("util");
10
10
  const zod_1 = require("zod");
11
- const repo_tree_1 = require("../../utils/repo-tree");
11
+ const constants_1 = require("../../constants");
12
12
  const grep_1 = require("../definitions/grep");
13
13
  const ripgrep_1 = require("./ripgrep");
14
14
  const GrepInputSchema = zod_1.z.object({
@@ -24,18 +24,18 @@ const GrepInputSchema = zod_1.z.object({
24
24
  .optional()
25
25
  .describe("File pattern to search in (e.g., '*.ts' for TypeScript files)"),
26
26
  });
27
- async function usingSystemGrep(input, repoPath) {
27
+ async function usingSystemGrep(input, repoPath, logger) {
28
28
  try {
29
29
  const dir = path_1.default.join(repoPath, input.directory || "");
30
30
  // Create exclude pattern for grep
31
- const excludePatterns = repo_tree_1.DEFAULT_EXCLUDE.map((pattern) => typeof pattern === "string" ? pattern : pattern.source)
31
+ const excludePatterns = constants_1.DEFAULT_EXCLUDE.map((pattern) => typeof pattern === "string" ? pattern : pattern.source)
32
32
  .map((pattern) => `--exclude-dir="${pattern}"`)
33
33
  .join(" ");
34
34
  // Using -n to show line numbers in output
35
35
  let cmd = `grep -rin ${excludePatterns} "${input.pattern}" ${dir}`;
36
36
  if (input.filePattern) {
37
37
  // For file pattern searches, we'll use find with exclusions
38
- const excludeFind = repo_tree_1.DEFAULT_EXCLUDE.map((pattern) => typeof pattern === "string" ? pattern : pattern.source)
38
+ const excludeFind = constants_1.DEFAULT_EXCLUDE.map((pattern) => typeof pattern === "string" ? pattern : pattern.source)
39
39
  .map((pattern) => `-not -path "*/${pattern}/*"`)
40
40
  .join(" ");
41
41
  // Modified command to ensure filepath is included in the output
@@ -65,14 +65,15 @@ async function usingSystemGrep(input, repoPath) {
65
65
  }
66
66
  }
67
67
  catch (error) {
68
- console.error("Error executing grep", error);
68
+ logger?.error("Error executing grep", error) ||
69
+ console.error("Error executing grep", error);
69
70
  return {
70
71
  isError: true,
71
72
  result: error instanceof Error ? error.message : String(error),
72
73
  };
73
74
  }
74
75
  }
75
- async function usingRipgrep(input, repoPath) {
76
+ async function usingRipgrep(input, repoPath, logger) {
76
77
  try {
77
78
  const dir = path_1.default.join(repoPath, input.directory || "");
78
79
  const escapedPattern = input.pattern
@@ -109,7 +110,8 @@ All paths are relative to the current working directory.`;
109
110
  };
110
111
  }
111
112
  catch (error) {
112
- console.error("Error executing ripgrep", error);
113
+ logger?.error("Error executing ripgrep", error) ||
114
+ console.error("Error executing ripgrep", error);
113
115
  return {
114
116
  isError: true,
115
117
  result: error instanceof ripgrep_1.RipGrepError ? error.message : String(error),
@@ -118,13 +120,18 @@ All paths are relative to the current working directory.`;
118
120
  }
119
121
  exports.grepTool = {
120
122
  ...grep_1.grepTool,
121
- execute: async ({ input, repoPath }) => {
123
+ execute: async ({ input, repoPath, logger }) => {
122
124
  if ((0, ripgrep_1.isRgAvailable)()) {
123
- return usingRipgrep(input, repoPath);
125
+ return usingRipgrep(input, repoPath, logger);
124
126
  }
125
127
  else {
126
- console.warn("ripgrep is not available, falling back to system grep.");
127
- return usingSystemGrep(input, repoPath);
128
+ if (logger) {
129
+ logger.warn("ripgrep is not available, falling back to system grep.");
130
+ }
131
+ else {
132
+ console.warn("ripgrep is not available, falling back to system grep.");
133
+ }
134
+ return usingSystemGrep(input, repoPath, logger);
128
135
  }
129
136
  },
130
137
  };
@@ -1,13 +1,12 @@
1
1
  import { PendingToolCall, ServicePayload, SupportedChatModels, Tool, ToolDefinition } from "@empiricalrun/shared-types";
2
2
  import { createPullRequestTool } from "./create-pull-request";
3
+ import { analyseVideo } from "./definitions/analyse-video";
3
4
  import { deleteFileTool } from "./definitions/delete-file";
4
5
  import { downloadBuildTool } from "./definitions/download-build";
5
- import { extractFramesFromVideo } from "./definitions/extract-frames-from-video";
6
- import { fetchVideoAnalysis } from "./definitions/fetch-video-analysis";
7
6
  import { grepTool } from "./definitions/grep";
8
- import { listProjectsTool, listTestsForProjectTool } from "./definitions/list-tests-and-projects";
9
7
  import { mergeConflictsTool } from "./definitions/merge-conflicts";
10
8
  import { renameFileTool } from "./definitions/rename-file";
9
+ import { reviewPullRequestTool } from "./definitions/review-pull-request";
11
10
  import { runTestTool } from "./definitions/run-test";
12
11
  import { generateTestWithBrowserAgent } from "./definitions/test-gen-browser";
13
12
  import { upgradePackagesTool } from "./definitions/upgrade-packages";
@@ -17,7 +16,6 @@ import { fetchLastSuccessfulTestRunTool } from "./fetch-last-successful-test-run
17
16
  import { fetchSessionDiffTool } from "./fetch-session-diff";
18
17
  import { createIssueTool, listIssuesTool, updateIssueTool } from "./issues";
19
18
  import { listEnvironmentsTool } from "./list-environments";
20
- import { reviewPullRequestTool } from "./review-pull-request";
21
19
  import { fetchTestRunReportTool } from "./test-run-fetcher";
22
20
  import { traceDotZipTool } from "./trace-dot-zip";
23
21
  import { sendTriageSummaryTool } from "./triage-summary";
@@ -26,9 +24,11 @@ type ToolOrToolDefinition = Tool | ToolDefinition;
26
24
  export declare const commonTools: ToolOrToolDefinition[];
27
25
  export declare const testGenerationTools: ToolOrToolDefinition[];
28
26
  export declare const triageOnlyTools: ToolOrToolDefinition[];
29
- export { createIssueTool, createPullRequestTool, deleteFileTool, downloadBuildTool, extractFramesFromVideo, fetchDiagnosisReportTool, fetchFileTool, fetchLastSuccessfulTestRunTool, fetchSessionDiffTool, fetchTestRunReportTool, fetchVideoAnalysis, generateTestWithBrowserAgent, grepTool, listEnvironmentsTool, listIssuesTool, listProjectsTool, listTestsForProjectTool, mergeConflictsTool, renameFileTool, reviewPullRequestTool, runTestTool, sendTriageSummaryTool, traceDotZipTool, updateIssueTool, upgradePackagesTool, viewFailedTestRunReportTool, };
27
+ export { createIssueTool, createPullRequestTool, deleteFileTool, downloadBuildTool, fetchDiagnosisReportTool, fetchFileTool, fetchLastSuccessfulTestRunTool, fetchSessionDiffTool, fetchTestRunReportTool, analyseVideo, generateTestWithBrowserAgent, grepTool, listEnvironmentsTool, listIssuesTool, mergeConflictsTool, renameFileTool, reviewPullRequestTool, runTestTool, sendTriageSummaryTool, traceDotZipTool, updateIssueTool, upgradePackagesTool, viewFailedTestRunReportTool, };
30
28
  export declare const allToolsDefinitions: ToolOrToolDefinition[];
29
+ export declare function hasBuiltInTextEditor(model: SupportedChatModels): boolean;
31
30
  export declare function textEditorToolsForModel(model: SupportedChatModels): ToolOrToolDefinition[];
31
+ export declare function textViewToolsForModel(model: SupportedChatModels): ToolOrToolDefinition[];
32
32
  export declare function toolsNeedBrowser(toolCalls: PendingToolCall[]): boolean;
33
33
  export declare function nameForTelemetry(toolCall: PendingToolCall): string;
34
34
  export declare function sendToolRequestToRemoteQueue(payload: ServicePayload): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,IAAI,EACJ,cAAc,EACf,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAu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