@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,35 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { getTestingLiveHistory } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
import { readTestingLiveState } from '../../../lib/testing-live-state.js';
|
|
6
|
-
export default class TestingLiveHistory extends AgentiaCommand {
|
|
7
|
-
static args = { 'job-id': Args.integer({ description: 'CRT job/test ID; defaults to the active session.', required: false }) };
|
|
8
|
-
static description = 'Read bounded sanitized local CRT live execution history';
|
|
9
|
-
static examples = ['<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --limit 20 --json'];
|
|
10
|
-
static flags = {
|
|
11
|
-
...testingLiveCommonFlags,
|
|
12
|
-
limit: Flags.integer({ default: 10, description: 'Maximum records to return.', max: 500, min: 1 }),
|
|
13
|
-
status: Flags.option({ description: 'Execution status filter.', options: ['completed', 'failed', 'recorded'] })(),
|
|
14
|
-
};
|
|
15
|
-
async run() {
|
|
16
|
-
const { args, flags } = await this.parse(TestingLiveHistory);
|
|
17
|
-
const active = args['job-id'] === undefined ? await readTestingLiveState() : undefined;
|
|
18
|
-
const jobId = args['job-id'] ?? active?.jobId;
|
|
19
|
-
if (jobId === undefined || (active !== undefined && active.projectId !== flags.project)) {
|
|
20
|
-
throw new Error('Provide a job ID or start a live session for this project.');
|
|
21
|
-
}
|
|
22
|
-
const result = getTestingLiveHistory({
|
|
23
|
-
jobId,
|
|
24
|
-
limit: flags.limit,
|
|
25
|
-
projectId: flags.project,
|
|
26
|
-
status: flags.status,
|
|
27
|
-
});
|
|
28
|
-
this.display(() => {
|
|
29
|
-
for (const execution of result.executions)
|
|
30
|
-
this.log(`${execution.startedAt} [${execution.status}] ${execution.lines.join(' | ')}`);
|
|
31
|
-
});
|
|
32
|
-
return result;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=history.js.map
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { inspectTestingLive } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
export default class TestingLiveInspect extends AgentiaCommand {
|
|
6
|
-
static args = { 'job-id': Args.integer({ description: 'Optional CRT job/test ID guard.', required: false }) };
|
|
7
|
-
static description = 'Inspect bounded, sanitized page state from an active CRT live session';
|
|
8
|
-
static examples = [
|
|
9
|
-
'<%= config.bin %> <%= command.id %> --project <project-id> --json',
|
|
10
|
-
'<%= config.bin %> <%= command.id %> --project <project-id> --dom --output page.html',
|
|
11
|
-
];
|
|
12
|
-
static flags = {
|
|
13
|
-
...testingLiveCommonFlags,
|
|
14
|
-
dom: Flags.boolean({ default: false, description: 'Fetch raw page DOM; requires --output.' }),
|
|
15
|
-
output: Flags.string({ dependsOn: ['dom'], description: 'Explicit file path for raw DOM.' }),
|
|
16
|
-
};
|
|
17
|
-
async run() {
|
|
18
|
-
const { args, flags } = await this.parse(TestingLiveInspect);
|
|
19
|
-
const result = await this.withSpinner('Inspecting CRT live session', () => inspectTestingLive({
|
|
20
|
-
dom: flags.dom,
|
|
21
|
-
jobId: args['job-id'],
|
|
22
|
-
output: flags.output,
|
|
23
|
-
projectId: flags.project,
|
|
24
|
-
sessionId: flags['session-id'],
|
|
25
|
-
}));
|
|
26
|
-
this.display(() => this.log(flags.dom ? `DOM written to ${String(result.path)}.` : JSON.stringify(result, null, 2)));
|
|
27
|
-
return result;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=inspect.js.map
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { controlTestingLive } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
export default class TestingLiveInterrupt extends AgentiaCommand {
|
|
6
|
-
static args = { 'job-id': Args.integer({ description: 'Optional CRT job/test ID guard.', required: false }) };
|
|
7
|
-
static description = 'Interrupt Robot execution in the active CRT live session';
|
|
8
|
-
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id>'];
|
|
9
|
-
static flags = testingLiveCommonFlags;
|
|
10
|
-
async run() {
|
|
11
|
-
const { args, flags } = await this.parse(TestingLiveInterrupt);
|
|
12
|
-
const result = await controlTestingLive('interrupt', {
|
|
13
|
-
jobId: args['job-id'],
|
|
14
|
-
projectId: flags.project,
|
|
15
|
-
sessionId: flags['session-id'],
|
|
16
|
-
});
|
|
17
|
-
this.display(() => this.log(result.message));
|
|
18
|
-
return result;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=interrupt.js.map
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-bitwise -- Node secure append flags are a bitmask. */
|
|
2
|
-
import { Args, Flags } from '@oclif/core';
|
|
3
|
-
import { randomUUID } from 'node:crypto';
|
|
4
|
-
import { closeSync, constants, mkdirSync, openSync, writeSync } from 'node:fs';
|
|
5
|
-
import { dirname, extname, resolve } from 'node:path';
|
|
6
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
7
|
-
import { resolveTestingCredentials } from '../../../lib/testing-config.js';
|
|
8
|
-
import { appendTestingLiveHistory } from '../../../lib/testing-live-history.js';
|
|
9
|
-
import { loadTestingLiveConnection, setTestingLiveOptions } from '../../../lib/testing-live-operations.js';
|
|
10
|
-
import { acquireTestingLiveRecorderLock, connectTestingLiveWebSocket, parseTestingLiveRecorderFrame, robotLinesFromRecorderEvent, } from '../../../lib/testing-live-recorder.js';
|
|
11
|
-
export default class TestingLiveRecorder extends AgentiaCommand {
|
|
12
|
-
static args = { 'job-id': Args.integer({ description: 'Optional CRT job/test ID guard.', required: false }) };
|
|
13
|
-
static description = 'Record CRT live interactions as bounded Robot Framework lines';
|
|
14
|
-
static enableJsonFlag = false;
|
|
15
|
-
static examples = [
|
|
16
|
-
'<%= config.bin %> <%= command.id %> --project <project-id> --output recorded.robot',
|
|
17
|
-
];
|
|
18
|
-
static flags = {
|
|
19
|
-
debug: Flags.boolean({ default: false, description: 'Print frame sizes and event types without frame bodies.' }),
|
|
20
|
-
'no-enable': Flags.boolean({ default: false, description: 'Do not manage the server recorder toggle.' }),
|
|
21
|
-
output: Flags.string({ char: 'o', description: 'Explicit .robot file to append recorded keywords to.' }),
|
|
22
|
-
project: Flags.integer({ char: 'p', description: 'CRT project ID.', required: true }),
|
|
23
|
-
'session-id': Flags.integer({ description: 'Guard that must match the active CRT live session.', min: 1 }),
|
|
24
|
-
};
|
|
25
|
-
async run() {
|
|
26
|
-
const { args, flags } = await this.parse(TestingLiveRecorder);
|
|
27
|
-
const connection = await loadTestingLiveConnection({
|
|
28
|
-
jobId: args['job-id'],
|
|
29
|
-
projectId: flags.project,
|
|
30
|
-
sessionId: flags['session-id'],
|
|
31
|
-
});
|
|
32
|
-
const lock = acquireTestingLiveRecorderLock(connection.metadata.sessionId);
|
|
33
|
-
const descriptor = flags.output === undefined ? undefined : openRobotOutput(flags.output);
|
|
34
|
-
let recorded = 0;
|
|
35
|
-
try {
|
|
36
|
-
if (!flags['no-enable']) {
|
|
37
|
-
await setTestingLiveOptions({
|
|
38
|
-
jobId: connection.metadata.jobId,
|
|
39
|
-
projectId: connection.metadata.projectId,
|
|
40
|
-
recorder: emptyOptions(true),
|
|
41
|
-
sessionId: connection.metadata.sessionId,
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
const socket = connectTestingLiveWebSocket(connection.metadata.sessionPath, resolveTestingCredentials().domain, connection.session);
|
|
45
|
-
await new Promise((resolvePromise, reject) => {
|
|
46
|
-
const heartbeat = setInterval(() => {
|
|
47
|
-
if (socket.readyState === socket.OPEN)
|
|
48
|
-
socket.send('true');
|
|
49
|
-
}, 3000);
|
|
50
|
-
const stop = () => socket.close();
|
|
51
|
-
process.once('SIGINT', stop);
|
|
52
|
-
socket.once('error', () => reject(new Error('CRT live recorder connection failed.')));
|
|
53
|
-
socket.once('open', () => this.log('Recording CRT interactions. Press Ctrl-C to stop.'));
|
|
54
|
-
socket.on('message', (frame) => {
|
|
55
|
-
try {
|
|
56
|
-
const event = parseTestingLiveRecorderFrame(frame);
|
|
57
|
-
if (event === undefined)
|
|
58
|
-
return;
|
|
59
|
-
if (flags.debug) {
|
|
60
|
-
const type = typeof event.type === 'string' && /^[a-z-]{1,32}$/u.test(event.type)
|
|
61
|
-
? event.type
|
|
62
|
-
: 'unknown';
|
|
63
|
-
this.warn(`Recorder event ${type} (${Buffer.byteLength(frame.toString())} bytes).`);
|
|
64
|
-
}
|
|
65
|
-
const lines = robotLinesFromRecorderEvent(event);
|
|
66
|
-
if (lines.length === 0)
|
|
67
|
-
return;
|
|
68
|
-
for (const line of lines)
|
|
69
|
-
this.log(line);
|
|
70
|
-
if (descriptor !== undefined) {
|
|
71
|
-
writeSync(descriptor, `${lines.join('\n')}\n\n`, undefined, 'utf8');
|
|
72
|
-
}
|
|
73
|
-
const now = new Date().toISOString();
|
|
74
|
-
appendTestingLiveHistory({
|
|
75
|
-
completedAt: now,
|
|
76
|
-
id: randomUUID(),
|
|
77
|
-
jobId: connection.metadata.jobId,
|
|
78
|
-
lines,
|
|
79
|
-
projectId: connection.metadata.projectId,
|
|
80
|
-
startedAt: now,
|
|
81
|
-
status: 'recorded',
|
|
82
|
-
});
|
|
83
|
-
recorded += lines.length;
|
|
84
|
-
}
|
|
85
|
-
catch (error) {
|
|
86
|
-
this.warn(error.message);
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
socket.once('close', () => resolvePromise());
|
|
90
|
-
socket.once('error', () => resolvePromise());
|
|
91
|
-
socket.once('close', cleanup);
|
|
92
|
-
socket.once('error', cleanup);
|
|
93
|
-
function cleanup() {
|
|
94
|
-
clearInterval(heartbeat);
|
|
95
|
-
process.removeListener('SIGINT', stop);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
finally {
|
|
100
|
-
if (descriptor !== undefined)
|
|
101
|
-
closeSync(descriptor);
|
|
102
|
-
lock.release();
|
|
103
|
-
if (!flags['no-enable']) {
|
|
104
|
-
await setTestingLiveOptions({
|
|
105
|
-
jobId: connection.metadata.jobId,
|
|
106
|
-
projectId: connection.metadata.projectId,
|
|
107
|
-
recorder: emptyOptions(false),
|
|
108
|
-
sessionId: connection.metadata.sessionId,
|
|
109
|
-
}).catch(() => { });
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return { recorded, sessionId: connection.metadata.sessionId };
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
function emptyOptions(enabled) {
|
|
116
|
-
return {
|
|
117
|
-
enabled,
|
|
118
|
-
enableHealingContext: false,
|
|
119
|
-
enableHoverText: false,
|
|
120
|
-
enableScrollText: false,
|
|
121
|
-
enableSystemState: false,
|
|
122
|
-
enableVerifyText: false,
|
|
123
|
-
preferTableKeywords: false,
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function openRobotOutput(path) {
|
|
127
|
-
if (path.includes('\0') || extname(path).toLowerCase() !== '.robot') {
|
|
128
|
-
throw new Error('CRT recorder output must be an explicit .robot path.');
|
|
129
|
-
}
|
|
130
|
-
const target = resolve(path);
|
|
131
|
-
mkdirSync(dirname(target), { mode: 0o700, recursive: true });
|
|
132
|
-
return openSync(target, constants.O_APPEND | constants.O_CREAT | constants.O_NOFOLLOW | constants.O_WRONLY, 0o600);
|
|
133
|
-
}
|
|
134
|
-
//# sourceMappingURL=recorder.js.map
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { getTestingLiveReports } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
export default class TestingLiveReports extends AgentiaCommand {
|
|
6
|
-
static args = { 'job-id': Args.integer({ description: 'Optional CRT job/test ID guard.', required: false }) };
|
|
7
|
-
static description = 'List or save bounded report artifacts from an active CRT live session';
|
|
8
|
-
static examples = [
|
|
9
|
-
'<%= config.bin %> <%= command.id %> --project <project-id>',
|
|
10
|
-
'<%= config.bin %> <%= command.id %> --project <project-id> --output-dir ./reports',
|
|
11
|
-
];
|
|
12
|
-
static flags = {
|
|
13
|
-
...testingLiveCommonFlags,
|
|
14
|
-
'output-dir': Flags.string({ description: 'Explicit directory for log.html, report.html, and output.xml.' }),
|
|
15
|
-
};
|
|
16
|
-
async run() {
|
|
17
|
-
const { args, flags } = await this.parse(TestingLiveReports);
|
|
18
|
-
const result = await this.withSpinner('Reading CRT live reports', () => getTestingLiveReports({
|
|
19
|
-
jobId: args['job-id'],
|
|
20
|
-
outputDir: flags['output-dir'],
|
|
21
|
-
projectId: flags.project,
|
|
22
|
-
sessionId: flags['session-id'],
|
|
23
|
-
}));
|
|
24
|
-
this.display(() => {
|
|
25
|
-
for (const file of result.files)
|
|
26
|
-
this.log(`${file.name}: ${file.bytes} bytes${file.path === undefined ? '' : ` -> ${file.path}`}`);
|
|
27
|
-
});
|
|
28
|
-
return result;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=reports.js.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { saveTestingLiveScreenshot } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
export default class TestingLiveScreenshot extends AgentiaCommand {
|
|
6
|
-
static args = { 'job-id': Args.integer({ description: 'Optional CRT job/test ID guard.', required: false }) };
|
|
7
|
-
static description = 'Save a bounded CRT live browser screenshot to an explicit file';
|
|
8
|
-
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id> --output screenshot.png'];
|
|
9
|
-
static flags = {
|
|
10
|
-
...testingLiveCommonFlags,
|
|
11
|
-
output: Flags.string({ char: 'o', description: 'Explicit screenshot output path.', required: true }),
|
|
12
|
-
};
|
|
13
|
-
async run() {
|
|
14
|
-
const { args, flags } = await this.parse(TestingLiveScreenshot);
|
|
15
|
-
const result = await this.withSpinner('Saving CRT live screenshot', () => saveTestingLiveScreenshot({
|
|
16
|
-
jobId: args['job-id'],
|
|
17
|
-
output: flags.output,
|
|
18
|
-
projectId: flags.project,
|
|
19
|
-
sessionId: flags['session-id'],
|
|
20
|
-
}));
|
|
21
|
-
this.display(() => this.log(`Wrote ${result.bytes} bytes to ${result.path}.`));
|
|
22
|
-
return result;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=screenshot.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags, testingLiveRecorderOptionFlags, testingLiveRecorderOptions, } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { setTestingLiveOptions } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
export default class TestingLiveSetOptions extends AgentiaCommand {
|
|
6
|
-
static args = { 'job-id': Args.integer({ description: 'Optional CRT job/test ID guard.', required: false }) };
|
|
7
|
-
static description = 'Set the complete validated CRT live recorder option block';
|
|
8
|
-
static examples = [
|
|
9
|
-
'<%= config.bin %> <%= command.id %> --project <project-id> --enable --scroll-text --table-keywords',
|
|
10
|
-
];
|
|
11
|
-
static flags = { ...testingLiveCommonFlags, ...testingLiveRecorderOptionFlags };
|
|
12
|
-
async run() {
|
|
13
|
-
const { args, flags } = await this.parse(TestingLiveSetOptions);
|
|
14
|
-
const optionNames = ['enable', 'healing-context', 'hover-text', 'scroll-text', 'system-state', 'table-keywords', 'verify-text'];
|
|
15
|
-
if (!optionNames.some((name) => flags[name] !== undefined)) {
|
|
16
|
-
throw new Error('Provide at least one recorder option; unspecified options are set to false.');
|
|
17
|
-
}
|
|
18
|
-
const result = await setTestingLiveOptions({
|
|
19
|
-
jobId: args['job-id'],
|
|
20
|
-
projectId: flags.project,
|
|
21
|
-
recorder: testingLiveRecorderOptions(flags),
|
|
22
|
-
sessionId: flags['session-id'],
|
|
23
|
-
});
|
|
24
|
-
this.display(() => this.log('CRT live recorder options updated.'));
|
|
25
|
-
return result;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=set-options.js.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { parseTestingLiveScreen, testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { startTestingLive } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
import { TESTING_LIVE_LIBRARIES } from '../../../lib/testing-live-types.js';
|
|
6
|
-
export default class TestingLiveStart extends AgentiaCommand {
|
|
7
|
-
static args = {
|
|
8
|
-
'job-id': Args.integer({ description: 'CRT job/test ID.', required: true }),
|
|
9
|
-
};
|
|
10
|
-
static description = 'Start and bootstrap a bounded Copado Robotic Testing live session';
|
|
11
|
-
static examples = [
|
|
12
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
|
|
13
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --file smoke.robot --section "Login"',
|
|
14
|
-
];
|
|
15
|
-
static flags = {
|
|
16
|
-
...testingLiveCommonFlags,
|
|
17
|
-
description: Flags.string({ description: 'Nonsecret session label.' }),
|
|
18
|
-
file: Flags.string({ description: 'Robot Framework file used to bootstrap a selected test/task.' }),
|
|
19
|
-
'jap-ime': Flags.boolean({ default: false, description: 'Enable Japanese IME in the live environment.' }),
|
|
20
|
-
library: Flags.option({ default: 'QWeb', description: 'Robot Framework library to bootstrap.', options: [...TESTING_LIVE_LIBRARIES] })(),
|
|
21
|
-
'no-bootstrap': Flags.boolean({ default: false, description: 'Create the host without readiness/bootstrap calls.' }),
|
|
22
|
-
'no-browser': Flags.boolean({ default: false, description: 'Do not open Chrome during QWeb/QForce bootstrap.' }),
|
|
23
|
-
'poll-interval': Flags.integer({ default: 3, description: 'Readiness polling interval in seconds.', min: 1 }),
|
|
24
|
-
screen: Flags.string({ description: 'Session screen as WIDTHxHEIGHTxDEPTH.' }),
|
|
25
|
-
section: Flags.string({ description: 'Robot test/task name to bootstrap.' }),
|
|
26
|
-
'section-index': Flags.integer({ description: 'One-based Robot test/task index to bootstrap.', min: 1 }),
|
|
27
|
-
'session-version': Flags.string({ description: 'CRT live environment version.' }),
|
|
28
|
-
timeout: Flags.integer({ default: 120, description: 'Readiness timeout in seconds.', min: 1 }),
|
|
29
|
-
viewport: Flags.string({ description: 'Session viewport as WIDTHxHEIGHT (24-bit depth).' }),
|
|
30
|
-
};
|
|
31
|
-
async run() {
|
|
32
|
-
const { args, flags } = await this.parse(TestingLiveStart);
|
|
33
|
-
const result = await this.withSpinner('Starting CRT live session', () => startTestingLive({
|
|
34
|
-
description: flags.description,
|
|
35
|
-
file: flags.file,
|
|
36
|
-
japIme: flags['jap-ime'],
|
|
37
|
-
jobId: args['job-id'],
|
|
38
|
-
library: flags.library,
|
|
39
|
-
noBootstrap: flags['no-bootstrap'],
|
|
40
|
-
noBrowser: flags['no-browser'],
|
|
41
|
-
pollIntervalMs: flags['poll-interval'] * 1000,
|
|
42
|
-
projectId: flags.project,
|
|
43
|
-
screen: parseTestingLiveScreen(flags.screen, flags.viewport),
|
|
44
|
-
section: flags.section,
|
|
45
|
-
sectionIndex: flags['section-index'],
|
|
46
|
-
sessionVersion: flags['session-version'],
|
|
47
|
-
timeoutMs: flags.timeout * 1000,
|
|
48
|
-
}));
|
|
49
|
-
this.display(() => this.log(`CRT live session ${result.sessionId} is ready for job ${result.jobId}.`));
|
|
50
|
-
return result;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=start.js.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
4
|
-
import { getTestingLiveStatus } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
export default class TestingLiveStatus extends AgentiaCommand {
|
|
6
|
-
static args = {
|
|
7
|
-
'job-id': Args.integer({ description: 'Optional CRT job/test ID guard.', required: false }),
|
|
8
|
-
};
|
|
9
|
-
static description = 'Inspect sanitized status for the active CRT live session';
|
|
10
|
-
static examples = ['<%= config.bin %> <%= command.id %> --project <project-id> --json'];
|
|
11
|
-
static flags = testingLiveCommonFlags;
|
|
12
|
-
async run() {
|
|
13
|
-
const { args, flags } = await this.parse(TestingLiveStatus);
|
|
14
|
-
const result = await this.withSpinner('Reading CRT live status', () => getTestingLiveStatus({
|
|
15
|
-
jobId: args['job-id'],
|
|
16
|
-
projectId: flags.project,
|
|
17
|
-
sessionId: flags['session-id'],
|
|
18
|
-
}));
|
|
19
|
-
this.display(() => {
|
|
20
|
-
this.log(`Session: ${result.metadata.sessionId} (${result.metadata.status})`);
|
|
21
|
-
this.log(`Browser started: ${result.status.env.isBrowserStarted}`);
|
|
22
|
-
this.log(`Executor running: ${result.status.session.isRobotExecutorRunning}`);
|
|
23
|
-
});
|
|
24
|
-
return result;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=status.js.map
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Args, Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { confirmTestingAction } from '../../../lib/testing-confirmation.js';
|
|
4
|
-
import { testingLiveCommonFlags } from '../../../lib/testing-live-command.js';
|
|
5
|
-
import { stopTestingLive } from '../../../lib/testing-live-operations.js';
|
|
6
|
-
export default class TestingLiveStop extends AgentiaCommand {
|
|
7
|
-
static args = {
|
|
8
|
-
'job-id': Args.integer({ description: 'Optional CRT job/test ID guard.', required: false }),
|
|
9
|
-
};
|
|
10
|
-
static description = 'Stop the active Copado Robotic Testing live session';
|
|
11
|
-
static examples = [
|
|
12
|
-
'<%= config.bin %> <%= command.id %> --project <project-id>',
|
|
13
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --yes --json',
|
|
14
|
-
];
|
|
15
|
-
static flags = {
|
|
16
|
-
...testingLiveCommonFlags,
|
|
17
|
-
yes: Flags.boolean({ char: 'y', default: false, description: 'Confirm live session shutdown.' }),
|
|
18
|
-
};
|
|
19
|
-
async run() {
|
|
20
|
-
const { args, flags } = await this.parse(TestingLiveStop);
|
|
21
|
-
const confirmed = await confirmTestingAction({
|
|
22
|
-
action: 'CRT live session shutdown',
|
|
23
|
-
json: this.jsonEnabled(),
|
|
24
|
-
message: 'Stop the active CRT live session?',
|
|
25
|
-
yes: flags.yes,
|
|
26
|
-
});
|
|
27
|
-
if (!confirmed)
|
|
28
|
-
return { stopped: false };
|
|
29
|
-
const result = await this.withSpinner('Stopping CRT live session', () => stopTestingLive({
|
|
30
|
-
jobId: args['job-id'],
|
|
31
|
-
projectId: flags.project,
|
|
32
|
-
sessionId: flags['session-id'],
|
|
33
|
-
}));
|
|
34
|
-
this.display(() => this.log(`Stopped CRT live session ${result.sessionId}.`));
|
|
35
|
-
return result;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
//# sourceMappingURL=stop.js.map
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../../lib/agentia-command.js';
|
|
3
|
-
import { openUrl } from '../../../lib/open-browser.js';
|
|
4
|
-
import { testingLiveViewUrl } from '../../../lib/testing-live-operations.js';
|
|
5
|
-
export default class TestingLiveView extends AgentiaCommand {
|
|
6
|
-
static description = 'Open the authenticated CRT run/session page without putting viewer secrets in the URL';
|
|
7
|
-
static examples = [
|
|
8
|
-
'<%= config.bin %> <%= command.id %> --project <project-id>',
|
|
9
|
-
'<%= config.bin %> <%= command.id %> --project <project-id> --no-open --json',
|
|
10
|
-
];
|
|
11
|
-
static flags = {
|
|
12
|
-
interactive: Flags.boolean({ default: false, description: 'Request interactive viewer controls when available.' }),
|
|
13
|
-
'no-open': Flags.boolean({ default: false, description: 'Return the nonsecret URL without opening a browser.' }),
|
|
14
|
-
project: Flags.integer({ char: 'p', description: 'CRT project ID.', required: true }),
|
|
15
|
-
'session-id': Flags.integer({ description: 'Guard that must match the active CRT live session.', min: 1 }),
|
|
16
|
-
};
|
|
17
|
-
async run() {
|
|
18
|
-
const { flags } = await this.parse(TestingLiveView);
|
|
19
|
-
if (this.jsonEnabled() && !flags['no-open']) {
|
|
20
|
-
throw new Error('CRT live view cannot open a browser with --json. Re-run with --no-open.');
|
|
21
|
-
}
|
|
22
|
-
const url = await testingLiveViewUrl({
|
|
23
|
-
interactive: flags.interactive,
|
|
24
|
-
projectId: flags.project,
|
|
25
|
-
sessionId: flags['session-id'],
|
|
26
|
-
});
|
|
27
|
-
if (!flags['no-open'])
|
|
28
|
-
await openUrl(url);
|
|
29
|
-
this.display(() => {
|
|
30
|
-
this.log(url);
|
|
31
|
-
this.warn('Viewer secrets are intentionally not transported in the URL; this opens only the authenticated CRT session page.');
|
|
32
|
-
});
|
|
33
|
-
return { access: 'authenticated-page-only', opened: !flags['no-open'], url };
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=view.js.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
|
-
import { testingProjectFlag, testingRunOptionFlags } from '../../lib/testing-flags.js';
|
|
3
|
-
import { TestingRunCommand } from '../../lib/testing-run-command.js';
|
|
4
|
-
export default class TestingRun extends TestingRunCommand {
|
|
5
|
-
static args = {
|
|
6
|
-
id: Args.integer({
|
|
7
|
-
description: 'CRT job/test ID to run.',
|
|
8
|
-
required: true,
|
|
9
|
-
}),
|
|
10
|
-
};
|
|
11
|
-
static description = 'Run a Copado Robotic Testing test';
|
|
12
|
-
static examples = [
|
|
13
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
|
|
14
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --branch main --include smoke',
|
|
15
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
|
|
16
|
-
];
|
|
17
|
-
static flags = {
|
|
18
|
-
...testingProjectFlag,
|
|
19
|
-
...testingRunOptionFlags,
|
|
20
|
-
};
|
|
21
|
-
async run() {
|
|
22
|
-
const { args, flags } = await this.parse(TestingRun);
|
|
23
|
-
return this.executeTestingRun(flags, { jobId: args.id, projectId: flags.project }, 'run');
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=run.js.map
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Flags } from '@oclif/core';
|
|
2
|
-
import { AgentiaCommand } from '../../lib/agentia-command.js';
|
|
3
|
-
import { testingProjectFlag } from '../../lib/testing-flags.js';
|
|
4
|
-
import { listTestingBuilds } from '../../lib/testing-operations.js';
|
|
5
|
-
import { formatTestingBuildTable, TESTING_BUILD_STATUSES, } from '../../lib/testing-types.js';
|
|
6
|
-
export default class TestingStatus extends AgentiaCommand {
|
|
7
|
-
static description = 'List Copado Robotic Testing run status';
|
|
8
|
-
static examples = [
|
|
9
|
-
'<%= config.bin %> <%= command.id %> --project <project-id>',
|
|
10
|
-
'<%= config.bin %> <%= command.id %> --project <project-id> --job <job-id> --status executing --json',
|
|
11
|
-
];
|
|
12
|
-
static flags = {
|
|
13
|
-
...testingProjectFlag,
|
|
14
|
-
job: Flags.integer({
|
|
15
|
-
description: 'Limit status to one CRT job/test ID.',
|
|
16
|
-
}),
|
|
17
|
-
'result-size': Flags.option({
|
|
18
|
-
default: 'compact',
|
|
19
|
-
description: 'CRT build result size.',
|
|
20
|
-
options: ['compact'],
|
|
21
|
-
})(),
|
|
22
|
-
status: Flags.option({
|
|
23
|
-
description: 'Build status filter.',
|
|
24
|
-
options: [...TESTING_BUILD_STATUSES],
|
|
25
|
-
})(),
|
|
26
|
-
};
|
|
27
|
-
async run() {
|
|
28
|
-
const { flags } = await this.parse(TestingStatus);
|
|
29
|
-
const builds = await this.withSpinner('Fetching testing run status', () => listTestingBuilds({
|
|
30
|
-
jobId: flags.job,
|
|
31
|
-
projectId: flags.project,
|
|
32
|
-
resultSize: flags['result-size'],
|
|
33
|
-
status: flags.status,
|
|
34
|
-
}));
|
|
35
|
-
this.display(() => {
|
|
36
|
-
if (builds.length === 0) {
|
|
37
|
-
this.log('No testing runs found.');
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
this.log(formatTestingBuildTable(builds));
|
|
41
|
-
});
|
|
42
|
-
return builds;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=status.js.map
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Args } from '@oclif/core';
|
|
2
|
-
import { testingProjectFlag, testingRunOptionFlags, } from '../../../lib/testing-flags.js';
|
|
3
|
-
import { TestingRunCommand } from '../../../lib/testing-run-command.js';
|
|
4
|
-
export default class TestingTestRun extends TestingRunCommand {
|
|
5
|
-
static args = {
|
|
6
|
-
id: Args.integer({
|
|
7
|
-
description: 'CRT job/test ID to run.',
|
|
8
|
-
required: true,
|
|
9
|
-
}),
|
|
10
|
-
};
|
|
11
|
-
static description = 'Run a Copado Robotic Testing test';
|
|
12
|
-
static examples = [
|
|
13
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
|
|
14
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --wait-for-result',
|
|
15
|
-
'<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
|
|
16
|
-
];
|
|
17
|
-
static flags = {
|
|
18
|
-
...testingProjectFlag,
|
|
19
|
-
...testingRunOptionFlags,
|
|
20
|
-
};
|
|
21
|
-
async run() {
|
|
22
|
-
const { args, flags } = await this.parse(TestingTestRun);
|
|
23
|
-
return this.executeTestingRun(flags, { jobId: args.id, projectId: flags.project }, 'run');
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=run.js.map
|