@empiricalrun/test-gen 0.57.2 → 0.59.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.
- package/CHANGELOG.md +69 -0
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/skill.js +2 -2
- package/dist/actions/utils/index.js +2 -3
- package/dist/agent/browsing/index.js +1 -2
- package/dist/agent/browsing/run.d.ts +3 -1
- package/dist/agent/browsing/run.d.ts.map +1 -1
- package/dist/agent/browsing/run.js +24 -27
- package/dist/agent/browsing/utils.d.ts +1 -14
- package/dist/agent/browsing/utils.d.ts.map +1 -1
- package/dist/agent/browsing/utils.js +10 -67
- package/dist/agent/chat/agent-loop.d.ts +6 -3
- package/dist/agent/chat/agent-loop.d.ts.map +1 -1
- package/dist/agent/chat/agent-loop.js +43 -27
- package/dist/agent/chat/exports.d.ts +7 -8
- package/dist/agent/chat/exports.d.ts.map +1 -1
- package/dist/agent/chat/exports.js +14 -34
- package/dist/agent/chat/index.d.ts +1 -1
- package/dist/agent/chat/index.d.ts.map +1 -1
- package/dist/agent/chat/index.js +20 -10
- package/dist/agent/chat/models.d.ts +6 -0
- package/dist/agent/chat/models.d.ts.map +1 -0
- package/dist/agent/chat/models.js +37 -0
- package/dist/agent/chat/prompt.d.ts +2 -1
- package/dist/agent/chat/prompt.d.ts.map +1 -1
- package/dist/agent/chat/prompt.js +40 -12
- package/dist/agent/chat/repo.d.ts +2 -1
- package/dist/agent/chat/repo.d.ts.map +1 -1
- package/dist/agent/chat/repo.js +32 -36
- package/dist/agent/chat/state.d.ts +15 -7
- package/dist/agent/chat/state.d.ts.map +1 -1
- package/dist/agent/chat/state.js +95 -32
- package/dist/agent/chat/types.d.ts +0 -1
- package/dist/agent/chat/types.d.ts.map +1 -1
- package/dist/agent/codegen/create-test-block.js +1 -2
- package/dist/agent/codegen/fix-ts-errors.js +1 -2
- package/dist/agent/codegen/generate-code-apply-changes.js +2 -3
- package/dist/agent/codegen/lexical-scoped-vars.js +1 -2
- package/dist/agent/codegen/repo-edit.js +2 -3
- package/dist/agent/codegen/run.js +2 -3
- package/dist/agent/codegen/skills-retriever.d.ts +3 -3
- package/dist/agent/codegen/skills-retriever.d.ts.map +1 -1
- package/dist/agent/codegen/skills-retriever.js +2 -2
- package/dist/agent/codegen/test-update-feedback.js +1 -2
- package/dist/agent/codegen/update-flow.js +4 -5
- package/dist/agent/codegen/use-skill.js +1 -2
- package/dist/agent/codegen/utils.js +9 -10
- package/dist/agent/cua/computer.js +3 -4
- package/dist/agent/cua/index.js +2 -3
- package/dist/agent/cua/model.js +1 -2
- package/dist/agent/diagnosis-agent/index.js +2 -3
- package/dist/agent/diagnosis-agent/strict-mode-violation.js +1 -2
- package/dist/agent/enrich-prompt/index.d.ts +1 -1
- package/dist/agent/enrich-prompt/index.d.ts.map +1 -1
- package/dist/agent/enrich-prompt/utils.js +1 -2
- package/dist/agent/infer-agent/index.js +1 -2
- package/dist/agent/master/action-tool-calls.js +3 -3
- package/dist/agent/master/browser-tests/index.spec.js +6 -6
- package/dist/agent/master/element-annotation.js +2 -3
- package/dist/agent/master/execute-browser-action.d.ts +1 -1
- package/dist/agent/master/execute-browser-action.d.ts.map +1 -1
- package/dist/agent/master/execute-browser-action.js +1 -2
- package/dist/agent/master/execute-skill-action.js +1 -2
- package/dist/agent/master/icon-descriptor/index.js +6 -7
- package/dist/agent/master/icon-descriptor/normalize-svg.js +1 -2
- package/dist/agent/master/next-action.js +1 -2
- package/dist/agent/master/planner.d.ts.map +1 -1
- package/dist/agent/master/planner.js +1 -2
- package/dist/agent/master/run.js +3 -3
- package/dist/agent/master/scroller.js +1 -2
- package/dist/agent/master/with-hints.d.ts +1 -1
- package/dist/agent/master/with-hints.d.ts.map +1 -1
- package/dist/agent/planner/run-time-planner.d.ts.map +1 -1
- package/dist/agent/planner/run-time-planner.js +1 -2
- package/dist/agent/planner/run.js +1 -2
- package/dist/bin/index.js +4 -0
- package/dist/bin/logger/index.js +2 -2
- package/dist/bin/utils/context.js +5 -6
- package/dist/bin/utils/fs/index.d.ts.map +1 -1
- package/dist/bin/utils/fs/index.js +4 -5
- package/dist/bin/utils/index.d.ts +1 -0
- package/dist/bin/utils/index.d.ts.map +1 -1
- package/dist/bin/utils/index.js +2 -3
- package/dist/bin/utils/platform/web/index.d.ts.map +1 -1
- package/dist/bin/utils/platform/web/index.js +21 -21
- package/dist/bin/utils/scenarios/index.js +3 -4
- package/dist/constants/index.js +1 -1
- package/dist/file/server.js +2 -2
- package/dist/human-in-the-loop/cli.js +1 -2
- package/dist/human-in-the-loop/ipc.js +2 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/prompts/lib/ts-transformer.js +17 -7
- package/dist/reporter/index.js +3 -3
- package/dist/reporter/lib.js +1 -1
- package/dist/session/index.js +6 -7
- package/dist/test-build/index.js +3 -4
- package/dist/tool-call-service/index.d.ts +3 -3
- package/dist/tool-call-service/index.d.ts.map +1 -1
- package/dist/tool-call-service/index.js +51 -71
- package/dist/tool-call-service/utils.d.ts +10 -0
- package/dist/tool-call-service/utils.d.ts.map +1 -0
- package/dist/tool-call-service/utils.js +23 -0
- package/dist/tools/commit-and-create-pr.js +2 -2
- package/dist/tools/download-build.d.ts +9 -0
- package/dist/tools/download-build.d.ts.map +1 -1
- package/dist/tools/download-build.js +5 -4
- package/dist/tools/grep/ripgrep/index.js +2 -3
- package/dist/tools/grep/ripgrep/types.d.ts +0 -2
- package/dist/tools/grep/ripgrep/types.d.ts.map +1 -1
- package/dist/tools/str_replace_editor.js +3 -3
- package/dist/tools/test-gen-browser.d.ts.map +1 -1
- package/dist/tools/test-gen-browser.js +8 -13
- package/dist/tools/test-run-fetcher/index.js +2 -2
- package/dist/tools/test-run.d.ts.map +1 -1
- package/dist/tools/test-run.js +8 -13
- package/dist/tools/utils/index.js +2 -3
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/uploader/index.js +6 -6
- package/dist/uploader/utils.d.ts.map +1 -1
- package/dist/uploader/utils.js +2 -2
- package/dist/utils/checkpoint.d.ts.map +1 -1
- package/dist/utils/checkpoint.js +4 -3
- package/dist/utils/env.js +1 -2
- package/dist/utils/exec.d.ts +2 -2
- package/dist/utils/exec.d.ts.map +1 -1
- package/dist/utils/exec.js +7 -6
- package/dist/utils/file-tree.d.ts +3 -0
- package/dist/utils/file-tree.d.ts.map +1 -0
- package/dist/utils/file-tree.js +42 -0
- package/dist/utils/file.js +1 -2
- package/dist/utils/git.js +7 -8
- package/dist/utils/html.d.ts.map +1 -1
- package/dist/utils/pw-test.js +1 -2
- package/dist/utils/repo-tree.d.ts +2 -1
- package/dist/utils/repo-tree.d.ts.map +1 -1
- package/dist/utils/repo-tree.js +62 -53
- package/dist/utils/slug.d.ts.map +1 -1
- package/dist/utils/slug.js +1 -1
- package/dist/utils/string.js +1 -2
- package/package.json +5 -5
- package/tsconfig.tsbuildinfo +1 -0
- package/dist/agent/chat/model.d.ts +0 -4
- package/dist/agent/chat/model.d.ts.map +0 -1
- package/dist/agent/chat/model.js +0 -17
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FrameLocator, Page } from "playwright";
|
|
2
2
|
import { ScopeVars } from "./types";
|
|
3
|
+
export { downloadBuild } from "./test-build";
|
|
3
4
|
export declare function createTest(task: string, pageRef: Page | FrameLocator, scope?: ScopeVars): Promise<void>;
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAQhD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAQhD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAoB7C,wBAAsB,UAAU,CAC9B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,IAAI,GAAG,YAAY,EAC5B,KAAK,CAAC,EAAE,SAAS,iBA0ElB"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,8 @@ 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.
|
|
6
|
+
exports.downloadBuild = void 0;
|
|
7
|
+
exports.createTest = createTest;
|
|
7
8
|
const llm_1 = require("@empiricalrun/llm");
|
|
8
9
|
const cua_1 = require("./agent/cua");
|
|
9
10
|
const run_1 = require("./agent/master/run");
|
|
@@ -11,6 +12,8 @@ const scenarios_1 = require("./bin/utils/scenarios");
|
|
|
11
12
|
const client_1 = __importDefault(require("./file/client"));
|
|
12
13
|
const reporter_1 = require("./reporter");
|
|
13
14
|
const session_1 = require("./session");
|
|
15
|
+
var test_build_1 = require("./test-build");
|
|
16
|
+
Object.defineProperty(exports, "downloadBuild", { enumerable: true, get: function () { return test_build_1.downloadBuild; } });
|
|
14
17
|
const flushEvents = async () => {
|
|
15
18
|
await (0, llm_1.flushAllTraces)();
|
|
16
19
|
};
|
|
@@ -95,4 +98,3 @@ async function createTest(task, pageRef, scope) {
|
|
|
95
98
|
await flushEvents();
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
|
-
exports.createTest = createTest;
|
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
36
|
const fs = __importStar(require("fs"));
|
|
27
37
|
const path = __importStar(require("path"));
|
package/dist/reporter/index.js
CHANGED
|
@@ -3,7 +3,9 @@ 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.TestGenUpdatesReporter =
|
|
6
|
+
exports.TestGenUpdatesReporter = void 0;
|
|
7
|
+
exports.getReporter = getReporter;
|
|
8
|
+
exports.setReporterConfig = setReporterConfig;
|
|
7
9
|
const r2_uploader_1 = require("@empiricalrun/r2-uploader");
|
|
8
10
|
const fs_1 = __importDefault(require("fs"));
|
|
9
11
|
const path_1 = __importDefault(require("path"));
|
|
@@ -23,7 +25,6 @@ function getReporter() {
|
|
|
23
25
|
}
|
|
24
26
|
return reporterInstance;
|
|
25
27
|
}
|
|
26
|
-
exports.getReporter = getReporter;
|
|
27
28
|
/**
|
|
28
29
|
* function will upload videos and json summary of test results to r2 and report them to reporter.
|
|
29
30
|
* method won't throw error if it fails to report
|
|
@@ -31,7 +32,6 @@ exports.getReporter = getReporter;
|
|
|
31
32
|
function setReporterConfig(config) {
|
|
32
33
|
reporterConfig = config;
|
|
33
34
|
}
|
|
34
|
-
exports.setReporterConfig = setReporterConfig;
|
|
35
35
|
class TestGenUpdatesReporter {
|
|
36
36
|
repoDir;
|
|
37
37
|
constructor() {
|
package/dist/reporter/lib.js
CHANGED
package/dist/session/index.js
CHANGED
|
@@ -3,7 +3,12 @@ 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.
|
|
6
|
+
exports.setSessionDetails = setSessionDetails;
|
|
7
|
+
exports.shouldStopSession = shouldStopSession;
|
|
8
|
+
exports.getSessionState = getSessionState;
|
|
9
|
+
exports.endSession = endSession;
|
|
10
|
+
exports.getSessionDetails = getSessionDetails;
|
|
11
|
+
exports.updateSessionStatus = updateSessionStatus;
|
|
7
12
|
const package_json_1 = __importDefault(require("../../package.json"));
|
|
8
13
|
const env_1 = require("../utils/env");
|
|
9
14
|
const sessionDetails = {
|
|
@@ -22,19 +27,16 @@ function getSessionDetails() {
|
|
|
22
27
|
version: package_json_1.default.version,
|
|
23
28
|
};
|
|
24
29
|
}
|
|
25
|
-
exports.getSessionDetails = getSessionDetails;
|
|
26
30
|
function setSessionDetails({ sessionId, generationId, testCaseId, projectRepoName, }) {
|
|
27
31
|
sessionDetails.sessionId = sessionId;
|
|
28
32
|
sessionDetails.generationId = generationId;
|
|
29
33
|
sessionDetails.testUrl = `${process.env.DASHBOARD_DOMAIN ?? ""}/${projectRepoName}/test-cases/${testCaseId}`;
|
|
30
34
|
}
|
|
31
|
-
exports.setSessionDetails = setSessionDetails;
|
|
32
35
|
async function shouldStopSession() {
|
|
33
36
|
const sessionState = await getSessionState();
|
|
34
37
|
const shouldStopSession = sessionState !== "started";
|
|
35
38
|
return shouldStopSession;
|
|
36
39
|
}
|
|
37
|
-
exports.shouldStopSession = shouldStopSession;
|
|
38
40
|
async function getSessionState() {
|
|
39
41
|
// if there is no dashboard domain to connect to or session details missing, then continue the generation session.
|
|
40
42
|
if (!DASHBOARD_DOMAIN ||
|
|
@@ -54,7 +56,6 @@ async function getSessionState() {
|
|
|
54
56
|
// TODO: fix this heirarchy
|
|
55
57
|
return generationStateData.data.state.state;
|
|
56
58
|
}
|
|
57
|
-
exports.getSessionState = getSessionState;
|
|
58
59
|
async function endSession() {
|
|
59
60
|
if (!DASHBOARD_DOMAIN) {
|
|
60
61
|
return;
|
|
@@ -82,7 +83,6 @@ async function endSession() {
|
|
|
82
83
|
console.error("Failed to end session:", error);
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
|
-
exports.endSession = endSession;
|
|
86
86
|
async function updateSessionStatus(sessionId, payload) {
|
|
87
87
|
if (!DASHBOARD_DOMAIN) {
|
|
88
88
|
return;
|
|
@@ -102,4 +102,3 @@ async function updateSessionStatus(sessionId, payload) {
|
|
|
102
102
|
console.error("Failed to update session status:", error);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
exports.updateSessionStatus = updateSessionStatus;
|
package/dist/test-build/index.js
CHANGED
|
@@ -3,7 +3,8 @@ 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.
|
|
6
|
+
exports.hasDownloadScript = hasDownloadScript;
|
|
7
|
+
exports.downloadBuild = downloadBuild;
|
|
7
8
|
const fs_1 = __importDefault(require("fs"));
|
|
8
9
|
const logger_1 = require("../bin/logger");
|
|
9
10
|
const exec_1 = require("../utils/exec");
|
|
@@ -16,16 +17,14 @@ async function hasDownloadScript() {
|
|
|
16
17
|
const packageJSON = await getPackageJSON();
|
|
17
18
|
return !!packageJSON.scripts["download"];
|
|
18
19
|
}
|
|
19
|
-
exports.hasDownloadScript = hasDownloadScript;
|
|
20
20
|
async function downloadBuild(buildUrl) {
|
|
21
21
|
const logger = new logger_1.CustomLogger({ useReporter: false });
|
|
22
22
|
const packageJSON = await getPackageJSON();
|
|
23
23
|
const buildDownloadScript = packageJSON.scripts["download"];
|
|
24
24
|
if (buildDownloadScript && buildUrl) {
|
|
25
25
|
logger.log(`Downloading build from ${buildUrl}`);
|
|
26
|
-
await (0, exec_1.cmd)(`npm run download
|
|
26
|
+
await (0, exec_1.cmd)(`npm`, ["run", "download", buildUrl], {
|
|
27
27
|
env: { ...Object(process.env) },
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
exports.downloadBuild = downloadBuild;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TraceClient } from "@empiricalrun/llm";
|
|
2
|
-
import { PendingToolCall, Tool, ToolResult } from "@empiricalrun/llm/chat";
|
|
3
|
-
import { SupportedChatModels } from "../agent/chat/types";
|
|
2
|
+
import { PendingToolCall, SupportedChatModels, Tool, ToolResult } from "@empiricalrun/llm/chat";
|
|
4
3
|
export type { SupportedChatModels };
|
|
5
4
|
type ToolExecutors = {
|
|
6
5
|
[key: string]: (input: any, trace?: TraceClient) => Promise<ToolResult>;
|
|
@@ -15,6 +14,7 @@ export declare class ToolCallService {
|
|
|
15
14
|
getTools(): Promise<{
|
|
16
15
|
tools: Tool[];
|
|
17
16
|
}>;
|
|
18
|
-
|
|
17
|
+
sendToQueue(toolCalls: PendingToolCall[]): Promise<void>;
|
|
18
|
+
execute(toolCalls: PendingToolCall[], trace?: TraceClient): Promise<ToolResult[]>;
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tool-call-service/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tool-call-service/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAEL,eAAe,EACf,mBAAmB,EACnB,IAAI,EACJ,UAAU,EACX,MAAM,wBAAwB,CAAC;AAiBhC,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,KAAK,aAAa,GAAG;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;CACzE,CAAC;AAEF,qBAAa,eAAe;IAC1B,KAAK,EAAE,IAAI,EAAE,CAAM;IACnB,aAAa,EAAE,aAAa,CAAM;IAClC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,aAAa,EAAE,mBAAmB,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;gBAEjB,aAAa,EAAE,MAAM,GAAG,IAAI,EAC5B,aAAa,EAAE,mBAAmB,EAClC,UAAU,EAAE,MAAM;IAiBd,QAAQ;;;IAaR,WAAW,CAAC,SAAS,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAcxD,OAAO,CACX,SAAS,EAAE,eAAe,EAAE,EAC5B,KAAK,CAAC,EAAE,WAAW,GAClB,OAAO,CAAC,UAAU,EAAE,CAAC;CA2CzB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ToolCallService = void 0;
|
|
4
|
-
const
|
|
4
|
+
const chat_1 = require("@empiricalrun/llm/chat");
|
|
5
5
|
const commit_and_create_pr_1 = require("../tools/commit-and-create-pr");
|
|
6
6
|
const diagnosis_fetcher_1 = require("../tools/diagnosis-fetcher");
|
|
7
7
|
const download_build_1 = require("../tools/download-build");
|
|
@@ -12,25 +12,7 @@ const test_gen_browser_1 = require("../tools/test-gen-browser");
|
|
|
12
12
|
const test_run_1 = require("../tools/test-run");
|
|
13
13
|
const test_run_fetcher_1 = require("../tools/test-run-fetcher");
|
|
14
14
|
const checkpoint_1 = require("../utils/checkpoint");
|
|
15
|
-
|
|
16
|
-
const sqs = new client_sqs_1.SQSClient({
|
|
17
|
-
region: process.env.AWS_REGION,
|
|
18
|
-
credentials: {
|
|
19
|
-
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
20
|
-
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
|
|
21
|
-
},
|
|
22
|
-
});
|
|
23
|
-
const queueUrl = process.env.TOOL_EXECUTION_SQS_URL;
|
|
24
|
-
if (!queueUrl) {
|
|
25
|
-
throw new Error("TOOL_EXECUTION_SQS_URL is required for remote execution.");
|
|
26
|
-
}
|
|
27
|
-
await sqs.send(new client_sqs_1.SendMessageCommand({
|
|
28
|
-
QueueUrl: queueUrl,
|
|
29
|
-
MessageBody: JSON.stringify(payload),
|
|
30
|
-
MessageGroupId: payload.requestId,
|
|
31
|
-
MessageDeduplicationId: payload.requestId, // unique id for the tool request
|
|
32
|
-
}));
|
|
33
|
-
}
|
|
15
|
+
const utils_1 = require("./utils");
|
|
34
16
|
class ToolCallService {
|
|
35
17
|
tools = [];
|
|
36
18
|
toolExecutors = {};
|
|
@@ -53,70 +35,68 @@ class ToolCallService {
|
|
|
53
35
|
];
|
|
54
36
|
}
|
|
55
37
|
async getTools() {
|
|
56
|
-
if (
|
|
38
|
+
if ((0, chat_1.getProviderForModel)(this.selectedModel) !== "claude") {
|
|
57
39
|
this.tools.push(...str_replace_editor_1.textEditorTools);
|
|
58
40
|
}
|
|
59
41
|
this.tools.forEach((tool) => {
|
|
60
42
|
this.toolExecutors[tool.schema.name] = tool.execute;
|
|
61
43
|
});
|
|
62
|
-
if (this.selectedModel
|
|
44
|
+
if ((0, chat_1.getProviderForModel)(this.selectedModel) === "claude") {
|
|
63
45
|
this.toolExecutors["str_replace_editor"] = str_replace_editor_1.strReplaceEditorExecutor;
|
|
64
46
|
}
|
|
65
47
|
return { tools: this.tools };
|
|
66
48
|
}
|
|
67
|
-
async
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
requestId: crypto.randomUUID(),
|
|
72
|
-
chatSessionId: this.chatSessionId,
|
|
73
|
-
selectedModel: this.selectedModel,
|
|
74
|
-
branchName: this.branchName,
|
|
75
|
-
});
|
|
76
|
-
return toolCalls.map(() => ({
|
|
77
|
-
isError: false,
|
|
78
|
-
result: `Tool request sent to remote queue to execute.`,
|
|
79
|
-
}));
|
|
49
|
+
async sendToQueue(toolCalls) {
|
|
50
|
+
const requestId = toolCalls[0]?.id;
|
|
51
|
+
if (!requestId) {
|
|
52
|
+
throw new Error("Could not find an id for the tool call.");
|
|
80
53
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
54
|
+
await (0, utils_1.sendToolRequestToRemoteQueue)({
|
|
55
|
+
toolCalls,
|
|
56
|
+
requestId,
|
|
57
|
+
chatSessionId: this.chatSessionId,
|
|
58
|
+
selectedModel: this.selectedModel,
|
|
59
|
+
branchName: this.branchName,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
async execute(toolCalls, trace) {
|
|
63
|
+
const executeSpan = trace?.span({
|
|
64
|
+
name: "execute_tools",
|
|
65
|
+
input: { toolCalls: toolCalls.map((tc) => ({ name: tc.name })) },
|
|
66
|
+
});
|
|
67
|
+
const toolResults = [];
|
|
68
|
+
for (const toolCall of toolCalls) {
|
|
69
|
+
const span = executeSpan?.span({
|
|
70
|
+
name: `tool: ${toolCall.name}`,
|
|
71
|
+
input: toolCall.input,
|
|
85
72
|
});
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
const errorResult = {
|
|
109
|
-
isError: true,
|
|
110
|
-
result: error instanceof Error ? error.message : String(error),
|
|
111
|
-
};
|
|
112
|
-
toolResults.push(errorResult);
|
|
113
|
-
span?.end({ output: errorResult });
|
|
114
|
-
}
|
|
73
|
+
const toolExecutor = this.toolExecutors[toolCall.name];
|
|
74
|
+
if (!toolExecutor) {
|
|
75
|
+
const errorResult = {
|
|
76
|
+
isError: true,
|
|
77
|
+
result: `Invalid function/tool call: ${toolCall.name} not found`,
|
|
78
|
+
};
|
|
79
|
+
toolResults.push(errorResult);
|
|
80
|
+
span?.end({ output: errorResult });
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
try {
|
|
84
|
+
const result = await toolExecutor(toolCall.input, trace);
|
|
85
|
+
toolResults.push(result);
|
|
86
|
+
span?.end({ output: result });
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
const errorResult = {
|
|
90
|
+
isError: true,
|
|
91
|
+
result: error instanceof Error ? error.message : String(error),
|
|
92
|
+
};
|
|
93
|
+
toolResults.push(errorResult);
|
|
94
|
+
span?.end({ output: errorResult });
|
|
115
95
|
}
|
|
116
|
-
await (0, checkpoint_1.createCheckpoint)(toolCalls, this.branchName);
|
|
117
|
-
executeSpan?.end({ output: { toolResults } });
|
|
118
|
-
return toolResults;
|
|
119
96
|
}
|
|
97
|
+
await (0, checkpoint_1.createCheckpoint)(toolCalls, this.branchName);
|
|
98
|
+
executeSpan?.end({ output: { toolResults } });
|
|
99
|
+
return toolResults;
|
|
120
100
|
}
|
|
121
101
|
}
|
|
122
102
|
exports.ToolCallService = ToolCallService;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SupportedChatModels } from "@empiricalrun/llm/chat";
|
|
2
|
+
import { PendingToolCall } from "@empiricalrun/shared-types";
|
|
3
|
+
export declare function sendToolRequestToRemoteQueue(payload: {
|
|
4
|
+
toolCalls: PendingToolCall[];
|
|
5
|
+
requestId: string;
|
|
6
|
+
chatSessionId: number;
|
|
7
|
+
selectedModel: SupportedChatModels;
|
|
8
|
+
branchName: string;
|
|
9
|
+
}): Promise<void>;
|
|
10
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/tool-call-service/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAE7D,wBAAsB,4BAA4B,CAAC,OAAO,EAAE;IAC1D,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,mBAAmB,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC;CACpB,iBAoBA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendToolRequestToRemoteQueue = sendToolRequestToRemoteQueue;
|
|
4
|
+
const client_sqs_1 = require("@aws-sdk/client-sqs");
|
|
5
|
+
async function sendToolRequestToRemoteQueue(payload) {
|
|
6
|
+
const sqs = new client_sqs_1.SQSClient({
|
|
7
|
+
region: process.env.AWS_REGION,
|
|
8
|
+
credentials: {
|
|
9
|
+
accessKeyId: process.env.AWS_ACCESS_KEY_ID,
|
|
10
|
+
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const queueUrl = process.env.TOOL_EXECUTION_SQS_URL;
|
|
14
|
+
if (!queueUrl) {
|
|
15
|
+
throw new Error("TOOL_EXECUTION_SQS_URL is required for remote execution.");
|
|
16
|
+
}
|
|
17
|
+
await sqs.send(new client_sqs_1.SendMessageCommand({
|
|
18
|
+
QueueUrl: queueUrl,
|
|
19
|
+
MessageBody: JSON.stringify(payload),
|
|
20
|
+
MessageGroupId: payload.requestId,
|
|
21
|
+
MessageDeduplicationId: payload.requestId, // unique id for the tool request
|
|
22
|
+
}));
|
|
23
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPullRequestTool =
|
|
3
|
+
exports.createPullRequestTool = void 0;
|
|
4
|
+
exports.parseGitHubUrl = parseGitHubUrl;
|
|
4
5
|
const child_process_1 = require("child_process");
|
|
5
6
|
const zod_1 = require("zod");
|
|
6
7
|
const git_1 = require("../utils/git");
|
|
@@ -19,7 +20,6 @@ function parseGitHubUrl(url) {
|
|
|
19
20
|
}
|
|
20
21
|
return { owner, repo };
|
|
21
22
|
}
|
|
22
|
-
exports.parseGitHubUrl = parseGitHubUrl;
|
|
23
23
|
const createPullRequestSchema = zod_1.z.object({
|
|
24
24
|
pullRequestTitle: zod_1.z
|
|
25
25
|
.string()
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
import type { Tool } from "@empiricalrun/llm/chat";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
export declare const downloadBuildToolSchema: z.ZodObject<{
|
|
4
|
+
buildUrl: z.ZodString;
|
|
5
|
+
}, "strip", z.ZodTypeAny, {
|
|
6
|
+
buildUrl: string;
|
|
7
|
+
}, {
|
|
8
|
+
buildUrl: string;
|
|
9
|
+
}>;
|
|
10
|
+
export type DownloadBuildToolInput = z.infer<typeof downloadBuildToolSchema>;
|
|
2
11
|
export declare const downloadBuildTool: Tool;
|
|
3
12
|
//# sourceMappingURL=download-build.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"download-build.d.ts","sourceRoot":"","sources":["../../src/tools/download-build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"download-build.d.ts","sourceRoot":"","sources":["../../src/tools/download-build.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE7E,eAAO,MAAM,iBAAiB,EAAE,IA8B/B,CAAC"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.downloadBuildTool = void 0;
|
|
3
|
+
exports.downloadBuildTool = exports.downloadBuildToolSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const test_build_1 = require("../test-build");
|
|
6
|
+
exports.downloadBuildToolSchema = zod_1.z.object({
|
|
7
|
+
buildUrl: zod_1.z.string().describe("The URL of the build to download"),
|
|
8
|
+
});
|
|
6
9
|
exports.downloadBuildTool = {
|
|
7
10
|
schema: {
|
|
8
11
|
name: "downloadBuild",
|
|
9
12
|
description: `Download a build from a build URL. If you do not have
|
|
10
13
|
have a build URL, you can try getting the environment details with the getEnvironment tool.
|
|
11
14
|
Environment details will include the build URL.`,
|
|
12
|
-
parameters:
|
|
13
|
-
buildUrl: zod_1.z.string().describe("The URL of the build to download"),
|
|
14
|
-
}),
|
|
15
|
+
parameters: exports.downloadBuildToolSchema,
|
|
15
16
|
},
|
|
16
17
|
execute: async (input) => {
|
|
17
18
|
if (!(await (0, test_build_1.hasDownloadScript)())) {
|
|
@@ -14,7 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.isRgAvailable = isRgAvailable;
|
|
18
|
+
exports.ripgrep = ripgrep;
|
|
18
19
|
const child_process_1 = require("child_process");
|
|
19
20
|
const types_1 = require("./types");
|
|
20
21
|
__exportStar(require("./types"), exports);
|
|
@@ -40,7 +41,6 @@ function isRgAvailable() {
|
|
|
40
41
|
return false;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
exports.isRgAvailable = isRgAvailable;
|
|
44
44
|
function ripgrep(cwd, options) {
|
|
45
45
|
if (!cwd) {
|
|
46
46
|
throw new Error("No `cwd` provided");
|
|
@@ -87,4 +87,3 @@ function ripgrep(cwd, options) {
|
|
|
87
87
|
throw new types_1.RipGrepError(error, stderr);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
exports.ripgrep = ripgrep;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types=".pnpm/@types+node@20.14.11/node_modules/@types/node/child_process" />
|
|
2
|
-
/// <reference types=".pnpm/@types+node@20.16.10/node_modules/@types/node/child_process" />
|
|
3
1
|
import { ExecException } from "child_process";
|
|
4
2
|
type StringSearchOptions = {
|
|
5
3
|
string: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/tools/grep/ripgrep/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/tools/grep/ripgrep/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,KAAK,mBAAmB,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,kBAAkB,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,cAAc,GAAG,mBAAmB,GAAG,kBAAkB,CAAC;AAE/D,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG;IACrC,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,KAAK,EAAE;YACL,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;QACF,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,UAAU,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;KACxC,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAE7C,qBAAa,YAAY;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;gBAEH,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM;IAKhD,IAAI,OAAO,IAAI,MAAM,CAEpB;CACF"}
|
|
@@ -3,7 +3,9 @@ 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 =
|
|
6
|
+
exports.textEditorTools = void 0;
|
|
7
|
+
exports.cleanupBackupFiles = cleanupBackupFiles;
|
|
8
|
+
exports.strReplaceEditorExecutor = strReplaceEditorExecutor;
|
|
7
9
|
const fs_1 = __importDefault(require("fs"));
|
|
8
10
|
const path_1 = __importDefault(require("path"));
|
|
9
11
|
const zod_1 = require("zod");
|
|
@@ -130,7 +132,6 @@ function cleanupBackupFiles(repoDir) {
|
|
|
130
132
|
}
|
|
131
133
|
return cleanedCount;
|
|
132
134
|
}
|
|
133
|
-
exports.cleanupBackupFiles = cleanupBackupFiles;
|
|
134
135
|
function escapeRegExp(text) {
|
|
135
136
|
return text.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
136
137
|
}
|
|
@@ -291,7 +292,6 @@ async function strReplaceEditorExecutor(input) {
|
|
|
291
292
|
};
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
|
-
exports.strReplaceEditorExecutor = strReplaceEditorExecutor;
|
|
295
295
|
const fileViewTool = {
|
|
296
296
|
schema: {
|
|
297
297
|
name: "fileViewTool",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-gen-browser.d.ts","sourceRoot":"","sources":["../../src/tools/test-gen-browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAyFnD,eAAO,MAAM,4BAA4B,EAAE,
|
|
1
|
+
{"version":3,"file":"test-gen-browser.d.ts","sourceRoot":"","sources":["../../src/tools/test-gen-browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAyFnD,eAAO,MAAM,4BAA4B,EAAE,IAyE1C,CAAC"}
|
|
@@ -104,34 +104,29 @@ exports.generateTestWithBrowserAgent = {
|
|
|
104
104
|
}
|
|
105
105
|
const fileBackup = await promises_1.default.readFile(fileName, "utf-8");
|
|
106
106
|
try {
|
|
107
|
-
await (0, utils_1.replaceTodoWithCreateTest)(
|
|
108
|
-
testCaseName: testName,
|
|
109
|
-
testCaseSuites: testSuites,
|
|
110
|
-
testFilePath: fileName,
|
|
111
|
-
});
|
|
107
|
+
await (0, utils_1.replaceTodoWithCreateTest)(fileName);
|
|
112
108
|
}
|
|
113
109
|
catch (error) {
|
|
110
|
+
// Undo the TODO -> createTest and test.only changes
|
|
111
|
+
await promises_1.default.writeFile(fileName, fileBackup, "utf-8");
|
|
114
112
|
return {
|
|
115
113
|
isError: true,
|
|
116
114
|
result: `Error running tool: ${error}`,
|
|
117
115
|
};
|
|
118
116
|
}
|
|
117
|
+
const testGenToken = (0, scenarios_1.buildTokenFromOptions)({ name: testName, file: fileName, prompt: changeToMake }, { useComputerUseAgent: true });
|
|
119
118
|
const toolResult = await (0, run_1.generateTestsUsingMasterAgent)({
|
|
119
|
+
testCaseName: testName,
|
|
120
|
+
testCaseSuites: testSuites,
|
|
120
121
|
testFilePath: fileName,
|
|
121
122
|
filePathToUpdate: fileName,
|
|
122
123
|
pwProjectsFilter: [project],
|
|
123
124
|
traceId: trace?.id,
|
|
124
|
-
testGenToken
|
|
125
|
-
name: testName,
|
|
126
|
-
file: fileName,
|
|
127
|
-
prompt: changeToMake,
|
|
128
|
-
}, {
|
|
129
|
-
useComputerUseAgent: true,
|
|
130
|
-
}),
|
|
125
|
+
testGenToken,
|
|
131
126
|
repoDir: process.cwd(),
|
|
132
127
|
editFileWithGeneratedCode: false,
|
|
133
128
|
});
|
|
134
|
-
// Undo the TODO -> createTest
|
|
129
|
+
// Undo the TODO -> createTest changes
|
|
135
130
|
await promises_1.default.writeFile(fileName, fileBackup, "utf-8");
|
|
136
131
|
const { isError, error, actionsSummary } = toolResult;
|
|
137
132
|
if (!isError) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fetchTestRunReportTool =
|
|
3
|
+
exports.fetchTestRunReportTool = void 0;
|
|
4
|
+
exports.extractPathAfterSourceRepo = extractPathAfterSourceRepo;
|
|
4
5
|
const zod_1 = require("zod");
|
|
5
6
|
const utils_1 = require("../utils");
|
|
6
7
|
const TestRunSchema = zod_1.z.object({
|
|
@@ -17,7 +18,6 @@ function extractPathAfterSourceRepo(fullPath) {
|
|
|
17
18
|
return parts[1].replace(/^\/|\/$/g, "");
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
exports.extractPathAfterSourceRepo = extractPathAfterSourceRepo;
|
|
21
21
|
exports.fetchTestRunReportTool = {
|
|
22
22
|
schema: {
|
|
23
23
|
name: "fetchTestRunDetails",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-run.d.ts","sourceRoot":"","sources":["../../src/tools/test-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAgDnD,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"test-run.d.ts","sourceRoot":"","sources":["../../src/tools/test-run.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAgDnD,eAAO,MAAM,WAAW,EAAE,IAiDzB,CAAC"}
|