@copado/agentia-cli 1.0.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 (226) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/README.md +2252 -1529
  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/cloud/commit.js +7 -2
  6. package/dist/commands/cicd/credential/auth/status.js +38 -0
  7. package/dist/commands/cicd/credential/auth/web/login.js +54 -0
  8. package/dist/commands/cicd/credential/list.js +13 -17
  9. package/dist/commands/cicd/credential/open.js +30 -0
  10. package/dist/commands/cicd/credential/update.js +9 -12
  11. package/dist/commands/cicd/environment/auth/status.js +34 -13
  12. package/dist/commands/cicd/environment/auth/web/login.js +20 -4
  13. package/dist/commands/cicd/environment/open.js +6 -22
  14. package/dist/commands/cicd/extension/create.js +53 -0
  15. package/dist/commands/cicd/extension/install.js +127 -0
  16. package/dist/commands/cicd/extension/package.js +35 -0
  17. package/dist/commands/cicd/extension/publish.js +61 -0
  18. package/dist/commands/cicd/extension/uninstall.js +99 -0
  19. package/dist/commands/cicd/extension/validate.js +47 -0
  20. package/dist/commands/cicd/extension-configuration/get.js +24 -0
  21. package/dist/commands/cicd/extension-configuration/list.js +49 -0
  22. package/dist/commands/cicd/extension-configuration/open.js +38 -0
  23. package/dist/commands/cicd/metadata/content/get.js +1 -1
  24. package/dist/commands/cicd/metadata/dependency/list.js +2 -2
  25. package/dist/commands/cicd/metadata/explore.js +81 -0
  26. package/dist/commands/cicd/metadata/list.js +3 -3
  27. package/dist/commands/cicd/metadata/refresh/deleted.js +1 -1
  28. package/dist/commands/cicd/metadata/refresh/run.js +2 -2
  29. package/dist/commands/cicd/metadata/refresh/status.js +2 -2
  30. package/dist/commands/cicd/pipeline/automation/activate.js +39 -0
  31. package/dist/commands/cicd/pipeline/automation/create.js +33 -0
  32. package/dist/commands/cicd/pipeline/automation/deactivate.js +39 -0
  33. package/dist/commands/cicd/pipeline/automation/delete.js +45 -0
  34. package/dist/commands/cicd/pipeline/automation/get.js +32 -0
  35. package/dist/commands/cicd/pipeline/automation/list.js +38 -0
  36. package/dist/commands/cicd/pipeline/automation/open.js +38 -0
  37. package/dist/commands/cicd/pipeline/automation/update.js +38 -0
  38. package/dist/commands/cicd/pipeline/quality-gate/activate.js +39 -0
  39. package/dist/commands/cicd/pipeline/quality-gate/create.js +34 -0
  40. package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +39 -0
  41. package/dist/commands/cicd/pipeline/quality-gate/delete.js +45 -0
  42. package/dist/commands/cicd/pipeline/quality-gate/get.js +32 -0
  43. package/dist/commands/cicd/pipeline/quality-gate/list.js +34 -0
  44. package/dist/commands/cicd/pipeline/quality-gate/open.js +38 -0
  45. package/dist/commands/cicd/pipeline/quality-gate/update.js +38 -0
  46. package/dist/commands/cicd/work/create.js +1 -0
  47. package/dist/commands/cicd/work/environment-sync.js +8 -7
  48. package/dist/commands/cicd/work/get.js +18 -2
  49. package/dist/commands/cicd/work/set.js +6 -4
  50. package/dist/commands/cicd/work/submit.js +3 -2
  51. package/dist/commands/cicd/work/update.js +1 -0
  52. package/dist/commands/plugins/install.js +2 -5
  53. package/dist/commands/setup/skills/create.js +29 -3
  54. package/dist/commands/setup/skills/list.js +55 -0
  55. package/dist/commands/setup/skills/update.js +37 -4
  56. package/dist/commands/setup.js +3 -3
  57. package/dist/commands/testing/data-table/create.js +1 -2
  58. package/dist/commands/testing/data-table/delete.js +1 -2
  59. package/dist/commands/testing/data-table/export.js +2 -6
  60. package/dist/commands/testing/data-table/get.js +2 -4
  61. package/dist/commands/testing/data-table/list.js +1 -2
  62. package/dist/commands/testing/data-table/update.js +3 -4
  63. package/dist/commands/testing/job/create.js +26 -22
  64. package/dist/commands/testing/job/delete.js +2 -2
  65. package/dist/commands/testing/job/files/download.js +73 -0
  66. package/dist/commands/testing/job/files/list.js +43 -0
  67. package/dist/commands/testing/job/{upload.js → files/upload.js} +13 -9
  68. package/dist/commands/testing/job/get.js +2 -2
  69. package/dist/commands/testing/job/list.js +1 -1
  70. package/dist/commands/testing/job/refs.js +4 -4
  71. package/dist/commands/testing/job/run.js +134 -1
  72. package/dist/commands/testing/{build → job/runs}/abort.js +10 -8
  73. package/dist/commands/testing/job/runs/get.js +42 -0
  74. package/dist/commands/testing/{build → job/runs}/list.js +19 -10
  75. package/dist/commands/testing/{logs.js → job/runs/logs.js} +9 -6
  76. package/dist/commands/testing/{build → job/runs}/search.js +9 -7
  77. package/dist/commands/testing/job/schedule/get.js +5 -11
  78. package/dist/commands/testing/job/schedule/remove.js +3 -3
  79. package/dist/commands/testing/job/schedule/set.js +3 -3
  80. package/dist/commands/testing/job/update.js +22 -65
  81. package/dist/commands/testing/live/continue.js +5 -10
  82. package/dist/commands/testing/live/execute.js +3 -3
  83. package/dist/commands/testing/live/history.js +7 -2
  84. package/dist/commands/testing/live/inspect.js +5 -4
  85. package/dist/commands/testing/live/interrupt.js +5 -10
  86. package/dist/commands/testing/live/recorder.js +23 -115
  87. package/dist/commands/testing/live/reports.js +3 -3
  88. package/dist/commands/testing/live/screenshot.js +3 -3
  89. package/dist/commands/testing/live/set-options.js +11 -4
  90. package/dist/commands/testing/live/start.js +9 -4
  91. package/dist/commands/testing/live/status.js +2 -5
  92. package/dist/commands/testing/live/stop.js +3 -5
  93. package/dist/commands/testing/live/view.js +2 -2
  94. package/dist/commands/testing/project/create.js +1 -17
  95. package/dist/commands/testing/project/get.js +0 -1
  96. package/dist/commands/testing/project/list.js +2 -2
  97. package/dist/commands/testing/project/permission/set.js +3 -7
  98. package/dist/commands/testing/project/permission/update.js +2 -2
  99. package/dist/commands/testing/robot/create.js +22 -25
  100. package/dist/commands/testing/robot/get.js +1 -1
  101. package/dist/commands/testing/robot/list.js +3 -3
  102. package/dist/commands/testing/robot/update.js +3 -3
  103. package/dist/commands/testing/user-parameter/create.js +3 -9
  104. package/dist/commands/testing/user-parameter/update.js +1 -7
  105. package/dist/commands/testing/variable/create.js +4 -9
  106. package/dist/commands/testing/variable/list.js +3 -3
  107. package/dist/commands/testing/variable/update.js +5 -12
  108. package/dist/help.js +17 -0
  109. package/dist/lib/ai-types.js +2 -1
  110. package/dist/lib/claude-mcp-config.js +15 -0
  111. package/dist/lib/credential-sync.js +1 -2
  112. package/dist/lib/defaults-store.js +4 -1
  113. package/dist/lib/environment-auth-status.js +2 -1
  114. package/dist/lib/environment-auth.js +2 -1
  115. package/dist/lib/environment-credential-flags.js +3 -1
  116. package/dist/lib/environment-credential-operations.js +8 -2
  117. package/dist/lib/environment-types.js +3 -1
  118. package/dist/lib/extension/assets.js +4 -0
  119. package/dist/lib/extension/create.js +3 -0
  120. package/dist/lib/extension/git.js +17 -0
  121. package/dist/lib/extension/index.js +27 -0
  122. package/dist/lib/extension/install.js +4 -0
  123. package/dist/lib/extension/manifest.js +21 -0
  124. package/dist/lib/extension/package.js +3 -0
  125. package/dist/lib/extension/paths.js +5 -0
  126. package/dist/lib/extension/publish.js +3 -0
  127. package/dist/lib/extension/sf-deploy.js +8 -0
  128. package/dist/lib/extension/source.js +7 -0
  129. package/dist/lib/extension/uninstall.js +3 -0
  130. package/dist/lib/extension-configuration-ops.js +4 -0
  131. package/dist/lib/extension-configuration-sanitize.js +7 -0
  132. package/dist/lib/extension-configuration-types.js +8 -0
  133. package/dist/lib/function-types.js +3 -1
  134. package/dist/lib/http-proxy.js +13 -0
  135. package/dist/lib/mcp/ai-tools.js +3 -3
  136. package/dist/lib/mcp/command-id.js +2 -0
  137. package/dist/lib/mcp/pipeline-automation-quality-tools.js +452 -0
  138. package/dist/lib/mcp/server.js +70 -1
  139. package/dist/lib/mcp/testing-live-tools.js +24 -13
  140. package/dist/lib/mcp/testing-tools.js +239 -550
  141. package/dist/lib/mcp/tool-annotations.js +27 -18
  142. package/dist/lib/mcp/tools.js +117 -32
  143. package/dist/lib/mcp/work-tools.js +37 -10
  144. package/dist/lib/metadata-explore.js +8 -0
  145. package/dist/lib/network-error.js +8 -0
  146. package/dist/lib/pipeline-automation-flags.js +12 -0
  147. package/dist/lib/pipeline-automation-ops.js +9 -0
  148. package/dist/lib/pipeline-automation-types.js +18 -0
  149. package/dist/lib/pipeline-lifecycle-id.js +3 -0
  150. package/dist/lib/pipeline-quality-gate-flags.js +12 -0
  151. package/dist/lib/pipeline-quality-gate-ops.js +9 -0
  152. package/dist/lib/pipeline-quality-gate-types.js +17 -0
  153. package/dist/lib/plugin-host/ai.js +2 -1
  154. package/dist/lib/plugin-skills.js +22 -0
  155. package/dist/lib/plugin-trust/gate.js +1 -2
  156. package/dist/lib/project-root.js +3 -1
  157. package/dist/lib/project-setup.js +5 -4
  158. package/dist/lib/runtime.js +1 -1
  159. package/dist/lib/salesforce-tooling-check.js +6 -0
  160. package/dist/lib/setup-skills.js +4 -1
  161. package/dist/lib/setup-templates.js +1 -4
  162. package/dist/lib/skill-packs.js +7 -0
  163. package/dist/lib/template-types.js +3 -1
  164. package/dist/lib/testing-archive.js +9 -0
  165. package/dist/lib/testing-data-table.js +39 -0
  166. package/dist/lib/testing-execution.js +22 -0
  167. package/dist/lib/testing-flags.js +6 -2
  168. package/dist/lib/testing-gateway.js +4 -1
  169. package/dist/lib/testing-live-command.js +3 -1
  170. package/dist/lib/testing-live-operations.js +7 -1
  171. package/dist/lib/testing-live-recorder.js +3 -1
  172. package/dist/lib/testing-live-state.js +8 -1
  173. package/dist/lib/testing-operations.js +6 -21
  174. package/dist/lib/testing-sanitization.js +2 -1
  175. package/dist/lib/testing-secret-input.js +2 -1
  176. package/dist/lib/testing-types.js +24 -3
  177. package/dist/lib/work-committed-metadata.js +4 -0
  178. package/dist/lib/work-environment-sync.js +3 -1
  179. package/dist/lib/work-flags.js +6 -1
  180. package/dist/lib/work-get.js +2 -1
  181. package/dist/lib/work-local-development-flow.js +4 -0
  182. package/dist/lib/work-submit-wait.js +3 -1
  183. package/oclif.manifest.json +9771 -9650
  184. package/package.json +35 -2
  185. package/templates/rules/cursor/agentia.mdc +29 -0
  186. package/templates/skills/agentia/SKILL.md +29 -0
  187. package/templates/skills/agentia-ai/SKILL.md +3 -4
  188. package/templates/skills/agentia-ai/references/ai-agents.md +2 -2
  189. package/templates/skills/agentia-cicd/SKILL.md +9 -4
  190. package/templates/skills/agentia-cicd/references/environments-and-credentials.md +19 -13
  191. package/templates/skills/agentia-cicd/references/extensions.md +52 -0
  192. package/templates/skills/agentia-cicd/references/pipelines.md +36 -2
  193. package/templates/skills/agentia-cicd/references/work.md +25 -8
  194. package/templates/skills/agentia-metadata/SKILL.md +140 -0
  195. package/templates/skills/agentia-metadata/references/metadata-explore.md +142 -0
  196. package/templates/skills/agentia-testing/SKILL.md +3 -3
  197. package/templates/skills/agentia-testing/references/tests.md +14 -14
  198. package/dist/commands/testing/build/get.js +0 -38
  199. package/dist/commands/testing/build/latest.js +0 -40
  200. package/dist/commands/testing/build/logs.js +0 -47
  201. package/dist/commands/testing/build/run.js +0 -26
  202. package/dist/commands/testing/create.js +0 -2
  203. package/dist/commands/testing/job/download.js +0 -54
  204. package/dist/commands/testing/job/files.js +0 -34
  205. package/dist/commands/testing/run.js +0 -26
  206. package/dist/commands/testing/status.js +0 -45
  207. package/dist/commands/testing/test/create.js +0 -2
  208. package/dist/commands/testing/test/logs.js +0 -2
  209. package/dist/commands/testing/test/run.js +0 -26
  210. package/dist/commands/testing/test/status.js +0 -2
  211. package/dist/commands/testing/test/update.js +0 -2
  212. package/dist/commands/testing/update.js +0 -65
  213. package/dist/lib/testing-data-command.js +0 -8
  214. package/dist/lib/testing-data-core.js +0 -20
  215. package/dist/lib/testing-data-export.js +0 -6
  216. package/dist/lib/testing-data-import.js +0 -6
  217. package/dist/lib/testing-data-io.js +0 -12
  218. package/dist/lib/testing-data-operations.js +0 -10
  219. package/dist/lib/testing-data-types.js +0 -4
  220. package/dist/lib/testing-live-endpoints.js +0 -6
  221. package/dist/lib/testing-live-history.js +0 -7
  222. package/dist/lib/testing-run-command.js +0 -3
  223. package/dist/lib/testing-schedule.js +0 -5
  224. package/dist/lib/testing-session.js +0 -5
  225. package/dist/lib/testing-watch.js +0 -4
  226. package/templates/AGENTS.md +0 -24
@@ -0,0 +1,142 @@
1
+ <!-- Agentia managed skill file: agentia setup skills -->
2
+
3
+ # Org Intelligence — Metadata Explore Reference
4
+
5
+ **Org Intelligence** is Agentia’s read-only Salesforce metadata inspection
6
+ feature: `agentia cicd metadata explore` and MCP `agentia_metadata_explore`
7
+ call `POST /agentia/headless/ai_metadata_tool` against the user's connected
8
+ sandbox/developer org (Copado credential or Salesforce session).
9
+
10
+ This is **org Metadata API exploration**, not Copado’s metadata index
11
+ (`cicd metadata list`) or content compare helpers.
12
+
13
+ **Source priority:** local project files first (when present), then the org.
14
+
15
+ **Can:** read / list / search / describe metadata; `find_references`; run
16
+ specified Apex tests when asked.
17
+
18
+ **Cannot:** read org **data** (records); **edit**, create, update, validate, or
19
+ deploy metadata. Do not invent validate/deploy/create/update, `check_async_id`,
20
+ or flags such as `--metadata-files`, `--async-id`, `--test-level`,
21
+ `--validate-only`, or `--organization-name`.
22
+
23
+ ## Prerequisites
24
+
25
+ ```sh
26
+ agentia auth get --cicd --json
27
+ ```
28
+
29
+ Omitting `--credential-id` / `credentialId` uses the CICD project default
30
+ credential automatically. Override only when the user needs a different org.
31
+ Credential auth and `--session-id` + `--endpoint` are mutually exclusive.
32
+
33
+ ```sh
34
+ agentia cicd project default set --credential <credential-id>
35
+ agentia cicd environment list --type Sandbox --json
36
+ agentia cicd credential list --environmentid <environment-id> --json
37
+ ```
38
+
39
+ ## Shell Quoting
40
+
41
+ Always quote CLI wildcards:
42
+
43
+ ```sh
44
+ agentia cicd metadata explore --action list --object-type ApexClass --pattern 'Account*' --json
45
+ ```
46
+
47
+ MCP `pattern` does not need shell quotes.
48
+
49
+ ## CLI Flags / MCP Args
50
+
51
+ | CLI | MCP | Notes |
52
+ | --- | --- | --- |
53
+ | `--action` | `action` | Required. `list`, `search`, `read_documentation`, `describe_type`, `read`, `find_references`, `run_apex_tests` |
54
+ | `--object-type` | `objectType` | e.g. `ApexClass`, `CustomObject`, `Flow` |
55
+ | `--full-name` | `fullName` | Required for `read` |
56
+ | `--pattern` | `pattern` | Default `*`; quote wildcards on CLI |
57
+ | `--apex-unit-tests` | `apexUnitTests` | Required for `run_apex_tests` |
58
+ | `--credential-id` | `credentialId` | Overrides project default |
59
+ | `--session-id` | `sessionId` | With `--endpoint` only; never log |
60
+ | `--endpoint` | `endpoint` | Salesforce instance URL with session |
61
+ | `--json` | — | `{ output, credentialId? }` plus experimental warning |
62
+
63
+ ## Actions
64
+
65
+ ### `list`
66
+
67
+ List names for one metadata type. Use returned `fullName` values with `read`.
68
+
69
+ ```sh
70
+ agentia cicd metadata explore --action list --object-type CustomObject --pattern 'Account*' --json
71
+ ```
72
+
73
+ Special pattern rules:
74
+
75
+ - **CustomField / FieldSet / DuplicateRule / ListView** — pattern must start with
76
+ SObject + `.` (e.g. `Account.Name`, `Account.namespace__Name__c`).
77
+ - **Flow** — pattern matches API name, label, and triggering object API name.
78
+
79
+ Unsupported listings: **Reports**, **Dashboards**, **Folders** — tell the user.
80
+
81
+ ### `search`
82
+
83
+ Text search across **ApexPage, ApexClass, ApexTrigger, ApexComponent** only.
84
+ Pattern ≥ 2 characters; at most one `*`.
85
+
86
+ ```sh
87
+ agentia cicd metadata explore --action search --pattern 'MyCtrl*' --json
88
+ ```
89
+
90
+ ### `describe_type` / `read_documentation`
91
+
92
+ Type shape vs tool-provided docs. Prefer `describe_type` for compact structure.
93
+
94
+ ```sh
95
+ agentia cicd metadata explore --action describe_type --object-type Flow --json
96
+ agentia cicd metadata explore --action read_documentation --object-type ApexClass --json
97
+ ```
98
+
99
+ ### `read`
100
+
101
+ Retrieve one component. **Profile contents are not supported**—inform the user
102
+ you cannot answer questions about Profile body/details.
103
+
104
+ ```sh
105
+ agentia cicd metadata explore --action read --object-type ApexClass --full-name ns__MyClass --json
106
+ ```
107
+
108
+ ### `find_references`
109
+
110
+ Partial reference/dependency lookup: metadata that uses or calls a given item.
111
+ Requires `--object-type` and `--full-name` (type + name of the referenced
112
+ component). Coverage may be incomplete—treat results as a starting point.
113
+
114
+ ```sh
115
+ agentia cicd metadata explore --action find_references --object-type ApexClass --full-name MyClass --json
116
+ ```
117
+
118
+ ### `run_apex_tests`
119
+
120
+ Requires explicit test class names. Cannot run all tests or local tests—ask the
121
+ user which classes to run.
122
+
123
+ ```sh
124
+ agentia cicd metadata explore --action run_apex_tests --apex-unit-tests MyClassTest --json
125
+ ```
126
+
127
+ ## Limits And Behavior
128
+
129
+ - Selected metadata access only—no org compare, no mass structure scan.
130
+ - Truncated/incomplete lists → narrow pattern or tell the user the scan is too broad.
131
+ - Tool returns YAML in `output`; **user-facing replies should be XML**, not YAML.
132
+ - Never echo `--session-id` or other secrets.
133
+
134
+ ## Related Commands
135
+
136
+ | Need | Command |
137
+ | --- | --- |
138
+ | Org Metadata API explore (read-oriented) | `cicd metadata explore` |
139
+ | Copado metadata index search | `cicd metadata list` |
140
+ | Indexed/Git content blobs | `cicd metadata content get` |
141
+ | Org/Git content diff | `cicd metadata content compare` |
142
+ | Copado dependency graph | `cicd metadata dependency list` |
@@ -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