@copado/agentia-cli 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +69 -0
- package/README.md +3290 -2095
- package/dist/commands/ai/agent/ask.js +4 -4
- package/dist/commands/ai/agent/chat.js +4 -4
- package/dist/commands/auth/get.js +21 -1
- package/dist/commands/auth/set.js +13 -0
- package/dist/commands/auth/unset.js +37 -0
- package/dist/commands/cicd/cloud/commit.js +2 -2
- package/dist/commands/cicd/cloud/promote.js +19 -5
- package/dist/commands/cicd/credential/auth/status.js +38 -0
- package/dist/commands/cicd/credential/auth/web/login.js +54 -0
- package/dist/commands/cicd/credential/create.js +2 -2
- package/dist/commands/cicd/credential/list.js +15 -19
- package/dist/commands/cicd/credential/open.js +30 -0
- package/dist/commands/cicd/credential/update.js +11 -14
- package/dist/commands/cicd/data/commit/create.js +2 -2
- package/dist/commands/cicd/data/commit/list.js +2 -2
- package/dist/commands/cicd/data/dataset-file/content.js +2 -2
- package/dist/commands/cicd/data/dataset-file/list.js +2 -2
- package/dist/commands/cicd/data/filter/add.js +2 -2
- package/dist/commands/cicd/data/filter/delete.js +2 -2
- package/dist/commands/cicd/data/filter/list.js +2 -2
- package/dist/commands/cicd/data/filter/update.js +2 -2
- package/dist/commands/cicd/data/formula/create.js +2 -2
- package/dist/commands/cicd/data/formula/list.js +2 -2
- package/dist/commands/cicd/data/formula/update.js +2 -2
- package/dist/commands/cicd/data/records/match.js +2 -2
- package/dist/commands/cicd/data/records/search.js +2 -2
- package/dist/commands/cicd/data/sobject/fields.js +2 -2
- package/dist/commands/cicd/data/sobject/relationships.js +2 -2
- package/dist/commands/cicd/data/sync/apply.js +2 -2
- package/dist/commands/cicd/data/sync/preview-updates.js +2 -2
- package/dist/commands/cicd/data/template/convert-old.js +2 -2
- package/dist/commands/cicd/data/template/create.js +2 -2
- package/dist/commands/cicd/data/template/delete.js +2 -2
- package/dist/commands/cicd/data/template/get-detail.js +2 -2
- package/dist/commands/cicd/data/template/get.js +2 -2
- package/dist/commands/cicd/data/template/list.js +2 -2
- package/dist/commands/cicd/data/template/open.js +2 -2
- package/dist/commands/cicd/data/template/save-detail.js +2 -2
- package/dist/commands/cicd/environment/auth/status.js +36 -15
- package/dist/commands/cicd/environment/auth/web/login.js +22 -6
- package/dist/commands/cicd/environment/create.js +2 -2
- package/dist/commands/cicd/environment/get.js +2 -2
- package/dist/commands/cicd/environment/list.js +2 -2
- package/dist/commands/cicd/environment/open.js +8 -24
- package/dist/commands/cicd/environment/update.js +2 -2
- package/dist/commands/cicd/extension/create.js +2 -2
- package/dist/commands/cicd/extension/install.js +2 -2
- package/dist/commands/cicd/extension/package.js +2 -2
- package/dist/commands/cicd/extension/publish.js +2 -2
- package/dist/commands/cicd/extension/uninstall.js +2 -2
- package/dist/commands/cicd/extension/validate.js +2 -2
- package/dist/commands/cicd/extension-configuration/get.js +24 -0
- package/dist/commands/cicd/extension-configuration/list.js +49 -0
- package/dist/commands/cicd/extension-configuration/open.js +38 -0
- package/dist/commands/cicd/function/defaults.js +2 -2
- package/dist/commands/cicd/function/delete.js +2 -2
- package/dist/commands/cicd/function/get.js +2 -2
- package/dist/commands/cicd/function/list.js +2 -2
- package/dist/commands/cicd/function/open.js +2 -2
- package/dist/commands/cicd/function/result/get.js +2 -2
- package/dist/commands/cicd/function/result/log/get.js +2 -2
- package/dist/commands/cicd/function/run-local.js +2 -2
- package/dist/commands/cicd/function/run.js +2 -2
- package/dist/commands/cicd/function/upsert.js +2 -2
- package/dist/commands/cicd/health-check.js +2 -2
- package/dist/commands/cicd/job/get.js +2 -2
- package/dist/commands/cicd/job/kill.js +2 -2
- package/dist/commands/cicd/job/list.js +2 -2
- package/dist/commands/cicd/job/log/get.js +2 -2
- package/dist/commands/cicd/job/open.js +2 -2
- package/dist/commands/cicd/job/pause.js +2 -2
- package/dist/commands/cicd/job/result-file/get.js +2 -2
- package/dist/commands/cicd/job/result-file/list.js +2 -2
- package/dist/commands/cicd/job/resume.js +2 -2
- package/dist/commands/cicd/job/run.js +2 -2
- package/dist/commands/cicd/metadata/content/compare.js +2 -2
- package/dist/commands/cicd/metadata/content/get.js +3 -3
- package/dist/commands/cicd/metadata/dependency/list.js +45 -22
- package/dist/commands/cicd/metadata/explore.js +81 -0
- package/dist/commands/cicd/metadata/index/compare.js +2 -2
- package/dist/commands/cicd/metadata/list.js +5 -5
- package/dist/commands/cicd/metadata/refresh/deleted.js +3 -3
- package/dist/commands/cicd/metadata/refresh/run.js +4 -4
- package/dist/commands/cicd/metadata/refresh/status.js +4 -4
- package/dist/commands/cicd/notification/configure.js +2 -2
- package/dist/commands/cicd/notification/get.js +2 -2
- package/dist/commands/cicd/pipeline/automation/activate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/create.js +33 -0
- package/dist/commands/cicd/pipeline/automation/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/automation/delete.js +45 -0
- package/dist/commands/cicd/pipeline/automation/get.js +32 -0
- package/dist/commands/cicd/pipeline/automation/list.js +38 -0
- package/dist/commands/cicd/pipeline/automation/open.js +38 -0
- package/dist/commands/cicd/pipeline/automation/update.js +38 -0
- package/dist/commands/cicd/pipeline/connection/create.js +2 -2
- package/dist/commands/cicd/pipeline/connection/delete.js +2 -2
- package/dist/commands/cicd/pipeline/connection/list.js +2 -2
- package/dist/commands/cicd/pipeline/connection/open.js +2 -2
- package/dist/commands/cicd/pipeline/connection/update.js +2 -2
- package/dist/commands/cicd/pipeline/create.js +2 -2
- package/dist/commands/cicd/pipeline/get.js +2 -2
- package/dist/commands/cicd/pipeline/list.js +2 -2
- package/dist/commands/cicd/pipeline/open.js +2 -2
- package/dist/commands/cicd/pipeline/quality-gate/activate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/create.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +39 -0
- package/dist/commands/cicd/pipeline/quality-gate/delete.js +45 -0
- package/dist/commands/cicd/pipeline/quality-gate/get.js +32 -0
- package/dist/commands/cicd/pipeline/quality-gate/list.js +34 -0
- package/dist/commands/cicd/pipeline/quality-gate/open.js +38 -0
- package/dist/commands/cicd/pipeline/quality-gate/update.js +38 -0
- package/dist/commands/cicd/pipeline/stage-connection/create.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/delete.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/list.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/open.js +2 -2
- package/dist/commands/cicd/pipeline/stage-connection/update.js +2 -2
- package/dist/commands/cicd/pipeline/update.js +2 -2
- package/dist/commands/cicd/project/create.js +2 -2
- package/dist/commands/cicd/project/default/get.js +2 -2
- package/dist/commands/cicd/project/default/set.js +2 -2
- package/dist/commands/cicd/project/default/unset.js +2 -2
- package/dist/commands/cicd/project/delete.js +2 -2
- package/dist/commands/cicd/project/get.js +2 -2
- package/dist/commands/cicd/project/list.js +2 -2
- package/dist/commands/cicd/project/open.js +2 -2
- package/dist/commands/cicd/project/update.js +2 -2
- package/dist/commands/cicd/promotion/conflict/get.js +2 -2
- package/dist/commands/cicd/promotion/conflict/list.js +2 -2
- package/dist/commands/cicd/promotion/conflict/resolve.js +2 -2
- package/dist/commands/cicd/promotion/conflict/unresolve.js +2 -2
- package/dist/commands/cicd/promotion/get.js +2 -2
- package/dist/commands/cicd/promotion/job-step/update.js +2 -2
- package/dist/commands/cicd/promotion/list.js +2 -2
- package/dist/commands/cicd/promotion/open.js +2 -2
- package/dist/commands/cicd/promotion/queue/list.js +28 -0
- package/dist/commands/cicd/promotion/queue/remove.js +37 -0
- package/dist/commands/cicd/promotion/run.js +2 -2
- package/dist/commands/cicd/repository/auth/https/configure.js +2 -2
- package/dist/commands/cicd/repository/auth/oauth/login.js +2 -2
- package/dist/commands/cicd/repository/auth/setup.js +2 -2
- package/dist/commands/cicd/repository/auth/ssh/configure.js +2 -2
- package/dist/commands/cicd/repository/create.js +2 -2
- package/dist/commands/cicd/repository/delete.js +2 -2
- package/dist/commands/cicd/repository/get.js +2 -2
- package/dist/commands/cicd/repository/list.js +2 -2
- package/dist/commands/cicd/repository/open.js +2 -2
- package/dist/commands/cicd/repository/reset.js +2 -2
- package/dist/commands/cicd/repository/update.js +2 -2
- package/dist/commands/cicd/repository/validate.js +2 -2
- package/dist/commands/cicd/stage/create.js +2 -2
- package/dist/commands/cicd/stage/delete.js +2 -2
- package/dist/commands/cicd/stage/get.js +2 -2
- package/dist/commands/cicd/stage/list.js +2 -2
- package/dist/commands/cicd/stage/open.js +2 -2
- package/dist/commands/cicd/stage/update.js +2 -2
- package/dist/commands/cicd/template/defaults.js +2 -2
- package/dist/commands/cicd/template/delete.js +2 -2
- package/dist/commands/cicd/template/get.js +2 -2
- package/dist/commands/cicd/template/list.js +2 -2
- package/dist/commands/cicd/template/upsert.js +2 -2
- package/dist/commands/cicd/user/get.js +2 -2
- package/dist/commands/cicd/work/ahead-behind.js +2 -2
- package/dist/commands/cicd/work/create.js +3 -2
- package/dist/commands/cicd/work/delete.js +2 -2
- package/dist/commands/cicd/work/deployment-step/create.js +2 -2
- package/dist/commands/cicd/work/deployment-step/delete.js +2 -2
- package/dist/commands/cicd/work/deployment-step/list.js +2 -2
- package/dist/commands/cicd/work/deployment-step/reorder.js +2 -2
- package/dist/commands/cicd/work/deployment-step/salesforce-flows.js +2 -2
- package/dist/commands/cicd/work/deployment-step/types.js +2 -2
- package/dist/commands/cicd/work/deployment-step/update.js +2 -2
- package/dist/commands/cicd/work/done.js +2 -2
- package/dist/commands/cicd/work/environment-sync.js +10 -9
- package/dist/commands/cicd/work/get.js +2 -2
- package/dist/commands/cicd/work/list.js +2 -2
- package/dist/commands/cicd/work/open.js +2 -2
- package/dist/commands/cicd/work/promote.js +2 -2
- package/dist/commands/cicd/work/publish.js +2 -2
- package/dist/commands/cicd/work/push.js +2 -2
- package/dist/commands/cicd/work/set.js +8 -6
- package/dist/commands/cicd/work/status.js +2 -2
- package/dist/commands/cicd/work/submit.js +5 -4
- package/dist/commands/cicd/work/test/apex.js +2 -2
- package/dist/commands/cicd/work/test.js +2 -2
- package/dist/commands/cicd/work/update.js +3 -2
- package/dist/commands/help-agent.js +15 -0
- package/dist/commands/help.js +38 -0
- package/dist/commands/history/clear.js +42 -0
- package/dist/commands/history/list.js +50 -0
- package/dist/commands/plugins/install.js +2 -5
- package/dist/commands/setup/skills/create.js +28 -2
- package/dist/commands/setup/skills/list.js +55 -0
- package/dist/commands/setup/skills/update.js +36 -3
- package/dist/commands/setup.js +3 -3
- package/dist/commands/support.js +15 -0
- package/dist/commands/testing/browser/execute.js +49 -0
- package/dist/commands/testing/browser/history.js +49 -0
- package/dist/commands/testing/browser/inspect.js +35 -0
- package/dist/commands/testing/browser/recorder.js +52 -0
- package/dist/commands/testing/browser/reports.js +33 -0
- package/dist/commands/testing/browser/screenshot.js +27 -0
- package/dist/commands/testing/browser/set-options.js +35 -0
- package/dist/commands/testing/browser/start.js +51 -0
- package/dist/commands/testing/browser/status.js +26 -0
- package/dist/commands/testing/browser/stop.js +34 -0
- package/dist/commands/testing/browser/view.js +35 -0
- package/dist/commands/testing/data-table/create.js +1 -2
- package/dist/commands/testing/data-table/delete.js +1 -2
- package/dist/commands/testing/data-table/export.js +2 -6
- package/dist/commands/testing/data-table/get.js +2 -4
- package/dist/commands/testing/data-table/list.js +1 -2
- package/dist/commands/testing/data-table/update.js +3 -4
- package/dist/commands/testing/job/create.js +26 -22
- package/dist/commands/testing/job/delete.js +2 -2
- package/dist/commands/testing/job/files/download.js +73 -0
- package/dist/commands/testing/job/files/list.js +43 -0
- package/dist/commands/testing/job/{upload.js → files/upload.js} +13 -9
- package/dist/commands/testing/job/get.js +2 -2
- package/dist/commands/testing/job/list.js +1 -1
- package/dist/commands/testing/job/refs.js +4 -4
- package/dist/commands/testing/job/run.js +134 -1
- package/dist/commands/testing/{build → job/runs}/abort.js +10 -8
- package/dist/commands/testing/job/runs/get.js +42 -0
- package/dist/commands/testing/{build → job/runs}/list.js +19 -10
- package/dist/commands/testing/{logs.js → job/runs/logs.js} +9 -6
- package/dist/commands/testing/{build → job/runs}/search.js +9 -7
- package/dist/commands/testing/job/schedule/get.js +5 -11
- package/dist/commands/testing/job/schedule/remove.js +3 -3
- package/dist/commands/testing/job/schedule/set.js +3 -3
- package/dist/commands/testing/job/update.js +22 -65
- package/dist/commands/testing/project/create.js +1 -17
- package/dist/commands/testing/project/get.js +0 -1
- package/dist/commands/testing/project/list.js +2 -2
- package/dist/commands/testing/project/permission/set.js +3 -7
- package/dist/commands/testing/project/permission/update.js +2 -2
- package/dist/commands/testing/robot/create.js +22 -25
- package/dist/commands/testing/robot/get.js +1 -1
- package/dist/commands/testing/robot/list.js +3 -3
- package/dist/commands/testing/robot/update.js +3 -3
- package/dist/commands/testing/user-parameter/create.js +3 -9
- package/dist/commands/testing/user-parameter/update.js +1 -7
- package/dist/commands/testing/variable/create.js +4 -9
- package/dist/commands/testing/variable/list.js +3 -3
- package/dist/commands/testing/variable/update.js +5 -12
- package/dist/help.js +17 -0
- package/dist/hooks/init/cicd-connection.js +59 -0
- package/dist/lib/agentia-command.js +69 -6
- package/dist/lib/ai-types.js +2 -1
- package/dist/lib/cicd-command.js +3 -0
- package/dist/lib/cicd-connection.js +22 -0
- package/dist/lib/cicd-gateway.js +2 -1
- package/dist/lib/claude-mcp-config.js +15 -0
- package/dist/lib/command-history-sanitization.js +9 -0
- package/dist/lib/command-history.js +11 -0
- package/dist/lib/command-output-buffer.js +6 -1
- package/dist/lib/credential-sync.js +1 -2
- package/dist/lib/defaults-store.js +6 -1
- package/dist/lib/dependency-from-changes.js +3 -1
- package/dist/lib/dependency-source-context.js +3 -0
- package/dist/lib/environment-auth-status.js +2 -1
- package/dist/lib/environment-auth.js +2 -1
- package/dist/lib/environment-credential-flags.js +3 -1
- package/dist/lib/environment-credential-operations.js +8 -2
- package/dist/lib/environment-types.js +3 -1
- package/dist/lib/extension-configuration-ops.js +4 -0
- package/dist/lib/extension-configuration-sanitize.js +7 -0
- package/dist/lib/extension-configuration-types.js +8 -0
- package/dist/lib/help-agent-command.js +3 -0
- package/dist/lib/help-agent-interaction-history.js +10 -0
- package/dist/lib/help-agent-session.js +3 -0
- package/dist/lib/http-proxy.js +13 -0
- package/dist/lib/mcp/ai-tools.js +3 -3
- package/dist/lib/mcp/command-id.js +2 -0
- package/dist/lib/mcp/pipeline-automation-quality-tools.js +452 -0
- package/dist/lib/mcp/result.js +41 -3
- package/dist/lib/mcp/server.js +73 -3
- package/dist/lib/mcp/testing-browser-tools.js +194 -0
- package/dist/lib/mcp/testing-tools.js +242 -552
- package/dist/lib/mcp/tool-annotations.js +59 -30
- package/dist/lib/mcp/tools.js +202 -66
- package/dist/lib/mcp/work-tools.js +18 -4
- package/dist/lib/metadata-explore.js +8 -0
- package/dist/lib/network-error.js +8 -0
- package/dist/lib/pipeline-automation-flags.js +12 -0
- package/dist/lib/pipeline-automation-ops.js +9 -0
- package/dist/lib/pipeline-automation-types.js +18 -0
- package/dist/lib/pipeline-lifecycle-id.js +3 -0
- package/dist/lib/pipeline-quality-gate-flags.js +12 -0
- package/dist/lib/pipeline-quality-gate-ops.js +9 -0
- package/dist/lib/pipeline-quality-gate-types.js +17 -0
- package/dist/lib/plugin-host/ai.js +2 -1
- package/dist/lib/plugin-skills.js +22 -0
- package/dist/lib/plugin-trust/gate.js +1 -2
- package/dist/lib/project-root.js +3 -1
- package/dist/lib/promotion-queue.js +5 -0
- package/dist/lib/promotion-run.js +2 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/salesforce-tooling-check.js +6 -0
- package/dist/lib/skill-packs.js +7 -0
- package/dist/lib/support-ai-context.js +11 -0
- package/dist/lib/support-ai-stream-parser.js +4 -0
- package/dist/lib/support-ai.js +9 -0
- package/dist/lib/testing-archive.js +9 -0
- package/dist/lib/testing-browser-command.js +6 -0
- package/dist/lib/testing-browser-operations.js +17 -0
- package/dist/lib/testing-browser-requests.js +11 -0
- package/dist/lib/testing-browser-robot.js +9 -0
- package/dist/lib/testing-browser-session.js +14 -0
- package/dist/lib/testing-browser-state.js +17 -0
- package/dist/lib/testing-browser-stream.js +7 -0
- package/dist/lib/testing-browser-types.js +3 -0
- package/dist/lib/testing-browser-viewer-key.js +7 -0
- package/dist/lib/testing-data-table.js +39 -0
- package/dist/lib/testing-execution.js +22 -0
- package/dist/lib/testing-flags.js +6 -2
- package/dist/lib/testing-gateway.js +5 -1
- package/dist/lib/testing-operations.js +9 -4
- package/dist/lib/testing-sanitization.js +3 -1
- package/dist/lib/testing-secret-input.js +2 -1
- package/dist/lib/testing-types.js +24 -3
- package/dist/lib/work-environment-sync.js +3 -1
- package/dist/lib/work-flags.js +6 -1
- package/dist/lib/work-local-development-flow.js +4 -0
- package/dist/lib/work-promote.js +2 -1
- package/dist/lib/work-submit-wait.js +3 -1
- package/oclif.manifest.json +8841 -7469
- package/package.json +45 -5
- package/templates/skills/agentia-ai/SKILL.md +9 -6
- package/templates/skills/agentia-ai/references/ai-agents.md +21 -3
- package/templates/skills/agentia-cicd/SKILL.md +8 -5
- package/templates/skills/agentia-cicd/references/environments-and-credentials.md +35 -13
- package/templates/skills/agentia-cicd/references/extensions.md +3 -0
- package/templates/skills/agentia-cicd/references/pipelines.md +36 -2
- package/templates/skills/agentia-cicd/references/promotions.md +10 -1
- package/templates/skills/agentia-cicd/references/work.md +20 -5
- package/templates/skills/agentia-metadata/SKILL.md +146 -0
- package/templates/skills/agentia-metadata/references/metadata-dependency.md +70 -0
- package/templates/skills/agentia-metadata/references/metadata-explore.md +146 -0
- package/templates/skills/agentia-testing/SKILL.md +12 -7
- package/templates/skills/agentia-testing/references/browser-testing.md +93 -0
- package/templates/skills/agentia-testing/references/flow-automation.md +112 -0
- package/templates/skills/agentia-testing/references/qforce.md +88 -0
- package/templates/skills/agentia-testing/references/qweb.md +103 -0
- package/templates/skills/agentia-testing/references/tests.md +31 -23
- package/dist/commands/testing/build/get.js +0 -38
- package/dist/commands/testing/build/latest.js +0 -40
- package/dist/commands/testing/build/logs.js +0 -47
- package/dist/commands/testing/build/run.js +0 -26
- package/dist/commands/testing/create.js +0 -2
- package/dist/commands/testing/job/download.js +0 -54
- package/dist/commands/testing/job/files.js +0 -34
- package/dist/commands/testing/live/continue.js +0 -21
- package/dist/commands/testing/live/execute.js +0 -43
- package/dist/commands/testing/live/history.js +0 -35
- package/dist/commands/testing/live/inspect.js +0 -30
- package/dist/commands/testing/live/interrupt.js +0 -21
- package/dist/commands/testing/live/recorder.js +0 -134
- package/dist/commands/testing/live/reports.js +0 -31
- package/dist/commands/testing/live/screenshot.js +0 -25
- package/dist/commands/testing/live/set-options.js +0 -28
- package/dist/commands/testing/live/start.js +0 -53
- package/dist/commands/testing/live/status.js +0 -27
- package/dist/commands/testing/live/stop.js +0 -38
- package/dist/commands/testing/live/view.js +0 -36
- package/dist/commands/testing/run.js +0 -26
- package/dist/commands/testing/status.js +0 -45
- package/dist/commands/testing/test/create.js +0 -2
- package/dist/commands/testing/test/logs.js +0 -2
- package/dist/commands/testing/test/run.js +0 -26
- package/dist/commands/testing/test/status.js +0 -2
- package/dist/commands/testing/test/update.js +0 -2
- package/dist/commands/testing/update.js +0 -65
- package/dist/lib/mcp/testing-live-tools.js +0 -215
- package/dist/lib/testing-data-command.js +0 -8
- package/dist/lib/testing-data-core.js +0 -20
- package/dist/lib/testing-data-export.js +0 -6
- package/dist/lib/testing-data-import.js +0 -6
- package/dist/lib/testing-data-io.js +0 -12
- package/dist/lib/testing-data-operations.js +0 -10
- package/dist/lib/testing-data-types.js +0 -4
- package/dist/lib/testing-live-command.js +0 -6
- package/dist/lib/testing-live-endpoints.js +0 -6
- package/dist/lib/testing-live-history.js +0 -7
- package/dist/lib/testing-live-operations.js +0 -19
- package/dist/lib/testing-live-recorder.js +0 -9
- package/dist/lib/testing-live-robot.js +0 -9
- package/dist/lib/testing-live-state.js +0 -5
- package/dist/lib/testing-live-types.js +0 -3
- package/dist/lib/testing-run-command.js +0 -3
- package/dist/lib/testing-schedule.js +0 -5
- package/dist/lib/testing-session.js +0 -5
- package/dist/lib/testing-watch.js +0 -4
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/* eslint-disable unicorn/text-encoding-identifier-case -- CRT file APIs require the literal utf-8 enum. */
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { createTestingDataTable, deleteTestingDataTable, getTestingDataTable, listTestingDataTables, TESTING_DATA_MAX_CELL_BYTES, TESTING_DATA_MAX_COLUMNS, TESTING_DATA_MAX_ROWS, updateTestingDataTable, } from '../testing-data-table.js';
|
|
4
|
+
import { abortTestingBuild, countTestingBuilds, executeTestingBuildRun, getTestingBuild, getTestingBuildLogs, listTestingBuilds, searchTestingBuilds, } from '../testing-execution.js';
|
|
5
|
+
import { buildTestingRunOptions } from '../testing-flags.js';
|
|
6
|
+
import { createTestingJob, createTestingProject, createTestingRobot, createTestingUserParameter, createTestingVariable, deleteTestingJob, deleteTestingProject, deleteTestingRobot, deleteTestingUserParameter, deleteTestingVariable, downloadTestingJobFiles, getTestingJob, getTestingJobRefs, getTestingJobScheduleStatus, getTestingProject, getTestingProjectPermission, getTestingRobot, getTestingUserParameter, getTestingVariable, listTestingJobFiles, listTestingJobs, listTestingProjectPermissions, listTestingProjects, listTestingRobots, listTestingUserParameters, listTestingVariables, removeTestingJobSchedule, setTestingJobSchedule, setTestingProjectPermission, updateTestingJob, updateTestingProject, updateTestingRobot, updateTestingUserParameter, updateTestingVariable, uploadTestingJobFiles, } from '../testing-operations.js';
|
|
6
7
|
import { sanitizeTestingOutput } from '../testing-sanitization.js';
|
|
7
|
-
import {
|
|
8
|
-
import { normalizeTestingId, TESTING_BUILD_STATUSES, TESTING_CONSOLE_COLORS, TESTING_JOB_PARALLEL_MODES, TESTING_JOB_SUITE_TYPES, TESTING_PROJECT_EXECUTORS, TESTING_PROJECT_TYPES, TESTING_RECORD_BUILD_OPTIONS, TESTING_ROBOT_REPORTING, TESTING_ROBOT_RUN_ENVIRONMENTS, TESTING_ROBOT_TYPES, TESTING_RUN_TYPES, TESTING_VARIABLE_TYPES, } from '../testing-types.js';
|
|
8
|
+
import { TESTING_BUILD_STATUSES, TESTING_CONSOLE_COLORS, TESTING_JOB_PARALLEL_MODES, TESTING_JOB_SUITE_TYPES, TESTING_RECORD_BUILD_OPTIONS, TESTING_ROBOT_ACCEPTED_RUN_ENVIRONMENTS, TESTING_ROBOT_REPORTING, TESTING_ROBOT_REPORTING_DESCRIPTION, TESTING_ROBOT_RUN_ENVIRONMENT_DESCRIPTION, TESTING_ROBOT_TYPE_DESCRIPTION, TESTING_ROBOT_TYPES, TESTING_RUN_TYPES, TESTING_VARIABLE_TYPES, } from '../testing-types.js';
|
|
9
9
|
import { safelyHandleTool } from './result.js';
|
|
10
|
-
import { registerTestingLiveMcpTools,
|
|
10
|
+
import { registerTestingLiveMcpTools, testingBrowserMcpHandlers } from './testing-browser-tools.js';
|
|
11
|
+
const projectIdSchema = z.number().int().positive().describe('CRT project ID.');
|
|
12
|
+
const jobIdSchema = z.number().int().positive().describe('CRT job ID.');
|
|
13
|
+
const optionalJobIdSchema = z.number().int().positive().optional().describe('CRT job ID.');
|
|
11
14
|
const gitStorageSchema = {
|
|
12
15
|
gitBranch: z.string().optional().describe('Git branch to use for a Git-backed CRT job.'),
|
|
13
16
|
gitDomainCredential: z.string().optional().describe('CRT domain credential ID for Git repository access.'),
|
|
@@ -17,50 +20,14 @@ const gitStorageSchema = {
|
|
|
17
20
|
gitUseCallerCredentials: z.boolean().optional().describe('Use caller credentials for Git repository access.'),
|
|
18
21
|
gitUsername: z.string().optional().describe('Git username for repository access. Prefer domain credentials.'),
|
|
19
22
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
function runOptions(args) {
|
|
29
|
-
if (args.branch !== undefined && args.tag !== undefined) {
|
|
30
|
-
throw new Error('Use either branch or tag, not both.');
|
|
31
|
-
}
|
|
32
|
-
if (args.rerunFailed !== undefined && args.rerunFailedFromLatest === true) {
|
|
33
|
-
throw new Error('Use either rerunFailed or rerunFailedFromLatest, not both.');
|
|
34
|
-
}
|
|
35
|
-
return {
|
|
36
|
-
branch: args.branch,
|
|
37
|
-
consoleColors: args.consoleColors,
|
|
38
|
-
consoleWidth: args.consoleWidth,
|
|
39
|
-
dataTables: args.datatable,
|
|
40
|
-
doc: args.doc,
|
|
41
|
-
dryRun: args.dryRun,
|
|
42
|
-
exclude: args.exclude,
|
|
43
|
-
exitOnError: args.exitOnError,
|
|
44
|
-
exitOnFailure: args.exitOnFailure,
|
|
45
|
-
include: args.include,
|
|
46
|
-
jobId: args.job,
|
|
47
|
-
metadata: args.metadata,
|
|
48
|
-
name: args.name,
|
|
49
|
-
parameters: (args.param ?? []).map((param) => parseParameter(param)),
|
|
50
|
-
projectId: args.project,
|
|
51
|
-
record: args.record,
|
|
52
|
-
rerunFailedFromLatest: args.rerunFailedFromLatest === true ? true : undefined,
|
|
53
|
-
rerunFailedId: args.rerunFailed,
|
|
54
|
-
runEmptySuite: args.runEmptySuite,
|
|
55
|
-
runType: args.runType,
|
|
56
|
-
setTags: args.setTag,
|
|
57
|
-
skip: args.skip,
|
|
58
|
-
skipOnFailure: args.skipOnFailure,
|
|
59
|
-
suites: args.suite,
|
|
60
|
-
tag: args.tag,
|
|
61
|
-
tests: args.test,
|
|
62
|
-
variables: args.variable,
|
|
63
|
-
};
|
|
23
|
+
const jobScreenSchema = {
|
|
24
|
+
screenDepth: z.number().int().positive().optional().describe('Screen color depth.'),
|
|
25
|
+
screenHeight: z.number().int().positive().optional().describe('Screen height.'),
|
|
26
|
+
screenWidth: z.number().int().positive().optional().describe('Screen width.'),
|
|
27
|
+
};
|
|
28
|
+
function requireConfirm(confirm, action) {
|
|
29
|
+
if (confirm !== true)
|
|
30
|
+
throw new Error(`${action} requires confirm: true.`);
|
|
64
31
|
}
|
|
65
32
|
async function testingProjectList(args = {}) {
|
|
66
33
|
return { result: await listTestingProjects({ name: args.name }) };
|
|
@@ -68,11 +35,8 @@ async function testingProjectList(args = {}) {
|
|
|
68
35
|
async function testingProjectCreate(args) {
|
|
69
36
|
return {
|
|
70
37
|
result: await createTestingProject({
|
|
71
|
-
dashboardId: args.dashboardId,
|
|
72
38
|
description: args.description,
|
|
73
39
|
name: args.name,
|
|
74
|
-
projectExecutor: args.executor,
|
|
75
|
-
projectType: args.type,
|
|
76
40
|
}),
|
|
77
41
|
};
|
|
78
42
|
}
|
|
@@ -100,8 +64,7 @@ async function testingProjectPermissionSet(args) {
|
|
|
100
64
|
};
|
|
101
65
|
}
|
|
102
66
|
async function testingProjectDelete(args) {
|
|
103
|
-
|
|
104
|
-
throw new Error('Project deletion requires confirm: true.');
|
|
67
|
+
requireConfirm(args.confirm, 'Project deletion');
|
|
105
68
|
return { result: await deleteTestingProject({ projectId: args.id }) };
|
|
106
69
|
}
|
|
107
70
|
async function testingRobotList(args) {
|
|
@@ -111,41 +74,16 @@ async function testingRobotGet(args) {
|
|
|
111
74
|
return { result: await getTestingRobot({ projectId: args.project, robotId: args.id }) };
|
|
112
75
|
}
|
|
113
76
|
async function testingRobotDelete(args) {
|
|
114
|
-
|
|
115
|
-
throw new Error('Robot deletion requires confirm: true.');
|
|
77
|
+
requireConfirm(args.confirm, 'Robot deletion');
|
|
116
78
|
return { result: await deleteTestingRobot({ projectId: args.project, robotId: args.id }) };
|
|
117
79
|
}
|
|
118
80
|
async function testingRobotCreate(args) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
return {
|
|
123
|
-
result: await createTestingRobot({
|
|
124
|
-
description: args.description,
|
|
125
|
-
fwVersion: args.fwVersion,
|
|
126
|
-
kind: args.runEnvironment ?? args.kind,
|
|
127
|
-
label: args.label,
|
|
128
|
-
name: args.name,
|
|
129
|
-
os: args.os,
|
|
130
|
-
projectId: args.project,
|
|
131
|
-
reporting: args.reporting,
|
|
132
|
-
robotType: args.robotType,
|
|
133
|
-
}),
|
|
134
|
-
};
|
|
81
|
+
const { project: projectId, ...rest } = args;
|
|
82
|
+
return { result: await createTestingRobot({ ...rest, projectId }) };
|
|
135
83
|
}
|
|
136
84
|
async function testingRobotUpdate(args) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
description: args.description,
|
|
140
|
-
fwVersion: args.fwVersion,
|
|
141
|
-
label: args.label,
|
|
142
|
-
name: args.name,
|
|
143
|
-
projectId: args.project,
|
|
144
|
-
reporting: args.reporting,
|
|
145
|
-
robotId: args.id,
|
|
146
|
-
robotType: args.robotType,
|
|
147
|
-
}),
|
|
148
|
-
};
|
|
85
|
+
const { id: robotId, project: projectId, ...rest } = args;
|
|
86
|
+
return { result: await updateTestingRobot({ ...rest, projectId, robotId }) };
|
|
149
87
|
}
|
|
150
88
|
async function testingJobList(args) {
|
|
151
89
|
return { result: await listTestingJobs({ name: args.name, projectId: args.project }) };
|
|
@@ -154,78 +92,37 @@ async function testingJobGet(args) {
|
|
|
154
92
|
return { result: await getTestingJob({ jobId: args.id, projectId: args.project }) };
|
|
155
93
|
}
|
|
156
94
|
async function testingJobUpdate(args) {
|
|
157
|
-
|
|
158
|
-
throw new Error('Use either showVideoParams or hideVideoParams, not both.');
|
|
159
|
-
}
|
|
160
|
-
const screenValues = [args.screenDepth, args.screenHeight, args.screenWidth];
|
|
161
|
-
const screenSupplied = screenValues.filter((value) => value !== undefined);
|
|
162
|
-
if (screenSupplied.length > 0 && screenSupplied.length !== screenValues.length) {
|
|
163
|
-
throw new Error('Provide screenWidth, screenHeight, and screenDepth together.');
|
|
164
|
-
}
|
|
95
|
+
const { gitDomainCredential: domainCredentialId, id: jobId, parallelMode: parallelExecution, project: projectId, robot: robotId, ...rest } = args;
|
|
165
96
|
return {
|
|
166
97
|
result: await updateTestingJob({
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
parallelExecution: args.parallelMode,
|
|
175
|
-
projectId: args.project,
|
|
176
|
-
robotId: args.robot,
|
|
177
|
-
screen: screenSupplied.length === 0
|
|
178
|
-
? undefined
|
|
179
|
-
: { depth: args.screenDepth, height: args.screenHeight, width: args.screenWidth },
|
|
180
|
-
showVideoParams: args.showVideoParams === true ? true : args.hideVideoParams === true ? false : undefined,
|
|
181
|
-
storage: buildTestingGitStorageUpdate({
|
|
182
|
-
gitBranch: args.gitBranch,
|
|
183
|
-
gitPassword: args.gitPassword,
|
|
184
|
-
gitTag: args.gitTag,
|
|
185
|
-
gitUrl: args.gitUrl,
|
|
186
|
-
gitUseCallerCredentials: args.gitUseCallerCredentials,
|
|
187
|
-
gitUsername: args.gitUsername,
|
|
188
|
-
}),
|
|
189
|
-
suiteType: args.suiteType,
|
|
190
|
-
timeout: args.timeout,
|
|
98
|
+
...rest,
|
|
99
|
+
domainCredentialId,
|
|
100
|
+
jobId,
|
|
101
|
+
parallelExecution,
|
|
102
|
+
projectId,
|
|
103
|
+
robotId,
|
|
104
|
+
screenMissingMessage: 'Provide screenWidth, screenHeight, and screenDepth together.',
|
|
191
105
|
}),
|
|
192
106
|
};
|
|
193
107
|
}
|
|
194
108
|
async function testingJobDelete(args) {
|
|
195
|
-
|
|
196
|
-
throw new Error('Job deletion requires confirm: true.');
|
|
109
|
+
requireConfirm(args.confirm, 'Job deletion');
|
|
197
110
|
return { result: await deleteTestingJob({ jobId: args.id, projectId: args.project }) };
|
|
198
111
|
}
|
|
199
112
|
async function testingJobScheduleGet(args) {
|
|
200
|
-
|
|
201
|
-
return { result: { configured: schedule !== undefined, jobId: args.job, projectId: args.project, schedule } };
|
|
113
|
+
return { result: await getTestingJobScheduleStatus({ jobId: args.job, projectId: args.project }) };
|
|
202
114
|
}
|
|
203
115
|
async function testingJobScheduleSet(args) {
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
cron: args.cron,
|
|
207
|
-
jobId: args.job,
|
|
208
|
-
projectId: args.project,
|
|
209
|
-
record: args.record,
|
|
210
|
-
timezone: args.timezone,
|
|
211
|
-
}),
|
|
212
|
-
};
|
|
116
|
+
const { job: jobId, project: projectId, ...rest } = args;
|
|
117
|
+
return { result: await setTestingJobSchedule({ ...rest, jobId, projectId }) };
|
|
213
118
|
}
|
|
214
119
|
async function testingJobScheduleRemove(args) {
|
|
215
|
-
|
|
216
|
-
throw new Error('Schedule removal requires confirm: true.');
|
|
120
|
+
requireConfirm(args.confirm, 'Schedule removal');
|
|
217
121
|
return { result: await removeTestingJobSchedule({ jobId: args.job, projectId: args.project }) };
|
|
218
122
|
}
|
|
219
123
|
async function testingDataTableList(args) {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
fields: args.fields,
|
|
223
|
-
jobId: args.job,
|
|
224
|
-
name: args.name,
|
|
225
|
-
projectId: args.project,
|
|
226
|
-
version: args.revision,
|
|
227
|
-
}),
|
|
228
|
-
};
|
|
124
|
+
const { job: jobId, project: projectId, revision: version, ...rest } = args;
|
|
125
|
+
return { result: await listTestingDataTables({ ...rest, jobId, projectId, version }) };
|
|
229
126
|
}
|
|
230
127
|
async function testingDataTableGet(args) {
|
|
231
128
|
return {
|
|
@@ -238,15 +135,16 @@ async function testingDataTableGet(args) {
|
|
|
238
135
|
};
|
|
239
136
|
}
|
|
240
137
|
async function testingDataTableCreate(args) {
|
|
241
|
-
|
|
242
|
-
throw new Error('Data-table creation requires confirm: true.');
|
|
138
|
+
requireConfirm(args.confirm, 'Data-table creation');
|
|
243
139
|
return {
|
|
244
140
|
result: await createTestingDataTable({
|
|
245
141
|
body: {
|
|
246
142
|
...(args.aiGenerated === undefined ? {} : { aiGenerated: args.aiGenerated }),
|
|
247
|
-
data:
|
|
143
|
+
data: args.data,
|
|
248
144
|
...(args.defaultRow === undefined ? {} : { defaultRow: args.defaultRow }),
|
|
145
|
+
header: args.header ?? 'row',
|
|
249
146
|
name: args.name,
|
|
147
|
+
prepare: true,
|
|
250
148
|
...(args.topics === undefined ? {} : { topics: args.topics }),
|
|
251
149
|
},
|
|
252
150
|
jobId: args.job,
|
|
@@ -255,19 +153,15 @@ async function testingDataTableCreate(args) {
|
|
|
255
153
|
};
|
|
256
154
|
}
|
|
257
155
|
async function testingDataTableUpdate(args) {
|
|
258
|
-
|
|
259
|
-
throw new Error('Data-table update requires confirm: true.');
|
|
260
|
-
const body = {
|
|
261
|
-
...(args.aiGenerated === undefined ? {} : { aiGenerated: args.aiGenerated }),
|
|
262
|
-
...(args.data === undefined ? {} : { data: prepareTestingData(args.data, args.header ?? 'row') }),
|
|
263
|
-
...(args.defaultRow === undefined ? {} : { defaultRow: args.defaultRow }),
|
|
264
|
-
...(args.topics === undefined ? {} : { topics: args.topics }),
|
|
265
|
-
};
|
|
266
|
-
if (Object.keys(body).length === 0)
|
|
267
|
-
throw new Error('Data-table update requires at least one field.');
|
|
156
|
+
requireConfirm(args.confirm, 'Data-table update');
|
|
268
157
|
return {
|
|
269
158
|
result: await updateTestingDataTable({
|
|
270
|
-
body
|
|
159
|
+
body: {
|
|
160
|
+
...(args.aiGenerated === undefined ? {} : { aiGenerated: args.aiGenerated }),
|
|
161
|
+
...(args.data === undefined ? {} : { data: args.data, header: args.header ?? 'row', prepare: true }),
|
|
162
|
+
...(args.defaultRow === undefined ? {} : { defaultRow: args.defaultRow }),
|
|
163
|
+
...(args.topics === undefined ? {} : { topics: args.topics }),
|
|
164
|
+
},
|
|
271
165
|
jobId: args.job,
|
|
272
166
|
projectId: args.project,
|
|
273
167
|
tableId: args.id,
|
|
@@ -275,51 +169,31 @@ async function testingDataTableUpdate(args) {
|
|
|
275
169
|
};
|
|
276
170
|
}
|
|
277
171
|
async function testingDataTableDelete(args) {
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
return {
|
|
281
|
-
result: await deleteTestingDataTable({
|
|
282
|
-
jobId: args.job,
|
|
283
|
-
projectId: args.project,
|
|
284
|
-
tableId: args.id,
|
|
285
|
-
}),
|
|
286
|
-
};
|
|
172
|
+
requireConfirm(args.confirm, 'Data-table deletion');
|
|
173
|
+
return { result: await deleteTestingDataTable({ jobId: args.job, projectId: args.project, tableId: args.id }) };
|
|
287
174
|
}
|
|
288
175
|
async function testingJobCreate(args) {
|
|
289
|
-
const
|
|
290
|
-
if (screenValues.some((value) => value !== undefined) && screenValues.includes(undefined)) {
|
|
291
|
-
throw new Error('Provide screenWidth, screenHeight, and screenDepth together.');
|
|
292
|
-
}
|
|
176
|
+
const { gitDomainCredential: gitDomainCredentialId, parallelMode: parallelExecution, project: projectId, robot: robotId, ...rest } = args;
|
|
293
177
|
return {
|
|
294
178
|
result: await createTestingJob({
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
gitDomainCredentialId: args.gitDomainCredential,
|
|
302
|
-
gitPassword: args.gitPassword,
|
|
303
|
-
gitTag: args.gitTag,
|
|
304
|
-
gitUrl: args.gitUrl,
|
|
305
|
-
gitUseCallerCredentials: args.gitUseCallerCredentials,
|
|
306
|
-
gitUsername: args.gitUsername,
|
|
307
|
-
name: args.name,
|
|
308
|
-
parallelExecution: args.parallelMode,
|
|
309
|
-
projectId: args.project,
|
|
310
|
-
robotId: args.robot,
|
|
311
|
-
screen: args.screenWidth === undefined
|
|
312
|
-
? undefined
|
|
313
|
-
: { depth: args.screenDepth, height: args.screenHeight, width: args.screenWidth },
|
|
314
|
-
showVideoParams: args.showVideoParams,
|
|
315
|
-
suiteType: args.suiteType,
|
|
316
|
-
timeout: args.timeout,
|
|
317
|
-
validation: args.validation,
|
|
179
|
+
...rest,
|
|
180
|
+
gitDomainCredentialId,
|
|
181
|
+
parallelExecution,
|
|
182
|
+
projectId,
|
|
183
|
+
robotId,
|
|
184
|
+
screenMissingMessage: 'Provide screenWidth, screenHeight, and screenDepth together.',
|
|
318
185
|
}),
|
|
319
186
|
};
|
|
320
187
|
}
|
|
321
188
|
async function testingJobFiles(args) {
|
|
322
|
-
return {
|
|
189
|
+
return {
|
|
190
|
+
result: await listTestingJobFiles({
|
|
191
|
+
branch: args.branch,
|
|
192
|
+
jobId: args.job,
|
|
193
|
+
projectId: args.project,
|
|
194
|
+
sharedCredentials: args.sharedCredentials,
|
|
195
|
+
}),
|
|
196
|
+
};
|
|
323
197
|
}
|
|
324
198
|
async function testingJobRefs(args) {
|
|
325
199
|
return {
|
|
@@ -331,197 +205,89 @@ async function testingJobRefs(args) {
|
|
|
331
205
|
};
|
|
332
206
|
}
|
|
333
207
|
async function testingJobUpload(args) {
|
|
334
|
-
const
|
|
335
|
-
encoding: operation.encoding,
|
|
336
|
-
op: operation.op,
|
|
337
|
-
path: normalizeTestingRemotePath(operation.path),
|
|
338
|
-
value: operation.value,
|
|
339
|
-
}));
|
|
340
|
-
for (const operation of operations) {
|
|
341
|
-
if (operation.op === 'remove' && operation.value !== undefined) {
|
|
342
|
-
throw new Error('Remove operations must not include value.');
|
|
343
|
-
}
|
|
344
|
-
if (operation.op !== 'remove' && operation.value === undefined) {
|
|
345
|
-
throw new Error(`${operation.op} operations require value.`);
|
|
346
|
-
}
|
|
347
|
-
}
|
|
208
|
+
const { authorEmail, authorName, job: jobId, project: projectId, ...rest } = args;
|
|
348
209
|
return {
|
|
349
210
|
result: await uploadTestingJobFiles({
|
|
350
|
-
|
|
211
|
+
...rest,
|
|
212
|
+
author: authorName === undefined && authorEmail === undefined
|
|
351
213
|
? undefined
|
|
352
|
-
: { email:
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
dryRun: args.dryRun,
|
|
356
|
-
jobId: args.job,
|
|
357
|
-
operations,
|
|
358
|
-
parentCommitHash: args.parentCommitHash,
|
|
359
|
-
projectId: args.project,
|
|
214
|
+
: { email: authorEmail ?? 'agentia@copado.com', name: authorName ?? 'Agentia CLI' },
|
|
215
|
+
jobId,
|
|
216
|
+
projectId,
|
|
360
217
|
}),
|
|
361
218
|
};
|
|
362
219
|
}
|
|
363
220
|
async function testingJobDownload(args) {
|
|
221
|
+
const { file: files, job: jobId, project: projectId, ...rest } = args;
|
|
222
|
+
return { result: await downloadTestingJobFiles({ ...rest, files, jobId, projectId }) };
|
|
223
|
+
}
|
|
224
|
+
async function testingBuildRun(args) {
|
|
225
|
+
const options = buildTestingRunOptions(args);
|
|
364
226
|
return {
|
|
365
|
-
result: await
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
227
|
+
result: await executeTestingBuildRun({
|
|
228
|
+
...options,
|
|
229
|
+
streamLogs: args.streamLogs,
|
|
230
|
+
strictDataDrivenWait: true,
|
|
231
|
+
timeout: args.timeout,
|
|
232
|
+
wait: args.waitForResult === true || args.streamLogs === true,
|
|
233
|
+
waitForResult: args.waitForResult,
|
|
371
234
|
}),
|
|
372
235
|
};
|
|
373
236
|
}
|
|
374
|
-
async function testingBuildRun(args) {
|
|
375
|
-
if ((args.datatable?.length ?? 0) > 0 && (args.waitForResult === true || args.streamLogs === true)) {
|
|
376
|
-
throw new Error('Data-driven MCP runs start a batch and cannot wait or stream logs.');
|
|
377
|
-
}
|
|
378
|
-
const options = runOptions(args);
|
|
379
|
-
const run = await runTestingBuild(options);
|
|
380
|
-
if (args.waitForResult !== true && args.streamLogs !== true)
|
|
381
|
-
return { result: run };
|
|
382
|
-
const buildId = normalizeTestingId(run.build);
|
|
383
|
-
if (buildId === undefined)
|
|
384
|
-
throw new Error('CRT did not return a build ID for the started run.');
|
|
385
|
-
const wait = await waitForTestingBuildResult({
|
|
386
|
-
...options,
|
|
387
|
-
buildId,
|
|
388
|
-
sensitiveValues: options.parameters?.filter((parameter) => parameter.sensitive === true).map((parameter) => parameter.value ?? ''),
|
|
389
|
-
streamLogs: args.streamLogs,
|
|
390
|
-
timeoutMs: (args.timeout ?? 60) * 60_000,
|
|
391
|
-
});
|
|
392
|
-
return { result: { ...run, finalBuild: wait.build, wait } };
|
|
393
|
-
}
|
|
394
237
|
async function testingBuildList(args) {
|
|
395
238
|
if (args.count === true) {
|
|
396
239
|
if (args.job === undefined)
|
|
397
240
|
throw new Error('count requires job.');
|
|
398
241
|
return { result: { count: await countTestingBuilds({ jobId: args.job, projectId: args.project }) } };
|
|
399
242
|
}
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
jobId: args.job,
|
|
403
|
-
page: args.page,
|
|
404
|
-
pageSize: args.pageSize,
|
|
405
|
-
projectId: args.project,
|
|
406
|
-
resultSize: args.resultSize ?? 'compact',
|
|
407
|
-
status: args.status,
|
|
408
|
-
}),
|
|
409
|
-
};
|
|
243
|
+
const { job: jobId, project: projectId, resultSize = 'compact', ...rest } = args;
|
|
244
|
+
return { result: await listTestingBuilds({ ...rest, jobId, projectId, resultSize }) };
|
|
410
245
|
}
|
|
411
246
|
async function testingBuildGet(args) {
|
|
412
247
|
return {
|
|
413
|
-
result: await getTestingBuild({
|
|
414
|
-
buildId: args.build,
|
|
415
|
-
full: args.full,
|
|
416
|
-
jobId: args.job,
|
|
417
|
-
projectId: args.project,
|
|
418
|
-
}),
|
|
419
|
-
};
|
|
420
|
-
}
|
|
421
|
-
async function testingBuildLatest(args) {
|
|
422
|
-
return {
|
|
423
|
-
result: await latestTestingBuilds({
|
|
424
|
-
projectId: args.project,
|
|
425
|
-
resultSize: args.resultSize ?? 'compact',
|
|
426
|
-
status: args.status,
|
|
427
|
-
}),
|
|
248
|
+
result: await getTestingBuild({ buildId: args.build, full: args.full, jobId: args.job, projectId: args.project }),
|
|
428
249
|
};
|
|
429
250
|
}
|
|
430
251
|
async function testingBuildSearch(args) {
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
count: args.count,
|
|
434
|
-
from: args.from,
|
|
435
|
-
jobId: args.job,
|
|
436
|
-
order: args.order,
|
|
437
|
-
page: args.page,
|
|
438
|
-
pageSize: args.pageSize,
|
|
439
|
-
projectId: args.project,
|
|
440
|
-
robots: args.robot,
|
|
441
|
-
runTypes: args.runType,
|
|
442
|
-
sort: args.sort,
|
|
443
|
-
statuses: args.status,
|
|
444
|
-
to: args.to,
|
|
445
|
-
}),
|
|
446
|
-
};
|
|
252
|
+
const { job: jobId, project: projectId, robot: robots, runType: runTypes, status: statuses, ...rest } = args;
|
|
253
|
+
return { result: await searchTestingBuilds({ ...rest, jobId, projectId, robots, runTypes, statuses }) };
|
|
447
254
|
}
|
|
448
255
|
async function testingBuildLogs(args) {
|
|
256
|
+
const { build: buildId, job: jobId, project: projectId, ...rest } = args;
|
|
449
257
|
return {
|
|
450
|
-
result: sanitizeTestingOutput(await getTestingBuildLogs({
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
jobId: args.job,
|
|
454
|
-
limitBytes: args.limitBytes,
|
|
455
|
-
output: args.output,
|
|
456
|
-
pretty: args.pretty,
|
|
457
|
-
projectId: args.project,
|
|
458
|
-
sinceSeconds: args.sinceSeconds,
|
|
459
|
-
tailLines: args.tailLines,
|
|
460
|
-
timestamps: args.timestamps,
|
|
461
|
-
})),
|
|
258
|
+
result: sanitizeTestingOutput(await getTestingBuildLogs({ ...rest, buildId, jobId, projectId }), {
|
|
259
|
+
preserveLogKeys: true,
|
|
260
|
+
}),
|
|
462
261
|
};
|
|
463
262
|
}
|
|
464
263
|
async function testingBuildAbort(args) {
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
return {
|
|
468
|
-
result: await abortTestingBuild({
|
|
469
|
-
buildId: args.build,
|
|
470
|
-
jobId: args.job,
|
|
471
|
-
projectId: args.project,
|
|
472
|
-
}),
|
|
473
|
-
};
|
|
264
|
+
requireConfirm(args.confirm, 'Build abort');
|
|
265
|
+
return { result: await abortTestingBuild({ buildId: args.build, jobId: args.job, projectId: args.project }) };
|
|
474
266
|
}
|
|
475
267
|
async function testingVariableList(args) {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
jobId: args.job,
|
|
479
|
-
key: args.key,
|
|
480
|
-
projectId: args.project,
|
|
481
|
-
robotId: args.robot,
|
|
482
|
-
sensitive: args.sensitive,
|
|
483
|
-
type: args.type,
|
|
484
|
-
userSpecific: args.userSpecific,
|
|
485
|
-
}),
|
|
486
|
-
};
|
|
268
|
+
const { job: jobId, project: projectId, robot: robotId, ...rest } = args;
|
|
269
|
+
return { result: await listTestingVariables({ ...rest, jobId, projectId, robotId }) };
|
|
487
270
|
}
|
|
488
271
|
async function testingVariableGet(args) {
|
|
489
272
|
return { result: await getTestingVariable({ projectId: args.project, variableId: args.id }) };
|
|
490
273
|
}
|
|
491
274
|
async function testingVariableCreate(args) {
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
description: args.description,
|
|
495
|
-
jobId: args.job,
|
|
496
|
-
key: args.key,
|
|
497
|
-
projectId: args.project,
|
|
498
|
-
robotId: args.robot,
|
|
499
|
-
sensitive: args.sensitive,
|
|
500
|
-
type: args.type,
|
|
501
|
-
userSpecific: args.userSpecific,
|
|
502
|
-
value: args.value,
|
|
503
|
-
}),
|
|
504
|
-
};
|
|
275
|
+
const { job: jobId, project: projectId, robot: robotId, ...rest } = args;
|
|
276
|
+
return { result: await createTestingVariable({ ...rest, jobId, projectId, robotId }) };
|
|
505
277
|
}
|
|
506
278
|
async function testingVariableUpdate(args) {
|
|
507
|
-
|
|
508
|
-
throw new Error('Use either sensitive or notSensitive, not both.');
|
|
509
|
-
}
|
|
279
|
+
const { id: variableId, project: projectId, ...rest } = args;
|
|
510
280
|
return {
|
|
511
281
|
result: await updateTestingVariable({
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
type: args.type,
|
|
517
|
-
value: args.value,
|
|
518
|
-
variableId: args.id,
|
|
282
|
+
...rest,
|
|
283
|
+
projectId,
|
|
284
|
+
sensitiveConflictMessage: 'Use either sensitive or notSensitive, not both.',
|
|
285
|
+
variableId,
|
|
519
286
|
}),
|
|
520
287
|
};
|
|
521
288
|
}
|
|
522
289
|
async function testingVariableDelete(args) {
|
|
523
|
-
|
|
524
|
-
throw new Error('Variable deletion requires confirm: true.');
|
|
290
|
+
requireConfirm(args.confirm, 'Variable deletion');
|
|
525
291
|
return { result: await deleteTestingVariable({ projectId: args.project, variableId: args.id }) };
|
|
526
292
|
}
|
|
527
293
|
async function testingUserParameterList(args) {
|
|
@@ -531,38 +297,22 @@ async function testingUserParameterGet(args) {
|
|
|
531
297
|
return { result: await getTestingUserParameter({ parameterId: args.id }) };
|
|
532
298
|
}
|
|
533
299
|
async function testingUserParameterCreate(args) {
|
|
534
|
-
return {
|
|
535
|
-
result: await createTestingUserParameter({
|
|
536
|
-
description: args.description,
|
|
537
|
-
key: args.key,
|
|
538
|
-
sensitive: args.sensitive,
|
|
539
|
-
unique: args.unique,
|
|
540
|
-
value: args.value,
|
|
541
|
-
}),
|
|
542
|
-
};
|
|
300
|
+
return { result: await createTestingUserParameter(args) };
|
|
543
301
|
}
|
|
544
302
|
async function testingUserParameterUpdate(args) {
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
description: args.description,
|
|
548
|
-
key: args.key,
|
|
549
|
-
parameterId: args.id,
|
|
550
|
-
unique: args.unique,
|
|
551
|
-
value: args.value,
|
|
552
|
-
}),
|
|
553
|
-
};
|
|
303
|
+
const { id: parameterId, ...rest } = args;
|
|
304
|
+
return { result: await updateTestingUserParameter({ ...rest, parameterId }) };
|
|
554
305
|
}
|
|
555
306
|
async function testingUserParameterDelete(args) {
|
|
556
|
-
|
|
557
|
-
throw new Error('User-parameter deletion requires confirm: true.');
|
|
307
|
+
requireConfirm(args.confirm, 'User-parameter deletion');
|
|
558
308
|
return { result: await deleteTestingUserParameter({ parameterId: args.id }) };
|
|
559
309
|
}
|
|
560
310
|
const buildListSchema = {
|
|
561
311
|
count: z.boolean().optional().describe('Return only the build count; requires job.'),
|
|
562
|
-
job:
|
|
312
|
+
job: optionalJobIdSchema,
|
|
563
313
|
page: z.number().int().positive().optional().describe('Build page number.'),
|
|
564
314
|
pageSize: z.number().int().positive().optional().describe('Build page size.'),
|
|
565
|
-
project:
|
|
315
|
+
project: projectIdSchema,
|
|
566
316
|
resultSize: z.enum(['compact']).optional().describe('CRT result size.'),
|
|
567
317
|
status: z.enum(TESTING_BUILD_STATUSES).optional().describe('Build status filter.'),
|
|
568
318
|
};
|
|
@@ -572,21 +322,28 @@ const uploadSchema = {
|
|
|
572
322
|
branch: z.string().optional().describe('Optional CRT branch name.'),
|
|
573
323
|
commitMessage: z.string().optional().describe('Commit message for CRT file history.'),
|
|
574
324
|
dryRun: z.boolean().optional().describe('Return a sanitized plan without making a network mutation.'),
|
|
575
|
-
job:
|
|
576
|
-
operations: z
|
|
325
|
+
job: jobIdSchema,
|
|
326
|
+
operations: z
|
|
327
|
+
.array(z.object({
|
|
577
328
|
encoding: z.enum(['utf-8', 'base64']).optional(),
|
|
578
329
|
op: z.enum(['add', 'replace', 'remove']),
|
|
579
330
|
path: z.string().min(1),
|
|
580
331
|
value: z.string().max(1_048_576).optional(),
|
|
581
|
-
}))
|
|
332
|
+
}))
|
|
333
|
+
.min(1)
|
|
334
|
+
.max(100)
|
|
335
|
+
.describe('Bounded structured file operations; local paths and stdin are not available in MCP.'),
|
|
582
336
|
parentCommitHash: z.string().optional().describe('Expected parent commit hash.'),
|
|
583
|
-
project:
|
|
337
|
+
project: projectIdSchema,
|
|
584
338
|
};
|
|
585
339
|
const runOptionSchema = {
|
|
586
340
|
branch: z.string().optional().describe('Git branch/ref to use for this run. Mutually exclusive with tag.'),
|
|
587
341
|
consoleColors: z.enum(TESTING_CONSOLE_COLORS).optional().describe('Robot Framework console color mode.'),
|
|
588
342
|
consoleWidth: z.number().int().positive().optional().describe('Robot Framework console width.'),
|
|
589
|
-
datatable: z
|
|
343
|
+
datatable: z
|
|
344
|
+
.array(z.string())
|
|
345
|
+
.optional()
|
|
346
|
+
.describe('Data-driven TABLE_ID:DATASETS selections. Batch runs cannot wait or stream logs.'),
|
|
590
347
|
doc: z.string().optional().describe('Top-level Robot Framework suite documentation.'),
|
|
591
348
|
dryRun: z.boolean().optional().describe('Validate Robot Framework data without executing library keywords.'),
|
|
592
349
|
exclude: z.array(z.string()).optional().describe('Robot Framework tags to exclude from this run.'),
|
|
@@ -604,30 +361,32 @@ const runOptionSchema = {
|
|
|
604
361
|
setTag: z.array(z.string()).optional().describe('Tags to set on every executed test.'),
|
|
605
362
|
skip: z.array(z.string()).optional().describe('Tags for tests to skip.'),
|
|
606
363
|
skipOnFailure: z.array(z.string()).optional().describe('Tags whose failing tests should be skipped.'),
|
|
607
|
-
streamLogs: z
|
|
364
|
+
streamLogs: z
|
|
365
|
+
.boolean()
|
|
366
|
+
.optional()
|
|
367
|
+
.describe('Wait for the run and return the finished log once. MCP never streams chunks. Implies a wait, and is rejected for data-driven runs.'),
|
|
608
368
|
suite: z.array(z.string()).optional().describe('Robot Framework suites to select.'),
|
|
609
369
|
tag: z.string().optional().describe('Git tag to use for this run. Mutually exclusive with branch.'),
|
|
610
370
|
test: z.array(z.string()).optional().describe('Robot Framework tests/tasks to select.'),
|
|
611
371
|
timeout: z.number().int().positive().optional().describe('Maximum wait time in minutes.'),
|
|
612
372
|
variable: z.array(z.string()).optional().describe('Robot Framework variables.'),
|
|
613
|
-
waitForResult: z
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
project: z.number().int().positive().describe('CRT project ID.'),
|
|
618
|
-
...runOptionSchema,
|
|
373
|
+
waitForResult: z
|
|
374
|
+
.boolean()
|
|
375
|
+
.optional()
|
|
376
|
+
.describe('Poll until the build reaches a terminal result. Omitted means do not wait. The CLI waits by default; this tool does not. Rejected for data-driven runs.'),
|
|
619
377
|
};
|
|
378
|
+
const buildRunSchema = { job: jobIdSchema, project: projectIdSchema, ...runOptionSchema };
|
|
620
379
|
const testingDataMatrixSchema = z
|
|
621
380
|
.array(z.array(z.string().max(TESTING_DATA_MAX_CELL_BYTES)).max(TESTING_DATA_MAX_COLUMNS))
|
|
622
381
|
.max(TESTING_DATA_MAX_ROWS);
|
|
623
382
|
const buildLogSchema = {
|
|
624
383
|
build: z.number().int().positive().describe('CRT build/run ID.'),
|
|
625
384
|
container: z.string().optional().describe('Specific CRT log stream/container.'),
|
|
626
|
-
job:
|
|
385
|
+
job: jobIdSchema,
|
|
627
386
|
limitBytes: z.number().int().positive().optional().describe('Maximum log bytes to fetch.'),
|
|
628
387
|
output: z.string().optional().describe('Output file for logs.'),
|
|
629
388
|
pretty: z.boolean().optional().describe('Request readable log formatting.'),
|
|
630
|
-
project:
|
|
389
|
+
project: projectIdSchema,
|
|
631
390
|
sinceSeconds: z.number().int().nonnegative().optional().describe('Fetch logs from the last N seconds.'),
|
|
632
391
|
tailLines: z.number().int().nonnegative().optional().describe('Return only the last N lines.'),
|
|
633
392
|
timestamps: z.boolean().optional().describe('Add timestamps to log lines.'),
|
|
@@ -635,7 +394,7 @@ const buildLogSchema = {
|
|
|
635
394
|
export const agentiaMcpTestingToolHandlers = {
|
|
636
395
|
testingBuildAbort,
|
|
637
396
|
testingBuildGet,
|
|
638
|
-
testingBuildLatest,
|
|
397
|
+
testingBuildLatest: testingBuildList,
|
|
639
398
|
testingBuildList,
|
|
640
399
|
testingBuildLogs,
|
|
641
400
|
testingBuildRun,
|
|
@@ -686,7 +445,7 @@ export const agentiaMcpTestingToolHandlers = {
|
|
|
686
445
|
testingVariableGet,
|
|
687
446
|
testingVariableList,
|
|
688
447
|
testingVariableUpdate,
|
|
689
|
-
...
|
|
448
|
+
...testingBrowserMcpHandlers,
|
|
690
449
|
};
|
|
691
450
|
export function registerAgentiaMcpTestingTools(server) {
|
|
692
451
|
server.registerTool('agentia_testing_project_list', {
|
|
@@ -697,11 +456,8 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
697
456
|
server.registerTool('agentia_testing_project_create', {
|
|
698
457
|
description: 'Create a Copado Robotic Testing project.',
|
|
699
458
|
inputSchema: {
|
|
700
|
-
dashboardId: z.number().int().positive().optional().describe('Optional CRT dashboard ID.'),
|
|
701
459
|
description: z.string().optional().describe('Project description.'),
|
|
702
|
-
executor: z.enum(TESTING_PROJECT_EXECUTORS).optional().describe('Project execution backend.'),
|
|
703
460
|
name: z.string().describe('Project name.'),
|
|
704
|
-
type: z.enum(TESTING_PROJECT_TYPES).optional().describe('CRT project type.'),
|
|
705
461
|
},
|
|
706
462
|
title: 'Agentia Testing Project Create',
|
|
707
463
|
}, (args) => safelyHandleTool(() => testingProjectCreate(args)));
|
|
@@ -721,18 +477,18 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
721
477
|
}, (args) => safelyHandleTool(() => testingProjectUpdate(args)));
|
|
722
478
|
server.registerTool('agentia_testing_project_permission_list', {
|
|
723
479
|
description: 'List assignments for a Copado Robotic Testing project.',
|
|
724
|
-
inputSchema: { project:
|
|
480
|
+
inputSchema: { project: projectIdSchema },
|
|
725
481
|
title: 'Agentia Testing Project Permission List',
|
|
726
482
|
}, (args) => safelyHandleTool(() => testingProjectPermissionList(args)));
|
|
727
483
|
server.registerTool('agentia_testing_project_permission_get', {
|
|
728
484
|
description: "Get the caller's permission on a Copado Robotic Testing project.",
|
|
729
|
-
inputSchema: { project:
|
|
485
|
+
inputSchema: { project: projectIdSchema },
|
|
730
486
|
title: 'Agentia Testing Project Permission Get',
|
|
731
487
|
}, (args) => safelyHandleTool(() => testingProjectPermissionGet(args)));
|
|
732
488
|
const permissionMutationSchema = {
|
|
733
489
|
edit: z.boolean().optional().describe('Grant edit access.'),
|
|
734
490
|
group: z.number().int().positive().optional().describe('Platform group ID; exclusive with user.'),
|
|
735
|
-
project:
|
|
491
|
+
project: projectIdSchema,
|
|
736
492
|
user: z.number().int().positive().optional().describe('Platform user ID; exclusive with group.'),
|
|
737
493
|
view: z.boolean().optional().describe('Grant view access.'),
|
|
738
494
|
};
|
|
@@ -748,23 +504,17 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
748
504
|
}, (args) => safelyHandleTool(() => testingProjectPermissionSet(args)));
|
|
749
505
|
server.registerTool('agentia_testing_project_delete', {
|
|
750
506
|
description: 'Delete a Copado Robotic Testing project.',
|
|
751
|
-
inputSchema: {
|
|
752
|
-
confirm: z.boolean().describe('Must be true to confirm project deletion.'),
|
|
753
|
-
id: z.number().int().positive().describe('CRT project ID.'),
|
|
754
|
-
},
|
|
507
|
+
inputSchema: { confirm: z.boolean().describe('Must be true to confirm project deletion.'), id: projectIdSchema },
|
|
755
508
|
title: 'Agentia Testing Project Delete',
|
|
756
509
|
}, (args) => safelyHandleTool(() => testingProjectDelete(args)));
|
|
757
510
|
server.registerTool('agentia_testing_robot_list', {
|
|
758
511
|
description: 'List Copado Robotic Testing robots.',
|
|
759
|
-
inputSchema: { project:
|
|
512
|
+
inputSchema: { project: projectIdSchema },
|
|
760
513
|
title: 'Agentia Testing Robot List',
|
|
761
514
|
}, (args) => safelyHandleTool(() => testingRobotList(args)));
|
|
762
515
|
server.registerTool('agentia_testing_robot_get', {
|
|
763
516
|
description: 'Get a Copado Robotic Testing robot from the project robot list.',
|
|
764
|
-
inputSchema: {
|
|
765
|
-
id: z.string().describe('CRT robot ID.'),
|
|
766
|
-
project: z.number().int().positive().describe('CRT project ID.'),
|
|
767
|
-
},
|
|
517
|
+
inputSchema: { id: z.string().describe('CRT robot ID.'), project: projectIdSchema },
|
|
768
518
|
title: 'Agentia Testing Robot Get',
|
|
769
519
|
}, (args) => safelyHandleTool(() => testingRobotGet(args)));
|
|
770
520
|
server.registerTool('agentia_testing_robot_delete', {
|
|
@@ -772,7 +522,7 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
772
522
|
inputSchema: {
|
|
773
523
|
confirm: z.boolean().describe('Must be true to confirm robot deletion.'),
|
|
774
524
|
id: z.string().describe('CRT robot ID.'),
|
|
775
|
-
project:
|
|
525
|
+
project: projectIdSchema,
|
|
776
526
|
},
|
|
777
527
|
title: 'Agentia Testing Robot Delete',
|
|
778
528
|
}, (args) => safelyHandleTool(() => testingRobotDelete(args)));
|
|
@@ -781,14 +531,15 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
781
531
|
inputSchema: {
|
|
782
532
|
description: z.string().optional().describe('Robot description.'),
|
|
783
533
|
fwVersion: z.string().optional().describe('Robot framework version.'),
|
|
784
|
-
kind: z.enum(TESTING_ROBOT_RUN_ENVIRONMENTS).optional().describe('Robot run environment.'),
|
|
785
534
|
label: z.string().optional().describe('Robot label.'),
|
|
786
535
|
name: z.string().describe('Robot name.'),
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
536
|
+
project: projectIdSchema,
|
|
537
|
+
reporting: z.enum(TESTING_ROBOT_REPORTING).optional().describe(TESTING_ROBOT_REPORTING_DESCRIPTION),
|
|
538
|
+
robotType: z.enum(TESTING_ROBOT_TYPES).optional().describe(TESTING_ROBOT_TYPE_DESCRIPTION),
|
|
539
|
+
runEnvironment: z
|
|
540
|
+
.enum(TESTING_ROBOT_ACCEPTED_RUN_ENVIRONMENTS)
|
|
541
|
+
.optional()
|
|
542
|
+
.describe(TESTING_ROBOT_RUN_ENVIRONMENT_DESCRIPTION),
|
|
792
543
|
},
|
|
793
544
|
title: 'Agentia Testing Robot Create',
|
|
794
545
|
}, (args) => safelyHandleTool(() => testingRobotCreate(args)));
|
|
@@ -800,72 +551,66 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
800
551
|
id: z.string().describe('CRT robot ID.'),
|
|
801
552
|
label: z.string().optional().describe('New robot label.'),
|
|
802
553
|
name: z.string().optional().describe('New robot name.'),
|
|
803
|
-
project:
|
|
804
|
-
reporting: z.enum(TESTING_ROBOT_REPORTING).optional().describe(
|
|
805
|
-
robotType: z.enum(TESTING_ROBOT_TYPES).optional().describe(
|
|
554
|
+
project: projectIdSchema,
|
|
555
|
+
reporting: z.enum(TESTING_ROBOT_REPORTING).optional().describe(TESTING_ROBOT_REPORTING_DESCRIPTION),
|
|
556
|
+
robotType: z.enum(TESTING_ROBOT_TYPES).optional().describe(TESTING_ROBOT_TYPE_DESCRIPTION),
|
|
806
557
|
},
|
|
807
558
|
title: 'Agentia Testing Robot Update',
|
|
808
559
|
}, (args) => safelyHandleTool(() => testingRobotUpdate(args)));
|
|
809
560
|
server.registerTool('agentia_testing_job_list', {
|
|
810
|
-
description: 'List Copado Robotic Testing jobs
|
|
561
|
+
description: 'List Copado Robotic Testing jobs.',
|
|
811
562
|
inputSchema: {
|
|
812
|
-
name: z.string().optional().describe('Case-insensitive exact job
|
|
813
|
-
project:
|
|
563
|
+
name: z.string().optional().describe('Case-insensitive exact job name filter.'),
|
|
564
|
+
project: projectIdSchema,
|
|
814
565
|
},
|
|
815
566
|
title: 'Agentia Testing Job List',
|
|
816
567
|
}, (args) => safelyHandleTool(() => testingJobList(args)));
|
|
817
568
|
server.registerTool('agentia_testing_job_get', {
|
|
818
|
-
description: 'Get a Copado Robotic Testing job
|
|
819
|
-
inputSchema: {
|
|
820
|
-
id: z.string().describe('CRT job/test ID.'),
|
|
821
|
-
project: z.number().int().positive().describe('CRT project ID.'),
|
|
822
|
-
},
|
|
569
|
+
description: 'Get a Copado Robotic Testing job from the project job list.',
|
|
570
|
+
inputSchema: { id: z.string().describe('CRT job ID.'), project: projectIdSchema },
|
|
823
571
|
title: 'Agentia Testing Job Get',
|
|
824
572
|
}, (args) => safelyHandleTool(() => testingJobGet(args)));
|
|
825
573
|
server.registerTool('agentia_testing_job_update', {
|
|
826
|
-
description: 'Update Copado Robotic Testing job
|
|
574
|
+
description: 'Update Copado Robotic Testing job metadata or Git storage.',
|
|
827
575
|
inputSchema: {
|
|
828
576
|
caseDurationChangeDetection: z.boolean().optional().describe('Enable or disable duration analytics.'),
|
|
829
|
-
description: z.string().optional().describe('Job
|
|
577
|
+
description: z.string().optional().describe('Job description.'),
|
|
830
578
|
...gitStorageSchema,
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
name: z.string().optional().describe('Job/test name.'),
|
|
579
|
+
id: jobIdSchema,
|
|
580
|
+
name: z.string().optional().describe('Job name.'),
|
|
834
581
|
parallelMode: z.enum(TESTING_JOB_PARALLEL_MODES).optional().describe('Parallel execution mode.'),
|
|
835
|
-
project:
|
|
582
|
+
project: projectIdSchema,
|
|
836
583
|
robot: z.number().int().positive().optional().describe('CRT robot ID.'),
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
584
|
+
...jobScreenSchema,
|
|
585
|
+
showVideoParams: z
|
|
586
|
+
.boolean()
|
|
587
|
+
.optional()
|
|
588
|
+
.describe('Enable or disable video streaming and recording capabilities when running the test job.'),
|
|
841
589
|
suiteType: z.enum(TESTING_JOB_SUITE_TYPES).optional().describe('CRT suite/job type.'),
|
|
842
590
|
timeout: z.string().optional().describe('Build timeout, for example 10m.'),
|
|
843
591
|
},
|
|
844
592
|
title: 'Agentia Testing Job Update',
|
|
845
593
|
}, (args) => safelyHandleTool(() => testingJobUpdate(args)));
|
|
846
594
|
server.registerTool('agentia_testing_job_delete', {
|
|
847
|
-
description: 'Delete a Copado Robotic Testing job
|
|
595
|
+
description: 'Delete a Copado Robotic Testing job.',
|
|
848
596
|
inputSchema: {
|
|
849
597
|
confirm: z.boolean().describe('Must be true to confirm job deletion.'),
|
|
850
|
-
id:
|
|
851
|
-
project:
|
|
598
|
+
id: jobIdSchema,
|
|
599
|
+
project: projectIdSchema,
|
|
852
600
|
},
|
|
853
601
|
title: 'Agentia Testing Job Delete',
|
|
854
602
|
}, (args) => safelyHandleTool(() => testingJobDelete(args)));
|
|
855
603
|
server.registerTool('agentia_testing_job_schedule_get', {
|
|
856
604
|
description: 'Get a Copado Robotic Testing job schedule.',
|
|
857
|
-
inputSchema: {
|
|
858
|
-
job: z.number().int().positive().describe('CRT job/test ID.'),
|
|
859
|
-
project: z.number().int().positive().describe('CRT project ID.'),
|
|
860
|
-
},
|
|
605
|
+
inputSchema: { job: jobIdSchema, project: projectIdSchema },
|
|
861
606
|
title: 'Agentia Testing Job Schedule Get',
|
|
862
607
|
}, (args) => safelyHandleTool(() => testingJobScheduleGet(args)));
|
|
863
608
|
server.registerTool('agentia_testing_job_schedule_set', {
|
|
864
609
|
description: 'Create or update a Copado Robotic Testing job schedule.',
|
|
865
610
|
inputSchema: {
|
|
866
611
|
cron: z.string().min(1).describe('Cron expression.'),
|
|
867
|
-
job:
|
|
868
|
-
project:
|
|
612
|
+
job: jobIdSchema,
|
|
613
|
+
project: projectIdSchema,
|
|
869
614
|
record: z.enum(TESTING_RECORD_BUILD_OPTIONS).optional().describe('Scheduled run recording mode.'),
|
|
870
615
|
timezone: z.string().optional().describe('Schedule timezone.'),
|
|
871
616
|
},
|
|
@@ -875,8 +620,8 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
875
620
|
description: 'Remove a Copado Robotic Testing job schedule.',
|
|
876
621
|
inputSchema: {
|
|
877
622
|
confirm: z.boolean().describe('Must be true to confirm schedule removal.'),
|
|
878
|
-
job:
|
|
879
|
-
project:
|
|
623
|
+
job: jobIdSchema,
|
|
624
|
+
project: projectIdSchema,
|
|
880
625
|
},
|
|
881
626
|
title: 'Agentia Testing Job Schedule Remove',
|
|
882
627
|
}, (args) => safelyHandleTool(() => testingJobScheduleRemove(args)));
|
|
@@ -884,9 +629,9 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
884
629
|
description: 'List Copado Robotic Testing data tables.',
|
|
885
630
|
inputSchema: {
|
|
886
631
|
fields: z.string().optional().describe('Comma-separated response fields.'),
|
|
887
|
-
job:
|
|
632
|
+
job: optionalJobIdSchema,
|
|
888
633
|
name: z.string().optional().describe('Exact table name filter.'),
|
|
889
|
-
project:
|
|
634
|
+
project: projectIdSchema,
|
|
890
635
|
revision: z.string().optional().describe('Table revision/version filter.'),
|
|
891
636
|
},
|
|
892
637
|
title: 'Agentia Testing Data Table List',
|
|
@@ -895,8 +640,8 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
895
640
|
description: 'Get a Copado Robotic Testing data table.',
|
|
896
641
|
inputSchema: {
|
|
897
642
|
id: z.number().int().positive().describe('CRT data-table ID.'),
|
|
898
|
-
job:
|
|
899
|
-
project:
|
|
643
|
+
job: optionalJobIdSchema,
|
|
644
|
+
project: projectIdSchema,
|
|
900
645
|
revision: z.string().optional().describe('Table revision/version.'),
|
|
901
646
|
},
|
|
902
647
|
title: 'Agentia Testing Data Table Get',
|
|
@@ -909,9 +654,9 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
909
654
|
data: testingDataMatrixSchema.min(1).describe('Rows with a header row followed by datasets.'),
|
|
910
655
|
defaultRow: z.number().int().positive().optional().describe('Default dataset row.'),
|
|
911
656
|
header: z.enum(['row', 'column']).optional().describe('Input header orientation.'),
|
|
912
|
-
job:
|
|
657
|
+
job: optionalJobIdSchema,
|
|
913
658
|
name: z.string().min(1).describe('Data-table name.'),
|
|
914
|
-
project:
|
|
659
|
+
project: projectIdSchema,
|
|
915
660
|
topics: z.array(z.string()).optional().describe('Topic tags.'),
|
|
916
661
|
},
|
|
917
662
|
title: 'Agentia Testing Data Table Create',
|
|
@@ -925,8 +670,8 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
925
670
|
defaultRow: z.number().int().positive().optional().describe('Default dataset row.'),
|
|
926
671
|
header: z.enum(['row', 'column']).optional().describe('Input header orientation.'),
|
|
927
672
|
id: z.number().int().positive().describe('CRT data-table ID.'),
|
|
928
|
-
job:
|
|
929
|
-
project:
|
|
673
|
+
job: optionalJobIdSchema,
|
|
674
|
+
project: projectIdSchema,
|
|
930
675
|
topics: z.array(z.string()).optional().describe('Replacement topic tags.'),
|
|
931
676
|
},
|
|
932
677
|
title: 'Agentia Testing Data Table Update',
|
|
@@ -936,25 +681,26 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
936
681
|
inputSchema: {
|
|
937
682
|
confirm: z.boolean().describe('Must be true to confirm deletion.'),
|
|
938
683
|
id: z.number().int().positive().describe('CRT data-table ID.'),
|
|
939
|
-
job:
|
|
940
|
-
project:
|
|
684
|
+
job: optionalJobIdSchema,
|
|
685
|
+
project: projectIdSchema,
|
|
941
686
|
},
|
|
942
687
|
title: 'Agentia Testing Data Table Delete',
|
|
943
688
|
}, (args) => safelyHandleTool(() => testingDataTableDelete(args)));
|
|
944
689
|
server.registerTool('agentia_testing_job_create', {
|
|
945
|
-
description: 'Create a Copado Robotic Testing job
|
|
690
|
+
description: 'Create a Copado Robotic Testing job from uploaded files or Git storage.',
|
|
946
691
|
inputSchema: {
|
|
947
692
|
caseDurationChangeDetection: z.boolean().optional().describe('Enable or disable duration analytics.'),
|
|
948
|
-
description: z.string().optional().describe('Job
|
|
693
|
+
description: z.string().optional().describe('Job description.'),
|
|
949
694
|
dryRun: z.boolean().optional().describe('Return a sanitized creation plan without network mutation.'),
|
|
950
|
-
name: z.string().describe('Job
|
|
695
|
+
name: z.string().describe('Job name.'),
|
|
951
696
|
parallelMode: z.enum(TESTING_JOB_PARALLEL_MODES).optional().describe('Parallel execution mode.'),
|
|
952
|
-
project:
|
|
697
|
+
project: projectIdSchema,
|
|
953
698
|
robot: z.string().describe('CRT robot ID.'),
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
699
|
+
...jobScreenSchema,
|
|
700
|
+
showVideoParams: z
|
|
701
|
+
.boolean()
|
|
702
|
+
.optional()
|
|
703
|
+
.describe('Enable or disable video streaming and recording capabilities when running the test job.'),
|
|
958
704
|
suiteType: z.enum(TESTING_JOB_SUITE_TYPES).optional().describe('CRT suite/job type.'),
|
|
959
705
|
timeout: z.string().optional().describe('Build timeout, for example 10m.'),
|
|
960
706
|
validation: z.boolean().optional().describe('Ask CRT to validate the created job.'),
|
|
@@ -963,111 +709,99 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
963
709
|
title: 'Agentia Testing Job Create',
|
|
964
710
|
}, (args) => safelyHandleTool(() => testingJobCreate(args)));
|
|
965
711
|
server.registerTool('agentia_testing_job_run', {
|
|
966
|
-
description: 'Run a Copado Robotic Testing job
|
|
712
|
+
description: 'Run a Copado Robotic Testing job. Does not wait unless waitForResult or streamLogs is set. Data-driven runs reject waiting.',
|
|
967
713
|
inputSchema: buildRunSchema,
|
|
968
714
|
title: 'Agentia Testing Job Run',
|
|
969
715
|
}, (args) => safelyHandleTool(() => testingBuildRun(args)));
|
|
970
|
-
server.registerTool('
|
|
971
|
-
description: 'List files for a Copado Robotic Testing job
|
|
716
|
+
server.registerTool('agentia_testing_job_files_list', {
|
|
717
|
+
description: 'List files for a Copado Robotic Testing job.',
|
|
972
718
|
inputSchema: {
|
|
973
|
-
|
|
974
|
-
|
|
719
|
+
branch: z.string().optional().describe('Optional CRT branch name.'),
|
|
720
|
+
job: jobIdSchema,
|
|
721
|
+
project: projectIdSchema,
|
|
722
|
+
sharedCredentials: z.boolean().optional().describe('Use shared stored Git credentials.'),
|
|
975
723
|
},
|
|
976
|
-
title: 'Agentia Testing Job Files',
|
|
724
|
+
title: 'Agentia Testing Job Files List',
|
|
977
725
|
}, (args) => safelyHandleTool(() => testingJobFiles(args)));
|
|
978
726
|
server.registerTool('agentia_testing_job_refs', {
|
|
979
|
-
description: 'List Git branches and tags for a Copado Robotic Testing job
|
|
727
|
+
description: 'List Git branches and tags for a Copado Robotic Testing job.',
|
|
980
728
|
inputSchema: {
|
|
981
|
-
job:
|
|
982
|
-
project:
|
|
729
|
+
job: jobIdSchema,
|
|
730
|
+
project: projectIdSchema,
|
|
983
731
|
sharedCredentials: z.boolean().optional().describe('Use shared stored Git credentials.'),
|
|
984
732
|
},
|
|
985
733
|
title: 'Agentia Testing Job Refs',
|
|
986
734
|
}, (args) => safelyHandleTool(() => testingJobRefs(args)));
|
|
987
|
-
server.registerTool('
|
|
988
|
-
description: 'Upload file operations to a Copado Robotic Testing job
|
|
735
|
+
server.registerTool('agentia_testing_job_files_upload', {
|
|
736
|
+
description: 'Upload file operations to a Copado Robotic Testing job.',
|
|
989
737
|
inputSchema: uploadSchema,
|
|
990
|
-
title: 'Agentia Testing Job Upload',
|
|
738
|
+
title: 'Agentia Testing Job Files Upload',
|
|
991
739
|
}, (args) => safelyHandleTool(() => testingJobUpload(args)));
|
|
992
|
-
server.registerTool('
|
|
993
|
-
description: 'Download files from a Copado Robotic Testing job
|
|
740
|
+
server.registerTool('agentia_testing_job_files_download', {
|
|
741
|
+
description: 'Download files from a Copado Robotic Testing job.',
|
|
994
742
|
inputSchema: {
|
|
995
743
|
branch: z.string().optional().describe('Optional CRT branch name.'),
|
|
996
744
|
file: z.array(z.string()).describe('Remote CRT file paths.'),
|
|
997
|
-
job:
|
|
745
|
+
job: jobIdSchema,
|
|
998
746
|
outputDir: z.string().optional().describe('Output directory for downloaded files.'),
|
|
999
|
-
project:
|
|
747
|
+
project: projectIdSchema,
|
|
1000
748
|
},
|
|
1001
|
-
title: 'Agentia Testing Job Download',
|
|
749
|
+
title: 'Agentia Testing Job Files Download',
|
|
1002
750
|
}, (args) => safelyHandleTool(() => testingJobDownload(args)));
|
|
1003
|
-
server.registerTool('
|
|
1004
|
-
description: '
|
|
1005
|
-
inputSchema: buildRunSchema,
|
|
1006
|
-
title: 'Agentia Testing Build Run',
|
|
1007
|
-
}, (args) => safelyHandleTool(() => testingBuildRun(args)));
|
|
1008
|
-
server.registerTool('agentia_testing_build_list', {
|
|
1009
|
-
description: 'List Copado Robotic Testing builds/runs.',
|
|
751
|
+
server.registerTool('agentia_testing_job_runs_list', {
|
|
752
|
+
description: 'List Copado Robotic Testing job runs.',
|
|
1010
753
|
inputSchema: buildListSchema,
|
|
1011
|
-
title: 'Agentia Testing
|
|
754
|
+
title: 'Agentia Testing Job Runs List',
|
|
1012
755
|
}, (args) => safelyHandleTool(() => testingBuildList(args)));
|
|
1013
|
-
server.registerTool('
|
|
1014
|
-
description: 'Get a Copado Robotic Testing
|
|
756
|
+
server.registerTool('agentia_testing_job_runs_get', {
|
|
757
|
+
description: 'Get the result of a Copado Robotic Testing job run.',
|
|
1015
758
|
inputSchema: {
|
|
1016
759
|
build: z.number().int().positive().describe('CRT build/run ID.'),
|
|
1017
760
|
full: z.boolean().optional().describe('Fetch the full build result.'),
|
|
1018
|
-
job:
|
|
1019
|
-
project:
|
|
761
|
+
job: jobIdSchema,
|
|
762
|
+
project: projectIdSchema,
|
|
1020
763
|
},
|
|
1021
|
-
title: 'Agentia Testing
|
|
764
|
+
title: 'Agentia Testing Job Runs Get',
|
|
1022
765
|
}, (args) => safelyHandleTool(() => testingBuildGet(args)));
|
|
1023
|
-
server.registerTool('
|
|
1024
|
-
description: '
|
|
1025
|
-
inputSchema: {
|
|
1026
|
-
project: z.number().int().positive().describe('CRT project ID.'),
|
|
1027
|
-
resultSize: z.enum(['compact']).optional().describe('CRT result size.'),
|
|
1028
|
-
status: z.enum(TESTING_BUILD_STATUSES).optional().describe('Build status filter.'),
|
|
1029
|
-
},
|
|
1030
|
-
title: 'Agentia Testing Build Latest',
|
|
1031
|
-
}, (args) => safelyHandleTool(() => testingBuildLatest(args)));
|
|
1032
|
-
server.registerTool('agentia_testing_build_search', {
|
|
1033
|
-
description: 'Search Copado Robotic Testing build metrics.',
|
|
766
|
+
server.registerTool('agentia_testing_job_runs_search', {
|
|
767
|
+
description: 'Search Copado Robotic Testing job run metrics.',
|
|
1034
768
|
inputSchema: {
|
|
1035
769
|
count: z.boolean().optional().describe('Return only the filtered count.'),
|
|
1036
770
|
from: z.string().optional().describe('Start date or epoch filter.'),
|
|
1037
|
-
job:
|
|
771
|
+
job: jobIdSchema,
|
|
1038
772
|
order: z.enum(['asc', 'desc']).optional().describe('Sort order.'),
|
|
1039
773
|
page: z.number().int().positive().optional().describe('Result page.'),
|
|
1040
774
|
pageSize: z.number().int().positive().optional().describe('Result page size.'),
|
|
1041
|
-
project:
|
|
775
|
+
project: projectIdSchema,
|
|
1042
776
|
robot: z.array(z.string()).optional().describe('Robot ID filters.'),
|
|
1043
777
|
runType: z.array(z.enum(TESTING_RUN_TYPES)).optional().describe('Run type filters.'),
|
|
1044
778
|
sort: z.enum(['date', 'duration', 'id', 'status']).optional().describe('Sort field.'),
|
|
1045
779
|
status: z.array(z.string()).optional().describe('Status filters.'),
|
|
1046
780
|
to: z.string().optional().describe('End date or epoch filter.'),
|
|
1047
781
|
},
|
|
1048
|
-
title: 'Agentia Testing
|
|
782
|
+
title: 'Agentia Testing Job Runs Search',
|
|
1049
783
|
}, (args) => safelyHandleTool(() => testingBuildSearch(args)));
|
|
1050
|
-
server.registerTool('
|
|
1051
|
-
description: 'Get logs for a Copado Robotic Testing
|
|
784
|
+
server.registerTool('agentia_testing_job_runs_logs', {
|
|
785
|
+
description: 'Get logs for a Copado Robotic Testing job run.',
|
|
1052
786
|
inputSchema: buildLogSchema,
|
|
1053
|
-
title: 'Agentia Testing
|
|
787
|
+
title: 'Agentia Testing Job Runs Logs',
|
|
1054
788
|
}, (args) => safelyHandleTool(() => testingBuildLogs(args)));
|
|
1055
|
-
server.registerTool('
|
|
1056
|
-
description: 'Abort a Copado Robotic Testing
|
|
789
|
+
server.registerTool('agentia_testing_job_runs_abort', {
|
|
790
|
+
description: 'Abort a Copado Robotic Testing job run.',
|
|
1057
791
|
inputSchema: {
|
|
1058
792
|
build: z.number().int().positive().describe('CRT build/run ID.'),
|
|
1059
793
|
confirm: z.boolean().describe('Must be true to confirm the abort.'),
|
|
1060
|
-
job:
|
|
1061
|
-
project:
|
|
794
|
+
job: jobIdSchema,
|
|
795
|
+
project: projectIdSchema,
|
|
1062
796
|
},
|
|
1063
|
-
title: 'Agentia Testing
|
|
797
|
+
title: 'Agentia Testing Job Runs Abort',
|
|
1064
798
|
}, (args) => safelyHandleTool(() => testingBuildAbort(args)));
|
|
1065
799
|
server.registerTool('agentia_testing_variable_list', {
|
|
1066
800
|
description: 'List Copado Robotic Testing variables/secrets.',
|
|
1067
801
|
inputSchema: {
|
|
1068
|
-
job:
|
|
802
|
+
job: optionalJobIdSchema,
|
|
1069
803
|
key: z.string().optional().describe('Exact variable key filter.'),
|
|
1070
|
-
project:
|
|
804
|
+
project: projectIdSchema,
|
|
1071
805
|
robot: z.number().int().positive().optional().describe('Robot ID filter.'),
|
|
1072
806
|
sensitive: z.boolean().optional().describe('Sensitive status filter.'),
|
|
1073
807
|
type: z.enum(TESTING_VARIABLE_TYPES).optional().describe('Variable type filter.'),
|
|
@@ -1077,19 +811,16 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
1077
811
|
}, (args) => safelyHandleTool(() => testingVariableList(args)));
|
|
1078
812
|
server.registerTool('agentia_testing_variable_get', {
|
|
1079
813
|
description: 'Get a Copado Robotic Testing variable/secret with value redaction.',
|
|
1080
|
-
inputSchema: {
|
|
1081
|
-
id: z.string().describe('CRT variable/secret ID.'),
|
|
1082
|
-
project: z.number().int().positive().describe('CRT project ID.'),
|
|
1083
|
-
},
|
|
814
|
+
inputSchema: { id: z.string().describe('CRT variable/secret ID.'), project: projectIdSchema },
|
|
1084
815
|
title: 'Agentia Testing Variable Get',
|
|
1085
816
|
}, (args) => safelyHandleTool(() => testingVariableGet(args)));
|
|
1086
817
|
server.registerTool('agentia_testing_variable_create', {
|
|
1087
818
|
description: 'Create a Copado Robotic Testing variable/secret.',
|
|
1088
819
|
inputSchema: {
|
|
1089
820
|
description: z.string().optional().describe('Variable description.'),
|
|
1090
|
-
job:
|
|
821
|
+
job: optionalJobIdSchema,
|
|
1091
822
|
key: z.string().describe('Variable key.'),
|
|
1092
|
-
project:
|
|
823
|
+
project: projectIdSchema,
|
|
1093
824
|
robot: z.number().int().positive().optional().describe('CRT robot ID scope.'),
|
|
1094
825
|
sensitive: z.boolean().optional().describe('Mark variable as sensitive.'),
|
|
1095
826
|
type: z.enum(TESTING_VARIABLE_TYPES).optional().describe('Variable type.'),
|
|
@@ -1105,7 +836,7 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
1105
836
|
id: z.string().describe('CRT variable/secret ID.'),
|
|
1106
837
|
key: z.string().optional().describe('Variable key.'),
|
|
1107
838
|
notSensitive: z.boolean().optional().describe('Mark variable as not sensitive.'),
|
|
1108
|
-
project:
|
|
839
|
+
project: projectIdSchema,
|
|
1109
840
|
sensitive: z.boolean().optional().describe('Mark variable as sensitive.'),
|
|
1110
841
|
type: z.enum(TESTING_VARIABLE_TYPES).optional().describe('Variable type.'),
|
|
1111
842
|
value: z.string().max(1_048_576).optional().describe('Structured variable value; redacted from output.'),
|
|
@@ -1117,7 +848,7 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
1117
848
|
inputSchema: {
|
|
1118
849
|
confirm: z.boolean().describe('Must be true to confirm variable deletion.'),
|
|
1119
850
|
id: z.string().describe('CRT variable/secret ID.'),
|
|
1120
|
-
project:
|
|
851
|
+
project: projectIdSchema,
|
|
1121
852
|
},
|
|
1122
853
|
title: 'Agentia Testing Variable Delete',
|
|
1123
854
|
}, (args) => safelyHandleTool(() => testingVariableDelete(args)));
|
|
@@ -1165,47 +896,6 @@ export function registerAgentiaMcpTestingTools(server) {
|
|
|
1165
896
|
},
|
|
1166
897
|
title: 'Agentia Testing User Parameter Delete',
|
|
1167
898
|
}, (args) => safelyHandleTool(() => testingUserParameterDelete(args)));
|
|
1168
|
-
server.registerTool('agentia_testing_create', {
|
|
1169
|
-
description: 'Create a Copado Robotic Testing test from uploaded files or Git storage.',
|
|
1170
|
-
inputSchema: {
|
|
1171
|
-
caseDurationChangeDetection: z.boolean().optional().describe('Enable or disable duration analytics.'),
|
|
1172
|
-
description: z.string().optional().describe('Test description.'),
|
|
1173
|
-
dryRun: z.boolean().optional().describe('Return a sanitized creation plan without network mutation.'),
|
|
1174
|
-
name: z.string().describe('Test name.'),
|
|
1175
|
-
parallelMode: z.enum(TESTING_JOB_PARALLEL_MODES).optional().describe('Parallel execution mode.'),
|
|
1176
|
-
project: z.number().int().positive().describe('CRT project ID.'),
|
|
1177
|
-
robot: z.string().describe('CRT robot ID.'),
|
|
1178
|
-
screenDepth: z.number().int().positive().optional().describe('Screen color depth.'),
|
|
1179
|
-
screenHeight: z.number().int().positive().optional().describe('Screen height.'),
|
|
1180
|
-
screenWidth: z.number().int().positive().optional().describe('Screen width.'),
|
|
1181
|
-
showVideoParams: z.boolean().optional().describe('Show or hide video parameters.'),
|
|
1182
|
-
suiteType: z.enum(TESTING_JOB_SUITE_TYPES).optional().describe('CRT suite/job type.'),
|
|
1183
|
-
timeout: z.string().optional().describe('Build timeout, for example 10m.'),
|
|
1184
|
-
validation: z.boolean().optional().describe('Ask CRT to validate the created job.'),
|
|
1185
|
-
...gitStorageSchema,
|
|
1186
|
-
},
|
|
1187
|
-
title: 'Agentia Testing Create',
|
|
1188
|
-
}, (args) => safelyHandleTool(() => testingJobCreate(args)));
|
|
1189
|
-
server.registerTool('agentia_testing_update', {
|
|
1190
|
-
description: 'Update a Copado Robotic Testing test by uploading file operations.',
|
|
1191
|
-
inputSchema: uploadSchema,
|
|
1192
|
-
title: 'Agentia Testing Update',
|
|
1193
|
-
}, (args) => safelyHandleTool(() => testingJobUpload(args)));
|
|
1194
|
-
server.registerTool('agentia_testing_run', {
|
|
1195
|
-
description: 'Run a Copado Robotic Testing test.',
|
|
1196
|
-
inputSchema: buildRunSchema,
|
|
1197
|
-
title: 'Agentia Testing Run',
|
|
1198
|
-
}, (args) => safelyHandleTool(() => testingBuildRun(args)));
|
|
1199
|
-
server.registerTool('agentia_testing_status', {
|
|
1200
|
-
description: 'List Copado Robotic Testing run status.',
|
|
1201
|
-
inputSchema: buildListSchema,
|
|
1202
|
-
title: 'Agentia Testing Status',
|
|
1203
|
-
}, (args) => safelyHandleTool(() => testingBuildList(args)));
|
|
1204
|
-
server.registerTool('agentia_testing_logs', {
|
|
1205
|
-
description: 'Get logs for a Copado Robotic Testing run.',
|
|
1206
|
-
inputSchema: buildLogSchema,
|
|
1207
|
-
title: 'Agentia Testing Logs',
|
|
1208
|
-
}, (args) => safelyHandleTool(() => testingBuildLogs(args)));
|
|
1209
899
|
registerTestingLiveMcpTools(server);
|
|
1210
900
|
}
|
|
1211
901
|
//# sourceMappingURL=testing-tools.js.map
|