@empiricalrun/test-gen 0.78.0 → 0.78.2
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 +19 -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 +25 -14
- 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 -4
- 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 +12 -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 +14 -19
- package/dist/agent/chat/state.d.ts.map +1 -1
- package/dist/agent/chat/state.js +10 -45
- 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 +5 -6
- package/dist/agent/code-review/index.d.ts +4 -3
- package/dist/agent/code-review/index.d.ts.map +1 -1
- package/dist/agent/code-review/index.js +10 -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 +24 -13
- package/dist/agent/cua/pw-codegen/factory.d.ts +15 -0
- package/dist/agent/cua/pw-codegen/factory.d.ts.map +1 -0
- package/dist/agent/cua/pw-codegen/factory.js +59 -0
- package/dist/agent/cua/pw-codegen/index.d.ts +7 -0
- package/dist/agent/cua/pw-codegen/index.d.ts.map +1 -0
- package/dist/agent/cua/pw-codegen/index.js +14 -0
- package/dist/agent/cua/pw-codegen/pw-event-sink/index.d.ts +43 -0
- package/dist/agent/cua/pw-codegen/pw-event-sink/index.d.ts.map +1 -0
- package/dist/agent/cua/pw-codegen/pw-event-sink/index.js +250 -0
- 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.d.ts +1 -1
- package/dist/agent/cua/pw-codegen/pw-pause/index.d.ts.map +1 -1
- package/dist/agent/cua/pw-codegen/pw-pause/index.js +7 -3
- package/dist/agent/cua/pw-codegen/pw-pause/patch.d.ts +15 -3
- package/dist/agent/cua/pw-codegen/pw-pause/patch.d.ts.map +1 -1
- package/dist/agent/cua/pw-codegen/pw-pause/patch.js +38 -10
- package/dist/agent/cua/pw-codegen/version.d.ts +25 -0
- package/dist/agent/cua/pw-codegen/version.d.ts.map +1 -0
- package/dist/agent/cua/pw-codegen/version.js +86 -0
- 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 +33 -20
- 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 -2
- 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 +9 -3
- 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 +20 -13
- 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 +3 -2
- package/dist/tools/create-pull-request/utils.d.ts.map +1 -1
- package/dist/tools/definitions/analyse-video.d.ts +5 -37
- package/dist/tools/definitions/analyse-video.d.ts.map +1 -1
- package/dist/tools/definitions/analyse-video.js +12 -25
- package/dist/tools/definitions/delete-file.d.ts +5 -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 +2 -6
- 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 +2 -6
- 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 +3 -15
- package/dist/tools/definitions/run-test.d.ts.map +1 -1
- package/dist/tools/definitions/safe-bash.d.ts +8 -0
- package/dist/tools/definitions/safe-bash.d.ts.map +1 -0
- package/dist/tools/definitions/safe-bash.js +32 -0
- 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 +3 -15
- package/dist/tools/definitions/test-gen-browser.d.ts.map +1 -1
- package/dist/tools/definitions/upgrade-packages.d.ts +4 -26
- package/dist/tools/definitions/upgrade-packages.d.ts.map +1 -1
- package/dist/tools/definitions/utils.d.ts +2 -10
- package/dist/tools/definitions/utils.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 +3 -2
- package/dist/tools/executor/base.d.ts.map +1 -1
- package/dist/tools/executor/base.js +5 -8
- 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 +12 -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 +1 -2
- package/dist/tools/executor/utils/index.d.ts.map +1 -1
- package/dist/tools/executor/utils/index.js +0 -20
- 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 +2 -6
- 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 +0 -1
- 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/firecrawl-scrape/index.d.ts +9 -0
- package/dist/tools/firecrawl-scrape/index.d.ts.map +1 -0
- package/dist/tools/firecrawl-scrape/index.js +107 -0
- 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 +5 -24
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +21 -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 +82 -0
- package/dist/tools/issues-v2/set-issue-description.d.ts +3 -0
- package/dist/tools/issues-v2/set-issue-description.d.ts.map +1 -0
- package/dist/tools/issues-v2/set-issue-description.js +59 -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 +85 -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 +5 -4
- package/dist/tools/run-test.d.ts +1 -1
- package/dist/tools/run-test.d.ts.map +1 -1
- package/dist/tools/safe-bash/index.d.ts +3 -0
- package/dist/tools/safe-bash/index.d.ts.map +1 -0
- package/dist/tools/safe-bash/index.js +128 -0
- 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 +64 -21
- 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 +14 -8
- package/dist/tools/upgrade-packages/utils.d.ts +9 -5
- package/dist/tools/upgrade-packages/utils.d.ts.map +1 -1
- package/dist/tools/upgrade-packages/utils.js +56 -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 +27 -0
- package/dist/utils/SQSClient.d.ts +1 -1
- package/dist/utils/SQSClient.d.ts.map +1 -1
- package/dist/utils/dedup/dedup-image.js +2 -2
- package/dist/utils/dedup/find-threshold.d.ts +1 -1
- package/dist/utils/dedup/find-threshold.d.ts.map +1 -1
- package/dist/utils/dedup/find-threshold.js +2 -2
- package/dist/utils/model.d.ts +1 -1
- package/dist/utils/model.d.ts.map +1 -1
- package/dist/utils/model.js +6 -10
- 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 +7 -24
- package/dist/video-core/index.d.ts.map +1 -1
- package/dist/video-core/index.js +32 -25
- 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 +9 -19
- 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/types.d.ts +1 -1
- package/dist/video-core/types.d.ts.map +1 -1
- package/dist/video-core/utils.d.ts +5 -7
- package/dist/video-core/utils.d.ts.map +1 -1
- package/dist/video-core/utils.js +39 -132
- package/package.json +10 -6
- 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/video-core/agent-orchestrator.d.ts +0 -13
- package/dist/video-core/agent-orchestrator.d.ts.map +0 -1
- package/dist/video-core/agent-orchestrator.js +0 -59
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../../src/agent/master/next-action.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,GAAG,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"next-action.d.ts","sourceRoot":"","sources":["../../../src/agent/master/next-action.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;AAElC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAUhD,wBAAsB,aAAa,CAAC,EAClC,IAAI,EACJ,cAAc,EACd,IAAI,EACJ,eAAe,EACf,aAAa,EACb,KAAK,EACL,GAAG,EACH,OAAO,EACP,OAAO,EACP,aAAa,EACb,MAAM,GACP,EAAE;IACD,IAAI,EAAE,IAAI,CAAC;IACX,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,aAAa,EAAE,GAAG,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACxC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,GAAG,OAAO,CACP;IACE,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,GACD,SAAS,CACZ,CAwFA"}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getNextAction = getNextAction;
|
|
4
4
|
const llm_1 = require("@empiricalrun/llm");
|
|
5
|
-
const skill_1 = require("../../actions/skill");
|
|
6
5
|
const constants_1 = require("../../constants");
|
|
7
6
|
const promptTemplate_0 = "{{#section \"system\"}}\nYou are a web automation tool which is given a task to complete. You need to execute the\ntask provided to you with the help of web page screenshot, a browser automation tool or skills\nwhich are learnt while writing previous tests. \n \nBrowser automation tool is a tool which uses Playwright and browser to execute action using\nnext_action tool call.\nSkill usage is a tool which helps to execute previously known pieces of code to achieve a task.\n\nYou will be provided with a screenshot of the webpage which you will use to extract the action\nthat needs to be taken.\n\nYou will be provided with previously executed actions by the browser automation tool and based\non the current screenshot and previously executed actions, you need to predict the next action\nto be taken.\n\nYou will also be provided with failed next action predicted by you, so that you can avoid\nsuggesting the same action again - which failed.\n\nThe next action should be as atomic as possible. e.g: scroll, click on an element, fill an input\nelement, assert, extract text from an element are valid next action as they are atomic in nature.\n\nYou also need to provide the action type using the list below, action type which is not present in\nthe list is invalid: {{validActionTypes}}\n\nYou will also be provided with skill usage tool which you can use to execute action. These skills\nare compound functions which helps you to complete your action.\n\nYou need to respond with either:\n- Next action to be taken by a browser automation tool \n- Use previously learnt skills in the form of tool call.\n \nYou need to make a decision whether the given skill can be reused if \"YES\" respond with the\nskill else respond with the next action.\n{{/section}}\n\n{{#section \"user\"}}\nTask:\n{{task}}\n\n-----\n\nPrevious executed actions:\n{{executedActions}}\n\n-----\n\nPrevious failed actions:\n{{failedActions}}\n\n-----\n\nYou are also provided with a page screenshot for you to decide the next action.\n\nCurrent page URL: {{pageUrl}}\n\nFollow the instructions before responding:\n- Divide the task into sub tasks\n- Using previously executed actions, identify tasks are complete and which tasks needs to be executed next.\n- You will be provided a skill usage action, if the testStep matches the next action then respond with the skill usage.\n- If responding with next action, ensure next action to be detailed and explicit about what action needs to be done. Provide all the information which can be extracted from the screenshot as a part of next action.\n- Mark task as complete only when executed actions provided to you indicates that the task is done.\n- Refer to the text and references available in the screenshot to create the next action.\n- Do not take any extra actions which are not required for the execution of the task\n- If there are no further actions required based on the task, then respond with task as done.\n- Do not recommend actions which are not available in the screenshot\n\nScreenshots:\n{{images pageScreenshots}}\n\n{{/section}}\n";
|
|
8
7
|
const action_tool_calls_1 = require("./action-tool-calls");
|
|
@@ -19,7 +18,6 @@ async function getNextAction({ page, pageScreenshot, task, executedActions, fail
|
|
|
19
18
|
options,
|
|
20
19
|
pageScreenshot,
|
|
21
20
|
disableSkills,
|
|
22
|
-
skills: skill_1.testCaseSkills.getAvailableSkills(),
|
|
23
21
|
},
|
|
24
22
|
});
|
|
25
23
|
const messages = (0, llm_1.compilePrompt)(promptTemplate_0, {
|
|
@@ -30,10 +28,7 @@ async function getNextAction({ page, pageScreenshot, task, executedActions, fail
|
|
|
30
28
|
pageUrl,
|
|
31
29
|
pageScreenshots: pageScreenshot,
|
|
32
30
|
});
|
|
33
|
-
const
|
|
34
|
-
? []
|
|
35
|
-
: actions.getSkillsActionSchemas();
|
|
36
|
-
const tools = [...(0, action_tool_calls_1.getActionToolCalls)(), ...actionSchemas];
|
|
31
|
+
const tools = [...(0, action_tool_calls_1.getActionToolCalls)()];
|
|
37
32
|
llm =
|
|
38
33
|
llm ||
|
|
39
34
|
new llm_1.LLM({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { TestGenConfigOptions } from "@empiricalrun/shared-types/agent-workflow";
|
|
2
|
+
import type { TestCaseWithSuitesAsArray } from "@empiricalrun/shared-types/api/test-cases";
|
|
2
3
|
import { Page } from "playwright";
|
|
3
4
|
import { ScopeVars } from "../../types";
|
|
4
5
|
export { createTestUsingComputerUseAgent } from "../cua";
|
|
@@ -6,7 +7,7 @@ export declare const IS_ALLOWED_TO_USE_SKILLS = false;
|
|
|
6
7
|
export declare function createTestUsingMasterAgent({ task, page, testCase, specPath, options, scopeVars, }: {
|
|
7
8
|
task: string;
|
|
8
9
|
page: Page;
|
|
9
|
-
testCase?:
|
|
10
|
+
testCase?: TestCaseWithSuitesAsArray;
|
|
10
11
|
specPath?: string;
|
|
11
12
|
options: Partial<TestGenConfigOptions>;
|
|
12
13
|
scopeVars?: ScopeVars;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/agent/master/run.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAYlC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQxC,OAAO,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAKzD,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAqB9C,wBAAsB,0BAA0B,CAAC,EAC/C,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,CAAC,EAAE,yBAAyB,CAAC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;;;GAwJA"}
|
package/dist/agent/master/run.js
CHANGED
|
@@ -4,19 +4,16 @@ exports.IS_ALLOWED_TO_USE_SKILLS = exports.createTestUsingComputerUseAgent = voi
|
|
|
4
4
|
exports.createTestUsingMasterAgent = createTestUsingMasterAgent;
|
|
5
5
|
const llm_1 = require("@empiricalrun/llm");
|
|
6
6
|
const actions_1 = require("../../actions");
|
|
7
|
-
const skill_1 = require("../../actions/skill");
|
|
8
7
|
const utils_1 = require("../../actions/utils");
|
|
9
8
|
const logger_1 = require("../../bin/logger");
|
|
10
9
|
const constants_1 = require("../../constants");
|
|
11
10
|
const errors_1 = require("../../errors");
|
|
12
11
|
const page_1 = require("../../page");
|
|
13
12
|
const utils_2 = require("../browsing/utils");
|
|
14
|
-
const skills_retriever_1 = require("../codegen/skills-retriever");
|
|
15
13
|
const run_1 = require("../planner/run");
|
|
16
14
|
const run_time_planner_1 = require("../planner/run-time-planner");
|
|
17
15
|
const action_tool_calls_1 = require("./action-tool-calls");
|
|
18
16
|
const execute_browser_action_1 = require("./execute-browser-action");
|
|
19
|
-
const execute_skill_action_1 = require("./execute-skill-action");
|
|
20
17
|
const next_action_1 = require("./next-action");
|
|
21
18
|
var cua_1 = require("../cua");
|
|
22
19
|
Object.defineProperty(exports, "createTestUsingComputerUseAgent", { enumerable: true, get: function () { return cua_1.createTestUsingComputerUseAgent; } });
|
|
@@ -47,15 +44,6 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
|
|
|
47
44
|
// we will be using google model for larger context window, in such cases 1 million tokens is not enough
|
|
48
45
|
maxTokens: options.modelProvider === "google" ? 3_000_000 : 1_000_000,
|
|
49
46
|
});
|
|
50
|
-
let skills = [];
|
|
51
|
-
if (testCase && exports.IS_ALLOWED_TO_USE_SKILLS) {
|
|
52
|
-
skills = await (0, skills_retriever_1.getAppropriateSkills)({
|
|
53
|
-
testCase,
|
|
54
|
-
//@ts-ignore
|
|
55
|
-
options,
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
skill_1.testCaseSkills.updateSkills(skills);
|
|
59
47
|
if (usePlannerInMaster && testCase && specPath) {
|
|
60
48
|
logger.log(`Planner is working on task: ${task}`);
|
|
61
49
|
const plan = await (0, run_1.planTask)({
|
|
@@ -122,16 +110,6 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
|
|
|
122
110
|
try {
|
|
123
111
|
logger.log(`Next Action: ${output.action}`);
|
|
124
112
|
switch (nextAction.actionType) {
|
|
125
|
-
case skill_1.SKILL_USAGE: {
|
|
126
|
-
const code = await (0, execute_skill_action_1.executeSkillAction)({
|
|
127
|
-
actions,
|
|
128
|
-
nextAction,
|
|
129
|
-
});
|
|
130
|
-
if (code) {
|
|
131
|
-
generatedCodeSteps.push(code);
|
|
132
|
-
}
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
113
|
case action_tool_calls_1.ActionType.OBSERVATION: {
|
|
136
114
|
output.action = args.observation;
|
|
137
115
|
logger.log("Observation: ", output.action);
|
|
@@ -159,10 +137,6 @@ async function createTestUsingMasterAgent({ task, page, testCase, specPath, opti
|
|
|
159
137
|
disableSkills = false;
|
|
160
138
|
}
|
|
161
139
|
catch (e) {
|
|
162
|
-
if (nextAction.actionType === skill_1.SKILL_USAGE) {
|
|
163
|
-
logger.log("Disabling skill usage for next retry");
|
|
164
|
-
disableSkills = true;
|
|
165
|
-
}
|
|
166
140
|
if (!(e instanceof errors_1.HumanApprovalDenied)) {
|
|
167
141
|
logger.error("Failed to run master agent's next task", JSON.stringify(nextAction, null, 2), e);
|
|
168
142
|
failedActions.push(output.action);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { ToolsForLLM } from "@empiricalrun/shared-types";
|
|
1
|
+
import type { ToolsForLLM } from "@empiricalrun/shared-types/chat-agent";
|
|
2
|
+
import type { FileInfo } from "@empiricalrun/shared-types/test-gen";
|
|
2
3
|
import { BaseAgent } from "../base";
|
|
3
|
-
export declare class TriageAgent extends BaseAgent {
|
|
4
|
+
export declare class TriageAgent<T> extends BaseAgent<T> {
|
|
4
5
|
protected getTools(): ToolsForLLM;
|
|
5
|
-
protected buildSystemPrompt(
|
|
6
|
+
protected buildSystemPrompt(repoInfoBuilder: () => Promise<FileInfo>): Promise<string>;
|
|
6
7
|
}
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/triage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agent/triage/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAepE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAIpC,qBAAa,WAAW,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IAC9C,SAAS,CAAC,QAAQ,IAAI,WAAW;cA0BjB,iBAAiB,CAC/B,eAAe,EAAE,MAAM,OAAO,CAAC,QAAQ,CAAC,GACvC,OAAO,CAAC,MAAM,CAAC;CAgEnB"}
|
|
@@ -2,35 +2,50 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TriageAgent = void 0;
|
|
4
4
|
const tools_1 = require("../../tools");
|
|
5
|
+
const analyse_video_1 = require("../../tools/definitions/analyse-video");
|
|
6
|
+
const grep_1 = require("../../tools/definitions/grep");
|
|
7
|
+
const diagnosis_fetcher_1 = require("../../tools/diagnosis-fetcher");
|
|
8
|
+
const fetch_file_1 = require("../../tools/fetch-file");
|
|
9
|
+
const list_issues_1 = require("../../tools/issues-v1/list-issues");
|
|
10
|
+
const create_issue_1 = require("../../tools/issues-v2/create-issue");
|
|
11
|
+
const set_issue_description_1 = require("../../tools/issues-v2/set-issue-description");
|
|
12
|
+
const update_issue_1 = require("../../tools/issues-v2/update-issue");
|
|
13
|
+
const list_environments_1 = require("../../tools/list-environments");
|
|
14
|
+
const test_run_fetcher_1 = require("../../tools/test-run-fetcher");
|
|
15
|
+
const trace_dot_zip_1 = require("../../tools/trace-dot-zip");
|
|
16
|
+
const triage_summary_1 = require("../../tools/triage-summary");
|
|
5
17
|
const base_1 = require("../base");
|
|
18
|
+
const repo_1 = require("../chat/prompt/repo");
|
|
6
19
|
const test_case_def_1 = require("../chat/prompt/test-case-def");
|
|
7
20
|
class TriageAgent extends base_1.BaseAgent {
|
|
8
21
|
getTools() {
|
|
9
22
|
const tools = [
|
|
10
23
|
// Tools to understand test run (open report)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
tools_1.listEnvironmentsTool,
|
|
24
|
+
diagnosis_fetcher_1.fetchDiagnosisReportTool,
|
|
25
|
+
test_run_fetcher_1.fetchTestRunDetailsTool,
|
|
26
|
+
list_environments_1.listEnvironmentsTool,
|
|
15
27
|
// Tools to analyse report artifacts
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
28
|
+
fetch_file_1.fetchFileTool,
|
|
29
|
+
analyse_video_1.analyseVideo,
|
|
30
|
+
trace_dot_zip_1.traceDotZipTool,
|
|
19
31
|
// Tools to get test case context from the repo
|
|
20
|
-
|
|
32
|
+
grep_1.grepTool,
|
|
21
33
|
...(0, tools_1.textEditorToolsForModel)(this.selectedModel),
|
|
22
34
|
// Tools to manage issues
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
35
|
+
list_issues_1.listIssuesTool,
|
|
36
|
+
create_issue_1.createIssueTool,
|
|
37
|
+
set_issue_description_1.setIssueDescriptionTool,
|
|
38
|
+
update_issue_1.updateIssueTool,
|
|
39
|
+
triage_summary_1.sendTriageSummaryTool,
|
|
27
40
|
];
|
|
28
41
|
return {
|
|
29
42
|
custom: tools,
|
|
30
43
|
builtInTextEditor: (0, tools_1.hasBuiltInTextEditor)(this.selectedModel),
|
|
31
44
|
};
|
|
32
45
|
}
|
|
33
|
-
async buildSystemPrompt(
|
|
46
|
+
async buildSystemPrompt(repoInfoBuilder) {
|
|
47
|
+
const repoInfo = await repoInfoBuilder();
|
|
48
|
+
const repoContext = await (0, repo_1.getRepoContextPrompt)(repoInfo);
|
|
34
49
|
return `
|
|
35
50
|
You are a helpful assistant that help with analysis of Playwright test reports. Your goal is to help the user analyse a test report and identify the root cause of the test failures, and log the unique failuers as issues so that the user can keep a track and fix them.
|
|
36
51
|
|
|
@@ -38,20 +53,18 @@ You are working on a test code repository that contains Playwright tests and oth
|
|
|
38
53
|
|
|
39
54
|
# Your capabilities
|
|
40
55
|
|
|
41
|
-
When provided with a test report
|
|
56
|
+
When provided with a test report URLs, you can use your tools to fetch the report or details of a particular failed test case (called diagnosis). You can review last successful run and compare what changed between that and the failing run.
|
|
42
57
|
|
|
43
|
-
|
|
58
|
+
You can also go through the repository: use the file view tool to understand what the test is about, and the helper methods that the test might be importing.
|
|
44
59
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
## Analyze each test case
|
|
60
|
+
## Analyse each test case
|
|
48
61
|
|
|
49
62
|
You are provided with multiple tools to help you understand each failing test case better. Understanding each test case allows you to identify the root cause and create more accurate issues. These tools can also be called in parallel.
|
|
50
63
|
|
|
51
|
-
- Each test case generates artifacts: images, videos, playwright trace zip file. With your tools, you can fetch image,
|
|
64
|
+
- Each test case generates artifacts: images, videos, playwright trace zip file. With your tools, you can fetch image, analyse the video frames and trace.zip to find out failing network requests and console logs
|
|
52
65
|
- Each video represents one browser tab of the test case (so multiple videos implies the test had multiple tabs or browser windows)
|
|
53
66
|
- Read the error stack and test file to understand what the test is doing
|
|
54
|
-
- Fetch the last successful run of the test case to understand the earlier flow. This report will contain image and video URLs that can also be
|
|
67
|
+
- Fetch the last successful run of the test case to understand the earlier flow. This report will contain image and video URLs that can also be analysed with your available tools.
|
|
55
68
|
|
|
56
69
|
## Listing, updating and creating issues
|
|
57
70
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Artifact, ArtifactInput } from "@empiricalrun/shared-types";
|
|
1
|
+
import { Artifact, ArtifactInput } from "@empiricalrun/shared-types/chat-agent";
|
|
2
2
|
export declare function isArtifactCollectionEnabled(): string | undefined;
|
|
3
3
|
/**
|
|
4
4
|
* Collects artifacts from the repository directory and returns their URLs.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/artifacts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EACR,aAAa,EAId,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/artifacts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,QAAQ,EACR,aAAa,EAId,MAAM,uCAAuC,CAAC;AAwB/C,wBAAgB,2BAA2B,uBAM1C;AA6HD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,aAAa,EAAE,EACvB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAsErB;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,aAAa,CAAoC;gBAE7C,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAK7C,OAAO,CAAC,SAAS,EAAE,aAAa,EAAE,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;IAiBlD,iBAAiB,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;CAMtD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArtifactInput, ArtifactInputPath, ArtifactInputUrl } from "@empiricalrun/shared-types";
|
|
1
|
+
import { ArtifactInput, ArtifactInputPath, ArtifactInputUrl } from "@empiricalrun/shared-types/chat-agent";
|
|
2
2
|
import { JSONReport as PlaywrightJSONReport } from "@playwright/test/reporter";
|
|
3
3
|
/**
|
|
4
4
|
* Extracts attachment information from a Playwright JSON report.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/artifacts/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/artifacts/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAGL,UAAU,IAAI,oBAAoB,EACnC,MAAM,2BAA2B,CAAC;AAInC;;;;GAIG;AACH,wBAAgB,0CAA0C,CACxD,MAAM,EAAE,oBAAoB,EAC5B,cAAc,CAAC,EAAE,MAAM,GACtB,KAAK,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,CAsE7C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,aAAa,EAAE,CAmCxE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IDashboardAPIClient } from "@empiricalrun/shared-types";
|
|
1
|
+
import type { IDashboardAPIClient } from "@empiricalrun/shared-types/api/base";
|
|
2
2
|
export declare function listEnvironments({ apiClient, repoPath: repoDir, }: {
|
|
3
3
|
repoPath: string;
|
|
4
4
|
apiClient: IDashboardAPIClient;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../src/bin/environments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"environments.d.ts","sourceRoot":"","sources":["../../src/bin/environments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAkE/E,wBAAsB,gBAAgB,CAAC,EACrC,SAAS,EACT,QAAQ,EAAE,OAAO,GAClB,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,mBAAmB,CAAC;CAChC,iBAiDA"}
|
package/dist/bin/index.js
CHANGED
|
@@ -122,8 +122,8 @@ async function main() {
|
|
|
122
122
|
});
|
|
123
123
|
program
|
|
124
124
|
.command("setup")
|
|
125
|
-
.description("Clone
|
|
126
|
-
.requiredOption("--repo-name <string>", "Name of the repository
|
|
125
|
+
.description("Clone the repository and install dependencies to be able to run tests locally")
|
|
126
|
+
.requiredOption("--repo-name <string>", "Name of the repository")
|
|
127
127
|
.option("--auth-type <type>", 'Use "user-access-token" or "project-api-key"', "user-access-token")
|
|
128
128
|
.action(async (opts) => {
|
|
129
129
|
const apiClient = new client_1.DashboardAPIClient({
|
package/dist/bin/setup.d.ts
CHANGED
package/dist/bin/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/bin/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/bin/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AA2H1E,wBAAsB,QAAQ,CAAC,EAC7B,SAAS,EACT,QAAQ,GACT,EAAE;IACD,SAAS,EAAE,mBAAmB,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;CAClB,iBAqBA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FileContent } from "@empiricalrun/shared-types";
|
|
1
|
+
import type { FileContent } from "@empiricalrun/shared-types/agent-workflow";
|
|
2
2
|
export declare function readFilesInDirectory(dir: string | undefined, filterFunc: (file: string) => boolean): Promise<FileContent[]>;
|
|
3
3
|
export declare function convertFileContentsToString(files?: FileContent[]): string;
|
|
4
4
|
export declare function generatePromptFromDirectory(dir: string | undefined, filterFunc: (file: string) => boolean): Promise<string | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/utils/fs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/utils/fs/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAI7E,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,MAAM,YAAK,EAChB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,0BAgBtC;AAED,wBAAgB,2BAA2B,CAAC,KAAK,GAAE,WAAW,EAAO,UAQpE;AAED,wBAAsB,2BAA2B,CAC/C,GAAG,oBAAK,EACR,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,+BAStC;AAED,wBAAsB,8BAA8B,CAClD,GAAG,EAAE,MAAM,YAAK,EAChB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,+BAgBtC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TraceClient } from "@empiricalrun/llm";
|
|
2
|
-
import type {
|
|
2
|
+
import type { TestCaseWithSuitesAsArray } from "@empiricalrun/shared-types/api/test-cases";
|
|
3
3
|
import { Node, SourceFile } from "ts-morph";
|
|
4
4
|
export declare const getTestModuleAliasFromSourceFile: (sourceFile: SourceFile) => string;
|
|
5
5
|
/**
|
|
@@ -75,7 +75,7 @@ export declare function addUserContextFixture({ scenarioName, filePath, suites,
|
|
|
75
75
|
export declare function appendScopeToCreateTest(filePath: string, scopeVariables: string[]): Promise<void>;
|
|
76
76
|
export declare function isTestPresent({ specPath, testCase, }: {
|
|
77
77
|
specPath: string;
|
|
78
|
-
testCase:
|
|
78
|
+
testCase: TestCaseWithSuitesAsArray;
|
|
79
79
|
}): boolean;
|
|
80
80
|
export declare function buildTestNamePrompt({ testName, suites, }: {
|
|
81
81
|
testName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/bin/utils/platform/web/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/bin/utils/platform/web/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AAM3F,OAAO,EAGL,IAAI,EAEJ,UAAU,EAEX,MAAM,UAAU,CAAC;AAMlB,eAAO,MAAM,gCAAgC,GAC3C,YAAY,UAAU,KACrB,MAgBF,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,YAAY,EACZ,MAAM,EACN,OAAO,GACR,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,GAAG;IACF,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,IAAI,GAAG,SAAS,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;CACnB,CA2CA;AAED,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,MAAM,EACN,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB,WAUA;AAwBD,wBAAsB,0CAA0C,CAC9D,QAAQ,EAAE,MAAM,oBA+BjB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,IAAI,GAAG,SAAS,GACrB,IAAI,GAAG,SAAS,CA4BlB;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAG5E;AAED,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IACpE,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC,CAwBD;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CA8C7D;AAED,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,mCAWjB;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,iBAYhD;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,WAAW,iBAiBrE;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,UAE5E;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,UAcpD;AAED,wBAAsB,iCAAiC,CAAC,QAAQ,EAAE,MAAM,+BAoBvE;AA+CD,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,UAoCtB;AAED,eAAO,MAAM,6BAA6B,GAAI,2CAI3C;IACD,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,WA0DA,CAAC;AAEF,eAAO,MAAM,iCAAiC,GAC5C,SAAS,MAAM,EACf,WAAW,MAAM,EAAE,EACnB,cAAc,MAAM,sBAyBrB,CAAC;AAEF,wBAAsB,qBAAqB,CAAC,EAC1C,YAAY,EACZ,QAAQ,EACR,MAAM,GACP,EAAE;IACD,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,iBAgDA;AAED,wBAAsB,uBAAuB,CAC3C,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EAAE,iBAsBzB;AAED,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,yBAAyB,CAAC;CACrC,WAYA;AAED,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,UAOA;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CA4B5E;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAQnD"}
|
|
@@ -203,7 +203,7 @@ function appendToTestBlock(testBlock, content) {
|
|
|
203
203
|
return updateTestBlock;
|
|
204
204
|
}
|
|
205
205
|
async function runTypescriptCompiler(repoDir) {
|
|
206
|
-
let { code, output } = await (0, test_run_1.spawnCmd)("npx", ["tsc", "--noEmit", "--pretty"], {
|
|
206
|
+
let { code, output } = await (0, test_run_1.spawnCmd)("npx", ["tsc", "--incremental", "--noEmit", "--pretty"], {
|
|
207
207
|
cwd: repoDir,
|
|
208
208
|
envOverrides: {},
|
|
209
209
|
captureOutput: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/utils/scenarios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/utils/scenarios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAIV,aAAa,EAEd,MAAM,2CAA2C,CAAC;AAEnD,UAAU,gBAAgB;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAeD,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,gBAAgB,EACzB,YAAY,CAAC,EAAE;IACb,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,GACA,MAAM,CAqBR;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,gBAAgB,GACxB,aAAa,CAaf;AAED,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,aAAa,CAmBnE"}
|
|
@@ -10,10 +10,6 @@ export declare const VIDEO_ANALYSIS: {
|
|
|
10
10
|
readonly DEFAULT_FPS: 25;
|
|
11
11
|
readonly DEFAULT_THRESHOLD: 0.01;
|
|
12
12
|
readonly DEFAULT_FALLBACK_FPS: 30;
|
|
13
|
-
readonly CLAUDE_MAX_IMAGES_PER_BATCH: 100;
|
|
14
|
-
readonly CLAUDE_MAX_REQUEST_SIZE_MB: 32;
|
|
15
|
-
readonly OPENAI_MAX_IMAGES_PER_BATCH: 500;
|
|
16
|
-
readonly OPENAI_MAX_REQUEST_SIZE_MB: 50;
|
|
17
13
|
readonly DEFAULT_FRAME_SIZE_MB: 0.2;
|
|
18
14
|
readonly BATCH_SIZE_REDUCTION_FACTOR: 0.8;
|
|
19
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAItD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,WAAsB,CAAC;AAE5D,eAAO,MAAM,aAAa,EAAE,QAAmB,CAAC;AAEhD,eAAO,MAAM,wBAAwB,EAAE,eAGtC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,eAGzC,CAAC;AAGF,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE3E,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAItD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,WAAsB,CAAC;AAE5D,eAAO,MAAM,aAAa,EAAE,QAAmB,CAAC;AAEhD,eAAO,MAAM,wBAAwB,EAAE,eAGtC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,eAGzC,CAAC;AAGF,eAAO,MAAM,cAAc;;;;;;;;CAajB,CAAC;AAEX,eAAO,MAAM,eAAe,qBAY3B,CAAC"}
|
package/dist/constants/index.js
CHANGED
|
@@ -25,12 +25,6 @@ exports.VIDEO_ANALYSIS = {
|
|
|
25
25
|
DEFAULT_FPS: 25,
|
|
26
26
|
DEFAULT_THRESHOLD: 0.01,
|
|
27
27
|
DEFAULT_FALLBACK_FPS: 30,
|
|
28
|
-
// Model limits - Claude
|
|
29
|
-
CLAUDE_MAX_IMAGES_PER_BATCH: 100,
|
|
30
|
-
CLAUDE_MAX_REQUEST_SIZE_MB: 32,
|
|
31
|
-
// Model limits - OpenAI
|
|
32
|
-
OPENAI_MAX_IMAGES_PER_BATCH: 500,
|
|
33
|
-
OPENAI_MAX_REQUEST_SIZE_MB: 50,
|
|
34
28
|
// Processing defaults
|
|
35
29
|
DEFAULT_FRAME_SIZE_MB: 0.2,
|
|
36
30
|
BATCH_SIZE_REDUCTION_FACTOR: 0.8,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IDashboardAPIClient, RequestOptions } from "@empiricalrun/shared-types";
|
|
1
|
+
import { IDashboardAPIClient, RequestOptions } from "@empiricalrun/shared-types/api/base";
|
|
2
2
|
export type AuthenticationType = "user-access-token" | "project-api-key" | "admin-totp";
|
|
3
3
|
export declare class DashboardAPIClient implements IDashboardAPIClient {
|
|
4
4
|
private baseUrl;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/dashboard/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACf,MAAM,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/dashboard/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,cAAc,EACf,MAAM,qCAAqC,CAAC;AAa7C,MAAM,MAAM,kBAAkB,GAC1B,mBAAmB,GACnB,iBAAiB,GACjB,YAAY,CAAC;AAEjB,qBAAa,kBAAmB,YAAW,mBAAmB;IAC5D,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,aAAa,CAAC,CAAS;IAC/B,OAAO,CAAC,SAAS,CAAC,CAAS;gBAEf,EACV,QAAQ,EACR,aAAa,EACb,SAAS,EACT,OAAO,GACR,EAAE;QACD,QAAQ,EAAE,kBAAkB,CAAC;QAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB;IAsBK,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC;IAmDjE,eAAe,CAAC,CAAC,EAAE,EACvB,MAAM,EACN,GAAG,EACH,IAAI,GACL,EAAE;QACD,MAAM,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;QACpD,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,GAAG,CAAC;KACZ,GAAG,OAAO,CAAC,CAAC,CAAC;IAYd,UAAU,IAAI,MAAM;IAId,yBAAyB,IAAI,OAAO,CAAC,IAAI,CAAC;YAelC,YAAY;YAmDZ,gBAAgB;CAyC/B;AAED,eAAO,MAAM,SAAS,oBAEpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/dashboard/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RetryableHTTPError = exports.NonRetryableHTTPError = exports.HTTPError = exports.DashboardAPIClient = void 0;
|
|
3
|
+
exports.RetryableHTTPError = exports.NonRetryableHTTPError = exports.HTTPError = exports.sendToolResponse = exports.sendErrorToolResponse = exports.DashboardAPIClient = void 0;
|
|
4
4
|
var client_1 = require("./client");
|
|
5
5
|
Object.defineProperty(exports, "DashboardAPIClient", { enumerable: true, get: function () { return client_1.DashboardAPIClient; } });
|
|
6
|
+
var tool_response_1 = require("./tool-response");
|
|
7
|
+
Object.defineProperty(exports, "sendErrorToolResponse", { enumerable: true, get: function () { return tool_response_1.sendErrorToolResponse; } });
|
|
8
|
+
Object.defineProperty(exports, "sendToolResponse", { enumerable: true, get: function () { return tool_response_1.sendToolResponse; } });
|
|
6
9
|
var types_1 = require("./types");
|
|
7
10
|
Object.defineProperty(exports, "HTTPError", { enumerable: true, get: function () { return types_1.HTTPError; } });
|
|
8
11
|
Object.defineProperty(exports, "NonRetryableHTTPError", { enumerable: true, get: function () { return types_1.NonRetryableHTTPError; } });
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IDashboardAPIClient } from "@empiricalrun/shared-types/api/base";
|
|
2
|
+
import type { Logger, MessageCheckpoint, PendingToolCall, ToolResult } from "@empiricalrun/shared-types/chat-agent";
|
|
3
|
+
export declare function sendToolResponse(apiClient: IDashboardAPIClient, chatSessionId: number | undefined, requestId: string, toolCalls: PendingToolCall[], toolResults: ToolResult[], checkpoint: MessageCheckpoint | null, logger: Logger, machineId?: string): Promise<boolean>;
|
|
4
|
+
export declare function sendErrorToolResponse(apiClient: IDashboardAPIClient, chatSessionId: number | undefined, requestId: string, toolCalls: PendingToolCall[], errorMessage: string, logger: Logger, machineId?: string): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=tool-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-response.d.ts","sourceRoot":"","sources":["../../src/dashboard/tool-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EACV,MAAM,EACN,iBAAiB,EACjB,eAAe,EACf,UAAU,EACX,MAAM,uCAAuC,CAAC;AAQ/C,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,mBAAmB,EAC9B,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,eAAe,EAAE,EAC5B,WAAW,EAAE,UAAU,EAAE,EACzB,UAAU,EAAE,iBAAiB,GAAG,IAAI,EACpC,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC,CAoClB;AAED,wBAAsB,qBAAqB,CACzC,SAAS,EAAE,mBAAmB,EAC9B,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,eAAe,EAAE,EAC5B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.sendToolResponse = sendToolResponse;
|
|
7
|
+
exports.sendErrorToolResponse = sendErrorToolResponse;
|
|
8
|
+
const os_1 = __importDefault(require("os"));
|
|
9
|
+
const types_1 = require("./types");
|
|
10
|
+
function getDefaultMachineId() {
|
|
11
|
+
return os_1.default.hostname();
|
|
12
|
+
}
|
|
13
|
+
async function sendToolResponse(apiClient, chatSessionId, requestId, toolCalls, toolResults, checkpoint, logger, machineId) {
|
|
14
|
+
const resolvedMachineId = machineId ?? getDefaultMachineId();
|
|
15
|
+
try {
|
|
16
|
+
if (chatSessionId) {
|
|
17
|
+
await sendToolResponseForChatSession(apiClient, chatSessionId, toolCalls, toolResults, checkpoint, resolvedMachineId, logger);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
await sendToolResponseForAdhocToolCall(apiClient, requestId, toolCalls, toolResults, resolvedMachineId, logger);
|
|
21
|
+
}
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
// Check if it's a 409 Conflict (tool calls were rejected by user)
|
|
26
|
+
if (error instanceof types_1.NonRetryableHTTPError && error.status === 409) {
|
|
27
|
+
logger.info("Tool calls were rejected by user (409 Conflict), skipping git push");
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
// For other errors, re-throw
|
|
31
|
+
logger.error("Failed to send tool response", error);
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
async function sendErrorToolResponse(apiClient, chatSessionId, requestId, toolCalls, errorMessage, logger, machineId) {
|
|
36
|
+
const resolvedMachineId = machineId ?? getDefaultMachineId();
|
|
37
|
+
const toolResults = toolCalls.map(() => ({
|
|
38
|
+
isError: true,
|
|
39
|
+
result: errorMessage,
|
|
40
|
+
}));
|
|
41
|
+
if (chatSessionId) {
|
|
42
|
+
return sendToolResponseForChatSession(apiClient, chatSessionId, toolCalls, toolResults, null, resolvedMachineId, logger);
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return sendToolResponseForAdhocToolCall(apiClient, requestId, toolCalls, toolResults, resolvedMachineId, logger);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
async function sendToolResponseForChatSession(apiClient, chatSessionId, toolCalls, toolResults, checkpoint, machineId, logger) {
|
|
49
|
+
const url = `/api/chat-sessions/${chatSessionId}/tool-response`;
|
|
50
|
+
try {
|
|
51
|
+
await apiClient.request(url, {
|
|
52
|
+
method: "POST",
|
|
53
|
+
body: {
|
|
54
|
+
toolResults,
|
|
55
|
+
toolCalls,
|
|
56
|
+
checkpoint,
|
|
57
|
+
machineId,
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
logger.error("Failed to send tool response for chat session", {
|
|
63
|
+
chatSessionId,
|
|
64
|
+
error,
|
|
65
|
+
});
|
|
66
|
+
throw error;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
async function sendToolResponseForAdhocToolCall(apiClient, requestId, toolCalls, toolResults, machineId, logger) {
|
|
70
|
+
const url = `/api/tool-calls/${requestId}/response`;
|
|
71
|
+
try {
|
|
72
|
+
await apiClient.request(url, {
|
|
73
|
+
method: "POST",
|
|
74
|
+
body: {
|
|
75
|
+
tool_results: toolResults,
|
|
76
|
+
tool_calls: toolCalls,
|
|
77
|
+
machine_id: machineId,
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
catch (error) {
|
|
82
|
+
logger.error("Failed to send tool response for adhoc tool call", {
|
|
83
|
+
requestId,
|
|
84
|
+
error,
|
|
85
|
+
});
|
|
86
|
+
throw error;
|
|
87
|
+
}
|
|
88
|
+
}
|
package/dist/dashboard/totp.js
CHANGED
package/dist/file/server.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/file/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/file/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,uCAAuC,CAAC;AAK9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AASlD,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB,CAAC;AAEF,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,QAAQ,CAAc;IAC9B,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,MAAM,CAA4C;IAC1D,OAAO,CAAC,UAAU,CAAkB;IACpC,OAAO,CAAC,UAAU,CAAC,CAAa;IAEhC,OAAO,CAAC,MAAM,CAAiC;IAC/C,OAAO,CAAC,KAAK,CAAoB;IAEjC,OAAO,CAAC,cAAc,CAAqB;gBAE/B,EACV,IAAI,EACJ,OAAO,EACP,UAAU,EACV,UAAU,GACX,EAAE;QACD,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;KACzB;IAOD,iBAAiB;;;;IAIjB,iBAAiB;IAIjB,WAAW,CAAC,QAAQ,EAAE,MAAM;IAItB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC;IAsHnC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAgB5B"}
|
package/dist/file/server.js
CHANGED
|
@@ -94,13 +94,14 @@ class FileServiceServer {
|
|
|
94
94
|
`;
|
|
95
95
|
res.send(html);
|
|
96
96
|
});
|
|
97
|
-
app.post("/codegen-sources", async (req) => {
|
|
97
|
+
app.post("/codegen-sources", async (req, res) => {
|
|
98
98
|
const payload = req.body;
|
|
99
99
|
this.codegenSources = payload.map((c) => c.actions.join("\n")).join("\n");
|
|
100
100
|
// console.log(
|
|
101
101
|
// "[FileServiceServer] Received codegen sources",
|
|
102
102
|
// this.codegenSources,
|
|
103
103
|
// );
|
|
104
|
+
res.send({ success: true });
|
|
104
105
|
});
|
|
105
106
|
app.post("/agent-results", async (req, res) => {
|
|
106
107
|
const { generatedCode, importPaths, result, usage } = req.body;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToolResult } from "@empiricalrun/shared-types";
|
|
1
|
+
import { ToolResult } from "@empiricalrun/shared-types/chat-agent";
|
|
2
2
|
import { type StrReplaceInputParams } from "../../../tools/file-operations/shared/helpers";
|
|
3
3
|
export { getFileInfoFromFS } from "./reader";
|
|
4
4
|
export declare function viewFileUsingFileSystem({ input, filePath, absoluteFilePath, }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/file-info/adapters/file-system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/file-info/adapters/file-system/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAEnE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,+CAA+C,CAAC;AAGvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,wBAAsB,uBAAuB,CAAC,EAC5C,KAAK,EACL,QAAQ,EACR,gBAAgB,GACjB,EAAE;IACD,KAAK,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,GAAG,OAAO,CAAC,UAAU,CAAC,CAmBtB"}
|