@copado/agentia-cli 1.1.0 → 1.2.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.
Files changed (196) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +2370 -1850
  3. package/dist/commands/ai/agent/ask.js +4 -4
  4. package/dist/commands/ai/agent/chat.js +4 -4
  5. package/dist/commands/cicd/credential/auth/status.js +38 -0
  6. package/dist/commands/cicd/credential/auth/web/login.js +54 -0
  7. package/dist/commands/cicd/credential/list.js +13 -17
  8. package/dist/commands/cicd/credential/open.js +30 -0
  9. package/dist/commands/cicd/credential/update.js +9 -12
  10. package/dist/commands/cicd/environment/auth/status.js +34 -13
  11. package/dist/commands/cicd/environment/auth/web/login.js +20 -4
  12. package/dist/commands/cicd/environment/open.js +6 -22
  13. package/dist/commands/cicd/extension-configuration/get.js +24 -0
  14. package/dist/commands/cicd/extension-configuration/list.js +49 -0
  15. package/dist/commands/cicd/extension-configuration/open.js +38 -0
  16. package/dist/commands/cicd/metadata/content/get.js +1 -1
  17. package/dist/commands/cicd/metadata/dependency/list.js +2 -2
  18. package/dist/commands/cicd/metadata/explore.js +81 -0
  19. package/dist/commands/cicd/metadata/list.js +3 -3
  20. package/dist/commands/cicd/metadata/refresh/deleted.js +1 -1
  21. package/dist/commands/cicd/metadata/refresh/run.js +2 -2
  22. package/dist/commands/cicd/metadata/refresh/status.js +2 -2
  23. package/dist/commands/cicd/pipeline/automation/activate.js +39 -0
  24. package/dist/commands/cicd/pipeline/automation/create.js +33 -0
  25. package/dist/commands/cicd/pipeline/automation/deactivate.js +39 -0
  26. package/dist/commands/cicd/pipeline/automation/delete.js +45 -0
  27. package/dist/commands/cicd/pipeline/automation/get.js +32 -0
  28. package/dist/commands/cicd/pipeline/automation/list.js +38 -0
  29. package/dist/commands/cicd/pipeline/automation/open.js +38 -0
  30. package/dist/commands/cicd/pipeline/automation/update.js +38 -0
  31. package/dist/commands/cicd/pipeline/quality-gate/activate.js +39 -0
  32. package/dist/commands/cicd/pipeline/quality-gate/create.js +34 -0
  33. package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +39 -0
  34. package/dist/commands/cicd/pipeline/quality-gate/delete.js +45 -0
  35. package/dist/commands/cicd/pipeline/quality-gate/get.js +32 -0
  36. package/dist/commands/cicd/pipeline/quality-gate/list.js +34 -0
  37. package/dist/commands/cicd/pipeline/quality-gate/open.js +38 -0
  38. package/dist/commands/cicd/pipeline/quality-gate/update.js +38 -0
  39. package/dist/commands/cicd/work/create.js +1 -0
  40. package/dist/commands/cicd/work/environment-sync.js +8 -7
  41. package/dist/commands/cicd/work/set.js +6 -4
  42. package/dist/commands/cicd/work/submit.js +3 -2
  43. package/dist/commands/cicd/work/update.js +1 -0
  44. package/dist/commands/plugins/install.js +2 -5
  45. package/dist/commands/setup/skills/create.js +28 -2
  46. package/dist/commands/setup/skills/list.js +55 -0
  47. package/dist/commands/setup/skills/update.js +36 -3
  48. package/dist/commands/setup.js +3 -3
  49. package/dist/commands/testing/data-table/create.js +1 -2
  50. package/dist/commands/testing/data-table/delete.js +1 -2
  51. package/dist/commands/testing/data-table/export.js +2 -6
  52. package/dist/commands/testing/data-table/get.js +2 -4
  53. package/dist/commands/testing/data-table/list.js +1 -2
  54. package/dist/commands/testing/data-table/update.js +3 -4
  55. package/dist/commands/testing/job/create.js +26 -22
  56. package/dist/commands/testing/job/delete.js +2 -2
  57. package/dist/commands/testing/job/files/download.js +73 -0
  58. package/dist/commands/testing/job/files/list.js +43 -0
  59. package/dist/commands/testing/job/{upload.js → files/upload.js} +13 -9
  60. package/dist/commands/testing/job/get.js +2 -2
  61. package/dist/commands/testing/job/list.js +1 -1
  62. package/dist/commands/testing/job/refs.js +4 -4
  63. package/dist/commands/testing/job/run.js +134 -1
  64. package/dist/commands/testing/{build → job/runs}/abort.js +10 -8
  65. package/dist/commands/testing/job/runs/get.js +42 -0
  66. package/dist/commands/testing/{build → job/runs}/list.js +19 -10
  67. package/dist/commands/testing/{logs.js → job/runs/logs.js} +9 -6
  68. package/dist/commands/testing/{build → job/runs}/search.js +9 -7
  69. package/dist/commands/testing/job/schedule/get.js +5 -11
  70. package/dist/commands/testing/job/schedule/remove.js +3 -3
  71. package/dist/commands/testing/job/schedule/set.js +3 -3
  72. package/dist/commands/testing/job/update.js +22 -65
  73. package/dist/commands/testing/live/continue.js +5 -10
  74. package/dist/commands/testing/live/execute.js +3 -3
  75. package/dist/commands/testing/live/history.js +7 -2
  76. package/dist/commands/testing/live/inspect.js +5 -4
  77. package/dist/commands/testing/live/interrupt.js +5 -10
  78. package/dist/commands/testing/live/recorder.js +23 -115
  79. package/dist/commands/testing/live/reports.js +3 -3
  80. package/dist/commands/testing/live/screenshot.js +3 -3
  81. package/dist/commands/testing/live/set-options.js +11 -4
  82. package/dist/commands/testing/live/start.js +9 -4
  83. package/dist/commands/testing/live/status.js +2 -5
  84. package/dist/commands/testing/live/stop.js +3 -5
  85. package/dist/commands/testing/live/view.js +2 -2
  86. package/dist/commands/testing/project/create.js +1 -17
  87. package/dist/commands/testing/project/get.js +0 -1
  88. package/dist/commands/testing/project/list.js +2 -2
  89. package/dist/commands/testing/project/permission/set.js +3 -7
  90. package/dist/commands/testing/project/permission/update.js +2 -2
  91. package/dist/commands/testing/robot/create.js +22 -25
  92. package/dist/commands/testing/robot/get.js +1 -1
  93. package/dist/commands/testing/robot/list.js +3 -3
  94. package/dist/commands/testing/robot/update.js +3 -3
  95. package/dist/commands/testing/user-parameter/create.js +3 -9
  96. package/dist/commands/testing/user-parameter/update.js +1 -7
  97. package/dist/commands/testing/variable/create.js +4 -9
  98. package/dist/commands/testing/variable/list.js +3 -3
  99. package/dist/commands/testing/variable/update.js +5 -12
  100. package/dist/help.js +17 -0
  101. package/dist/lib/ai-types.js +2 -1
  102. package/dist/lib/claude-mcp-config.js +15 -0
  103. package/dist/lib/credential-sync.js +1 -2
  104. package/dist/lib/defaults-store.js +4 -1
  105. package/dist/lib/environment-auth-status.js +2 -1
  106. package/dist/lib/environment-auth.js +2 -1
  107. package/dist/lib/environment-credential-flags.js +3 -1
  108. package/dist/lib/environment-credential-operations.js +8 -2
  109. package/dist/lib/environment-types.js +3 -1
  110. package/dist/lib/extension-configuration-ops.js +4 -0
  111. package/dist/lib/extension-configuration-sanitize.js +7 -0
  112. package/dist/lib/extension-configuration-types.js +8 -0
  113. package/dist/lib/http-proxy.js +13 -0
  114. package/dist/lib/mcp/ai-tools.js +3 -3
  115. package/dist/lib/mcp/command-id.js +2 -0
  116. package/dist/lib/mcp/pipeline-automation-quality-tools.js +452 -0
  117. package/dist/lib/mcp/server.js +70 -1
  118. package/dist/lib/mcp/testing-live-tools.js +24 -13
  119. package/dist/lib/mcp/testing-tools.js +239 -550
  120. package/dist/lib/mcp/tool-annotations.js +27 -18
  121. package/dist/lib/mcp/tools.js +117 -32
  122. package/dist/lib/mcp/work-tools.js +18 -4
  123. package/dist/lib/metadata-explore.js +8 -0
  124. package/dist/lib/network-error.js +8 -0
  125. package/dist/lib/pipeline-automation-flags.js +12 -0
  126. package/dist/lib/pipeline-automation-ops.js +9 -0
  127. package/dist/lib/pipeline-automation-types.js +18 -0
  128. package/dist/lib/pipeline-lifecycle-id.js +3 -0
  129. package/dist/lib/pipeline-quality-gate-flags.js +12 -0
  130. package/dist/lib/pipeline-quality-gate-ops.js +9 -0
  131. package/dist/lib/pipeline-quality-gate-types.js +17 -0
  132. package/dist/lib/plugin-host/ai.js +2 -1
  133. package/dist/lib/plugin-skills.js +22 -0
  134. package/dist/lib/plugin-trust/gate.js +1 -2
  135. package/dist/lib/project-root.js +3 -1
  136. package/dist/lib/runtime.js +1 -1
  137. package/dist/lib/salesforce-tooling-check.js +6 -0
  138. package/dist/lib/skill-packs.js +7 -0
  139. package/dist/lib/testing-archive.js +9 -0
  140. package/dist/lib/testing-data-table.js +39 -0
  141. package/dist/lib/testing-execution.js +22 -0
  142. package/dist/lib/testing-flags.js +6 -2
  143. package/dist/lib/testing-gateway.js +4 -1
  144. package/dist/lib/testing-live-command.js +3 -1
  145. package/dist/lib/testing-live-operations.js +7 -1
  146. package/dist/lib/testing-live-recorder.js +3 -1
  147. package/dist/lib/testing-live-state.js +8 -1
  148. package/dist/lib/testing-operations.js +6 -21
  149. package/dist/lib/testing-sanitization.js +2 -1
  150. package/dist/lib/testing-secret-input.js +2 -1
  151. package/dist/lib/testing-types.js +24 -3
  152. package/dist/lib/work-environment-sync.js +3 -1
  153. package/dist/lib/work-flags.js +6 -1
  154. package/dist/lib/work-local-development-flow.js +4 -0
  155. package/dist/lib/work-submit-wait.js +3 -1
  156. package/oclif.manifest.json +6609 -6895
  157. package/package.json +35 -2
  158. package/templates/skills/agentia-ai/SKILL.md +3 -4
  159. package/templates/skills/agentia-ai/references/ai-agents.md +2 -2
  160. package/templates/skills/agentia-cicd/SKILL.md +7 -4
  161. package/templates/skills/agentia-cicd/references/environments-and-credentials.md +19 -13
  162. package/templates/skills/agentia-cicd/references/extensions.md +3 -0
  163. package/templates/skills/agentia-cicd/references/pipelines.md +36 -2
  164. package/templates/skills/agentia-cicd/references/work.md +20 -5
  165. package/templates/skills/agentia-metadata/SKILL.md +140 -0
  166. package/templates/skills/agentia-metadata/references/metadata-explore.md +142 -0
  167. package/templates/skills/agentia-testing/SKILL.md +3 -3
  168. package/templates/skills/agentia-testing/references/tests.md +14 -14
  169. package/dist/commands/testing/build/get.js +0 -38
  170. package/dist/commands/testing/build/latest.js +0 -40
  171. package/dist/commands/testing/build/logs.js +0 -47
  172. package/dist/commands/testing/build/run.js +0 -26
  173. package/dist/commands/testing/create.js +0 -2
  174. package/dist/commands/testing/job/download.js +0 -54
  175. package/dist/commands/testing/job/files.js +0 -34
  176. package/dist/commands/testing/run.js +0 -26
  177. package/dist/commands/testing/status.js +0 -45
  178. package/dist/commands/testing/test/create.js +0 -2
  179. package/dist/commands/testing/test/logs.js +0 -2
  180. package/dist/commands/testing/test/run.js +0 -26
  181. package/dist/commands/testing/test/status.js +0 -2
  182. package/dist/commands/testing/test/update.js +0 -2
  183. package/dist/commands/testing/update.js +0 -65
  184. package/dist/lib/testing-data-command.js +0 -8
  185. package/dist/lib/testing-data-core.js +0 -20
  186. package/dist/lib/testing-data-export.js +0 -6
  187. package/dist/lib/testing-data-import.js +0 -6
  188. package/dist/lib/testing-data-io.js +0 -12
  189. package/dist/lib/testing-data-operations.js +0 -10
  190. package/dist/lib/testing-data-types.js +0 -4
  191. package/dist/lib/testing-live-endpoints.js +0 -6
  192. package/dist/lib/testing-live-history.js +0 -7
  193. package/dist/lib/testing-run-command.js +0 -3
  194. package/dist/lib/testing-schedule.js +0 -5
  195. package/dist/lib/testing-session.js +0 -5
  196. package/dist/lib/testing-watch.js +0 -4
@@ -15,7 +15,7 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
15
15
 
16
16
  1. Confirm CRT auth with `agentia auth get --crt --json`. Configure missing credentials with `agentia auth set --crt ...` or the supported `AGENTIA_CRT_*` environment variables.
17
17
  2. Identify or create the CRT Project and Robot before creating or running tests. Use explicit project and job IDs; do not invent hidden active-resource defaults.
18
- 3. Use `testing test ...` as the canonical namespace for test workflows. The shorter `testing run|logs|status|create|update` forms exist for compatibility.
18
+ 3. Use `testing job ...` as the single namespace for test definitions and runs: `job create|update|run` for definitions, `job files list|upload|download` for test files, and `job runs list|search|get|logs|abort` for executions. The old `testing create|update|status|logs|run`, `testing test ...`, `testing build ...`, and `testing job files|upload|download` forms are deprecated aliases that warn when used.
19
19
  4. Never expose PAKs, session cookies, viewer keys, variable values, or generated log content that contains secrets.
20
20
 
21
21
  ## Reference
@@ -24,9 +24,9 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
24
24
 
25
25
  ## General Rules
26
26
 
27
- - `agentia testing test run` starts CRT Robot Framework execution. It is different from `agentia cicd work test --local`.
27
+ - `agentia testing job run` starts CRT Robot Framework execution. It is different from `agentia cicd work test --local`.
28
28
  - `agentia testing job` manages CRT job/test definitions. It is different from `agentia cicd job`, which manages Copado CICD JobExecution records.
29
- - Use `--wait-for-result` on `testing test run` when the agent must return the final build result in one turn.
29
+ - `testing job run` waits for the final build result and exits non-zero when it fails. Add `--no-wait` when only the queued run record is needed.
30
30
  - Use Git-backed job flags only when the user or project clearly uses repository-backed CRT test storage.
31
31
  - In JSON or non-interactive CLI calls, destructive actions require `--yes`; matching MCP tools require `confirm: true`.
32
32
  - Prefer `--value-stdin` and `--git-password-stdin` over putting secrets in process arguments.
@@ -19,7 +19,7 @@ Use explicit `--project` and `--job` context. Agentia does not reproduce the leg
19
19
 
20
20
  1. Discover or create a project and robot.
21
21
  2. Create a job/test using snapshot files or validated Git-backed storage.
22
- 3. Run through `testing test run` and optionally wait for the terminal build.
22
+ 3. Run through `testing job run`, which waits for the terminal build unless `--no-wait` is passed.
23
23
  4. Inspect build detail, search, logs, artifacts, or xUnit.
24
24
  5. Update the job or data inputs as needed.
25
25
  6. Clean up regression-owned resources in reverse order with explicit confirmation.
@@ -27,10 +27,10 @@ Use explicit `--project` and `--job` context. Agentia does not reproduce the leg
27
27
  ```sh
28
28
  agentia testing project list --json
29
29
  agentia testing robot list --json
30
- agentia testing test create --project <project-id> --robot <robot-id> --name "Smoke" --file tests/smoke.robot --json
31
- agentia testing test run <job-id> --project <project-id> --wait-for-result --json
32
- agentia testing build get <build-id> --project <project-id> --job <job-id> --json
33
- agentia testing test logs <build-id> --project <project-id> --job <job-id> --output ./crt.log --json
30
+ agentia testing job create --project <project-id> --robot <robot-id> --name "Smoke" --file tests/smoke.robot --json
31
+ agentia testing job run <job-id> --project <project-id> --json
32
+ agentia testing job runs get <build-id> --project <project-id> --job <job-id> --json
33
+ agentia testing job runs logs <build-id> --project <project-id> --job <job-id> --output ./crt.log --json
34
34
  ```
35
35
 
36
36
  ## Command Areas
@@ -39,24 +39,25 @@ agentia testing test logs <build-id> --project <project-id> --job <job-id> --out
39
39
  | --- | --- |
40
40
  | Projects | `testing project list|get|create|update|delete`; `project permission list|get|set|update` |
41
41
  | Robots | `testing robot list|get|create|update|delete` |
42
- | Jobs | `testing job list|get|create|update|delete|run|files|refs|upload|download` |
42
+ | Jobs | `testing job list|get|create|update|delete|run|refs` |
43
+ | Runs | `testing job runs list|search|get|logs|abort` |
44
+ | Job files | `testing job files list|upload|download` |
43
45
  | Schedules | `testing job schedule get|set|remove` |
44
- | Builds | `testing build run|list|get|latest|search|logs|abort` |
45
46
  | Variables | `testing variable list|get|create|update|delete` |
46
47
  | User parameters | `testing user-parameter list|get|create|update|delete` |
47
48
  | Data tables | `testing data-table list|get|create|update|delete|export` |
48
49
  | Live testing | `testing live start|stop|status|execute|continue|interrupt|inspect|screenshot|reports|set-options|history|view|recorder` |
49
50
 
50
- `testing create|update|run|status|logs` remain compatibility aliases. Prefer `testing test` for test workflows and canonical resource commands for new automation.
51
+ `testing job` is the single namespace for test definitions and their runs. Commands directly under `job` take a job ID; `job runs get|logs|abort` take a build/run ID plus `--job`. On `testing job create` and `testing job update`, `--[no-]show-video-params` (`showVideoParams` in the API/MCP) enables or disables Video Streaming and Recording capabilities when running the test job. The older `testing create|update|status|logs|run`, `testing test ...`, `testing build ...`, and `testing job files|upload|download` forms are deprecated aliases that still execute but warn when used: `create` maps to `job create`, `update` to `job files upload` (file operations, not `job update`), `status`, `build list`, and `build latest` to `job runs list`, `build get` to `job runs get`, and `build search|logs|abort` to `job runs search|logs|abort`.
51
52
 
52
53
  ## Execution And Builds
53
54
 
54
- - Use `--wait-for-result` when the result must include terminal build data.
55
+ - Runs wait for terminal build data and exit non-zero unless the final status is `succeeded`. Use `--no-wait` to return the queued run record instead.
55
56
  - `--timeout` bounds waiting; `--no-exit-code` keeps a failed remote run from failing the local command when explicitly desired.
56
- - `--save-artifacts` and `--xunit` write only to validated explicit paths.
57
- - `--stream-logs` and `--watch` are human-only and cannot be combined with `--json`.
58
- - Repeated `--datatable TABLE_ID:SELECTION` starts data-driven batch execution. It cannot be combined with wait, stream, artifact-save, or xUnit modes.
59
- - Use build `get`, `latest`, and `search` instead of assuming list order.
57
+ - `--save-artifacts` and `--xunit` write only to validated explicit paths. They require waiting, so they reject `--no-wait`.
58
+ - Run log output is printed live while the run executes. Pass `--no-stream-logs` for a progress spinner instead. `--json` never streams, so machine-readable output stays clean.
59
+ - Repeated `--datatable TABLE_ID:SELECTION` starts data-driven batch execution. It never waits and cannot be combined with stream, artifact-save, or xUnit modes.
60
+ - Use `job runs get`, `job runs list`, and `job runs search` instead of assuming list order.
60
61
 
61
62
  ## Schedules And Data Tables
62
63
 
@@ -94,6 +95,5 @@ This applies to resource deletion, build abort, schedule removal, live stop, pro
94
95
  ## Gotchas
95
96
 
96
97
  - `testing job` is a CRT test definition; `cicd job` is a Copado CICD JobExecution.
97
- - There is no `testing test get` or `testing test delete`; use `testing job get` and `testing job delete`.
98
98
  - CRT tenant users, organizations, groups, roles, licenses, and cross-region migration are intentionally not Agentia testing commands.
99
99
  - Log, artifact, data-table, DOM, screenshot, and report commands may write files. Keep JSON stdout structured and report only sanitized output metadata.
@@ -1,38 +0,0 @@
1
- import { Args, Flags } from '@oclif/core';
2
- import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
- import { testingJobFlag, testingProjectFlag } from '../../../lib/testing-flags.js';
4
- import { getTestingBuild } from '../../../lib/testing-operations.js';
5
- import { formatTestingRecord } from '../../../lib/testing-types.js';
6
- export default class TestingBuildGet extends AgentiaCommand {
7
- static args = {
8
- id: Args.integer({
9
- description: 'CRT build/run ID.',
10
- required: true,
11
- }),
12
- };
13
- static description = 'Get a Copado Robotic Testing build/run';
14
- static examples = [
15
- '<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id>',
16
- '<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id> --full --json',
17
- ];
18
- static flags = {
19
- ...testingProjectFlag,
20
- ...testingJobFlag,
21
- full: Flags.boolean({
22
- default: false,
23
- description: 'Fetch the full build result instead of the compact summary.',
24
- }),
25
- };
26
- async run() {
27
- const { args, flags } = await this.parse(TestingBuildGet);
28
- const build = await this.withSpinner('Fetching testing build', () => getTestingBuild({
29
- buildId: args.id,
30
- full: flags.full,
31
- jobId: flags.job,
32
- projectId: flags.project,
33
- }));
34
- this.display(() => this.log(formatTestingRecord(build)));
35
- return build;
36
- }
37
- }
38
- //# sourceMappingURL=get.js.map
@@ -1,40 +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 { latestTestingBuilds } from '../../../lib/testing-operations.js';
5
- import { formatTestingBuildTable, TESTING_BUILD_STATUSES, } from '../../../lib/testing-types.js';
6
- export default class TestingBuildLatest extends AgentiaCommand {
7
- static description = 'List the latest Copado Robotic Testing builds/runs';
8
- static examples = [
9
- '<%= config.bin %> <%= command.id %> --project <project-id>',
10
- '<%= config.bin %> <%= command.id %> --project <project-id> --status failed --json',
11
- ];
12
- static flags = {
13
- ...testingProjectFlag,
14
- 'result-size': Flags.option({
15
- default: 'compact',
16
- description: 'CRT build result size.',
17
- options: ['compact'],
18
- })(),
19
- status: Flags.option({
20
- description: 'Build status filter.',
21
- options: [...TESTING_BUILD_STATUSES],
22
- })(),
23
- };
24
- async run() {
25
- const { flags } = await this.parse(TestingBuildLatest);
26
- const builds = await this.withSpinner('Fetching latest testing builds', () => latestTestingBuilds({
27
- projectId: flags.project,
28
- resultSize: flags['result-size'],
29
- status: flags.status,
30
- }));
31
- this.display(() => {
32
- if (builds.length === 0)
33
- this.log('No latest testing builds found.');
34
- else
35
- this.log(formatTestingBuildTable(builds));
36
- });
37
- return builds;
38
- }
39
- }
40
- //# sourceMappingURL=latest.js.map
@@ -1,47 +0,0 @@
1
- import { Args } from '@oclif/core';
2
- import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
- import { testingJobFlag, testingLogOptionFlags, testingOutputFlags, testingProjectFlag, } from '../../../lib/testing-flags.js';
4
- import { getTestingBuildLogs } from '../../../lib/testing-operations.js';
5
- export default class TestingBuildLogs extends AgentiaCommand {
6
- static args = {
7
- id: Args.integer({
8
- description: 'CRT build/run ID.',
9
- required: true,
10
- }),
11
- };
12
- static description = 'Get logs for a Copado Robotic Testing build/run';
13
- static examples = [
14
- '<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id>',
15
- '<%= config.bin %> <%= command.id %> <build-id> --project <project-id> --job <job-id> --output log.html --json',
16
- ];
17
- static flags = {
18
- ...testingProjectFlag,
19
- ...testingJobFlag,
20
- ...testingLogOptionFlags,
21
- ...testingOutputFlags,
22
- };
23
- async run() {
24
- const { args, flags } = await this.parse(TestingBuildLogs);
25
- const result = await this.withSpinner('Fetching testing build logs', () => getTestingBuildLogs({
26
- buildId: args.id,
27
- container: flags.container,
28
- jobId: flags.job,
29
- limitBytes: flags['limit-bytes'],
30
- output: flags.output,
31
- pretty: flags.pretty ? true : undefined,
32
- projectId: flags.project,
33
- sinceSeconds: flags['since-seconds'],
34
- tailLines: flags['tail-lines'],
35
- timestamps: flags.timestamps ? true : undefined,
36
- }));
37
- this.display(() => {
38
- if (flags.output !== undefined) {
39
- this.log(`Testing build logs written to ${flags.output}`);
40
- return;
41
- }
42
- process.stdout.write(result.log);
43
- });
44
- return result;
45
- }
46
- }
47
- //# sourceMappingURL=logs.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 TestingBuildRun 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 job/test';
12
- static examples = [
13
- '<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
14
- '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --param BROWSER=chrome --record failed',
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(TestingBuildRun);
23
- return this.executeTestingRun(flags, { jobId: args.id, projectId: flags.project }, 'build');
24
- }
25
- }
26
- //# sourceMappingURL=run.js.map
@@ -1,2 +0,0 @@
1
- export { default } from './job/create.js';
2
- //# sourceMappingURL=create.js.map
@@ -1,54 +0,0 @@
1
- import { Args, Flags } from '@oclif/core';
2
- import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
- import { testingBranchFlag, testingProjectFlag, } from '../../../lib/testing-flags.js';
4
- import { downloadTestingJobFiles } from '../../../lib/testing-operations.js';
5
- import { formatTestingTable } from '../../../lib/testing-types.js';
6
- export default class TestingJobDownload extends AgentiaCommand {
7
- static args = {
8
- id: Args.integer({
9
- description: 'CRT job/test ID.',
10
- required: true,
11
- }),
12
- };
13
- static description = 'Download files from a Copado Robotic Testing job/test';
14
- static examples = [
15
- '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --file tests.robot',
16
- '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --file tests.robot --output-dir ./crt-files --json',
17
- ];
18
- static flags = {
19
- ...testingProjectFlag,
20
- ...testingBranchFlag,
21
- file: Flags.string({
22
- char: 'f',
23
- description: 'Remote CRT file path to download. Can be provided multiple times.',
24
- multiple: true,
25
- required: true,
26
- }),
27
- 'output-dir': Flags.string({
28
- description: 'Directory to write downloaded files.',
29
- }),
30
- };
31
- async run() {
32
- const { args, flags } = await this.parse(TestingJobDownload);
33
- const result = await this.withSpinner('Downloading testing job files', () => downloadTestingJobFiles({
34
- branch: flags.branch,
35
- files: flags.file,
36
- jobId: args.id,
37
- outputDir: flags['output-dir'],
38
- projectId: flags.project,
39
- }));
40
- this.display(() => {
41
- if (flags['output-dir'] !== undefined) {
42
- this.log(`Downloaded files to ${flags['output-dir']}`);
43
- }
44
- if (result.files.length > 0) {
45
- this.log(formatTestingTable(result.files));
46
- }
47
- else {
48
- this.log('Downloaded file response did not include a file listing.');
49
- }
50
- });
51
- return result;
52
- }
53
- }
54
- //# sourceMappingURL=download.js.map
@@ -1,34 +0,0 @@
1
- import { Args } from '@oclif/core';
2
- import { AgentiaCommand } from '../../../lib/agentia-command.js';
3
- import { testingProjectFlag } from '../../../lib/testing-flags.js';
4
- import { listTestingJobFiles } from '../../../lib/testing-operations.js';
5
- import { formatTestingTable } from '../../../lib/testing-types.js';
6
- export default class TestingJobFiles extends AgentiaCommand {
7
- static args = {
8
- id: Args.integer({
9
- description: 'CRT job/test ID.',
10
- required: true,
11
- }),
12
- };
13
- static description = 'List files for a Copado Robotic Testing job/test';
14
- static examples = [
15
- '<%= config.bin %> <%= command.id %> <job-id> --project <project-id>',
16
- '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --json',
17
- ];
18
- static flags = {
19
- ...testingProjectFlag,
20
- };
21
- async run() {
22
- const { args, flags } = await this.parse(TestingJobFiles);
23
- const files = await this.withSpinner('Fetching testing job files', () => listTestingJobFiles({ jobId: args.id, projectId: flags.project }));
24
- this.display(() => {
25
- if (files.length === 0) {
26
- this.log('No testing job files found.');
27
- return;
28
- }
29
- this.log(formatTestingTable(files));
30
- });
31
- return files;
32
- }
33
- }
34
- //# sourceMappingURL=files.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,2 +0,0 @@
1
- export { default } from '../create.js';
2
- //# sourceMappingURL=create.js.map
@@ -1,2 +0,0 @@
1
- export { default } from '../logs.js';
2
- //# sourceMappingURL=logs.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
@@ -1,2 +0,0 @@
1
- export { default } from '../status.js';
2
- //# sourceMappingURL=status.js.map
@@ -1,2 +0,0 @@
1
- export { default } from '../update.js';
2
- //# sourceMappingURL=update.js.map
@@ -1,65 +0,0 @@
1
- import { Args, Flags } from '@oclif/core';
2
- import { AgentiaCommand } from '../../lib/agentia-command.js';
3
- import { testingBranchFlag, testingProjectFlag, testingUploadOperationFlags, } from '../../lib/testing-flags.js';
4
- import { buildFileOperationsFromSpecs, DEFAULT_TESTING_AUTHOR, uploadTestingJobFiles } from '../../lib/testing-operations.js';
5
- import { formatTestingRecord } from '../../lib/testing-types.js';
6
- export default class TestingUpdate extends AgentiaCommand {
7
- static args = {
8
- id: Args.integer({
9
- description: 'CRT job/test ID.',
10
- required: true,
11
- }),
12
- };
13
- static description = 'Update a Copado Robotic Testing test by uploading file operations';
14
- static examples = [
15
- '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --replace tests.robot',
16
- '<%= config.bin %> <%= command.id %> <job-id> --project <project-id> --add new.robot --remove old.robot --json',
17
- ];
18
- static flags = {
19
- ...testingProjectFlag,
20
- ...testingBranchFlag,
21
- ...testingUploadOperationFlags,
22
- 'author-email': Flags.string({
23
- default: DEFAULT_TESTING_AUTHOR.email,
24
- description: 'Author email for CRT file history.',
25
- }),
26
- 'author-name': Flags.string({
27
- default: DEFAULT_TESTING_AUTHOR.name,
28
- description: 'Author name for CRT file history.',
29
- }),
30
- 'base-path': Flags.string({ description: 'Require local upload files to stay within this directory.' }),
31
- 'dry-run': Flags.boolean({ default: false, description: 'Return a sanitized plan without making a request.' }),
32
- message: Flags.string({ description: 'Commit message for CRT file history.' }),
33
- 'parent-commit': Flags.string({ description: 'Expected parent commit hash.' }),
34
- 'remote-prefix': Flags.string({ description: 'Validated remote path prefix for all operations.' }),
35
- };
36
- async run() {
37
- const { args, flags } = await this.parse(TestingUpdate);
38
- const operations = buildFileOperationsFromSpecs({
39
- add: flags.add,
40
- basePath: flags['base-path'],
41
- remotePrefix: flags['remote-prefix'],
42
- remove: flags.remove,
43
- replace: flags.replace,
44
- });
45
- if (operations.length === 0) {
46
- this.error('Provide at least one of --add, --replace, or --remove.', { exit: 2 });
47
- }
48
- const result = await this.withSpinner('Updating testing test', () => uploadTestingJobFiles({
49
- author: { email: flags['author-email'], name: flags['author-name'] },
50
- branch: flags.branch,
51
- commitMessage: flags.message,
52
- dryRun: flags['dry-run'],
53
- jobId: args.id,
54
- operations,
55
- parentCommitHash: flags['parent-commit'],
56
- projectId: flags.project,
57
- }));
58
- this.display(() => {
59
- this.log(`Testing test updated with ${operations.length} file operation(s).`);
60
- this.log(formatTestingRecord(result.response));
61
- });
62
- return result;
63
- }
64
- }
65
- //# sourceMappingURL=update.js.map
@@ -1,8 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const formatTestingDataTableHuman = modules["testing-data-command.js"]["formatTestingDataTableHuman"]
3
- const parseTestingDataTopics = modules["testing-data-command.js"]["parseTestingDataTopics"]
4
- const prepareTestingDataInput = modules["testing-data-command.js"]["prepareTestingDataInput"]
5
- const testingDataInputFlags = modules["testing-data-command.js"]["testingDataInputFlags"]
6
- const testingDataJobFlag = modules["testing-data-command.js"]["testingDataJobFlag"]
7
- const testingDataRevisionFlag = modules["testing-data-command.js"]["testingDataRevisionFlag"]
8
- export {formatTestingDataTableHuman, parseTestingDataTopics, prepareTestingDataInput, testingDataInputFlags, testingDataJobFlag, testingDataRevisionFlag};
@@ -1,20 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const TESTING_DATA_MAX_CELLS = modules["testing-data-core.js"]["TESTING_DATA_MAX_CELLS"]
3
- const TESTING_DATA_MAX_CELL_BYTES = modules["testing-data-core.js"]["TESTING_DATA_MAX_CELL_BYTES"]
4
- const TESTING_DATA_MAX_COLUMNS = modules["testing-data-core.js"]["TESTING_DATA_MAX_COLUMNS"]
5
- const TESTING_DATA_MAX_EXPANDED_RUNS = modules["testing-data-core.js"]["TESTING_DATA_MAX_EXPANDED_RUNS"]
6
- const TESTING_DATA_MAX_ROWS = modules["testing-data-core.js"]["TESTING_DATA_MAX_ROWS"]
7
- const buildTestingDataDisplayGrid = modules["testing-data-core.js"]["buildTestingDataDisplayGrid"]
8
- const coerceTestingDataMatrix = modules["testing-data-core.js"]["coerceTestingDataMatrix"]
9
- const formatTestingDatasetKey = modules["testing-data-core.js"]["formatTestingDatasetKey"]
10
- const normalizeTestingDataTable = modules["testing-data-core.js"]["normalizeTestingDataTable"]
11
- const normalizeTestingDataTables = modules["testing-data-core.js"]["normalizeTestingDataTables"]
12
- const parseTestingDataTableRunSpecs = modules["testing-data-core.js"]["parseTestingDataTableRunSpecs"]
13
- const parseTestingDatasetSelector = modules["testing-data-core.js"]["parseTestingDatasetSelector"]
14
- const prepareTestingData = modules["testing-data-core.js"]["prepareTestingData"]
15
- const sliceTestingDataTable = modules["testing-data-core.js"]["sliceTestingDataTable"]
16
- const stripTestingDataTablePrefix = modules["testing-data-core.js"]["stripTestingDataTablePrefix"]
17
- const transposeTestingData = modules["testing-data-core.js"]["transposeTestingData"]
18
- const unwrapTestingDataHeaders = modules["testing-data-core.js"]["unwrapTestingDataHeaders"]
19
- const validateTestingDataMatrix = modules["testing-data-core.js"]["validateTestingDataMatrix"]
20
- export {TESTING_DATA_MAX_CELLS, TESTING_DATA_MAX_CELL_BYTES, TESTING_DATA_MAX_COLUMNS, TESTING_DATA_MAX_EXPANDED_RUNS, TESTING_DATA_MAX_ROWS, buildTestingDataDisplayGrid, coerceTestingDataMatrix, formatTestingDatasetKey, normalizeTestingDataTable, normalizeTestingDataTables, parseTestingDataTableRunSpecs, parseTestingDatasetSelector, prepareTestingData, sliceTestingDataTable, stripTestingDataTablePrefix, transposeTestingData, unwrapTestingDataHeaders, validateTestingDataMatrix};
@@ -1,6 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const normalizeTestingDataPath = modules["testing-data-export.js"]["normalizeTestingDataPath"]
3
- const resolveTestingDataExportFormat = modules["testing-data-export.js"]["resolveTestingDataExportFormat"]
4
- const serializeDelimitedTestingData = modules["testing-data-export.js"]["serializeDelimitedTestingData"]
5
- const writeTestingDataFile = modules["testing-data-export.js"]["writeTestingDataFile"]
6
- export {normalizeTestingDataPath, resolveTestingDataExportFormat, serializeDelimitedTestingData, writeTestingDataFile};
@@ -1,6 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const parseDelimitedTestingData = modules["testing-data-import.js"]["parseDelimitedTestingData"]
3
- const parseTestingDataText = modules["testing-data-import.js"]["parseTestingDataText"]
4
- const readTestingDataFile = modules["testing-data-import.js"]["readTestingDataFile"]
5
- const readTestingDataInput = modules["testing-data-import.js"]["readTestingDataInput"]
6
- export {parseDelimitedTestingData, parseTestingDataText, readTestingDataFile, readTestingDataInput};
@@ -1,12 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const TESTING_DATA_MAX_INPUT_BYTES = modules["testing-data-io.js"]["TESTING_DATA_MAX_INPUT_BYTES"]
3
- const TESTING_DATA_MAX_XLSX_EXPANDED_BYTES = modules["testing-data-io.js"]["TESTING_DATA_MAX_XLSX_EXPANDED_BYTES"]
4
- const normalizeTestingDataPath = modules["testing-data-io.js"]["normalizeTestingDataPath"]
5
- const parseDelimitedTestingData = modules["testing-data-io.js"]["parseDelimitedTestingData"]
6
- const parseTestingDataText = modules["testing-data-io.js"]["parseTestingDataText"]
7
- const readTestingDataFile = modules["testing-data-io.js"]["readTestingDataFile"]
8
- const readTestingDataInput = modules["testing-data-io.js"]["readTestingDataInput"]
9
- const resolveTestingDataExportFormat = modules["testing-data-io.js"]["resolveTestingDataExportFormat"]
10
- const serializeDelimitedTestingData = modules["testing-data-io.js"]["serializeDelimitedTestingData"]
11
- const writeTestingDataFile = modules["testing-data-io.js"]["writeTestingDataFile"]
12
- export {TESTING_DATA_MAX_INPUT_BYTES, TESTING_DATA_MAX_XLSX_EXPANDED_BYTES, normalizeTestingDataPath, parseDelimitedTestingData, parseTestingDataText, readTestingDataFile, readTestingDataInput, resolveTestingDataExportFormat, serializeDelimitedTestingData, writeTestingDataFile};
@@ -1,10 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const createTestingDataSession = modules["testing-data-operations.js"]["createTestingDataSession"]
3
- const createTestingDataTable = modules["testing-data-operations.js"]["createTestingDataTable"]
4
- const deleteTestingDataTable = modules["testing-data-operations.js"]["deleteTestingDataTable"]
5
- const getTestingDataTable = modules["testing-data-operations.js"]["getTestingDataTable"]
6
- const listTestingDataTables = modules["testing-data-operations.js"]["listTestingDataTables"]
7
- const testingDataTableEndpoint = modules["testing-data-operations.js"]["testingDataTableEndpoint"]
8
- const testingDataTablesEndpoint = modules["testing-data-operations.js"]["testingDataTablesEndpoint"]
9
- const updateTestingDataTable = modules["testing-data-operations.js"]["updateTestingDataTable"]
10
- export {createTestingDataSession, createTestingDataTable, deleteTestingDataTable, getTestingDataTable, listTestingDataTables, testingDataTableEndpoint, testingDataTablesEndpoint, updateTestingDataTable};
@@ -1,4 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const TESTING_DATA_EXPORT_FORMATS = modules["testing-data-types.js"]["TESTING_DATA_EXPORT_FORMATS"]
3
- const TESTING_DATA_HEADER_ORIENTATIONS = modules["testing-data-types.js"]["TESTING_DATA_HEADER_ORIENTATIONS"]
4
- export {TESTING_DATA_EXPORT_FORMATS, TESTING_DATA_HEADER_ORIENTATIONS};
@@ -1,6 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const TESTING_LIVE_API_ENDPOINTS = modules["testing-live-endpoints.js"]["TESTING_LIVE_API_ENDPOINTS"]
3
- const testingLiveJobSessionEndpoint = modules["testing-live-endpoints.js"]["testingLiveJobSessionEndpoint"]
4
- const testingLiveSessionPath = modules["testing-live-endpoints.js"]["testingLiveSessionPath"]
5
- const validateTestingLiveSessionPath = modules["testing-live-endpoints.js"]["validateTestingLiveSessionPath"]
6
- export {TESTING_LIVE_API_ENDPOINTS, testingLiveJobSessionEndpoint, testingLiveSessionPath, validateTestingLiveSessionPath};
@@ -1,7 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const TESTING_LIVE_HISTORY_MAX_LIMIT = modules["testing-live-history.js"]["TESTING_LIVE_HISTORY_MAX_LIMIT"]
3
- const TESTING_LIVE_HISTORY_MAX_LINE_BYTES = modules["testing-live-history.js"]["TESTING_LIVE_HISTORY_MAX_LINE_BYTES"]
4
- const TESTING_LIVE_HISTORY_MAX_READ_BYTES = modules["testing-live-history.js"]["TESTING_LIVE_HISTORY_MAX_READ_BYTES"]
5
- const appendTestingLiveHistory = modules["testing-live-history.js"]["appendTestingLiveHistory"]
6
- const readTestingLiveHistory = modules["testing-live-history.js"]["readTestingLiveHistory"]
7
- export {TESTING_LIVE_HISTORY_MAX_LIMIT, TESTING_LIVE_HISTORY_MAX_LINE_BYTES, TESTING_LIVE_HISTORY_MAX_READ_BYTES, appendTestingLiveHistory, readTestingLiveHistory};
@@ -1,3 +0,0 @@
1
- import {modules} from './runtime.js';
2
- const TestingRunCommand = modules["testing-run-command.js"]["TestingRunCommand"]
3
- export {TestingRunCommand};