@empiricalrun/test-gen 0.77.0 → 0.78.1
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 +25 -0
- package/dist/actions/index.d.ts +0 -1
- package/dist/actions/index.d.ts.map +1 -1
- package/dist/actions/index.js +0 -10
- package/dist/agent/base/index.d.ts +28 -19
- package/dist/agent/base/index.d.ts.map +1 -1
- package/dist/agent/base/index.js +30 -17
- package/dist/agent/browsing/run.d.ts +1 -1
- package/dist/agent/browsing/run.d.ts.map +1 -1
- package/dist/agent/chat/agent-loop.d.ts +5 -5
- package/dist/agent/chat/agent-loop.d.ts.map +1 -1
- package/dist/agent/chat/exports.d.ts +3 -3
- package/dist/agent/chat/exports.d.ts.map +1 -1
- package/dist/agent/chat/exports.js +5 -11
- package/dist/agent/chat/index.d.ts +4 -3
- package/dist/agent/chat/index.d.ts.map +1 -1
- package/dist/agent/chat/index.js +10 -5
- package/dist/agent/chat/models.d.ts +1 -1
- package/dist/agent/chat/models.d.ts.map +1 -1
- package/dist/agent/chat/models.js +3 -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 +42 -0
- package/dist/agent/chat/prompt/repo.d.ts +2 -2
- package/dist/agent/chat/prompt/repo.d.ts.map +1 -1
- package/dist/agent/chat/prompt/repo.js +2 -2
- package/dist/agent/chat/state.d.ts +13 -25
- package/dist/agent/chat/state.d.ts.map +1 -1
- package/dist/agent/chat/state.js +10 -60
- package/dist/agent/chat/utils.d.ts +5 -5
- package/dist/agent/chat/utils.d.ts.map +1 -1
- package/dist/agent/cli.d.ts +2 -2
- package/dist/agent/cli.d.ts.map +1 -1
- package/dist/agent/cli.js +17 -31
- package/dist/agent/code-review/index.d.ts +5 -4
- package/dist/agent/code-review/index.d.ts.map +1 -1
- package/dist/agent/code-review/index.js +13 -4
- package/dist/agent/code-review/types.d.ts +2 -35
- package/dist/agent/code-review/types.d.ts.map +1 -1
- package/dist/agent/code-review/types.js +4 -11
- package/dist/agent/cua/index.d.ts +1 -1
- package/dist/agent/cua/index.d.ts.map +1 -1
- package/dist/agent/cua/index.js +13 -5
- package/dist/agent/cua/pw-codegen/pw-pause/for-recorder.d.ts.map +1 -1
- package/dist/agent/cua/pw-codegen/pw-pause/for-recorder.js +0 -3
- package/dist/agent/cua/pw-codegen/pw-pause/index.js +1 -1
- package/dist/agent/index.d.ts +1 -5
- package/dist/agent/index.d.ts.map +1 -1
- package/dist/agent/index.js +1 -11
- package/dist/agent/master/element-annotation.d.ts +1 -1
- package/dist/agent/master/element-annotation.d.ts.map +1 -1
- package/dist/agent/master/next-action.d.ts +1 -1
- package/dist/agent/master/next-action.d.ts.map +1 -1
- package/dist/agent/master/next-action.js +1 -6
- package/dist/agent/master/run.d.ts +3 -2
- package/dist/agent/master/run.d.ts.map +1 -1
- package/dist/agent/master/run.js +0 -26
- package/dist/agent/triage/index.d.ts +4 -3
- package/dist/agent/triage/index.d.ts.map +1 -1
- package/dist/agent/triage/index.js +35 -29
- package/dist/artifacts/index.d.ts +1 -1
- package/dist/artifacts/index.d.ts.map +1 -1
- package/dist/artifacts/utils.d.ts +1 -1
- package/dist/artifacts/utils.d.ts.map +1 -1
- package/dist/bin/environments.d.ts +1 -1
- package/dist/bin/environments.d.ts.map +1 -1
- package/dist/bin/index.js +2 -57
- package/dist/bin/setup.d.ts +1 -1
- package/dist/bin/setup.d.ts.map +1 -1
- package/dist/bin/utils/fs/index.d.ts +1 -1
- package/dist/bin/utils/fs/index.d.ts.map +1 -1
- package/dist/bin/utils/platform/web/index.d.ts +2 -2
- package/dist/bin/utils/platform/web/index.d.ts.map +1 -1
- package/dist/bin/utils/platform/web/index.js +1 -1
- package/dist/bin/utils/scenarios/index.d.ts +1 -1
- package/dist/bin/utils/scenarios/index.d.ts.map +1 -1
- package/dist/constants/index.d.ts +0 -4
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/constants/index.js +0 -6
- package/dist/dashboard/client.d.ts +1 -1
- package/dist/dashboard/client.d.ts.map +1 -1
- 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.d.ts +5 -0
- package/dist/dashboard/tool-response.d.ts.map +1 -0
- package/dist/dashboard/tool-response.js +88 -0
- package/dist/dashboard/totp.js +1 -1
- package/dist/file/server.d.ts +1 -1
- package/dist/file/server.d.ts.map +1 -1
- package/dist/file/server.js +2 -1
- package/dist/file-info/adapters/file-system/index.d.ts +1 -1
- package/dist/file-info/adapters/file-system/index.d.ts.map +1 -1
- package/dist/file-info/adapters/file-system/reader.d.ts +1 -1
- package/dist/file-info/adapters/file-system/reader.d.ts.map +1 -1
- package/dist/file-info/adapters/github/index.d.ts +2 -1
- package/dist/file-info/adapters/github/index.d.ts.map +1 -1
- package/dist/file-info/adapters/github/reader.d.ts +2 -1
- package/dist/file-info/adapters/github/reader.d.ts.map +1 -1
- package/dist/recorder/index.d.ts.map +1 -1
- package/dist/recorder/index.js +2 -1
- package/dist/recorder/upload.d.ts +1 -1
- package/dist/recorder/upload.d.ts.map +1 -1
- package/dist/tools/analyse-video/index.d.ts +1 -1
- package/dist/tools/analyse-video/index.d.ts.map +1 -1
- package/dist/tools/analyse-video/index.js +28 -15
- package/dist/tools/create-pull-request/index.d.ts +1 -1
- package/dist/tools/create-pull-request/index.d.ts.map +1 -1
- package/dist/tools/create-pull-request/utils.d.ts +2 -1
- package/dist/tools/create-pull-request/utils.d.ts.map +1 -1
- package/dist/tools/definitions/analyse-video.d.ts +9 -19
- package/dist/tools/definitions/analyse-video.d.ts.map +1 -1
- package/dist/tools/definitions/analyse-video.js +13 -26
- package/dist/tools/definitions/delete-file.d.ts +9 -1
- package/dist/tools/definitions/delete-file.d.ts.map +1 -1
- package/dist/tools/definitions/delete-file.js +3 -3
- package/dist/tools/definitions/download-build.d.ts +1 -1
- package/dist/tools/definitions/download-build.d.ts.map +1 -1
- package/dist/tools/definitions/grep.d.ts +1 -1
- package/dist/tools/definitions/grep.d.ts.map +1 -1
- package/dist/tools/definitions/list-tests-and-projects.d.ts +1 -1
- package/dist/tools/definitions/list-tests-and-projects.d.ts.map +1 -1
- package/dist/tools/definitions/list-tests-and-projects.js +1 -1
- package/dist/tools/definitions/merge-conflicts.d.ts +1 -1
- package/dist/tools/definitions/merge-conflicts.d.ts.map +1 -1
- package/dist/tools/definitions/merge-conflicts.js +2 -2
- package/dist/tools/definitions/rename-file.d.ts +1 -1
- package/dist/tools/definitions/rename-file.d.ts.map +1 -1
- package/dist/tools/definitions/review-pull-request.d.ts +1 -1
- package/dist/tools/definitions/review-pull-request.d.ts.map +1 -1
- package/dist/tools/definitions/review-pull-request.js +1 -1
- package/dist/tools/definitions/run-test.d.ts +1 -1
- package/dist/tools/definitions/run-test.d.ts.map +1 -1
- package/dist/tools/definitions/str_replace_editor.d.ts +1 -1
- package/dist/tools/definitions/str_replace_editor.d.ts.map +1 -1
- package/dist/tools/definitions/test-gen-browser.d.ts +1 -1
- package/dist/tools/definitions/test-gen-browser.d.ts.map +1 -1
- package/dist/tools/definitions/upgrade-packages.d.ts +1 -1
- package/dist/tools/definitions/upgrade-packages.d.ts.map +1 -1
- package/dist/tools/definitions/utils.js +1 -1
- package/dist/tools/delete-file/index.d.ts +1 -1
- package/dist/tools/delete-file/index.d.ts.map +1 -1
- package/dist/tools/delete-file/index.js +6 -2
- package/dist/tools/diagnosis-fetcher.d.ts +1 -1
- package/dist/tools/diagnosis-fetcher.d.ts.map +1 -1
- package/dist/tools/diagnosis-fetcher.js +92 -47
- package/dist/tools/download-build/index.d.ts +1 -1
- package/dist/tools/download-build/index.d.ts.map +1 -1
- package/dist/tools/executor/base.d.ts +4 -3
- package/dist/tools/executor/base.d.ts.map +1 -1
- package/dist/tools/executor/base.js +16 -2
- package/dist/tools/executor/index.d.ts +3 -0
- package/dist/tools/executor/index.d.ts.map +1 -1
- package/dist/tools/executor/index.js +10 -10
- package/dist/tools/executor/utils/checkpoint.d.ts.map +1 -1
- package/dist/tools/executor/utils/checkpoint.js +0 -4
- package/dist/tools/executor/utils/git.d.ts +7 -1
- package/dist/tools/executor/utils/git.d.ts.map +1 -1
- package/dist/tools/executor/utils/git.js +10 -3
- package/dist/tools/executor/utils/index.d.ts +4 -3
- package/dist/tools/executor/utils/index.d.ts.map +1 -1
- package/dist/tools/executor/utils/index.js +2 -1
- package/dist/tools/executor/utils/pr-description.d.ts +1 -1
- package/dist/tools/executor/utils/pr-description.d.ts.map +1 -1
- package/dist/tools/fetch-file/index.d.ts +1 -1
- package/dist/tools/fetch-file/index.d.ts.map +1 -1
- package/dist/tools/fetch-file/index.js +53 -13
- package/dist/tools/fetch-file/utils.d.ts +3 -0
- package/dist/tools/fetch-file/utils.d.ts.map +1 -0
- package/dist/tools/fetch-file/utils.js +136 -0
- package/dist/tools/fetch-session-diff/index.d.ts +1 -1
- package/dist/tools/fetch-session-diff/index.d.ts.map +1 -1
- package/dist/tools/fetch-session-diff/index.js +26 -2
- package/dist/tools/file-operations/create.d.ts +1 -1
- package/dist/tools/file-operations/create.d.ts.map +1 -1
- package/dist/tools/file-operations/index.d.ts +2 -1
- package/dist/tools/file-operations/index.d.ts.map +1 -1
- package/dist/tools/file-operations/insert.d.ts +1 -1
- package/dist/tools/file-operations/insert.d.ts.map +1 -1
- package/dist/tools/file-operations/replace.d.ts +1 -1
- package/dist/tools/file-operations/replace.d.ts.map +1 -1
- package/dist/tools/file-operations/replace.js +20 -22
- package/dist/tools/file-operations/shared/helpers.d.ts +3 -5
- package/dist/tools/file-operations/shared/helpers.d.ts.map +1 -1
- package/dist/tools/file-operations/shared/helpers.js +1 -5
- package/dist/tools/file-operations/view/index.d.ts +2 -1
- package/dist/tools/file-operations/view/index.d.ts.map +1 -1
- package/dist/tools/grep/index.d.ts +1 -1
- package/dist/tools/grep/index.d.ts.map +1 -1
- package/dist/tools/grep/index.js +15 -12
- package/dist/tools/index.d.ts +3 -24
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +13 -42
- package/dist/tools/issues-v1/create-issue.d.ts +3 -0
- package/dist/tools/issues-v1/create-issue.d.ts.map +1 -0
- package/dist/tools/{issues → issues-v1}/create-issue.js +5 -9
- package/dist/tools/issues-v1/index.d.ts.map +1 -0
- package/dist/tools/issues-v1/list-issues.d.ts +3 -0
- package/dist/tools/issues-v1/list-issues.d.ts.map +1 -0
- package/dist/tools/issues-v1/update-issue.d.ts +3 -0
- package/dist/tools/issues-v1/update-issue.d.ts.map +1 -0
- package/dist/tools/{issues → issues-v1}/update-issue.js +1 -9
- package/dist/tools/{issues → issues-v1}/utils.d.ts +2 -1
- package/dist/tools/issues-v1/utils.d.ts.map +1 -0
- package/dist/tools/issues-v2/create-issue.d.ts +3 -0
- package/dist/tools/issues-v2/create-issue.d.ts.map +1 -0
- package/dist/tools/issues-v2/create-issue.js +86 -0
- package/dist/tools/issues-v2/update-issue.d.ts +3 -0
- package/dist/tools/issues-v2/update-issue.d.ts.map +1 -0
- package/dist/tools/issues-v2/update-issue.js +87 -0
- package/dist/tools/list-environments.d.ts +1 -1
- package/dist/tools/list-environments.d.ts.map +1 -1
- package/dist/tools/list-tests-and-projects/index.d.ts +1 -1
- package/dist/tools/list-tests-and-projects/index.d.ts.map +1 -1
- package/dist/tools/list-tests-and-projects/index.js +14 -4
- package/dist/tools/merge-conflicts/index.d.ts +1 -1
- package/dist/tools/merge-conflicts/index.d.ts.map +1 -1
- package/dist/tools/merge-conflicts/index.js +23 -10
- package/dist/tools/rename-file/index.d.ts +1 -1
- package/dist/tools/rename-file/index.d.ts.map +1 -1
- package/dist/tools/rename-file/index.js +0 -1
- package/dist/tools/review-pull-request/index.d.ts +1 -1
- package/dist/tools/review-pull-request/index.d.ts.map +1 -1
- package/dist/tools/review-pull-request/index.js +9 -15
- package/dist/tools/run-test.d.ts +1 -1
- package/dist/tools/run-test.d.ts.map +1 -1
- package/dist/tools/test-gen-browser.d.ts +1 -1
- package/dist/tools/test-gen-browser.d.ts.map +1 -1
- package/dist/tools/test-gen-browser.js +55 -19
- package/dist/tools/test-run-fetcher/index.d.ts +2 -2
- package/dist/tools/test-run-fetcher/index.d.ts.map +1 -1
- package/dist/tools/test-run-fetcher/index.js +67 -66
- package/dist/tools/trace-dot-zip/index.d.ts +1 -1
- package/dist/tools/trace-dot-zip/index.d.ts.map +1 -1
- package/dist/tools/trace-dot-zip/utils/network-trace.d.ts.map +1 -1
- package/dist/tools/trace-dot-zip/utils/network-trace.js +5 -10
- package/dist/tools/triage-summary/index.d.ts +1 -1
- package/dist/tools/triage-summary/index.d.ts.map +1 -1
- package/dist/tools/triage-summary/index.js +5 -2
- package/dist/tools/triage-summary/utils.d.ts +1 -1
- package/dist/tools/triage-summary/utils.d.ts.map +1 -1
- package/dist/tools/upgrade-packages/index.d.ts +1 -1
- package/dist/tools/upgrade-packages/index.d.ts.map +1 -1
- package/dist/tools/upgrade-packages/index.js +18 -8
- package/dist/tools/upgrade-packages/utils.d.ts +10 -5
- package/dist/tools/upgrade-packages/utils.d.ts.map +1 -1
- package/dist/tools/upgrade-packages/utils.js +57 -16
- package/dist/tools/utils/queue.d.ts +1 -1
- package/dist/tools/utils/queue.d.ts.map +1 -1
- package/dist/tools/utils/validate-schema.d.ts +3 -0
- package/dist/tools/utils/validate-schema.d.ts.map +1 -0
- package/dist/tools/utils/validate-schema.js +22 -0
- package/dist/trace-utils/index.d.ts +1 -1
- package/dist/trace-utils/index.d.ts.map +1 -1
- package/dist/trace-utils/index.js +1 -1
- package/dist/utils/SQSClient.d.ts +1 -1
- package/dist/utils/SQSClient.d.ts.map +1 -1
- package/dist/utils/dedup/dedup-image.d.ts +22 -0
- package/dist/utils/dedup/dedup-image.d.ts.map +1 -0
- package/dist/utils/dedup/dedup-image.js +26 -0
- package/dist/utils/dedup/find-threshold.d.ts +2 -0
- package/dist/utils/dedup/find-threshold.d.ts.map +1 -0
- package/dist/utils/{find-threshold.js → dedup/find-threshold.js} +2 -15
- package/dist/utils/model.d.ts +1 -1
- package/dist/utils/model.d.ts.map +1 -1
- package/dist/utils/model.js +4 -3
- package/dist/utils/playwright-report-parser.d.ts +1 -1
- package/dist/utils/playwright-report-parser.d.ts.map +1 -1
- package/dist/utils/playwright-test-id.d.ts +8 -0
- package/dist/utils/playwright-test-id.d.ts.map +1 -0
- package/dist/utils/playwright-test-id.js +21 -0
- package/dist/utils/repo-tree.d.ts +1 -1
- package/dist/utils/repo-tree.d.ts.map +1 -1
- package/dist/utils/slug.d.ts.map +1 -1
- package/dist/utils/slug.js +15 -4
- package/dist/utils/url-validation.d.ts +2 -0
- package/dist/utils/url-validation.d.ts.map +1 -0
- package/dist/utils/url-validation.js +16 -0
- package/dist/video-core/index.d.ts +14 -36
- package/dist/video-core/index.d.ts.map +1 -1
- package/dist/video-core/index.js +118 -181
- package/dist/video-core/model-limits.d.ts +2 -2
- package/dist/video-core/model-limits.d.ts.map +1 -1
- package/dist/video-core/model-limits.js +16 -20
- package/dist/video-core/storage-manager.d.ts +2 -1
- package/dist/video-core/storage-manager.d.ts.map +1 -1
- package/dist/video-core/storage-manager.js +13 -6
- package/dist/video-core/types.d.ts +1 -1
- package/dist/video-core/types.d.ts.map +1 -1
- package/dist/video-core/utils.d.ts +5 -17
- package/dist/video-core/utils.d.ts.map +1 -1
- package/dist/video-core/utils.js +39 -149
- package/package.json +10 -5
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/actions/skill.d.ts +0 -21
- package/dist/actions/skill.d.ts.map +0 -1
- package/dist/actions/skill.js +0 -127
- package/dist/agent/chat/filesystem-cache.d.ts +0 -12
- package/dist/agent/chat/filesystem-cache.d.ts.map +0 -1
- package/dist/agent/chat/filesystem-cache.js +0 -101
- package/dist/agent/codegen/create-test-block.d.ts +0 -8
- package/dist/agent/codegen/create-test-block.d.ts.map +0 -1
- package/dist/agent/codegen/create-test-block.js +0 -47
- package/dist/agent/codegen/fix-ts-errors.d.ts +0 -12
- package/dist/agent/codegen/fix-ts-errors.d.ts.map +0 -1
- package/dist/agent/codegen/fix-ts-errors.js +0 -78
- package/dist/agent/codegen/lexical-scoped-vars.d.ts +0 -9
- package/dist/agent/codegen/lexical-scoped-vars.d.ts.map +0 -1
- package/dist/agent/codegen/lexical-scoped-vars.js +0 -55
- package/dist/agent/codegen/skills-retriever.d.ts +0 -26
- package/dist/agent/codegen/skills-retriever.d.ts.map +0 -1
- package/dist/agent/codegen/skills-retriever.js +0 -93
- package/dist/agent/codegen/test-update-feedback.d.ts +0 -12
- package/dist/agent/codegen/test-update-feedback.d.ts.map +0 -1
- package/dist/agent/codegen/test-update-feedback.js +0 -49
- package/dist/agent/codegen/types.d.ts +0 -25
- package/dist/agent/codegen/types.d.ts.map +0 -1
- package/dist/agent/codegen/types.js +0 -8
- package/dist/agent/codegen/update-flow.d.ts +0 -36
- package/dist/agent/codegen/update-flow.d.ts.map +0 -1
- package/dist/agent/codegen/update-flow.js +0 -259
- package/dist/agent/codegen/use-skill.d.ts +0 -11
- package/dist/agent/codegen/use-skill.d.ts.map +0 -1
- package/dist/agent/codegen/use-skill.js +0 -53
- package/dist/agent/codegen/utils.d.ts +0 -110
- package/dist/agent/codegen/utils.d.ts.map +0 -1
- package/dist/agent/codegen/utils.js +0 -376
- package/dist/agent/master/browser-tests/skills.spec.d.ts +0 -2
- package/dist/agent/master/browser-tests/skills.spec.d.ts.map +0 -1
- package/dist/agent/master/browser-tests/skills.spec.js +0 -112
- package/dist/agent/master/execute-skill-action.d.ts +0 -11
- package/dist/agent/master/execute-skill-action.d.ts.map +0 -1
- package/dist/agent/master/execute-skill-action.js +0 -23
- package/dist/agent/video-analysis/executor/index.d.ts +0 -5
- package/dist/agent/video-analysis/executor/index.d.ts.map +0 -1
- package/dist/agent/video-analysis/executor/index.js +0 -10
- package/dist/agent/video-analysis/index.d.ts +0 -7
- package/dist/agent/video-analysis/index.d.ts.map +0 -1
- package/dist/agent/video-analysis/index.js +0 -60
- package/dist/evals/append-create-test-agent.evals.d.ts +0 -4
- package/dist/evals/append-create-test-agent.evals.d.ts.map +0 -1
- package/dist/evals/append-create-test-agent.evals.js +0 -117
- package/dist/evals/fetch-pom-skills-agent.evals.d.ts +0 -4
- package/dist/evals/fetch-pom-skills-agent.evals.d.ts.map +0 -1
- package/dist/evals/fetch-pom-skills-agent.evals.js +0 -36
- package/dist/evals/master-agent.evals.d.ts +0 -4
- package/dist/evals/master-agent.evals.d.ts.map +0 -1
- package/dist/evals/master-agent.evals.js +0 -35
- package/dist/evals/type.d.ts +0 -12
- package/dist/evals/type.d.ts.map +0 -1
- package/dist/evals/type.js +0 -2
- package/dist/evals/update-scenario-agent.evals.d.ts +0 -4
- package/dist/evals/update-scenario-agent.evals.d.ts.map +0 -1
- package/dist/evals/update-scenario-agent.evals.js +0 -47
- package/dist/tools/fetch-last-successful-test-run/index.d.ts +0 -3
- package/dist/tools/fetch-last-successful-test-run/index.d.ts.map +0 -1
- package/dist/tools/fetch-last-successful-test-run/index.js +0 -60
- package/dist/tools/issues/create-issue.d.ts +0 -3
- package/dist/tools/issues/create-issue.d.ts.map +0 -1
- package/dist/tools/issues/index.d.ts.map +0 -1
- package/dist/tools/issues/list-issues.d.ts +0 -3
- package/dist/tools/issues/list-issues.d.ts.map +0 -1
- package/dist/tools/issues/metadata-schema.d.ts +0 -24
- package/dist/tools/issues/metadata-schema.d.ts.map +0 -1
- package/dist/tools/issues/metadata-schema.js +0 -22
- package/dist/tools/issues/update-issue.d.ts +0 -3
- package/dist/tools/issues/update-issue.d.ts.map +0 -1
- package/dist/tools/issues/utils.d.ts.map +0 -1
- package/dist/tools/utils/urls.d.ts +0 -5
- package/dist/tools/utils/urls.d.ts.map +0 -1
- package/dist/tools/utils/urls.js +0 -19
- package/dist/tools/view-failed-test-run-report/index.d.ts +0 -12
- package/dist/tools/view-failed-test-run-report/index.d.ts.map +0 -1
- package/dist/tools/view-failed-test-run-report/index.js +0 -151
- package/dist/utils/artifact-paths.d.ts +0 -20
- package/dist/utils/artifact-paths.d.ts.map +0 -1
- package/dist/utils/artifact-paths.js +0 -16
- package/dist/utils/dedup-image-fs.d.ts +0 -13
- package/dist/utils/dedup-image-fs.d.ts.map +0 -1
- package/dist/utils/dedup-image-fs.js +0 -84
- package/dist/utils/dedup-image.d.ts +0 -12
- package/dist/utils/dedup-image.d.ts.map +0 -1
- package/dist/utils/dedup-image.js +0 -25
- package/dist/utils/ffmpeg/index.d.ts +0 -26
- package/dist/utils/ffmpeg/index.d.ts.map +0 -1
- package/dist/utils/ffmpeg/index.js +0 -415
- package/dist/utils/find-threshold.d.ts +0 -8
- package/dist/utils/find-threshold.d.ts.map +0 -1
- package/dist/video-core/agent-orchestrator.d.ts +0 -14
- package/dist/video-core/agent-orchestrator.d.ts.map +0 -1
- package/dist/video-core/agent-orchestrator.js +0 -78
- package/dist/video-core/analysis-server.d.ts +0 -24
- package/dist/video-core/analysis-server.d.ts.map +0 -1
- package/dist/video-core/analysis-server.js +0 -398
- package/dist/video-core/analysis-viewer.html +0 -1374
- package/dist/video-core/xml-parser.d.ts +0 -3
- package/dist/video-core/xml-parser.d.ts.map +0 -1
- package/dist/video-core/xml-parser.js +0 -27
- /package/dist/tools/{issues → issues-v1}/index.d.ts +0 -0
- /package/dist/tools/{issues → issues-v1}/index.js +0 -0
- /package/dist/tools/{issues → issues-v1}/list-issues.js +0 -0
- /package/dist/tools/{issues → issues-v1}/utils.js +0 -0
|
@@ -2,33 +2,31 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createIssueTool = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const metadata_schema_1 = require("./metadata-schema");
|
|
6
5
|
const utils_1 = require("./utils");
|
|
7
6
|
const createIssueSchema = zod_1.z.object({
|
|
8
7
|
title: zod_1.z.string().describe("A short, descriptive title for the issue"),
|
|
9
8
|
description: zod_1.z
|
|
10
9
|
.string()
|
|
11
|
-
.describe("A
|
|
10
|
+
.describe("A concise description that includes failing line, diagnosis summary (gathered from going through test run report attachments), and reasoning for issue_type."),
|
|
12
11
|
issue_type: zod_1.z
|
|
13
12
|
.enum(["app", "test", "unknown"])
|
|
14
13
|
.describe("The type of issue. Options: app, test, unknown. You can use 'unknown' if you are unsure about the type."),
|
|
15
14
|
test_issue_prompt: zod_1.z
|
|
16
15
|
.string()
|
|
17
16
|
.optional()
|
|
18
|
-
.describe("A prompt that suggests how to fix test type issues. This prompt is used to modify the test to adapt to the new state of the
|
|
19
|
-
...metadata_schema_1.issueMetadataFields,
|
|
17
|
+
.describe("A prompt that suggests how to fix test type issues. This prompt is used to modify the test to adapt to the new state of the application. Provide URLs for build and run reports where the issue originated, so that the developer can understand full context."),
|
|
20
18
|
});
|
|
21
19
|
exports.createIssueTool = {
|
|
22
20
|
schema: {
|
|
23
21
|
name: "createIssue",
|
|
24
|
-
description: `This tool allows you to create an issue in the project's issue tracking system. You MUST check if a similar issue already exists with the list
|
|
22
|
+
description: `This tool allows you to create an issue in the project's issue tracking system. You MUST check if a similar issue already exists with the list issues tool before creating a new one.`,
|
|
25
23
|
parameters: createIssueSchema,
|
|
26
24
|
},
|
|
27
25
|
needsBrowser: false,
|
|
28
26
|
isInlineTool: true,
|
|
29
27
|
execute: async ({ input, apiClient, chatSession }) => {
|
|
30
28
|
try {
|
|
31
|
-
const { title, description, issue_type = "unknown", test_issue_prompt,
|
|
29
|
+
const { title, description, issue_type = "unknown", test_issue_prompt, } = input;
|
|
32
30
|
if (!chatSession?.id) {
|
|
33
31
|
throw new Error("Cannot create issue without a chat session ID.");
|
|
34
32
|
}
|
|
@@ -44,8 +42,6 @@ exports.createIssueTool = {
|
|
|
44
42
|
issue_type,
|
|
45
43
|
test_issue_prompt,
|
|
46
44
|
triage_session_id: chatSession?.id,
|
|
47
|
-
test_cases_affected,
|
|
48
|
-
test_run_info,
|
|
49
45
|
});
|
|
50
46
|
if (!response.data?.issue) {
|
|
51
47
|
return {
|
|
@@ -55,7 +51,7 @@ exports.createIssueTool = {
|
|
|
55
51
|
}
|
|
56
52
|
const issue = response.data?.issue;
|
|
57
53
|
const baseUrl = apiClient.getBaseUrl();
|
|
58
|
-
const issueUrl = `${baseUrl}/issues
|
|
54
|
+
const issueUrl = `${baseUrl}/issues/${issue?.id}`;
|
|
59
55
|
const result = `Successfully created issue #${issue?.id}: ${issue?.title}
|
|
60
56
|
Issue URL: ${issueUrl}
|
|
61
57
|
Issue JSON:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/issues-v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-issues.d.ts","sourceRoot":"","sources":["../../../src/tools/issues-v1/list-issues.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAKlE,eAAO,MAAM,cAAc,EAAE,IA2B5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-issue.d.ts","sourceRoot":"","sources":["../../../src/tools/issues-v1/update-issue.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAsBlE,eAAO,MAAM,eAAe,EAAE,IAwD7B,CAAC"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.updateIssueTool = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
-
const metadata_schema_1 = require("./metadata-schema");
|
|
6
5
|
const utils_1 = require("./utils");
|
|
7
6
|
const updateIssueSchema = zod_1.z.object({
|
|
8
7
|
id: zod_1.z.number().describe("The ID of the issue to update"),
|
|
@@ -19,7 +18,6 @@ const updateIssueSchema = zod_1.z.object({
|
|
|
19
18
|
.string()
|
|
20
19
|
.optional()
|
|
21
20
|
.describe("Updated test issue prompt"),
|
|
22
|
-
...metadata_schema_1.issueMetadataFields,
|
|
23
21
|
});
|
|
24
22
|
exports.updateIssueTool = {
|
|
25
23
|
schema: {
|
|
@@ -31,7 +29,7 @@ exports.updateIssueTool = {
|
|
|
31
29
|
isInlineTool: true,
|
|
32
30
|
execute: async ({ input, apiClient }) => {
|
|
33
31
|
try {
|
|
34
|
-
const { id, title, description, issue_type, test_issue_prompt
|
|
32
|
+
const { id, title, description, issue_type, test_issue_prompt } = input;
|
|
35
33
|
if (!apiClient) {
|
|
36
34
|
throw new Error("Dashboard API client is not available.");
|
|
37
35
|
}
|
|
@@ -48,12 +46,6 @@ exports.updateIssueTool = {
|
|
|
48
46
|
if (test_issue_prompt !== undefined) {
|
|
49
47
|
updateData.test_issue_prompt = test_issue_prompt;
|
|
50
48
|
}
|
|
51
|
-
if (test_cases_affected !== undefined && test_cases_affected.length > 0) {
|
|
52
|
-
updateData.test_cases_affected = test_cases_affected;
|
|
53
|
-
}
|
|
54
|
-
if (test_run_info !== undefined && test_run_info.length > 0) {
|
|
55
|
-
updateData.test_run_info = test_run_info;
|
|
56
|
-
}
|
|
57
49
|
const response = await (0, utils_1.updateIssue)(apiClient, id, updateData);
|
|
58
50
|
if (!response.data?.issue) {
|
|
59
51
|
return {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IDashboardAPIClient } from "@empiricalrun/shared-types/api/base";
|
|
2
|
+
import type { CreateIssueApiResponse, GetIssuesApiResponse, Issue, UpdateIssueApiResponse } from "@empiricalrun/shared-types/api/issues";
|
|
2
3
|
export declare function fetchIssues(apiClient: IDashboardAPIClient): Promise<GetIssuesApiResponse<Issue>>;
|
|
3
4
|
export declare function createIssue(apiClient: IDashboardAPIClient, issueData: Omit<Issue, "id" | "created_at" | "updated_at" | "status" | "project_id">): Promise<CreateIssueApiResponse<Issue>>;
|
|
4
5
|
export declare function updateIssue(apiClient: IDashboardAPIClient, issueId: number, updateData: Partial<Omit<Issue, "id" | "created_at" | "updated_at" | "project_id">>): Promise<UpdateIssueApiResponse<Issue>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/tools/issues-v1/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EACV,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,EACL,sBAAsB,EACvB,MAAM,uCAAuC,CAAC;AAE/C,wBAAsB,WAAW,CAC/B,SAAS,EAAE,mBAAmB,GAC7B,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAStC;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,mBAAmB,EAC9B,SAAS,EAAE,IAAI,CACb,KAAK,EACL,IAAI,GAAG,YAAY,GAAG,YAAY,GAAG,QAAQ,GAAG,YAAY,CAC7D,GACA,OAAO,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CASxC;AAED,wBAAsB,WAAW,CAC/B,SAAS,EAAE,mBAAmB,EAC9B,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,OAAO,CACjB,IAAI,CAAC,KAAK,EAAE,IAAI,GAAG,YAAY,GAAG,YAAY,GAAG,YAAY,CAAC,CAC/D,GACA,OAAO,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CASxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-issue.d.ts","sourceRoot":"","sources":["../../../src/tools/issues-v2/create-issue.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AA6ClE,eAAO,MAAM,eAAe,EAAE,IAwE7B,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createIssueTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const createIssueSchema = zod_1.z.object({
|
|
6
|
+
title: zod_1.z.string().describe("A short, descriptive title for the issue"),
|
|
7
|
+
description: zod_1.z
|
|
8
|
+
.string()
|
|
9
|
+
.describe("A concise description that includes failing line, diagnosis summary (gathered from going through test run report attachments), and reasoning for issue_type."),
|
|
10
|
+
issue_type: zod_1.z
|
|
11
|
+
.enum(["app", "test", "unknown"])
|
|
12
|
+
.describe("The type of issue. Options: app, test, unknown. You can use 'unknown' if you are unsure about the type."),
|
|
13
|
+
test_issue_prompt: zod_1.z
|
|
14
|
+
.string()
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("A prompt that suggests how to fix test type issues. This prompt is used to modify the test to adapt to the new state of the application. Provide URLs for build and run reports where the issue originated, so that the developer can understand full context."),
|
|
17
|
+
diagnosis_id: zod_1.z
|
|
18
|
+
.string()
|
|
19
|
+
.describe("12 character random string that identifies a failing test case in a test run, which is where this issue was detected."),
|
|
20
|
+
});
|
|
21
|
+
async function createIssue(apiClient, issueData) {
|
|
22
|
+
const response = await apiClient.request(`/api/diagnosis/${issueData.diagnosis_id}/triage`, { method: "POST", body: issueData });
|
|
23
|
+
if (!response || !response.data || !response.data.issue) {
|
|
24
|
+
throw new Error("Failed to create issue: No response data received.");
|
|
25
|
+
}
|
|
26
|
+
return response;
|
|
27
|
+
}
|
|
28
|
+
exports.createIssueTool = {
|
|
29
|
+
schema: {
|
|
30
|
+
name: "createIssue",
|
|
31
|
+
description: `This tool allows you to create an issue in the project's issue tracking system. You MUST check if a similar issue already exists with the list issues tool before creating a new one.`,
|
|
32
|
+
parameters: createIssueSchema,
|
|
33
|
+
},
|
|
34
|
+
needsBrowser: false,
|
|
35
|
+
isInlineTool: true,
|
|
36
|
+
execute: async ({ input, apiClient, chatSession }) => {
|
|
37
|
+
try {
|
|
38
|
+
const { title, description, issue_type = "unknown", test_issue_prompt, diagnosis_id, } = input;
|
|
39
|
+
if (!chatSession?.id) {
|
|
40
|
+
throw new Error("Cannot create issue without a chat session ID.");
|
|
41
|
+
}
|
|
42
|
+
if (issue_type === "test" && !test_issue_prompt) {
|
|
43
|
+
throw new Error("test_issue_prompt is required for test type issues.");
|
|
44
|
+
}
|
|
45
|
+
if (!diagnosis_id) {
|
|
46
|
+
throw new Error("diagnosis_id is required.");
|
|
47
|
+
}
|
|
48
|
+
if (!apiClient) {
|
|
49
|
+
throw new Error("Dashboard API client is not available.");
|
|
50
|
+
}
|
|
51
|
+
const response = await createIssue(apiClient, {
|
|
52
|
+
action: "created",
|
|
53
|
+
title,
|
|
54
|
+
issue_type,
|
|
55
|
+
description,
|
|
56
|
+
diagnosis_id,
|
|
57
|
+
test_issue_prompt,
|
|
58
|
+
triage_session_id: chatSession.id,
|
|
59
|
+
});
|
|
60
|
+
if (!response.data?.issue) {
|
|
61
|
+
return {
|
|
62
|
+
isError: true,
|
|
63
|
+
result: `Failed to create issue: ${response.error?.message}`,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
const issue = response.data?.issue;
|
|
67
|
+
const baseUrl = apiClient.getBaseUrl();
|
|
68
|
+
const issueUrl = `${baseUrl}/issues/${issue?.id}`;
|
|
69
|
+
const result = `Successfully created issue #${issue?.id}: ${issue?.title}
|
|
70
|
+
Issue URL: ${issueUrl}
|
|
71
|
+
Issue JSON:
|
|
72
|
+
${JSON.stringify(issue, null, 2)}
|
|
73
|
+
`;
|
|
74
|
+
return {
|
|
75
|
+
isError: false,
|
|
76
|
+
result,
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
return {
|
|
81
|
+
isError: true,
|
|
82
|
+
result: `Failed to create issue: ${error instanceof Error ? error.message : String(error)}`,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-issue.d.ts","sourceRoot":"","sources":["../../../src/tools/issues-v2/update-issue.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAuClE,eAAO,MAAM,eAAe,EAAE,IAmE7B,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateIssueTool = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const updateIssueSchema = zod_1.z.object({
|
|
6
|
+
id: zod_1.z.number().describe("The ID of the issue to update"),
|
|
7
|
+
title: zod_1.z.string().optional().describe("Updated title of the issue"),
|
|
8
|
+
description: zod_1.z
|
|
9
|
+
.string()
|
|
10
|
+
.optional()
|
|
11
|
+
.describe("Updated description of the issue"),
|
|
12
|
+
issue_type: zod_1.z
|
|
13
|
+
.enum(["app", "test", "unknown"])
|
|
14
|
+
.optional()
|
|
15
|
+
.describe("Updated issue type"),
|
|
16
|
+
test_issue_prompt: zod_1.z
|
|
17
|
+
.string()
|
|
18
|
+
.optional()
|
|
19
|
+
.describe("Updated test issue prompt"),
|
|
20
|
+
diagnosis_id: zod_1.z
|
|
21
|
+
.string()
|
|
22
|
+
.describe("12 character random string that identifies a failing test case in a test run, which is where this issue was detected."),
|
|
23
|
+
});
|
|
24
|
+
async function updateIssue(apiClient, issueData) {
|
|
25
|
+
const response = await apiClient.request(`/api/diagnosis/${issueData.diagnosis_id}/triage`, { method: "POST", body: issueData });
|
|
26
|
+
if (!response || !response.data || !response.data.issue) {
|
|
27
|
+
throw new Error("Failed to create issue: No response data received.");
|
|
28
|
+
}
|
|
29
|
+
return response;
|
|
30
|
+
}
|
|
31
|
+
exports.updateIssueTool = {
|
|
32
|
+
schema: {
|
|
33
|
+
name: "updateIssue",
|
|
34
|
+
description: `This tool allows you to update an existing issue in the project's issue tracking system. You can update the title, description, issue type, or test issue prompt. Use this tool to update existing issue to prevent duplication of issues.`,
|
|
35
|
+
parameters: updateIssueSchema,
|
|
36
|
+
},
|
|
37
|
+
needsBrowser: false,
|
|
38
|
+
isInlineTool: true,
|
|
39
|
+
execute: async ({ input, apiClient }) => {
|
|
40
|
+
try {
|
|
41
|
+
const { id: issue_id, title, description, issue_type, test_issue_prompt, diagnosis_id, } = input;
|
|
42
|
+
if (!apiClient) {
|
|
43
|
+
throw new Error("Dashboard API client is not available.");
|
|
44
|
+
}
|
|
45
|
+
const updateData = {
|
|
46
|
+
action: "updated",
|
|
47
|
+
issue_id,
|
|
48
|
+
diagnosis_id,
|
|
49
|
+
};
|
|
50
|
+
if (title !== undefined) {
|
|
51
|
+
updateData.title = title;
|
|
52
|
+
}
|
|
53
|
+
if (description !== undefined) {
|
|
54
|
+
updateData.description = description;
|
|
55
|
+
}
|
|
56
|
+
if (issue_type !== undefined) {
|
|
57
|
+
updateData.issue_type = issue_type;
|
|
58
|
+
}
|
|
59
|
+
if (test_issue_prompt !== undefined) {
|
|
60
|
+
updateData.test_issue_prompt = test_issue_prompt;
|
|
61
|
+
}
|
|
62
|
+
const response = await updateIssue(apiClient, updateData);
|
|
63
|
+
if (!response.data?.issue) {
|
|
64
|
+
return {
|
|
65
|
+
isError: true,
|
|
66
|
+
result: `Failed to update issue: ${response.error?.message}`,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
const issue = response.data?.issue;
|
|
70
|
+
const result = `Successfully updated issue #${issue?.id}: ${issue?.title}
|
|
71
|
+
|
|
72
|
+
Updated Issue JSON:
|
|
73
|
+
${JSON.stringify(issue, null, 2)}
|
|
74
|
+
`;
|
|
75
|
+
return {
|
|
76
|
+
isError: false,
|
|
77
|
+
result,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
catch (error) {
|
|
81
|
+
return {
|
|
82
|
+
isError: true,
|
|
83
|
+
result: `Failed to update issue: ${error instanceof Error ? error.message : String(error)}`,
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-environments.d.ts","sourceRoot":"","sources":["../../src/tools/list-environments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"list-environments.d.ts","sourceRoot":"","sources":["../../src/tools/list-environments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAGlE,eAAO,MAAM,oBAAoB,EAAE,IAgDlC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tool } from "@empiricalrun/shared-types";
|
|
1
|
+
import { Tool } from "@empiricalrun/shared-types/chat-agent";
|
|
2
2
|
export declare const objectAsString: (obj: any) => string;
|
|
3
3
|
export declare function parseObjectString(objectString: string): any;
|
|
4
4
|
export declare const listProjectsTool: Tool;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/list-tests-and-projects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/list-tests-and-projects/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAc,MAAM,uCAAuC,CAAC;AAgBzE,eAAO,MAAM,cAAc,GAAI,KAAK,GAAG,WAKnC,CAAC;AAEL,wBAAgB,iBAAiB,CAAC,YAAY,EAAE,MAAM,GAAG,GAAG,CAkB3D;AAED,eAAO,MAAM,gBAAgB,EAAE,IAY9B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,IA0BrC,CAAC"}
|
|
@@ -49,9 +49,19 @@ exports.listTestsForProjectTool = {
|
|
|
49
49
|
execute: async ({ repoPath, input, }) => {
|
|
50
50
|
const data = await (0, test_run_1.listProjectsAndTests)(repoPath);
|
|
51
51
|
const projectToFilter = input.project;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
const listOfTestsForProject = data.projectsToTestCases[projectToFilter];
|
|
53
|
+
if (!listOfTestsForProject) {
|
|
54
|
+
const validProjects = Object.keys(data.projectsToTestCases).join(", ");
|
|
55
|
+
return {
|
|
56
|
+
isError: false,
|
|
57
|
+
result: `No test cases found for project ${projectToFilter}. Test cases exist for projects: ${validProjects}`,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
return {
|
|
62
|
+
isError: false,
|
|
63
|
+
result: JSON.stringify(listOfTestsForProject),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
56
66
|
},
|
|
57
67
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/merge-conflicts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/merge-conflicts/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uCAAuC,CAAC;AAgDlE,eAAO,MAAM,kBAAkB,EAAE,IAkEhC,CAAC"}
|
|
@@ -9,9 +9,9 @@ const fs_1 = __importDefault(require("fs"));
|
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
10
|
const merge_conflicts_1 = require("../definitions/merge-conflicts");
|
|
11
11
|
const git_1 = require("../executor/utils/git");
|
|
12
|
-
function
|
|
12
|
+
function runMerge(repoPath, targetBranch) {
|
|
13
13
|
try {
|
|
14
|
-
(0, child_process_1.execSync)(
|
|
14
|
+
(0, child_process_1.execSync)(`git merge --no-ff origin/${targetBranch} -m 'Merge remote-tracking branch origin/${targetBranch} [skip ci]'`, { stdio: "pipe", cwd: repoPath });
|
|
15
15
|
return "CLEAN";
|
|
16
16
|
}
|
|
17
17
|
catch (error) {
|
|
@@ -42,26 +42,39 @@ function getConflictedFilesWithContents(repoPath) {
|
|
|
42
42
|
}
|
|
43
43
|
exports.mergeConflictsTool = {
|
|
44
44
|
...merge_conflicts_1.mergeConflictsTool,
|
|
45
|
-
execute: async ({ repoPath }) => {
|
|
45
|
+
execute: async ({ repoPath, chatSession }) => {
|
|
46
|
+
const targetBranch = chatSession?.baseBranchName || "main";
|
|
46
47
|
try {
|
|
47
48
|
// Fetch main branch (git clone runs --single-branch), and then run merge
|
|
48
|
-
(0, child_process_1.execSync)(
|
|
49
|
-
|
|
49
|
+
(0, child_process_1.execSync)(`git remote set-branches --add origin ${targetBranch}`, {
|
|
50
|
+
cwd: repoPath,
|
|
51
|
+
});
|
|
52
|
+
(0, child_process_1.execSync)(`git fetch origin ${targetBranch}`, { cwd: repoPath });
|
|
53
|
+
// Configure git user for merge
|
|
54
|
+
(0, child_process_1.execSync)(`git config user.name "${git_1.GIT_USER_NAME}"`, { cwd: repoPath });
|
|
55
|
+
(0, child_process_1.execSync)(`git config user.email "${git_1.GIT_USER_EMAIL}"`, { cwd: repoPath });
|
|
50
56
|
// Run merge command and commit (with or without conflict)
|
|
51
|
-
const mergeResult =
|
|
57
|
+
const mergeResult = runMerge(repoPath, targetBranch);
|
|
52
58
|
const branchName = await (0, git_1.getCurrentBranchName)(repoPath);
|
|
53
59
|
if (mergeResult === "CLEAN") {
|
|
54
60
|
(0, child_process_1.execSync)(`git push origin ${branchName}`, { cwd: repoPath });
|
|
55
61
|
return {
|
|
56
62
|
isError: false,
|
|
57
|
-
result: `Merge from
|
|
63
|
+
result: `Merge from ${targetBranch} was successful, without any conflicts.`,
|
|
58
64
|
};
|
|
59
65
|
}
|
|
60
66
|
else if (mergeResult === "CONFLICTS") {
|
|
61
67
|
const files = getConflictedFilesWithContents(repoPath);
|
|
68
|
+
const filePaths = Object.keys(files);
|
|
69
|
+
if (filePaths.length === 0) {
|
|
70
|
+
return {
|
|
71
|
+
isError: true,
|
|
72
|
+
result: `Merge failed with exit code 1, but no conflicted files were found.`,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
62
75
|
(0, git_1.stageAndCommitFilesAsBotUser)({
|
|
63
|
-
commitMessage:
|
|
64
|
-
files:
|
|
76
|
+
commitMessage: `Merge from ${targetBranch} with conflicts`,
|
|
77
|
+
files: filePaths,
|
|
65
78
|
repoPath,
|
|
66
79
|
});
|
|
67
80
|
(0, child_process_1.execSync)(`git push origin ${branchName}`, { cwd: repoPath });
|
|
@@ -71,7 +84,7 @@ exports.mergeConflictsTool = {
|
|
|
71
84
|
.join("\n\n");
|
|
72
85
|
return {
|
|
73
86
|
isError: false,
|
|
74
|
-
result: `Merge from
|
|
87
|
+
result: `Merge from ${targetBranch} is committed, with conflicts. Use text edit tools to resolve them.\n\n${filesResult}`,
|
|
75
88
|
};
|
|
76
89
|
}
|
|
77
90
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/rename-file/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/rename-file/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,uCAAuC,CAAC;AAQ9E,eAAO,MAAM,cAAc,EAAE,IA4E5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/review-pull-request/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/review-pull-request/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,IAAI,EAEL,MAAM,uCAAuC,CAAC;AAU/C,eAAO,MAAM,qBAAqB,EAAE,IA0FnC,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.reviewPullRequestTool = void 0;
|
|
4
|
-
const state_1 = require("../../agent/chat/state");
|
|
5
4
|
const code_review_1 = require("../../agent/code-review");
|
|
6
5
|
const executor_1 = require("../../agent/code-review/executor");
|
|
6
|
+
const file_info_1 = require("../../file-info");
|
|
7
7
|
const review_pull_request_1 = require("../definitions/review-pull-request");
|
|
8
|
-
const CODE_REVIEW_MODEL = "claude-sonnet-4-
|
|
8
|
+
const CODE_REVIEW_MODEL = "claude-sonnet-4-5-20250929";
|
|
9
9
|
exports.reviewPullRequestTool = {
|
|
10
10
|
...review_pull_request_1.reviewPullRequestTool,
|
|
11
|
-
execute: async ({ input, apiClient,
|
|
11
|
+
execute: async ({ input, apiClient, environmentOverrides, trace, featureFlags, repoPath, }) => {
|
|
12
12
|
try {
|
|
13
13
|
const { sessionUrl } = input;
|
|
14
14
|
if (!sessionUrl) {
|
|
@@ -22,15 +22,6 @@ exports.reviewPullRequestTool = {
|
|
|
22
22
|
isError: true,
|
|
23
23
|
result: "API Client not available",
|
|
24
24
|
};
|
|
25
|
-
// creating chat state to pass to model
|
|
26
|
-
const userPrompt = `Review this session: ${sessionUrl}`;
|
|
27
|
-
const chatState = (0, state_1.createChatState)({
|
|
28
|
-
userPrompt,
|
|
29
|
-
attachments: [],
|
|
30
|
-
existingState: undefined,
|
|
31
|
-
selectedModel: CODE_REVIEW_MODEL,
|
|
32
|
-
error: null,
|
|
33
|
-
});
|
|
34
25
|
const span = trace?.span({
|
|
35
26
|
name: "code-review-agent",
|
|
36
27
|
input: {
|
|
@@ -39,7 +30,7 @@ exports.reviewPullRequestTool = {
|
|
|
39
30
|
},
|
|
40
31
|
});
|
|
41
32
|
const codeReviewToolExecutor = new executor_1.CodeReviewToolExecutor({
|
|
42
|
-
chatSession:
|
|
33
|
+
chatSession: null,
|
|
43
34
|
repoPath,
|
|
44
35
|
apiClient,
|
|
45
36
|
trace: span,
|
|
@@ -49,15 +40,18 @@ exports.reviewPullRequestTool = {
|
|
|
49
40
|
const agentParams = {
|
|
50
41
|
featureFlags: [],
|
|
51
42
|
selectedModel: CODE_REVIEW_MODEL,
|
|
52
|
-
chatState,
|
|
43
|
+
chatState: undefined,
|
|
53
44
|
toolExecutor: codeReviewToolExecutor,
|
|
54
45
|
trace: span,
|
|
46
|
+
repoInfoBuilder: () => (0, file_info_1.getFileInfoFromFS)(repoPath),
|
|
55
47
|
};
|
|
56
48
|
const agent = new code_review_1.CodeReviewAgent({ ...agentParams });
|
|
49
|
+
// Push the review prompt to the agent
|
|
50
|
+
const userPrompt = `Review this session: ${sessionUrl}`;
|
|
51
|
+
agent.pushUserMessage([{ text: userPrompt }]);
|
|
57
52
|
while (!agent.askUserForInput) {
|
|
58
53
|
await agent.runLoop({
|
|
59
54
|
reporter: async () => { },
|
|
60
|
-
trace: span,
|
|
61
55
|
});
|
|
62
56
|
}
|
|
63
57
|
const agentResult = agent.getResult();
|
package/dist/tools/run-test.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-test.d.ts","sourceRoot":"","sources":["../../src/tools/run-test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"run-test.d.ts","sourceRoot":"","sources":["../../src/tools/run-test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,IAAI,EAEL,MAAM,uCAAuC,CAAC;AA0C/C,eAAO,MAAM,WAAW,EAAE,IA4GzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-gen-browser.d.ts","sourceRoot":"","sources":["../../src/tools/test-gen-browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"test-gen-browser.d.ts","sourceRoot":"","sources":["../../src/tools/test-gen-browser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,IAAI,EACL,MAAM,uCAAuC,CAAC;AAqB/C,eAAO,MAAM,4BAA4B,EAAE,IAmO1C,CAAC"}
|