@copado/agentia-cli 0.11.0-alpha.0 → 0.14.0-alpha.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/README.md CHANGED
@@ -1,46 +1,43 @@
1
- @copado/agentia-cli
2
- =================
1
+ # @copado/agentia-cli
3
2
 
4
3
  Command-line interface for Agentia headless Copado workflows (auth, environments, jobs, pipelines, metadata, and local MCP).
5
4
 
6
-
7
5
  [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
8
6
  [![Version](https://img.shields.io/npm/v/%40copado%2Fagentia-cli.svg)](https://www.npmjs.com/package/@copado/agentia-cli)
9
7
  [![Downloads/week](https://img.shields.io/npm/dw/%40copado%2Fagentia-cli.svg)](https://www.npmjs.com/package/@copado/agentia-cli)
10
8
 
11
-
12
9
  <!-- toc -->
10
+ * [@copado/agentia-cli](#copadoagentia-cli)
13
11
  * [Usage](#usage)
14
- * [Integration Testing](#integration-testing)
15
12
  * [Local MCP Server](#local-mcp-server)
16
13
  * [License](#license)
17
14
  * [Commands](#commands)
18
15
  <!-- tocstop -->
16
+
19
17
  # Usage
18
+
20
19
  <!-- usage -->
21
20
  ```sh-session
22
21
  $ npm install -g @copado/agentia-cli
23
22
  $ agentia COMMAND
24
23
  running command...
25
24
  $ agentia (--version)
26
- @copado/agentia-cli/0.11.0-alpha.0 linux-x64 node-v22.23.2
25
+ @copado/agentia-cli/0.14.0-alpha.0 linux-x64 node-v22.23.2
27
26
  $ agentia --help [COMMAND]
28
27
  USAGE
29
28
  $ agentia COMMAND
30
29
  ...
31
30
  ```
32
31
  <!-- usagestop -->
33
- # Integration Testing
34
32
 
35
- Live metadata integration tests are opt-in. They use the CICD API key and endpoint already stored with `agentia auth set`, plus local Test14 IDs from `.env.integration`.
33
+ Store CICD credentials before calling gateway-backed commands:
36
34
 
37
35
  ```sh-session
38
- $ agentia auth set --cicd <api-key> --custom-url https://test.api.copado.com
39
- $ cp .env.integration.example .env.integration
40
- $ npm run test:integration
36
+ $ agentia auth set --cicd <api-key> --region na
37
+ $ agentia auth get
41
38
  ```
42
39
 
43
- Fill `.env.integration` with the pipeline, org, credential, platform, metadata type, and API name values for the component you want to exercise. Do not commit `.env.integration`.
40
+ Contributor setup, local gateway mode, and integration testing are documented in [DEVELOPMENT.md](DEVELOPMENT.md).
44
41
 
45
42
  # Local MCP Server
46
43
 
@@ -48,17 +45,16 @@ Agentia can run as a local Model Context Protocol (MCP) server over stdio. MCP-c
48
45
 
49
46
  ## Prerequisites
50
47
 
51
- 1. Install or link the CLI so `agentia` is available:
48
+ 1. Install the CLI so `agentia` is available:
52
49
 
53
50
  ```sh-session
54
51
  $ npm install -g @copado/agentia-cli
55
- $ npm run build && npm link
56
52
  ```
57
53
 
58
54
  2. Store CICD credentials. The MCP server reuses the same keychain-backed auth as the CLI:
59
55
 
60
56
  ```sh-session
61
- $ agentia auth set --cicd <api-key> --custom-url https://test.api.copado.com
57
+ $ agentia auth set --cicd <api-key> --region na
62
58
  $ agentia auth get
63
59
  ```
64
60
 
@@ -92,39 +88,20 @@ Add an MCP server entry that launches Agentia:
92
88
  }
93
89
  ```
94
90
 
95
- If Cursor cannot resolve `agentia` on `PATH`, use the absolute binary from this repo:
96
-
97
- ```json
98
- {
99
- "mcpServers": {
100
- "agentia": {
101
- "command": "/absolute/path/to/agentia-headless/cli/bin/run.js",
102
- "args": ["mcp", "start"]
103
- }
104
- }
105
- }
106
- ```
107
-
108
91
  After saving the config, reload MCP servers in Cursor. The Agentia tools should appear in the MCP tool list.
109
92
 
110
- For local development, rebuild after code changes so Cursor picks up the latest `dist` output:
111
-
112
- ```sh-session
113
- $ npm run build
114
- ```
115
-
116
93
  ## Available tools
117
94
 
118
95
  Tools are JSON-safe and return structured results. Sensitive fields are redacted.
119
96
 
120
- | Topic | Tools |
121
- | --- | --- |
122
- | Environment | `agentia_environment_list`, `agentia_environment_get`, `agentia_environment_create`, `agentia_environment_update` |
123
- | Job | `agentia_job_list`, `agentia_job_get`, `agentia_job_run`, `agentia_job_resume`, `agentia_job_kill`, `agentia_job_pause` |
124
- | Pipeline | `agentia_pipeline_list`, `agentia_pipeline_get`, `agentia_pipeline_connection_list` |
125
- | Project | `agentia_project_list`, `agentia_project_default_get`, `agentia_project_default_set`, `agentia_project_default_unset` |
126
- | User | `agentia_user_get` |
127
- | Metadata | `agentia_metadata_list`, `agentia_metadata_content_get`, `agentia_metadata_content_compare`, `agentia_metadata_index_compare`, `agentia_metadata_dependency_list` |
97
+ | Topic | Tools |
98
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
99
+ | Environment | `agentia_environment_list`, `agentia_environment_get`, `agentia_environment_create`, `agentia_environment_update` |
100
+ | Job | `agentia_job_list`, `agentia_job_get`, `agentia_job_run`, `agentia_job_resume`, `agentia_job_kill`, `agentia_job_pause` |
101
+ | Pipeline | `agentia_pipeline_list`, `agentia_pipeline_get`, `agentia_pipeline_connection_list` |
102
+ | Project | `agentia_project_list`, `agentia_project_default_get`, `agentia_project_default_set`, `agentia_project_default_unset` |
103
+ | User | `agentia_user_get` |
104
+ | Metadata | `agentia_metadata_list`, `agentia_metadata_content_get`, `agentia_metadata_content_compare`, `agentia_metadata_index_compare`, `agentia_metadata_dependency_list` |
128
105
 
129
106
  ### Notes for common tools
130
107
 
@@ -136,21 +113,12 @@ Tools are JSON-safe and return structured results. Sensitive fields are redacted
136
113
  - User get defaults `id` to `me` for the authenticated user.
137
114
  - Environment create/update tools mirror the corresponding CLI commands and only send fields you provide.
138
115
 
139
- ## Verify locally
140
-
141
- Unit coverage for MCP registration and redaction:
142
-
143
- ```sh-session
144
- $ npm test -- --grep 'mcp'
145
- ```
146
-
147
- Live smoke check through Cursor: call `agentia_environment_list` or `agentia_project_default_get` after auth is configured. For pipeline and metadata tools, use Test14 IDs from your local `.env.integration`.
148
-
149
116
  # License
150
117
 
151
118
  Agentia CLI is distributed under the Copado End User License Agreement. See [LICENSE.md](LICENSE.md) for the full license terms.
152
119
 
153
120
  # Commands
121
+
154
122
  <!-- commands -->
155
123
  * [`agentia auth get`](#agentia-auth-get)
156
124
  * [`agentia auth set`](#agentia-auth-set)
@@ -197,6 +165,8 @@ Agentia CLI is distributed under the Copado End User License Agreement. See [LIC
197
165
  * [`agentia promotion conflict list`](#agentia-promotion-conflict-list)
198
166
  * [`agentia promotion conflict resolve ID`](#agentia-promotion-conflict-resolve-id)
199
167
  * [`agentia promotion conflict unresolve ID`](#agentia-promotion-conflict-unresolve-id)
168
+ * [`agentia promotion get ID`](#agentia-promotion-get-id)
169
+ * [`agentia promotion list`](#agentia-promotion-list)
200
170
  * [`agentia user get`](#agentia-user-get)
201
171
  * [`agentia work create`](#agentia-work-create)
202
172
  * [`agentia work delete ID`](#agentia-work-delete-id)
@@ -234,7 +204,7 @@ EXAMPLES
234
204
  $ agentia auth get --json
235
205
  ```
236
206
 
237
- _See code: [src/commands/auth/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/auth/get.ts)_
207
+ _See code: [src/commands/auth/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/auth/get.ts)_
238
208
 
239
209
  ## `agentia auth set`
240
210
 
@@ -272,7 +242,7 @@ EXAMPLES
272
242
  $ agentia auth set --cicd <copado-api-key> --region na --json
273
243
  ```
274
244
 
275
- _See code: [src/commands/auth/set.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/auth/set.ts)_
245
+ _See code: [src/commands/auth/set.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/auth/set.ts)_
276
246
 
277
247
  ## `agentia environment auth status ID`
278
248
 
@@ -302,7 +272,7 @@ EXAMPLES
302
272
  $ agentia environment auth status <environment-id> --json
303
273
  ```
304
274
 
305
- _See code: [src/commands/environment/auth/status.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/auth/status.ts)_
275
+ _See code: [src/commands/environment/auth/status.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/environment/auth/status.ts)_
306
276
 
307
277
  ## `agentia environment auth web login ID`
308
278
 
@@ -336,7 +306,7 @@ EXAMPLES
336
306
  $ agentia environment auth web login <environment-id> --json
337
307
  ```
338
308
 
339
- _See code: [src/commands/environment/auth/web/login.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/auth/web/login.ts)_
309
+ _See code: [src/commands/environment/auth/web/login.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/environment/auth/web/login.ts)_
340
310
 
341
311
  ## `agentia environment create NAME`
342
312
 
@@ -381,7 +351,7 @@ EXAMPLES
381
351
  $ agentia environment create Dev --json
382
352
  ```
383
353
 
384
- _See code: [src/commands/environment/create.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/create.ts)_
354
+ _See code: [src/commands/environment/create.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/environment/create.ts)_
385
355
 
386
356
  ## `agentia environment get ID`
387
357
 
@@ -406,7 +376,7 @@ EXAMPLES
406
376
  $ agentia environment get a0SKC000000CmZ2AU --json
407
377
  ```
408
378
 
409
- _See code: [src/commands/environment/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/get.ts)_
379
+ _See code: [src/commands/environment/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/environment/get.ts)_
410
380
 
411
381
  ## `agentia environment list`
412
382
 
@@ -438,7 +408,7 @@ EXAMPLES
438
408
  $ agentia environment list --json
439
409
  ```
440
410
 
441
- _See code: [src/commands/environment/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/list.ts)_
411
+ _See code: [src/commands/environment/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/environment/list.ts)_
442
412
 
443
413
  ## `agentia environment update ID`
444
414
 
@@ -484,7 +454,7 @@ EXAMPLES
484
454
  $ agentia environment update a0SKC000000CmZ2AU --name UAT --json
485
455
  ```
486
456
 
487
- _See code: [src/commands/environment/update.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/environment/update.ts)_
457
+ _See code: [src/commands/environment/update.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/environment/update.ts)_
488
458
 
489
459
  ## `agentia help [COMMAND]`
490
460
 
@@ -533,7 +503,7 @@ EXAMPLES
533
503
  $ agentia job get <job-id> --user-id <id> --organization-id <id> --json
534
504
  ```
535
505
 
536
- _See code: [src/commands/job/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/get.ts)_
506
+ _See code: [src/commands/job/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/job/get.ts)_
537
507
 
538
508
  ## `agentia job kill ID`
539
509
 
@@ -562,7 +532,7 @@ EXAMPLES
562
532
  $ agentia job kill <job-id> --user-id <id> --organization-id <id> --json
563
533
  ```
564
534
 
565
- _See code: [src/commands/job/kill.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/kill.ts)_
535
+ _See code: [src/commands/job/kill.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/job/kill.ts)_
566
536
 
567
537
  ## `agentia job list`
568
538
 
@@ -600,7 +570,7 @@ EXAMPLES
600
570
  $ agentia job list --user-id <id> --organization-id <id> --json
601
571
  ```
602
572
 
603
- _See code: [src/commands/job/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/list.ts)_
573
+ _See code: [src/commands/job/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/job/list.ts)_
604
574
 
605
575
  ## `agentia job pause ID`
606
576
 
@@ -629,7 +599,7 @@ EXAMPLES
629
599
  $ agentia job pause <job-id> --user-id <id> --organization-id <id> --json
630
600
  ```
631
601
 
632
- _See code: [src/commands/job/pause.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/pause.ts)_
602
+ _See code: [src/commands/job/pause.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/job/pause.ts)_
633
603
 
634
604
  ## `agentia job resume ID`
635
605
 
@@ -658,7 +628,7 @@ EXAMPLES
658
628
  $ agentia job resume <job-id> --user-id <id> --organization-id <id> --json
659
629
  ```
660
630
 
661
- _See code: [src/commands/job/resume.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/resume.ts)_
631
+ _See code: [src/commands/job/resume.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/job/resume.ts)_
662
632
 
663
633
  ## `agentia job run ID`
664
634
 
@@ -688,7 +658,7 @@ EXAMPLES
688
658
  $ agentia job run <job-id> --user-id <id> --organization-id <id> --restart --json
689
659
  ```
690
660
 
691
- _See code: [src/commands/job/run.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/job/run.ts)_
661
+ _See code: [src/commands/job/run.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/job/run.ts)_
692
662
 
693
663
  ## `agentia mcp start`
694
664
 
@@ -707,7 +677,7 @@ EXAMPLES
707
677
  $ agentia mcp start # long-running stdio MCP server for Cursor and other clients
708
678
  ```
709
679
 
710
- _See code: [src/commands/mcp/start.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/mcp/start.ts)_
680
+ _See code: [src/commands/mcp/start.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/mcp/start.ts)_
711
681
 
712
682
  ## `agentia metadata content compare`
713
683
 
@@ -750,7 +720,7 @@ EXAMPLES
750
720
  $ agentia metadata content compare --metadata-type ApexClass --api-name MyClass --json
751
721
  ```
752
722
 
753
- _See code: [src/commands/metadata/content/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/content/compare.ts)_
723
+ _See code: [src/commands/metadata/content/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/metadata/content/compare.ts)_
754
724
 
755
725
  ## `agentia metadata content get`
756
726
 
@@ -791,7 +761,7 @@ EXAMPLES
791
761
  $ agentia metadata content get --file requests.json --json
792
762
  ```
793
763
 
794
- _See code: [src/commands/metadata/content/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/content/get.ts)_
764
+ _See code: [src/commands/metadata/content/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/metadata/content/get.ts)_
795
765
 
796
766
  ## `agentia metadata dependency list`
797
767
 
@@ -839,7 +809,7 @@ EXAMPLES
839
809
  $ agentia metadata dependency list --from-changes --base-ref origin/main --retrieve-mode all --pipeline-id <id> --source-org-id <id> --source-credential-id <id>
840
810
  ```
841
811
 
842
- _See code: [src/commands/metadata/dependency/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/dependency/list.ts)_
812
+ _See code: [src/commands/metadata/dependency/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/metadata/dependency/list.ts)_
843
813
 
844
814
  ## `agentia metadata index compare`
845
815
 
@@ -873,7 +843,7 @@ EXAMPLES
873
843
  $ agentia metadata index compare --comparison-mode MIX --json
874
844
  ```
875
845
 
876
- _See code: [src/commands/metadata/index/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/index/compare.ts)_
846
+ _See code: [src/commands/metadata/index/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/metadata/index/compare.ts)_
877
847
 
878
848
  ## `agentia metadata list`
879
849
 
@@ -921,7 +891,7 @@ EXAMPLES
921
891
  $ agentia metadata list --source NewAndChanged --find-managed-packages --json
922
892
  ```
923
893
 
924
- _See code: [src/commands/metadata/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/list.ts)_
894
+ _See code: [src/commands/metadata/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/metadata/list.ts)_
925
895
 
926
896
  ## `agentia metadata refresh deleted`
927
897
 
@@ -953,7 +923,7 @@ EXAMPLES
953
923
  $ agentia metadata refresh deleted --env <environment-id> --user-id <id> --organization-id <id> --module-type vlocity --json
954
924
  ```
955
925
 
956
- _See code: [src/commands/metadata/refresh/deleted.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/refresh/deleted.ts)_
926
+ _See code: [src/commands/metadata/refresh/deleted.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/metadata/refresh/deleted.ts)_
957
927
 
958
928
  ## `agentia metadata refresh run`
959
929
 
@@ -996,7 +966,7 @@ EXAMPLES
996
966
  $ agentia metadata refresh run --env <environment-id> --user-id <id> --organization-id <id> --all --json
997
967
  ```
998
968
 
999
- _See code: [src/commands/metadata/refresh/run.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/refresh/run.ts)_
969
+ _See code: [src/commands/metadata/refresh/run.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/metadata/refresh/run.ts)_
1000
970
 
1001
971
  ## `agentia metadata refresh status`
1002
972
 
@@ -1028,7 +998,7 @@ EXAMPLES
1028
998
  $ agentia metadata refresh status --job-id <event-id> --user-id <id> --organization-id <id> --json
1029
999
  ```
1030
1000
 
1031
- _See code: [src/commands/metadata/refresh/status.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/metadata/refresh/status.ts)_
1001
+ _See code: [src/commands/metadata/refresh/status.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/metadata/refresh/status.ts)_
1032
1002
 
1033
1003
  ## `agentia pipeline connection list`
1034
1004
 
@@ -1055,7 +1025,7 @@ EXAMPLES
1055
1025
  $ agentia pipeline connection list --pipeline-id <pipeline-id> --user-id <id> --organization-id <id> --json
1056
1026
  ```
1057
1027
 
1058
- _See code: [src/commands/pipeline/connection/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/pipeline/connection/list.ts)_
1028
+ _See code: [src/commands/pipeline/connection/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/pipeline/connection/list.ts)_
1059
1029
 
1060
1030
  ## `agentia pipeline get ID`
1061
1031
 
@@ -1084,7 +1054,7 @@ EXAMPLES
1084
1054
  $ agentia pipeline get <pipeline-id> --user-id <id> --organization-id <id> --json
1085
1055
  ```
1086
1056
 
1087
- _See code: [src/commands/pipeline/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/pipeline/get.ts)_
1057
+ _See code: [src/commands/pipeline/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/pipeline/get.ts)_
1088
1058
 
1089
1059
  ## `agentia pipeline list`
1090
1060
 
@@ -1110,7 +1080,7 @@ EXAMPLES
1110
1080
  $ agentia pipeline list --user-id <id> --organization-id <id> --json
1111
1081
  ```
1112
1082
 
1113
- _See code: [src/commands/pipeline/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/pipeline/list.ts)_
1083
+ _See code: [src/commands/pipeline/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/pipeline/list.ts)_
1114
1084
 
1115
1085
  ## `agentia plugins`
1116
1086
 
@@ -1437,7 +1407,7 @@ EXAMPLES
1437
1407
  $ agentia project default get --json
1438
1408
  ```
1439
1409
 
1440
- _See code: [src/commands/project/default/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/project/default/get.ts)_
1410
+ _See code: [src/commands/project/default/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/project/default/get.ts)_
1441
1411
 
1442
1412
  ## `agentia project default set`
1443
1413
 
@@ -1474,7 +1444,7 @@ EXAMPLES
1474
1444
  $ agentia project default set --project my-project --json
1475
1445
  ```
1476
1446
 
1477
- _See code: [src/commands/project/default/set.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/project/default/set.ts)_
1447
+ _See code: [src/commands/project/default/set.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/project/default/set.ts)_
1478
1448
 
1479
1449
  ## `agentia project default unset`
1480
1450
 
@@ -1511,7 +1481,7 @@ EXAMPLES
1511
1481
  $ agentia project default unset --project --json
1512
1482
  ```
1513
1483
 
1514
- _See code: [src/commands/project/default/unset.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/project/default/unset.ts)_
1484
+ _See code: [src/commands/project/default/unset.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/project/default/unset.ts)_
1515
1485
 
1516
1486
  ## `agentia project list`
1517
1487
 
@@ -1538,7 +1508,7 @@ EXAMPLES
1538
1508
  $ agentia project list --mine --json
1539
1509
  ```
1540
1510
 
1541
- _See code: [src/commands/project/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/project/list.ts)_
1511
+ _See code: [src/commands/project/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/project/list.ts)_
1542
1512
 
1543
1513
  ## `agentia promotion conflict get ID`
1544
1514
 
@@ -1569,7 +1539,7 @@ EXAMPLES
1569
1539
  $ agentia promotion conflict get <conflict-id> -p <promotion-id> --json
1570
1540
  ```
1571
1541
 
1572
- _See code: [src/commands/promotion/conflict/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/promotion/conflict/get.ts)_
1542
+ _See code: [src/commands/promotion/conflict/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/promotion/conflict/get.ts)_
1573
1543
 
1574
1544
  ## `agentia promotion conflict list`
1575
1545
 
@@ -1594,7 +1564,7 @@ EXAMPLES
1594
1564
  $ agentia promotion conflict list -p <promotion-id> --json
1595
1565
  ```
1596
1566
 
1597
- _See code: [src/commands/promotion/conflict/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/promotion/conflict/list.ts)_
1567
+ _See code: [src/commands/promotion/conflict/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/promotion/conflict/list.ts)_
1598
1568
 
1599
1569
  ## `agentia promotion conflict resolve ID`
1600
1570
 
@@ -1627,7 +1597,7 @@ EXAMPLES
1627
1597
  $ agentia promotion conflict resolve <conflict-id> -p <promotion-id> --mode auto --json
1628
1598
  ```
1629
1599
 
1630
- _See code: [src/commands/promotion/conflict/resolve.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/promotion/conflict/resolve.ts)_
1600
+ _See code: [src/commands/promotion/conflict/resolve.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/promotion/conflict/resolve.ts)_
1631
1601
 
1632
1602
  ## `agentia promotion conflict unresolve ID`
1633
1603
 
@@ -1655,7 +1625,75 @@ EXAMPLES
1655
1625
  $ agentia promotion conflict unresolve <conflict-id> -p <promotion-id> --json
1656
1626
  ```
1657
1627
 
1658
- _See code: [src/commands/promotion/conflict/unresolve.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/promotion/conflict/unresolve.ts)_
1628
+ _See code: [src/commands/promotion/conflict/unresolve.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/promotion/conflict/unresolve.ts)_
1629
+
1630
+ ## `agentia promotion get ID`
1631
+
1632
+ Get a Copado promotion by ID
1633
+
1634
+ ```
1635
+ USAGE
1636
+ $ agentia promotion get ID [--json]
1637
+
1638
+ ARGUMENTS
1639
+ ID Copado promotion ID
1640
+
1641
+ GLOBAL FLAGS
1642
+ --json Format output as json.
1643
+
1644
+ DESCRIPTION
1645
+ Get a Copado promotion by ID
1646
+
1647
+ EXAMPLES
1648
+ $ agentia promotion get <promotion-id>
1649
+
1650
+ $ agentia promotion get <promotion-id> --json
1651
+ ```
1652
+
1653
+ _See code: [src/commands/promotion/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/promotion/get.ts)_
1654
+
1655
+ ## `agentia promotion list`
1656
+
1657
+ List Copado promotions
1658
+
1659
+ ```
1660
+ USAGE
1661
+ $ agentia promotion list [--json] [--created-by-id <value>] [--created-by-name <value>]
1662
+ [--destination-environment-id <value>] [--destination-environment-name <value>] [--is-back-promotion] [--limit
1663
+ <value>] [--name <value>] [--pipeline-id <value>] [--pipeline-name <value>] [--project-id <value>] [--project-name
1664
+ <value>] [--source-environment-id <value>] [--source-environment-name <value>] [--status <value>]
1665
+
1666
+ FLAGS
1667
+ --created-by-id=<value> Filter by creator ID
1668
+ --created-by-name=<value> Filter by creator name
1669
+ --destination-environment-id=<value> Filter by destination environment ID
1670
+ --destination-environment-name=<value> Filter by destination environment name
1671
+ --[no-]is-back-promotion Filter by back promotion
1672
+ --limit=<value> Maximum number of promotions to return (1-200)
1673
+ --name=<value> Filter by name
1674
+ --pipeline-id=<value> Filter by pipeline ID
1675
+ --pipeline-name=<value> Filter by pipeline name
1676
+ --project-id=<value> Filter by project ID
1677
+ --project-name=<value> Filter by project name
1678
+ --source-environment-id=<value> Filter by source environment ID
1679
+ --source-environment-name=<value> Filter by source environment name
1680
+ --status=<value> Filter by status
1681
+
1682
+ GLOBAL FLAGS
1683
+ --json Format output as json.
1684
+
1685
+ DESCRIPTION
1686
+ List Copado promotions
1687
+
1688
+ EXAMPLES
1689
+ $ agentia promotion list
1690
+
1691
+ $ agentia promotion list --status Completed --project-name "My Project" --limit 50
1692
+
1693
+ $ agentia promotion list --json
1694
+ ```
1695
+
1696
+ _See code: [src/commands/promotion/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/promotion/list.ts)_
1659
1697
 
1660
1698
  ## `agentia user get`
1661
1699
 
@@ -1684,7 +1722,7 @@ EXAMPLES
1684
1722
  $ agentia user get --json
1685
1723
  ```
1686
1724
 
1687
- _See code: [src/commands/user/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/user/get.ts)_
1725
+ _See code: [src/commands/user/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/user/get.ts)_
1688
1726
 
1689
1727
  ## `agentia work create`
1690
1728
 
@@ -1739,7 +1777,7 @@ EXAMPLES
1739
1777
  $ agentia work create --title "My story" --json
1740
1778
  ```
1741
1779
 
1742
- _See code: [src/commands/work/create.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/create.ts)_
1780
+ _See code: [src/commands/work/create.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/work/create.ts)_
1743
1781
 
1744
1782
  ## `agentia work delete ID`
1745
1783
 
@@ -1764,7 +1802,7 @@ EXAMPLES
1764
1802
  $ agentia work delete a0SKC000000CmZ2AU --json
1765
1803
  ```
1766
1804
 
1767
- _See code: [src/commands/work/delete.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/delete.ts)_
1805
+ _See code: [src/commands/work/delete.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/work/delete.ts)_
1768
1806
 
1769
1807
  ## `agentia work get ID`
1770
1808
 
@@ -1789,7 +1827,7 @@ EXAMPLES
1789
1827
  $ agentia work get a0SKC000000CmZ2AU --json
1790
1828
  ```
1791
1829
 
1792
- _See code: [src/commands/work/get.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/get.ts)_
1830
+ _See code: [src/commands/work/get.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/work/get.ts)_
1793
1831
 
1794
1832
  ## `agentia work list`
1795
1833
 
@@ -1832,7 +1870,7 @@ EXAMPLES
1832
1870
  $ agentia work list --json
1833
1871
  ```
1834
1872
 
1835
- _See code: [src/commands/work/list.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/list.ts)_
1873
+ _See code: [src/commands/work/list.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/work/list.ts)_
1836
1874
 
1837
1875
  ## `agentia work update ID`
1838
1876
 
@@ -1890,5 +1928,5 @@ EXAMPLES
1890
1928
  $ agentia work update a0SKC000000CmZ2AU --status "In Progress" --json
1891
1929
  ```
1892
1930
 
1893
- _See code: [src/commands/work/update.ts](https://github.com/Copado/agentia-cli/blob/v0.11.0-alpha.0/src/commands/work/update.ts)_
1931
+ _See code: [src/commands/work/update.ts](https://github.com/Copado/agentia-cli/blob/v0.14.0-alpha.0/src/commands/work/update.ts)_
1894
1932
  <!-- commandsstop -->
@@ -0,0 +1,10 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { type PromotionDetail } from '../../lib/promotion-types.js';
3
+ export default class PromotionGet extends AgentiaCommand {
4
+ static args: {
5
+ id: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
+ };
7
+ static description: string;
8
+ static examples: string[];
9
+ run(): Promise<PromotionDetail>;
10
+ }
@@ -0,0 +1,31 @@
1
+ import { Args } from '@oclif/core';
2
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
3
+ import { CicdGateway } from '../../lib/cicd-gateway.js';
4
+ import { formatPromotionDetail, normalizePromotionDetail, promotionEndpoint, } from '../../lib/promotion-types.js';
5
+ export default class PromotionGet extends AgentiaCommand {
6
+ static args = {
7
+ id: Args.string({
8
+ description: 'Copado promotion ID',
9
+ name: 'id',
10
+ required: true,
11
+ }),
12
+ };
13
+ static description = 'Get a Copado promotion by ID';
14
+ static examples = [
15
+ '<%= config.bin %> <%= command.id %> <promotion-id>',
16
+ '<%= config.bin %> <%= command.id %> <promotion-id> --json',
17
+ ];
18
+ async run() {
19
+ const { args } = await this.parse(PromotionGet);
20
+ const response = await this.withSpinner('Fetching promotion', () => CicdGateway.call({
21
+ endpoint: promotionEndpoint(args.id),
22
+ method: 'GET',
23
+ }));
24
+ const promotion = normalizePromotionDetail(response);
25
+ this.display(() => {
26
+ this.log(formatPromotionDetail(promotion));
27
+ });
28
+ return promotion;
29
+ }
30
+ }
31
+ //# sourceMappingURL=get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../src/commands/promotion/get.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAC,MAAM,aAAa,CAAA;AAEhC,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAA;AACrD,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EAGxB,iBAAiB,GAClB,MAAM,8BAA8B,CAAA;AAErC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,cAAc;IACtD,MAAM,CAAU,IAAI,GAAG;QACrB,EAAE,EAAE,IAAI,CAAC,MAAM,CAAC;YACd,WAAW,EAAE,qBAAqB;YAClC,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,IAAI;SACf,CAAC;KACH,CAAA;IACD,MAAM,CAAU,WAAW,GAAG,8BAA8B,CAAA;IAC5D,MAAM,CAAU,QAAQ,GAAG;QACzB,oDAAoD;QACpD,2DAA2D;KAC5D,CAAA;IAEM,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,IAAI,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;QAE7C,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,oBAAoB,EAAE,GAAG,EAAE,CACjE,WAAW,CAAC,IAAI,CAA4C;YAC1D,QAAQ,EAAE,iBAAiB,CAAC,IAAI,CAAC,EAAE,CAAC;YACpC,MAAM,EAAE,KAAK;SACd,CAAC,CACH,CAAA;QACD,MAAM,SAAS,GAAG,wBAAwB,CAAC,QAAQ,CAAC,CAAA;QAEpD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAA;QAC5C,CAAC,CAAC,CAAA;QAEF,OAAO,SAAS,CAAA;IAClB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { type Promotion } from '../../lib/promotion-types.js';
3
+ export declare const PROMOTION_TABLE_DISPLAY_LIMIT = 100;
4
+ export declare function selectPromotionsForTableDisplay(promotions: Promotion[]): {
5
+ displayed: Promotion[];
6
+ total: number;
7
+ truncated: boolean;
8
+ };
9
+ export declare function formatPromotionTableTruncationMessage(total: number): string;
10
+ export default class PromotionList extends AgentiaCommand {
11
+ static description: string;
12
+ static examples: string[];
13
+ static flags: {
14
+ readonly 'created-by-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ readonly 'created-by-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
16
+ readonly 'destination-environment-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ readonly 'destination-environment-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ readonly 'is-back-promotion': import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
+ readonly limit: import("@oclif/core/interfaces").OptionFlag<number | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ readonly name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
21
+ readonly 'pipeline-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
22
+ readonly 'pipeline-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
23
+ readonly 'project-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
24
+ readonly 'project-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
25
+ readonly 'source-environment-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
26
+ readonly 'source-environment-name': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
27
+ readonly status: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
28
+ };
29
+ run(): Promise<Promotion[]>;
30
+ }