@empiricalrun/test-gen 0.79.2 → 0.79.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.
- package/CHANGELOG.md +14 -0
- package/dist/agent/chat/exports.d.ts +1 -0
- package/dist/agent/chat/exports.d.ts.map +1 -1
- package/dist/agent/chat/exports.js +3 -1
- package/dist/agent/chat/index.d.ts.map +1 -1
- package/dist/agent/chat/index.js +22 -3
- package/dist/agent/chat/prompt/pw-utils-docs.d.ts +1 -1
- package/dist/agent/chat/prompt/pw-utils-docs.d.ts.map +1 -1
- package/dist/agent/chat/prompt/pw-utils-docs.js +1 -1
- package/dist/agent/chat/prompt/repo.d.ts.map +1 -1
- package/dist/agent/chat/prompt/repo.js +4 -3
- package/dist/agent/chat/prompt/trace-utils-docs.d.ts +2 -0
- package/dist/agent/chat/prompt/trace-utils-docs.d.ts.map +1 -0
- package/dist/agent/chat/prompt/trace-utils-docs.js +208 -0
- package/dist/agent/code-review/index.d.ts +1 -1
- package/dist/agent/code-review/index.d.ts.map +1 -1
- package/dist/agent/code-review/index.js +4 -4
- package/dist/agent/code-review/{parser.d.ts → xml-parser.d.ts} +1 -1
- package/dist/agent/code-review/xml-parser.d.ts.map +1 -0
- package/dist/agent/code-review/{parser.js → xml-parser.js} +1 -1
- package/dist/agent/fast-triage/index.d.ts +8 -0
- package/dist/agent/fast-triage/index.d.ts.map +1 -0
- package/dist/agent/fast-triage/index.js +79 -0
- package/dist/agent/index.d.ts +2 -1
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +4 -1
- package/dist/agent/master/element-annotation.d.ts.map +1 -1
- package/dist/agent/master/element-annotation.js +2 -19
- package/dist/agent/triage/index.js +2 -2
- package/dist/bin/index.js +3 -3
- package/dist/bin/utils/platform/web/index.d.ts.map +1 -1
- package/dist/bin/utils/platform/web/index.js +3 -2
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.js +1 -1
- package/dist/dashboard/client.d.ts +16 -1
- package/dist/dashboard/client.d.ts.map +1 -1
- package/dist/dashboard/client.js +33 -9
- package/dist/dashboard/index.d.ts +1 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +4 -1
- package/dist/dashboard/tool-response-from-sandbox.d.ts +5 -0
- package/dist/dashboard/tool-response-from-sandbox.d.ts.map +1 -0
- package/dist/dashboard/tool-response-from-sandbox.js +40 -0
- package/dist/dashboard/tool-response.d.ts +1 -0
- package/dist/dashboard/tool-response.d.ts.map +1 -1
- package/dist/dashboard/tool-response.js +1 -0
- package/dist/file-info/adapters/github/index.d.ts.map +1 -1
- package/dist/file-info/adapters/github/index.js +1 -1
- package/dist/file-info/adapters/github/reader.d.ts.map +1 -1
- package/dist/file-info/adapters/github/reader.js +9 -3
- package/dist/generate-summary/frame-sampling.d.ts +12 -0
- package/dist/generate-summary/frame-sampling.d.ts.map +1 -0
- package/dist/generate-summary/frame-sampling.js +72 -0
- package/dist/generate-summary/generate-error-stack-summary.d.ts +11 -0
- package/dist/generate-summary/generate-error-stack-summary.d.ts.map +1 -0
- package/dist/generate-summary/generate-error-stack-summary.js +41 -0
- package/dist/generate-summary/generate-failed-step-screenshot-diff-summary.d.ts +58 -0
- package/dist/generate-summary/generate-failed-step-screenshot-diff-summary.d.ts.map +1 -0
- package/dist/generate-summary/generate-failed-step-screenshot-diff-summary.js +460 -0
- package/dist/generate-summary/generate-grouped-summary.d.ts +18 -0
- package/dist/generate-summary/generate-grouped-summary.d.ts.map +1 -0
- package/dist/generate-summary/generate-grouped-summary.js +88 -0
- package/dist/generate-summary/merge-summary.d.ts +16 -0
- package/dist/generate-summary/merge-summary.d.ts.map +1 -0
- package/dist/generate-summary/merge-summary.js +43 -0
- package/dist/generate-summary/pick-videos-for-comparison.d.ts +9 -0
- package/dist/generate-summary/pick-videos-for-comparison.d.ts.map +1 -0
- package/dist/generate-summary/pick-videos-for-comparison.js +54 -0
- package/dist/telemetry/index.d.ts +3 -3
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +11 -6
- package/dist/tools/analyse-video/index.js +1 -1
- package/dist/tools/definitions/delete-file.js +1 -1
- package/dist/tools/definitions/grep.d.ts.map +1 -1
- package/dist/tools/definitions/grep.js +1 -1
- package/dist/tools/definitions/publish-markdown-report.d.ts +8 -0
- package/dist/tools/definitions/publish-markdown-report.d.ts.map +1 -0
- package/dist/tools/definitions/publish-markdown-report.js +29 -0
- package/dist/tools/definitions/rename-file.js +2 -2
- package/dist/tools/definitions/safe-bash.d.ts.map +1 -1
- package/dist/tools/definitions/safe-bash.js +10 -8
- package/dist/tools/definitions/str_replace_editor.d.ts.map +1 -1
- package/dist/tools/definitions/str_replace_editor.js +12 -4
- package/dist/tools/definitions/trace-dot-zip.d.ts +7 -0
- package/dist/tools/definitions/trace-dot-zip.d.ts.map +1 -0
- package/dist/tools/definitions/trace-dot-zip.js +16 -0
- package/dist/tools/definitions/utils.js +1 -1
- package/dist/tools/delete-file/index.d.ts.map +1 -1
- package/dist/tools/delete-file/index.js +9 -6
- package/dist/tools/diagnosis-fetcher.d.ts +5 -0
- package/dist/tools/diagnosis-fetcher.d.ts.map +1 -1
- package/dist/tools/diagnosis-fetcher.js +56 -13
- package/dist/tools/executor/index.d.ts.map +1 -1
- package/dist/tools/executor/index.js +2 -2
- package/dist/tools/fetch-file/index.d.ts.map +1 -1
- package/dist/tools/fetch-file/index.js +110 -10
- package/dist/tools/fetch-file/utils.d.ts +13 -1
- package/dist/tools/fetch-file/utils.d.ts.map +1 -1
- package/dist/tools/fetch-file/utils.js +44 -118
- package/dist/tools/file-operations/index.d.ts.map +1 -1
- package/dist/tools/file-operations/index.js +7 -5
- package/dist/tools/file-operations/shared/helpers.d.ts +13 -0
- package/dist/tools/file-operations/shared/helpers.d.ts.map +1 -1
- package/dist/tools/file-operations/shared/helpers.js +24 -0
- package/dist/tools/file-operations/view/index.d.ts.map +1 -1
- package/dist/tools/file-operations/view/index.js +9 -3
- package/dist/tools/grep/index.d.ts.map +1 -1
- package/dist/tools/grep/index.js +7 -2
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +14 -10
- package/dist/tools/issues-v1/index.d.ts +0 -2
- package/dist/tools/issues-v1/index.d.ts.map +1 -1
- package/dist/tools/issues-v1/index.js +1 -5
- package/dist/tools/merge-conflicts/index.d.ts.map +1 -1
- package/dist/tools/merge-conflicts/index.js +8 -8
- package/dist/tools/publish-markdown-report/index.d.ts +3 -0
- package/dist/tools/publish-markdown-report/index.d.ts.map +1 -0
- package/dist/tools/publish-markdown-report/index.js +196 -0
- package/dist/tools/rename-file/index.d.ts.map +1 -1
- package/dist/tools/rename-file/index.js +11 -7
- package/dist/tools/run-test.d.ts.map +1 -1
- package/dist/tools/run-test.js +12 -7
- package/dist/tools/safe-bash/index.d.ts.map +1 -1
- package/dist/tools/safe-bash/index.js +18 -2
- package/dist/tools/test-gen-browser.d.ts.map +1 -1
- package/dist/tools/test-gen-browser.js +13 -10
- package/dist/tools/trace-dot-zip/index.d.ts +3 -1
- package/dist/tools/trace-dot-zip/index.d.ts.map +1 -1
- package/dist/tools/trace-dot-zip/index.js +21 -23
- package/dist/tools/trace-dot-zip/utils/console-trace.d.ts.map +1 -1
- package/dist/tools/trace-dot-zip/utils/console-trace.js +11 -5
- package/dist/tools/trace-dot-zip/utils/extract-screenshots.d.ts +27 -0
- package/dist/tools/trace-dot-zip/utils/extract-screenshots.d.ts.map +1 -0
- package/dist/tools/trace-dot-zip/utils/extract-screenshots.js +128 -0
- package/dist/tools/trace-dot-zip/utils/extract-steps.d.ts +12 -0
- package/dist/tools/trace-dot-zip/utils/extract-steps.d.ts.map +1 -0
- package/dist/tools/trace-dot-zip/utils/extract-steps.js +130 -0
- package/dist/tools/trace-dot-zip/utils/extract-zip.d.ts +13 -16
- package/dist/tools/trace-dot-zip/utils/extract-zip.d.ts.map +1 -1
- package/dist/tools/trace-dot-zip/utils/extract-zip.js +27 -167
- package/dist/tools/trace-dot-zip/utils/network-trace.d.ts.map +1 -1
- package/dist/tools/trace-dot-zip/utils/network-trace.js +136 -105
- package/dist/utils/model.d.ts.map +1 -1
- package/dist/utils/model.js +2 -6
- package/dist/video-core/index.d.ts.map +1 -1
- package/dist/video-core/index.js +17 -33
- package/package.json +13 -16
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/agent/code-review/parser.d.ts.map +0 -1
- package/dist/agent/master/icon-descriptor/index.d.ts +0 -22
- package/dist/agent/master/icon-descriptor/index.d.ts.map +0 -1
- package/dist/agent/master/icon-descriptor/index.js +0 -249
- package/dist/agent/master/icon-descriptor/normalize-svg.d.ts +0 -2
- package/dist/agent/master/icon-descriptor/normalize-svg.d.ts.map +0 -1
- package/dist/agent/master/icon-descriptor/normalize-svg.js +0 -247
- package/dist/tools/issues-v1/create-issue.d.ts +0 -3
- package/dist/tools/issues-v1/create-issue.d.ts.map +0 -1
- package/dist/tools/issues-v1/create-issue.js +0 -72
- package/dist/tools/issues-v1/update-issue.d.ts +0 -3
- package/dist/tools/issues-v1/update-issue.d.ts.map +0 -1
- package/dist/tools/issues-v1/update-issue.js +0 -74
- package/dist/trace-utils/index.d.ts +0 -4
- package/dist/trace-utils/index.d.ts.map +0 -1
- package/dist/trace-utils/index.js +0 -10
- package/dist/utils/playwright-report-parser.d.ts +0 -13
- package/dist/utils/playwright-report-parser.d.ts.map +0 -1
- package/dist/utils/playwright-report-parser.js +0 -138
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @empiricalrun/test-gen
|
|
2
2
|
|
|
3
|
+
## 0.79.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dc2e6c9: feat: dashboard api client upgrade
|
|
8
|
+
|
|
9
|
+
## 0.79.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [92254ba]
|
|
14
|
+
- @empiricalrun/r2-uploader@0.9.1
|
|
15
|
+
- @empiricalrun/test-run@0.14.2
|
|
16
|
+
|
|
3
17
|
## 0.79.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -6,6 +6,7 @@ export type { AgentParams, OnToolCallCallback } from "../base";
|
|
|
6
6
|
export { BaseAgent } from "../base";
|
|
7
7
|
export type { CodeReviewResultV0, CodeReviewResultV1, CodeReviewResultV2, CodeReviewVersionedResult, } from "../code-review";
|
|
8
8
|
export { CodeReviewAgent } from "../code-review";
|
|
9
|
+
export { FastTriageAgent } from "../fast-triage";
|
|
9
10
|
export { TriageAgent } from "../triage";
|
|
10
11
|
export { ChatAgent } from "./index";
|
|
11
12
|
export { fetchToolCallFromId, getLatestDownloadBuildUrl, LATEST_CHAT_STATE_VERSION, } from "./state";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/agent/chat/exports.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/agent/chat/exports.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EACL,qBAAqB,EACrB,mBAAmB,GACpB,MAAM,iCAAiC,CAAC;AAEzC,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractAttachments = exports.LATEST_CHAT_STATE_VERSION = exports.getLatestDownloadBuildUrl = exports.fetchToolCallFromId = exports.ChatAgent = exports.TriageAgent = exports.CodeReviewAgent = exports.BaseAgent = exports.viewFileUsingGitHub = exports.getFileInfoFromGitHub = exports.SUPPORTED_CHAT_MODELS = exports.createChatModel = void 0;
|
|
3
|
+
exports.extractAttachments = exports.LATEST_CHAT_STATE_VERSION = exports.getLatestDownloadBuildUrl = exports.fetchToolCallFromId = exports.ChatAgent = exports.TriageAgent = exports.FastTriageAgent = exports.CodeReviewAgent = exports.BaseAgent = exports.viewFileUsingGitHub = exports.getFileInfoFromGitHub = exports.SUPPORTED_CHAT_MODELS = exports.createChatModel = void 0;
|
|
4
4
|
var chat_1 = require("@empiricalrun/llm/chat");
|
|
5
5
|
Object.defineProperty(exports, "createChatModel", { enumerable: true, get: function () { return chat_1.createChatModel; } });
|
|
6
6
|
var constants_1 = require("@empiricalrun/llm/chat/constants");
|
|
@@ -12,6 +12,8 @@ var base_1 = require("../base");
|
|
|
12
12
|
Object.defineProperty(exports, "BaseAgent", { enumerable: true, get: function () { return base_1.BaseAgent; } });
|
|
13
13
|
var code_review_1 = require("../code-review");
|
|
14
14
|
Object.defineProperty(exports, "CodeReviewAgent", { enumerable: true, get: function () { return code_review_1.CodeReviewAgent; } });
|
|
15
|
+
var fast_triage_1 = require("../fast-triage");
|
|
16
|
+
Object.defineProperty(exports, "FastTriageAgent", { enumerable: true, get: function () { return fast_triage_1.FastTriageAgent; } });
|
|
15
17
|
var triage_1 = require("../triage");
|
|
16
18
|
Object.defineProperty(exports, "TriageAgent", { enumerable: true, get: function () { return triage_1.TriageAgent; } });
|
|
17
19
|
var index_1 = require("./index");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAsBpE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMpC,qBAAa,SAAS,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAC5C,SAAS,CAAC,QAAQ,IAAI,WAAW;IA0B3B,iBAAiB,CACrB,eAAe,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC;CAyGnB"}
|
package/dist/agent/chat/index.js
CHANGED
|
@@ -3,32 +3,49 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ChatAgent = void 0;
|
|
4
4
|
const tools_1 = require("../../tools");
|
|
5
5
|
const analyse_video_1 = require("../../tools/definitions/analyse-video");
|
|
6
|
+
const download_build_1 = require("../../tools/definitions/download-build");
|
|
7
|
+
const grep_1 = require("../../tools/definitions/grep");
|
|
8
|
+
const list_tests_and_projects_1 = require("../../tools/definitions/list-tests-and-projects");
|
|
9
|
+
const run_test_1 = require("../../tools/definitions/run-test");
|
|
6
10
|
const diagnosis_fetcher_1 = require("../../tools/diagnosis-fetcher");
|
|
11
|
+
const fetch_file_1 = require("../../tools/fetch-file");
|
|
12
|
+
const list_environments_1 = require("../../tools/list-environments");
|
|
7
13
|
const test_run_fetcher_1 = require("../../tools/test-run-fetcher");
|
|
8
14
|
const base_1 = require("../base");
|
|
9
15
|
const pw_utils_docs_1 = require("./prompt/pw-utils-docs");
|
|
10
16
|
const repo_1 = require("./prompt/repo");
|
|
11
17
|
const test_case_def_1 = require("./prompt/test-case-def");
|
|
18
|
+
const trace_utils_docs_1 = require("./prompt/trace-utils-docs");
|
|
12
19
|
class ChatAgent extends base_1.BaseAgent {
|
|
13
20
|
getTools() {
|
|
14
21
|
const custom = [
|
|
15
22
|
analyse_video_1.analyseVideo,
|
|
16
|
-
|
|
23
|
+
run_test_1.runTestTool,
|
|
24
|
+
grep_1.grepTool,
|
|
25
|
+
list_environments_1.listEnvironmentsTool,
|
|
26
|
+
download_build_1.downloadBuildTool,
|
|
27
|
+
fetch_file_1.fetchFileTool,
|
|
28
|
+
list_tests_and_projects_1.listProjectsTool,
|
|
29
|
+
list_tests_and_projects_1.listTestsForProjectTool,
|
|
17
30
|
...tools_1.testGenerationTools,
|
|
18
31
|
test_run_fetcher_1.fetchTestRunDetailsTool,
|
|
19
32
|
diagnosis_fetcher_1.fetchDiagnosisReportTool,
|
|
20
33
|
...(0, tools_1.textEditorToolsForModel)(this.selectedModel),
|
|
21
|
-
|
|
22
|
-
...(this.
|
|
34
|
+
tools_1.safeBashTool,
|
|
35
|
+
...(!(0, tools_1.hasBuiltInWebFetch)(this.selectedModel) ? [tools_1.scrapeHtmlTool] : []),
|
|
23
36
|
];
|
|
24
37
|
return {
|
|
25
38
|
custom,
|
|
26
39
|
builtInTextEditor: (0, tools_1.hasBuiltInTextEditor)(this.selectedModel),
|
|
40
|
+
builtInWebFetch: (0, tools_1.hasBuiltInWebFetch)(this.selectedModel)
|
|
41
|
+
? { enabled: true, max_uses: 1 }
|
|
42
|
+
: undefined,
|
|
27
43
|
};
|
|
28
44
|
}
|
|
29
45
|
async buildSystemPrompt(repoInfoBuilder) {
|
|
30
46
|
const repoInfo = await repoInfoBuilder();
|
|
31
47
|
const repoContext = await (0, repo_1.getRepoContextPrompt)(repoInfo);
|
|
48
|
+
const hasTraceUtils = this.featureFlags.includes("enableTraceUtilsViaBash");
|
|
32
49
|
const preamble = `
|
|
33
50
|
You are a helpful assistant that can answer questions and help with tasks related to writing and maintaining Playwright tests.
|
|
34
51
|
|
|
@@ -121,6 +138,8 @@ ${test_case_def_1.testCasesDefinitionPrompt}
|
|
|
121
138
|
# Recipes
|
|
122
139
|
${pw_utils_docs_1.playwrightUtilsDocs}
|
|
123
140
|
|
|
141
|
+
${trace_utils_docs_1.traceUtilsDoc}
|
|
142
|
+
|
|
124
143
|
# Repo context
|
|
125
144
|
${repoContext}
|
|
126
145
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const playwrightUtilsDocs = "\nYou can refer to the following recipes to learn how to write tests for different scenarios.\n\n<email-automation>\n\n# Email automation\n\n## Example usage\n\n### Dynamic email\n\nThis dynamically generates a random email address that can \nbe used for the test (e.g. invite a new user).\n\n```ts\nimport { EmailClient } from \"@empiricalrun/playwright-utils\";\nimport { expect } from \"@playwright/test\";\n\nconst client = new EmailClient();\nconst address = client.getAddress();\n\n// Input the `address` in the application\n// that sends the email.\n\n// Get email received on the `address`\nconst email = await client.waitForEmail();\nexpect(\n email.links.find((l) => l.text === \"Join your team\")\n).toBeTruthy();\n```\n\n### Static email\n\nThis uses a known (static) email that can be used to login\ninto an application.\n\nThis needs an email id (e.g. `test-login-user`). The email id\nis appended with the domain (managed internally) to get the full\nemail address.\n\n```ts\nimport { EmailClient } from \"@empiricalrun/playwright-utils\";\n\nconst emailId = `test-login-user`;\n\nconst client = new EmailClient({ emailId });\nconst address = client.getAddress(); // Returns full address with domain\n\n// Get email received on the `address`\nconst email = await client.waitForEmail();\n\n// Get login OTP\nconst loginCode = email.codes[0];\n```\n\n</email-automation>\n\n<fixtures>\n\nThe playwright-utils package provides fixtures that wrap around Playwright's built-in\n`page`, `context` fixtures to provide a mouse highlighter (which makes it easier to\nsee actions taken in a video).\n\nTo use this, you can use the `baseTestFixture` and `extendExpect` imports\nin your fixtures file.\n\n```ts\nimport { test as base, expect as baseExpect } from \"@playwright/test\";\nimport { baseTestFixture, extendExpect } from \"@empiricalrun/playwright-utils/test\";\n\nexport const test = baseTestFixture(base);\nexport const expect = extendExpect(baseExpect);\n```\n\n### Get a new browser context\n\nThis package provides a fixture `customContextPageProvider` which is a good way to create\na fresh, new browser context, and a page inside it.\n\nThere are two benefits of using this to create contexts or pages:\n1. Videos get recorded and attached to the test report\n2. Mouse highlights are available\n\n```ts\nimport { test, expect } from \"./fixtures\";\n\ntest(\"Example test\", async ({ page: builtInPage, customContextPageProvider }) => {\n // builtInPage is from default browser context\n const { page: newPage, context } = await customContextPageProvider();\n // newPage is from this other browser context\n});\n```\n\ncustomContextPageProvider can accept options to customize the browser context.\n\n```\n customContextPageProvider: (\n options?: BrowserContextOptions,\n ) => Promise<{ context: BrowserContext; page: Page }>;\n```\n\nFor example, pass { storageState: undefined } to create a new browser context without\nthe auth state of the current browser context. This is useful for multi-user scenarios.\n\n</fixtures>\n\n<video-labels>\n\n# Video Labels\n\nPages generate video recordings after test execution, with 1 page generating 1 video file (webm). \n\nIf your test case relies on multiple pages (e.g. for multi-user or multi-app flows), it can get difficult to\nknow which page does \"video-1.webm\" belong to.\n\nTo solve this, you should set video labels for pages. This will enable you to identify videos faster.\n\n## Usage\n\n```typescript\nimport { setVideoLabel } from '@empiricalrun/playwright-utils/test';\n\ntest('my test', async ({ page }) => {\n setVideoLabel(page, 'checkout-flow');\n // Video will be saved as 'checkout-flow.webm'\n});\n```\n\n## Multiple Contexts\n\n```typescript\ntest('multi-user scenario', async ({ page, customContextPageProvider }) => {\n setVideoLabel(page, 'host-page');\n\n const { page: guestPage } = await customContextPageProvider({ storageState: undefined });\n setVideoLabel(guestPage, 'guest-page');\n // Videos saved as 'guest-page.webm' and 'host-page.webm'\n});\n```\n\n## Notes\n\n- The default behavior is to label videos for multiple pages as: `video-0.webm`, `video-1.webm`, etc.\n- If setVideoLabel is called twice for the same page, the last label will be set\n\n</video-labels>\n\n";
|
|
1
|
+
export declare const playwrightUtilsDocs = "\nYou can refer to the following recipes to learn how to write or diagnose tests for different scenarios.\n\n<email-automation>\n\n# Email automation\n\n## Example usage\n\n### Dynamic email\n\nThis dynamically generates a random email address that can \nbe used for the test (e.g. invite a new user).\n\n```ts\nimport { EmailClient } from \"@empiricalrun/playwright-utils\";\nimport { expect } from \"@playwright/test\";\n\nconst client = new EmailClient();\nconst address = client.getAddress();\n\n// Input the `address` in the application\n// that sends the email.\n\n// Get email received on the `address`\nconst email = await client.waitForEmail();\nexpect(\n email.links.find((l) => l.text === \"Join your team\")\n).toBeTruthy();\n```\n\n### Static email\n\nThis uses a known (static) email that can be used to login\ninto an application.\n\nThis needs an email id (e.g. `test-login-user`). The email id\nis appended with the domain (managed internally) to get the full\nemail address.\n\n```ts\nimport { EmailClient } from \"@empiricalrun/playwright-utils\";\n\nconst emailId = `test-login-user`;\n\nconst client = new EmailClient({ emailId });\nconst address = client.getAddress(); // Returns full address with domain\n\n// Get email received on the `address`\nconst email = await client.waitForEmail();\n\n// Get login OTP\nconst loginCode = email.codes[0];\n```\n\n</email-automation>\n\n<fixtures>\n\nThe playwright-utils package provides fixtures that wrap around Playwright's built-in\n`page`, `context` fixtures to provide a mouse highlighter (which makes it easier to\nsee actions taken in a video).\n\nTo use this, you can use the `baseTestFixture` and `extendExpect` imports\nin your fixtures file.\n\n```ts\nimport { test as base, expect as baseExpect } from \"@playwright/test\";\nimport { baseTestFixture, extendExpect } from \"@empiricalrun/playwright-utils/test\";\n\nexport const test = baseTestFixture(base);\nexport const expect = extendExpect(baseExpect);\n```\n\n### Get a new browser context\n\nThis package provides a fixture `customContextPageProvider` which is a good way to create\na fresh, new browser context, and a page inside it.\n\nThere are two benefits of using this to create contexts or pages:\n1. Videos get recorded and attached to the test report\n2. Mouse highlights are available\n\n```ts\nimport { test, expect } from \"./fixtures\";\n\ntest(\"Example test\", async ({ page: builtInPage, customContextPageProvider }) => {\n // builtInPage is from default browser context\n const { page: newPage, context } = await customContextPageProvider();\n // newPage is from this other browser context\n});\n```\n\ncustomContextPageProvider can accept options to customize the browser context.\n\n```\n customContextPageProvider: (\n options?: BrowserContextOptions,\n ) => Promise<{ context: BrowserContext; page: Page }>;\n```\n\nFor example, pass { storageState: undefined } to create a new browser context without\nthe auth state of the current browser context. This is useful for multi-user scenarios.\n\n</fixtures>\n\n<video-labels>\n\n# Video Labels\n\nPages generate video recordings after test execution, with 1 page generating 1 video file (webm). \n\nIf your test case relies on multiple pages (e.g. for multi-user or multi-app flows), it can get difficult to\nknow which page does \"video-1.webm\" belong to.\n\nTo solve this, you should set video labels for pages. This will enable you to identify videos faster.\n\n## Usage\n\n```typescript\nimport { setVideoLabel } from '@empiricalrun/playwright-utils/test';\n\ntest('my test', async ({ page }) => {\n setVideoLabel(page, 'checkout-flow');\n // Video will be saved as 'checkout-flow.webm'\n});\n```\n\n## Multiple Contexts\n\n```typescript\ntest('multi-user scenario', async ({ page, customContextPageProvider }) => {\n setVideoLabel(page, 'host-page');\n\n const { page: guestPage } = await customContextPageProvider({ storageState: undefined });\n setVideoLabel(guestPage, 'guest-page');\n // Videos saved as 'guest-page.webm' and 'host-page.webm'\n});\n```\n\n## Notes\n\n- The default behavior is to label videos for multiple pages as: `video-0.webm`, `video-1.webm`, etc.\n- If setVideoLabel is called twice for the same page, the last label will be set\n\n</video-labels>\n\n";
|
|
2
2
|
//# sourceMappingURL=pw-utils-docs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pw-utils-docs.d.ts","sourceRoot":"","sources":["../../../../src/agent/chat/prompt/pw-utils-docs.ts"],"names":[],"mappings":"AA4IA,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"pw-utils-docs.d.ts","sourceRoot":"","sources":["../../../../src/agent/chat/prompt/pw-utils-docs.ts"],"names":[],"mappings":"AA4IA,eAAO,MAAM,mBAAmB,itIAe/B,CAAC"}
|
|
@@ -139,7 +139,7 @@ test('multi-user scenario', async ({ page, customContextPageProvider }) => {
|
|
|
139
139
|
- If setVideoLabel is called twice for the same page, the last label will be set
|
|
140
140
|
`;
|
|
141
141
|
exports.playwrightUtilsDocs = `
|
|
142
|
-
You can refer to the following recipes to learn how to write tests for different scenarios.
|
|
142
|
+
You can refer to the following recipes to learn how to write or diagnose tests for different scenarios.
|
|
143
143
|
|
|
144
144
|
<email-automation>
|
|
145
145
|
${emailRecipe}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../../../src/agent/chat/prompt/repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAuD/D,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../../../src/agent/chat/prompt/repo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAuD/D,wBAAsB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,mBA4B5D"}
|
|
@@ -56,9 +56,10 @@ Here is the repo directory structure:
|
|
|
56
56
|
|
|
57
57
|
${(0, repo_tree_1.generateAsciiTree)(repoInfo)}
|
|
58
58
|
|
|
59
|
-
While specifying paths to files,
|
|
60
|
-
-
|
|
61
|
-
-
|
|
59
|
+
While specifying paths to files, prefer using absolute paths with the /repo/ prefix. Both absolute and relative paths are supported. For example:
|
|
60
|
+
- Preferred: "/repo/tests/lesson.spec.ts" (absolute path with /repo/ prefix)
|
|
61
|
+
- Also supported: "tests/lesson.spec.ts" (relative path from repository root)
|
|
62
|
+
- Incorrect: "/${repoInfo.name}/tests/lesson.spec.ts" (wrong prefix)
|
|
62
63
|
`;
|
|
63
64
|
const knowledge = await knowledgeContext(repoInfo);
|
|
64
65
|
if (knowledge.length > 0) {
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const traceUtilsDoc = "\n<trace-utils-cli>\n# Trace Utils\n\nCLI and library for inspecting Playwright `trace.zip` files.\n\n## Usage\n\nVia sandbox-cli:\n```bash\nsandbox-cli trace-utils <command> [options]\n```\n\n---\n\n## `steps`\n\nList all test steps from a trace.\n\n```bash\nsandbox-cli trace-utils steps --file <path> [--json]\n```\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--file` | Path or URL to trace.zip | *required* |\n| `--json` | Output as JSON | `false` |\n\n---\n\n## `screenshots`\n\nExtract screenshots from a trace. Use either `--step` or `--start`/`--end` (one is required).\n\n```bash\n# By step ID\nsandbox-cli trace-utils screenshots --file <path> --step <id> [options]\n\n# By time range\nsandbox-cli trace-utils screenshots --file <path> --start <time> --end <time> [options]\n```\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--file` | Path or URL to trace.zip | *required* |\n| `--step` | Step callId to extract around | - |\n| `--start` | Start time (HH:MM:SS.mmm) | - |\n| `--end` | End time (HH:MM:SS.mmm) | - |\n| `--page` | Page ID to filter by (required for multi-page traces with time-based extraction) | - |\n| `--before` | Milliseconds before step (only with --step) | `2000` |\n| `--after` | Milliseconds after step (only with --step) | `2000` |\n| `--max` | Maximum screenshots | `10` |\n| `--output` | Output directory | auto-generated in `/tmp` |\n\n**Examples:**\n\n```bash\n# 1. List steps to find callId or timestamps\nsandbox-cli trace-utils steps --file ./trace.zip\n\n# Output:\n# [test.step@36] locator.click(getByRole('button', { name: 'Create' })) (page@abc123)\n# 00:02:06.434 \u2192 00:02:06.543 (110ms)\n\n# 2a. Extract by step ID\nsandbox-cli trace-utils screenshots --file ./trace.zip --step \"test.step@36\"\n\n# 2b. Extract by time range (for multi-page traces, --page is required)\nsandbox-cli trace-utils screenshots --file ./trace.zip --start 00:02:06.000 --end 00:02:07.000 --page \"page@abc123\"\n```\n\n---\n\n## `network`\n\nSearch network requests. For multi-page traces, either `--step` or `--page` is required.\n\n```bash\nsandbox-cli trace-utils network --file <path> [filters] [options]\n```\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--file` | Path or URL to trace.zip | *required* |\n| `--step <callId>` | Filter to requests during a specific step | - |\n| `--page` | Page ID to filter by (required for multi-page traces without --step) | - |\n| `--before <ms>` | Time before step to include (with --step) | `2000` |\n| `--after <ms>` | Time after step to include (with --step) | `2000` |\n| `--errors` | Show only failed requests (4xx, 5xx, no response) | - |\n| `--url <pattern>` | Filter by URL pattern (regex) | - |\n| `--method <method>` | Filter by HTTP method | - |\n| `--status <codes>` | Filter by status codes (e.g., `404,500`) | - |\n| `--json` | Output as JSON | `false` |\n\n**Examples:**\n\n```bash\n# Show all failed requests (for multi-page traces, specify --page)\nsandbox-cli trace-utils network --file ./trace.zip --errors --page \"page@abc123\"\n\n# Search for specific API calls\nsandbox-cli trace-utils network --file ./trace.zip --url \"/api/v1/users\" --page \"page@abc123\"\n\n# Failed POST requests\nsandbox-cli trace-utils network --file ./trace.zip --errors --method POST --page \"page@abc123\"\n\n# Network requests during a specific step (--page not required)\nsandbox-cli trace-utils network --file ./trace.zip --step \"pw:api@32\"\n```\n\n---\n\n## `console`\n\nView browser console output. For multi-page traces, `--page` is required.\n\n```bash\nsandbox-cli trace-utils console --file <path> [options]\n```\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--file` | Path or URL to trace.zip | *required* |\n| `--page` | Page ID to filter by (required for multi-page traces) | - |\n| `--level` | Minimum level: `error`, `warning`, `info`, `debug` | `error` |\n| `--json` | Output as JSON | `false` |\n| `--search` | Filter logs containing text | - |\n\n---\n\n## `dom-snapshot`\n\nExtract DOM snapshot from a trace. Use either `--step` or `--time` (one is required).\n\n```bash\n# By step ID\nsandbox-cli trace-utils dom-snapshot --file <path> --step <id> [options]\n\n# By time (for multi-page traces, --page is required)\nsandbox-cli trace-utils dom-snapshot --file <path> --time <time> --page <pageId> [options]\n```\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--file` | Path or URL to trace.zip | *required* |\n| `--step` | Step callId to extract snapshot for | - |\n| `--time` | Time to extract snapshot at (HH:MM:SS.mmm) | - |\n| `--page` | Page ID to filter by (required for multi-page traces with --time) | - |\n| `--type` | Snapshot type: `before`, `after`, `input` (only with --step) | `before` |\n| `--output` | Output file path | - |\n| `--json` | Output as JSON | `false` |\n\n**Snapshot types:**\n\n- `before` - DOM state when the step starts (default)\n- `after` - DOM state when the step completes\n- `input` - DOM state at the moment of user input (for click/fill actions)\n\n> **Tip for assertions:** For `expect` steps like `toBeVisible`, use `--type after` to see the DOM state when the assertion passed. The `before` snapshot may show a loading state if the test was waiting for an element to appear.\n\n**Examples:**\n\n```bash\n# 1. List steps to find callId\nsandbox-cli trace-utils steps --file ./trace.zip\n\n# 2. Extract DOM snapshot before a click step\nsandbox-cli trace-utils dom-snapshot --file ./trace.zip --step \"pw:api@32\" --type before\n\n# 3. Extract DOM snapshot after a step and save to file\nsandbox-cli trace-utils dom-snapshot --file ./trace.zip --step \"pw:api@32\" --type after --output ./snapshot.html\n\n# 4. For assertions, use --type after to see the DOM when assertion passed\nsandbox-cli trace-utils dom-snapshot --file ./trace.zip --step \"expect@43\" --type after\n\n# 5. Extract DOM snapshot at a specific time\nsandbox-cli trace-utils dom-snapshot --file ./trace.zip --time 00:02:06.434\n\n# 6. Get snapshot as JSON\nsandbox-cli trace-utils dom-snapshot --file ./trace.zip --step \"pw:api@32\" --json\n```\n\n**Output (default):**\n```\n# DOM Snapshot: locator.click\n# Step: pw:api@32\n# URL: https://example.com/dashboard\n# Viewport: 1280x720\n# Snapshot type: before\n\n<!DOCTYPE html>\n<html>\n <head>\n <title>Dashboard</title>\n ...\n </head>\n <body>\n ...\n </body>\n</html>\n```\n\n</trace-utils-cli>\n";
|
|
2
|
+
//# sourceMappingURL=trace-utils-docs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace-utils-docs.d.ts","sourceRoot":"","sources":["../../../../src/agent/chat/prompt/trace-utils-docs.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,aAAa,w4MA2MzB,CAAC"}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.traceUtilsDoc = void 0;
|
|
4
|
+
// TODO: Need a better way to keep this in sync with trace-utils/README.md
|
|
5
|
+
exports.traceUtilsDoc = `
|
|
6
|
+
<trace-utils-cli>
|
|
7
|
+
# Trace Utils
|
|
8
|
+
|
|
9
|
+
CLI and library for inspecting Playwright \`trace.zip\` files.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
Via sandbox-cli:
|
|
14
|
+
\`\`\`bash
|
|
15
|
+
sandbox-cli trace-utils <command> [options]
|
|
16
|
+
\`\`\`
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## \`steps\`
|
|
21
|
+
|
|
22
|
+
List all test steps from a trace.
|
|
23
|
+
|
|
24
|
+
\`\`\`bash
|
|
25
|
+
sandbox-cli trace-utils steps --file <path> [--json]
|
|
26
|
+
\`\`\`
|
|
27
|
+
|
|
28
|
+
| Option | Description | Default |
|
|
29
|
+
|--------|-------------|---------|
|
|
30
|
+
| \`--file\` | Path or URL to trace.zip | *required* |
|
|
31
|
+
| \`--json\` | Output as JSON | \`false\` |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## \`screenshots\`
|
|
36
|
+
|
|
37
|
+
Extract screenshots from a trace. Use either \`--step\` or \`--start\`/\`--end\` (one is required).
|
|
38
|
+
|
|
39
|
+
\`\`\`bash
|
|
40
|
+
# By step ID
|
|
41
|
+
sandbox-cli trace-utils screenshots --file <path> --step <id> [options]
|
|
42
|
+
|
|
43
|
+
# By time range
|
|
44
|
+
sandbox-cli trace-utils screenshots --file <path> --start <time> --end <time> [options]
|
|
45
|
+
\`\`\`
|
|
46
|
+
|
|
47
|
+
| Option | Description | Default |
|
|
48
|
+
|--------|-------------|---------|
|
|
49
|
+
| \`--file\` | Path or URL to trace.zip | *required* |
|
|
50
|
+
| \`--step\` | Step callId to extract around | - |
|
|
51
|
+
| \`--start\` | Start time (HH:MM:SS.mmm) | - |
|
|
52
|
+
| \`--end\` | End time (HH:MM:SS.mmm) | - |
|
|
53
|
+
| \`--page\` | Page ID to filter by (required for multi-page traces with time-based extraction) | - |
|
|
54
|
+
| \`--before\` | Milliseconds before step (only with --step) | \`2000\` |
|
|
55
|
+
| \`--after\` | Milliseconds after step (only with --step) | \`2000\` |
|
|
56
|
+
| \`--max\` | Maximum screenshots | \`10\` |
|
|
57
|
+
| \`--output\` | Output directory | auto-generated in \`/tmp\` |
|
|
58
|
+
|
|
59
|
+
**Examples:**
|
|
60
|
+
|
|
61
|
+
\`\`\`bash
|
|
62
|
+
# 1. List steps to find callId or timestamps
|
|
63
|
+
sandbox-cli trace-utils steps --file ./trace.zip
|
|
64
|
+
|
|
65
|
+
# Output:
|
|
66
|
+
# [test.step@36] locator.click(getByRole('button', { name: 'Create' })) (page@abc123)
|
|
67
|
+
# 00:02:06.434 → 00:02:06.543 (110ms)
|
|
68
|
+
|
|
69
|
+
# 2a. Extract by step ID
|
|
70
|
+
sandbox-cli trace-utils screenshots --file ./trace.zip --step "test.step@36"
|
|
71
|
+
|
|
72
|
+
# 2b. Extract by time range (for multi-page traces, --page is required)
|
|
73
|
+
sandbox-cli trace-utils screenshots --file ./trace.zip --start 00:02:06.000 --end 00:02:07.000 --page "page@abc123"
|
|
74
|
+
\`\`\`
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## \`network\`
|
|
79
|
+
|
|
80
|
+
Search network requests. For multi-page traces, either \`--step\` or \`--page\` is required.
|
|
81
|
+
|
|
82
|
+
\`\`\`bash
|
|
83
|
+
sandbox-cli trace-utils network --file <path> [filters] [options]
|
|
84
|
+
\`\`\`
|
|
85
|
+
|
|
86
|
+
| Option | Description | Default |
|
|
87
|
+
|--------|-------------|---------|
|
|
88
|
+
| \`--file\` | Path or URL to trace.zip | *required* |
|
|
89
|
+
| \`--step <callId>\` | Filter to requests during a specific step | - |
|
|
90
|
+
| \`--page\` | Page ID to filter by (required for multi-page traces without --step) | - |
|
|
91
|
+
| \`--before <ms>\` | Time before step to include (with --step) | \`2000\` |
|
|
92
|
+
| \`--after <ms>\` | Time after step to include (with --step) | \`2000\` |
|
|
93
|
+
| \`--errors\` | Show only failed requests (4xx, 5xx, no response) | - |
|
|
94
|
+
| \`--url <pattern>\` | Filter by URL pattern (regex) | - |
|
|
95
|
+
| \`--method <method>\` | Filter by HTTP method | - |
|
|
96
|
+
| \`--status <codes>\` | Filter by status codes (e.g., \`404,500\`) | - |
|
|
97
|
+
| \`--json\` | Output as JSON | \`false\` |
|
|
98
|
+
|
|
99
|
+
**Examples:**
|
|
100
|
+
|
|
101
|
+
\`\`\`bash
|
|
102
|
+
# Show all failed requests (for multi-page traces, specify --page)
|
|
103
|
+
sandbox-cli trace-utils network --file ./trace.zip --errors --page "page@abc123"
|
|
104
|
+
|
|
105
|
+
# Search for specific API calls
|
|
106
|
+
sandbox-cli trace-utils network --file ./trace.zip --url "/api/v1/users" --page "page@abc123"
|
|
107
|
+
|
|
108
|
+
# Failed POST requests
|
|
109
|
+
sandbox-cli trace-utils network --file ./trace.zip --errors --method POST --page "page@abc123"
|
|
110
|
+
|
|
111
|
+
# Network requests during a specific step (--page not required)
|
|
112
|
+
sandbox-cli trace-utils network --file ./trace.zip --step "pw:api@32"
|
|
113
|
+
\`\`\`
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## \`console\`
|
|
118
|
+
|
|
119
|
+
View browser console output. For multi-page traces, \`--page\` is required.
|
|
120
|
+
|
|
121
|
+
\`\`\`bash
|
|
122
|
+
sandbox-cli trace-utils console --file <path> [options]
|
|
123
|
+
\`\`\`
|
|
124
|
+
|
|
125
|
+
| Option | Description | Default |
|
|
126
|
+
|--------|-------------|---------|
|
|
127
|
+
| \`--file\` | Path or URL to trace.zip | *required* |
|
|
128
|
+
| \`--page\` | Page ID to filter by (required for multi-page traces) | - |
|
|
129
|
+
| \`--level\` | Minimum level: \`error\`, \`warning\`, \`info\`, \`debug\` | \`error\` |
|
|
130
|
+
| \`--json\` | Output as JSON | \`false\` |
|
|
131
|
+
| \`--search\` | Filter logs containing text | - |
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## \`dom-snapshot\`
|
|
136
|
+
|
|
137
|
+
Extract DOM snapshot from a trace. Use either \`--step\` or \`--time\` (one is required).
|
|
138
|
+
|
|
139
|
+
\`\`\`bash
|
|
140
|
+
# By step ID
|
|
141
|
+
sandbox-cli trace-utils dom-snapshot --file <path> --step <id> [options]
|
|
142
|
+
|
|
143
|
+
# By time (for multi-page traces, --page is required)
|
|
144
|
+
sandbox-cli trace-utils dom-snapshot --file <path> --time <time> --page <pageId> [options]
|
|
145
|
+
\`\`\`
|
|
146
|
+
|
|
147
|
+
| Option | Description | Default |
|
|
148
|
+
|--------|-------------|---------|
|
|
149
|
+
| \`--file\` | Path or URL to trace.zip | *required* |
|
|
150
|
+
| \`--step\` | Step callId to extract snapshot for | - |
|
|
151
|
+
| \`--time\` | Time to extract snapshot at (HH:MM:SS.mmm) | - |
|
|
152
|
+
| \`--page\` | Page ID to filter by (required for multi-page traces with --time) | - |
|
|
153
|
+
| \`--type\` | Snapshot type: \`before\`, \`after\`, \`input\` (only with --step) | \`before\` |
|
|
154
|
+
| \`--output\` | Output file path | - |
|
|
155
|
+
| \`--json\` | Output as JSON | \`false\` |
|
|
156
|
+
|
|
157
|
+
**Snapshot types:**
|
|
158
|
+
|
|
159
|
+
- \`before\` - DOM state when the step starts (default)
|
|
160
|
+
- \`after\` - DOM state when the step completes
|
|
161
|
+
- \`input\` - DOM state at the moment of user input (for click/fill actions)
|
|
162
|
+
|
|
163
|
+
> **Tip for assertions:** For \`expect\` steps like \`toBeVisible\`, use \`--type after\` to see the DOM state when the assertion passed. The \`before\` snapshot may show a loading state if the test was waiting for an element to appear.
|
|
164
|
+
|
|
165
|
+
**Examples:**
|
|
166
|
+
|
|
167
|
+
\`\`\`bash
|
|
168
|
+
# 1. List steps to find callId
|
|
169
|
+
sandbox-cli trace-utils steps --file ./trace.zip
|
|
170
|
+
|
|
171
|
+
# 2. Extract DOM snapshot before a click step
|
|
172
|
+
sandbox-cli trace-utils dom-snapshot --file ./trace.zip --step "pw:api@32" --type before
|
|
173
|
+
|
|
174
|
+
# 3. Extract DOM snapshot after a step and save to file
|
|
175
|
+
sandbox-cli trace-utils dom-snapshot --file ./trace.zip --step "pw:api@32" --type after --output ./snapshot.html
|
|
176
|
+
|
|
177
|
+
# 4. For assertions, use --type after to see the DOM when assertion passed
|
|
178
|
+
sandbox-cli trace-utils dom-snapshot --file ./trace.zip --step "expect@43" --type after
|
|
179
|
+
|
|
180
|
+
# 5. Extract DOM snapshot at a specific time
|
|
181
|
+
sandbox-cli trace-utils dom-snapshot --file ./trace.zip --time 00:02:06.434
|
|
182
|
+
|
|
183
|
+
# 6. Get snapshot as JSON
|
|
184
|
+
sandbox-cli trace-utils dom-snapshot --file ./trace.zip --step "pw:api@32" --json
|
|
185
|
+
\`\`\`
|
|
186
|
+
|
|
187
|
+
**Output (default):**
|
|
188
|
+
\`\`\`
|
|
189
|
+
# DOM Snapshot: locator.click
|
|
190
|
+
# Step: pw:api@32
|
|
191
|
+
# URL: https://example.com/dashboard
|
|
192
|
+
# Viewport: 1280x720
|
|
193
|
+
# Snapshot type: before
|
|
194
|
+
|
|
195
|
+
<!DOCTYPE html>
|
|
196
|
+
<html>
|
|
197
|
+
<head>
|
|
198
|
+
<title>Dashboard</title>
|
|
199
|
+
...
|
|
200
|
+
</head>
|
|
201
|
+
<body>
|
|
202
|
+
...
|
|
203
|
+
</body>
|
|
204
|
+
</html>
|
|
205
|
+
\`\`\`
|
|
206
|
+
|
|
207
|
+
</trace-utils-cli>
|
|
208
|
+
`;
|
|
@@ -4,7 +4,7 @@ import { BaseAgent } from "../base";
|
|
|
4
4
|
import { type CodeReviewResultV0, type CodeReviewResultV1, type CodeReviewResultV2, CodeReviewSeverity, CodeReviewVerdict } from "./types";
|
|
5
5
|
export type { CodeReviewResultV1, CodeReviewResultV0, CodeReviewResultV2 };
|
|
6
6
|
export { CodeReviewVerdict, CodeReviewSeverity };
|
|
7
|
-
export { convertXmlToV2Format } from "./parser";
|
|
7
|
+
export { convertXmlToV2Format } from "./xml-parser";
|
|
8
8
|
export type CodeReviewVersionedResult = CodeReviewResultV0 | CodeReviewResultV1 | CodeReviewResultV2;
|
|
9
9
|
export declare class CodeReviewAgent<T> extends BaseAgent<T> {
|
|
10
10
|
protected getTools(): ToolsForLLM;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/code-review/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACZ,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAGpE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/code-review/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,WAAW,EACZ,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAGpE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,yBAAyB,GACjC,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,qBAAa,eAAe,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAClD,SAAS,CAAC,QAAQ,IAAI,WAAW;IAWjC,SAAS,IAAI,yBAAyB,GAAG,SAAS;cAmBlC,iBAAiB,CAC/B,eAAe,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC;CAiInB"}
|
|
@@ -5,12 +5,12 @@ const tools_1 = require("../../tools");
|
|
|
5
5
|
const fetch_session_diff_1 = require("../../tools/fetch-session-diff");
|
|
6
6
|
const base_1 = require("../base");
|
|
7
7
|
const repo_1 = require("../chat/prompt/repo");
|
|
8
|
-
const parser_1 = require("./parser");
|
|
9
8
|
const types_1 = require("./types");
|
|
10
9
|
Object.defineProperty(exports, "CodeReviewSeverity", { enumerable: true, get: function () { return types_1.CodeReviewSeverity; } });
|
|
11
10
|
Object.defineProperty(exports, "CodeReviewVerdict", { enumerable: true, get: function () { return types_1.CodeReviewVerdict; } });
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const xml_parser_1 = require("./xml-parser");
|
|
12
|
+
var xml_parser_2 = require("./xml-parser");
|
|
13
|
+
Object.defineProperty(exports, "convertXmlToV2Format", { enumerable: true, get: function () { return xml_parser_2.convertXmlToV2Format; } });
|
|
14
14
|
class CodeReviewAgent extends base_1.BaseAgent {
|
|
15
15
|
getTools() {
|
|
16
16
|
const custom = [
|
|
@@ -35,7 +35,7 @@ class CodeReviewAgent extends base_1.BaseAgent {
|
|
|
35
35
|
if (!text) {
|
|
36
36
|
return undefined;
|
|
37
37
|
}
|
|
38
|
-
return (0,
|
|
38
|
+
return (0, xml_parser_1.convertXmlToV2Format)(text);
|
|
39
39
|
}
|
|
40
40
|
async buildSystemPrompt(repoInfoBuilder) {
|
|
41
41
|
const repoInfo = await repoInfoBuilder();
|
|
@@ -2,4 +2,4 @@ import { type CodeReviewResultV2 } from "./types";
|
|
|
2
2
|
export type { CodeReviewLineComment, CodeReviewResultV0, CodeReviewResultV1, CodeReviewResultV2, } from "./types";
|
|
3
3
|
export { CodeReviewSeverity, CodeReviewVerdict } from "./types";
|
|
4
4
|
export declare function convertXmlToV2Format(output: string): CodeReviewResultV2;
|
|
5
|
-
//# sourceMappingURL=parser.d.ts.map
|
|
5
|
+
//# sourceMappingURL=xml-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xml-parser.d.ts","sourceRoot":"","sources":["../../../src/agent/code-review/xml-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,kBAAkB,EAGxB,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAchE,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,CAmFvE"}
|
|
@@ -41,7 +41,7 @@ function convertXmlToV2Format(output) {
|
|
|
41
41
|
: null;
|
|
42
42
|
if (severity !== null) {
|
|
43
43
|
lineComments.push({
|
|
44
|
-
file: fileMatch[1].trim(),
|
|
44
|
+
file: fileMatch[1].trim().replace(/^\/repo\//, ""),
|
|
45
45
|
line_start: parseInt(lineStartMatch[1].trim(), 10),
|
|
46
46
|
line_end: parseInt(lineEndMatch[1].trim(), 10),
|
|
47
47
|
severity: severity,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ToolsForLLM } from "@empiricalrun/shared-types/chat-agent";
|
|
2
|
+
import type { FileInfo } from "@empiricalrun/shared-types/test-gen";
|
|
3
|
+
import { BaseAgent } from "../base";
|
|
4
|
+
export declare class FastTriageAgent<T> extends BaseAgent<T> {
|
|
5
|
+
protected getTools(): ToolsForLLM;
|
|
6
|
+
protected buildSystemPrompt(repoInfoBuilder: () => Promise<FileInfo>): Promise<string>;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/fast-triage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAapE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,qBAAa,eAAe,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAClD,SAAS,CAAC,QAAQ,IAAI,WAAW;cAkBjB,iBAAiB,CAC/B,eAAe,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC;CA+CnB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FastTriageAgent = void 0;
|
|
4
|
+
const tools_1 = require("../../tools");
|
|
5
|
+
// import { grepTool } from "../../tools/definitions/grep";
|
|
6
|
+
const diagnosis_fetcher_1 = require("../../tools/diagnosis-fetcher");
|
|
7
|
+
const fetch_file_1 = require("../../tools/fetch-file");
|
|
8
|
+
const list_environments_1 = require("../../tools/list-environments");
|
|
9
|
+
const publish_markdown_report_1 = require("../../tools/publish-markdown-report");
|
|
10
|
+
const test_run_fetcher_1 = require("../../tools/test-run-fetcher");
|
|
11
|
+
const base_1 = require("../base");
|
|
12
|
+
const trace_utils_docs_1 = require("../chat/prompt/trace-utils-docs");
|
|
13
|
+
class FastTriageAgent extends base_1.BaseAgent {
|
|
14
|
+
getTools() {
|
|
15
|
+
const tools = [
|
|
16
|
+
diagnosis_fetcher_1.fetchDiagnosisReportTool,
|
|
17
|
+
test_run_fetcher_1.fetchTestRunDetailsTool,
|
|
18
|
+
list_environments_1.listEnvironmentsTool,
|
|
19
|
+
fetch_file_1.fetchFileTool,
|
|
20
|
+
tools_1.safeBashTool,
|
|
21
|
+
publish_markdown_report_1.publishMarkdownReportTool,
|
|
22
|
+
// TODO: Do we need grep?
|
|
23
|
+
// grepTool,
|
|
24
|
+
...(0, tools_1.textEditorToolsForModel)(this.selectedModel),
|
|
25
|
+
];
|
|
26
|
+
return {
|
|
27
|
+
custom: tools,
|
|
28
|
+
builtInTextEditor: (0, tools_1.hasBuiltInTextEditor)(this.selectedModel),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
async buildSystemPrompt(repoInfoBuilder) {
|
|
32
|
+
const _repoInfo = await repoInfoBuilder();
|
|
33
|
+
// TODO: Use repo knowledge - can that also replace "issues" as memory?
|
|
34
|
+
return `
|
|
35
|
+
You are a fast triage agent that quickly analyzes test failures. [PLACEHOLDER - to be refined]
|
|
36
|
+
|
|
37
|
+
Your goal is to analyze the provided test failure and identify the root cause as quickly as possible.
|
|
38
|
+
|
|
39
|
+
Use the available tools to:
|
|
40
|
+
1. Fetch the diagnosis report for the failing test
|
|
41
|
+
2. Fetch test run details to understand the context
|
|
42
|
+
3. Review the test code and related files to understand what the test is doing
|
|
43
|
+
4. Identify the root cause of the failure
|
|
44
|
+
|
|
45
|
+
Provide a concise summary of:
|
|
46
|
+
- What failed
|
|
47
|
+
- Why it failed (root cause)
|
|
48
|
+
- Whether this is an app issue or a test issue
|
|
49
|
+
|
|
50
|
+
Use the bash tool to make use of trace-utils and fetch steps from traces,
|
|
51
|
+
errors in network calls, and screenshots around failures.
|
|
52
|
+
|
|
53
|
+
${trace_utils_docs_1.traceUtilsDoc}
|
|
54
|
+
|
|
55
|
+
# Expected output
|
|
56
|
+
|
|
57
|
+
A well-structured markdown report published via the publishMarkdownReport tool.
|
|
58
|
+
|
|
59
|
+
Your report must include:
|
|
60
|
+
- What failed and why (root cause analysis)
|
|
61
|
+
- Whether this is an app issue or a test issue
|
|
62
|
+
- Evidence from the failure: include screenshots (as file:// URLs), network logs, console logs, etc.
|
|
63
|
+
- Evidence from the last passing run when available: include screenshots showing the expected behavior
|
|
64
|
+
|
|
65
|
+
Use trace-utils to extract screenshots from both failing and passing runs. Reference them in your
|
|
66
|
+
markdown using file:// URLs (e.g. file:///path/to/screenshot.png). The publishMarkdownReport tool
|
|
67
|
+
will upload these files and replace them with public URLs automatically.
|
|
68
|
+
|
|
69
|
+
As your final step, always call the publishMarkdownReport tool with your complete markdown report.
|
|
70
|
+
|
|
71
|
+
# Things to keep in mind
|
|
72
|
+
|
|
73
|
+
Follow the action, not just the assertion - The console showed deletePlayer error. I should have immediately looked at screenshots around the click that triggered it (test.step@126 - the "Yes" click) rather than the failing expect (expect@92).
|
|
74
|
+
|
|
75
|
+
Today's date is ${new Date().toDateString()}
|
|
76
|
+
`;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
exports.FastTriageAgent = FastTriageAgent;
|
package/dist/agent/index.d.ts
CHANGED
|
@@ -2,8 +2,9 @@ import type { AgentModeEnum } from "@empiricalrun/shared-types/chat-agent";
|
|
|
2
2
|
import { type AgentParams, BaseAgent } from "./base";
|
|
3
3
|
import { ChatAgent } from "./chat";
|
|
4
4
|
import { CodeReviewAgent } from "./code-review";
|
|
5
|
+
import { FastTriageAgent } from "./fast-triage";
|
|
5
6
|
import { TriageAgent } from "./triage";
|
|
6
7
|
export declare function createAgent<T>(mode: AgentModeEnum, params: AgentParams<T>): BaseAgent<T>;
|
|
7
|
-
export { BaseAgent, ChatAgent, CodeReviewAgent, TriageAgent };
|
|
8
|
+
export { BaseAgent, ChatAgent, CodeReviewAgent, FastTriageAgent, TriageAgent };
|
|
8
9
|
export type { AgentParams };
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,KAAK,WAAW,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agent/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,KAAK,WAAW,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAWvC,wBAAgB,WAAW,CAAC,CAAC,EAC3B,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,GACrB,SAAS,CAAC,CAAC,CAAC,CAMd;AAED,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC;AAC/E,YAAY,EAAE,WAAW,EAAE,CAAC"}
|
package/dist/agent/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TriageAgent = exports.CodeReviewAgent = exports.ChatAgent = exports.BaseAgent = void 0;
|
|
3
|
+
exports.TriageAgent = exports.FastTriageAgent = exports.CodeReviewAgent = exports.ChatAgent = exports.BaseAgent = void 0;
|
|
4
4
|
exports.createAgent = createAgent;
|
|
5
5
|
const base_1 = require("./base");
|
|
6
6
|
Object.defineProperty(exports, "BaseAgent", { enumerable: true, get: function () { return base_1.BaseAgent; } });
|
|
@@ -8,12 +8,15 @@ const chat_1 = require("./chat");
|
|
|
8
8
|
Object.defineProperty(exports, "ChatAgent", { enumerable: true, get: function () { return chat_1.ChatAgent; } });
|
|
9
9
|
const code_review_1 = require("./code-review");
|
|
10
10
|
Object.defineProperty(exports, "CodeReviewAgent", { enumerable: true, get: function () { return code_review_1.CodeReviewAgent; } });
|
|
11
|
+
const fast_triage_1 = require("./fast-triage");
|
|
12
|
+
Object.defineProperty(exports, "FastTriageAgent", { enumerable: true, get: function () { return fast_triage_1.FastTriageAgent; } });
|
|
11
13
|
const triage_1 = require("./triage");
|
|
12
14
|
Object.defineProperty(exports, "TriageAgent", { enumerable: true, get: function () { return triage_1.TriageAgent; } });
|
|
13
15
|
const agentRegistry = {
|
|
14
16
|
chat: chat_1.ChatAgent,
|
|
15
17
|
triage: triage_1.TriageAgent,
|
|
16
18
|
"code-review": code_review_1.CodeReviewAgent,
|
|
19
|
+
"fast-triage": fast_triage_1.FastTriageAgent,
|
|
17
20
|
};
|
|
18
21
|
function createAgent(mode, params) {
|
|
19
22
|
const AgentClass = agentRegistry[mode];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-annotation.d.ts","sourceRoot":"","sources":["../../../src/agent/master/element-annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAQlC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"element-annotation.d.ts","sourceRoot":"","sources":["../../../src/agent/master/element-annotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAQlC,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AA0DjD,wBAAsB,oBAAoB,CAAC,EACzC,kBAAkB,EAClB,WAAW,EACX,mBAAmB,EACnB,KAAK,EACL,GAAG,EACH,OAAO,EACP,UAAU,GACX,EAAE;IACD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAC/B,UAAU,EAAE,oBAAoB,CAAC;CAClC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CA8C9B;AAED,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,EACN,KAAK,GACL,UAAU,CAAC,IAAI,GACf,UAAU,CAAC,WAAW,GACtB,UAAU,CAAC,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC,CAAC;AAgBF,wBAAsB,iBAAiB,CAAC,EACtC,IAAI,EACJ,UAAU,EACV,KAAK,GACN,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,EAAE,oBAAoB,CAAC;IACjC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB,GAAG,OAAO,CAAC;IACV,cAAc,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACtD,gBAAgB,EAAE,MAAM,CAAC;IACzB,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC,CAmFD"}
|