@copado/agentia-cli 0.11.0-alpha.0 → 0.13.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,35 +1,36 @@
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
12
  * [Integration Testing](#integration-testing)
15
13
  * [Local MCP Server](#local-mcp-server)
16
14
  * [License](#license)
17
15
  * [Commands](#commands)
18
16
  <!-- tocstop -->
17
+
19
18
  # Usage
19
+
20
20
  <!-- usage -->
21
21
  ```sh-session
22
22
  $ npm install -g @copado/agentia-cli
23
23
  $ agentia COMMAND
24
24
  running command...
25
25
  $ agentia (--version)
26
- @copado/agentia-cli/0.11.0-alpha.0 linux-x64 node-v22.23.2
26
+ @copado/agentia-cli/0.13.0-alpha.0 linux-x64 node-v22.23.2
27
27
  $ agentia --help [COMMAND]
28
28
  USAGE
29
29
  $ agentia COMMAND
30
30
  ...
31
31
  ```
32
32
  <!-- usagestop -->
33
+
33
34
  # Integration Testing
34
35
 
35
36
  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`.
@@ -117,14 +118,14 @@ $ npm run build
117
118
 
118
119
  Tools are JSON-safe and return structured results. Sensitive fields are redacted.
119
120
 
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` |
121
+ | Topic | Tools |
122
+ | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
123
+ | Environment | `agentia_environment_list`, `agentia_environment_get`, `agentia_environment_create`, `agentia_environment_update` |
124
+ | Job | `agentia_job_list`, `agentia_job_get`, `agentia_job_run`, `agentia_job_resume`, `agentia_job_kill`, `agentia_job_pause` |
125
+ | Pipeline | `agentia_pipeline_list`, `agentia_pipeline_get`, `agentia_pipeline_connection_list` |
126
+ | Project | `agentia_project_list`, `agentia_project_default_get`, `agentia_project_default_set`, `agentia_project_default_unset` |
127
+ | User | `agentia_user_get` |
128
+ | Metadata | `agentia_metadata_list`, `agentia_metadata_content_get`, `agentia_metadata_content_compare`, `agentia_metadata_index_compare`, `agentia_metadata_dependency_list` |
128
129
 
129
130
  ### Notes for common tools
130
131
 
@@ -151,6 +152,7 @@ Live smoke check through Cursor: call `agentia_environment_list` or `agentia_pro
151
152
  Agentia CLI is distributed under the Copado End User License Agreement. See [LICENSE.md](LICENSE.md) for the full license terms.
152
153
 
153
154
  # Commands
155
+
154
156
  <!-- commands -->
155
157
  * [`agentia auth get`](#agentia-auth-get)
156
158
  * [`agentia auth set`](#agentia-auth-set)
@@ -197,6 +199,8 @@ Agentia CLI is distributed under the Copado End User License Agreement. See [LIC
197
199
  * [`agentia promotion conflict list`](#agentia-promotion-conflict-list)
198
200
  * [`agentia promotion conflict resolve ID`](#agentia-promotion-conflict-resolve-id)
199
201
  * [`agentia promotion conflict unresolve ID`](#agentia-promotion-conflict-unresolve-id)
202
+ * [`agentia promotion get ID`](#agentia-promotion-get-id)
203
+ * [`agentia promotion list`](#agentia-promotion-list)
200
204
  * [`agentia user get`](#agentia-user-get)
201
205
  * [`agentia work create`](#agentia-work-create)
202
206
  * [`agentia work delete ID`](#agentia-work-delete-id)
@@ -234,7 +238,7 @@ EXAMPLES
234
238
  $ agentia auth get --json
235
239
  ```
236
240
 
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)_
241
+ _See code: [src/commands/auth/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/auth/get.ts)_
238
242
 
239
243
  ## `agentia auth set`
240
244
 
@@ -272,7 +276,7 @@ EXAMPLES
272
276
  $ agentia auth set --cicd <copado-api-key> --region na --json
273
277
  ```
274
278
 
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)_
279
+ _See code: [src/commands/auth/set.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/auth/set.ts)_
276
280
 
277
281
  ## `agentia environment auth status ID`
278
282
 
@@ -302,7 +306,7 @@ EXAMPLES
302
306
  $ agentia environment auth status <environment-id> --json
303
307
  ```
304
308
 
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)_
309
+ _See code: [src/commands/environment/auth/status.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/environment/auth/status.ts)_
306
310
 
307
311
  ## `agentia environment auth web login ID`
308
312
 
@@ -336,7 +340,7 @@ EXAMPLES
336
340
  $ agentia environment auth web login <environment-id> --json
337
341
  ```
338
342
 
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)_
343
+ _See code: [src/commands/environment/auth/web/login.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/environment/auth/web/login.ts)_
340
344
 
341
345
  ## `agentia environment create NAME`
342
346
 
@@ -381,7 +385,7 @@ EXAMPLES
381
385
  $ agentia environment create Dev --json
382
386
  ```
383
387
 
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)_
388
+ _See code: [src/commands/environment/create.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/environment/create.ts)_
385
389
 
386
390
  ## `agentia environment get ID`
387
391
 
@@ -406,7 +410,7 @@ EXAMPLES
406
410
  $ agentia environment get a0SKC000000CmZ2AU --json
407
411
  ```
408
412
 
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)_
413
+ _See code: [src/commands/environment/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/environment/get.ts)_
410
414
 
411
415
  ## `agentia environment list`
412
416
 
@@ -438,7 +442,7 @@ EXAMPLES
438
442
  $ agentia environment list --json
439
443
  ```
440
444
 
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)_
445
+ _See code: [src/commands/environment/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/environment/list.ts)_
442
446
 
443
447
  ## `agentia environment update ID`
444
448
 
@@ -484,7 +488,7 @@ EXAMPLES
484
488
  $ agentia environment update a0SKC000000CmZ2AU --name UAT --json
485
489
  ```
486
490
 
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)_
491
+ _See code: [src/commands/environment/update.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/environment/update.ts)_
488
492
 
489
493
  ## `agentia help [COMMAND]`
490
494
 
@@ -533,7 +537,7 @@ EXAMPLES
533
537
  $ agentia job get <job-id> --user-id <id> --organization-id <id> --json
534
538
  ```
535
539
 
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)_
540
+ _See code: [src/commands/job/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/job/get.ts)_
537
541
 
538
542
  ## `agentia job kill ID`
539
543
 
@@ -562,7 +566,7 @@ EXAMPLES
562
566
  $ agentia job kill <job-id> --user-id <id> --organization-id <id> --json
563
567
  ```
564
568
 
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)_
569
+ _See code: [src/commands/job/kill.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/job/kill.ts)_
566
570
 
567
571
  ## `agentia job list`
568
572
 
@@ -600,7 +604,7 @@ EXAMPLES
600
604
  $ agentia job list --user-id <id> --organization-id <id> --json
601
605
  ```
602
606
 
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)_
607
+ _See code: [src/commands/job/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/job/list.ts)_
604
608
 
605
609
  ## `agentia job pause ID`
606
610
 
@@ -629,7 +633,7 @@ EXAMPLES
629
633
  $ agentia job pause <job-id> --user-id <id> --organization-id <id> --json
630
634
  ```
631
635
 
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)_
636
+ _See code: [src/commands/job/pause.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/job/pause.ts)_
633
637
 
634
638
  ## `agentia job resume ID`
635
639
 
@@ -658,7 +662,7 @@ EXAMPLES
658
662
  $ agentia job resume <job-id> --user-id <id> --organization-id <id> --json
659
663
  ```
660
664
 
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)_
665
+ _See code: [src/commands/job/resume.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/job/resume.ts)_
662
666
 
663
667
  ## `agentia job run ID`
664
668
 
@@ -688,7 +692,7 @@ EXAMPLES
688
692
  $ agentia job run <job-id> --user-id <id> --organization-id <id> --restart --json
689
693
  ```
690
694
 
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)_
695
+ _See code: [src/commands/job/run.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/job/run.ts)_
692
696
 
693
697
  ## `agentia mcp start`
694
698
 
@@ -707,7 +711,7 @@ EXAMPLES
707
711
  $ agentia mcp start # long-running stdio MCP server for Cursor and other clients
708
712
  ```
709
713
 
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)_
714
+ _See code: [src/commands/mcp/start.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/mcp/start.ts)_
711
715
 
712
716
  ## `agentia metadata content compare`
713
717
 
@@ -750,7 +754,7 @@ EXAMPLES
750
754
  $ agentia metadata content compare --metadata-type ApexClass --api-name MyClass --json
751
755
  ```
752
756
 
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)_
757
+ _See code: [src/commands/metadata/content/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/metadata/content/compare.ts)_
754
758
 
755
759
  ## `agentia metadata content get`
756
760
 
@@ -791,7 +795,7 @@ EXAMPLES
791
795
  $ agentia metadata content get --file requests.json --json
792
796
  ```
793
797
 
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)_
798
+ _See code: [src/commands/metadata/content/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/metadata/content/get.ts)_
795
799
 
796
800
  ## `agentia metadata dependency list`
797
801
 
@@ -839,7 +843,7 @@ EXAMPLES
839
843
  $ 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
844
  ```
841
845
 
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)_
846
+ _See code: [src/commands/metadata/dependency/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/metadata/dependency/list.ts)_
843
847
 
844
848
  ## `agentia metadata index compare`
845
849
 
@@ -873,7 +877,7 @@ EXAMPLES
873
877
  $ agentia metadata index compare --comparison-mode MIX --json
874
878
  ```
875
879
 
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)_
880
+ _See code: [src/commands/metadata/index/compare.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/metadata/index/compare.ts)_
877
881
 
878
882
  ## `agentia metadata list`
879
883
 
@@ -921,7 +925,7 @@ EXAMPLES
921
925
  $ agentia metadata list --source NewAndChanged --find-managed-packages --json
922
926
  ```
923
927
 
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)_
928
+ _See code: [src/commands/metadata/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/metadata/list.ts)_
925
929
 
926
930
  ## `agentia metadata refresh deleted`
927
931
 
@@ -953,7 +957,7 @@ EXAMPLES
953
957
  $ agentia metadata refresh deleted --env <environment-id> --user-id <id> --organization-id <id> --module-type vlocity --json
954
958
  ```
955
959
 
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)_
960
+ _See code: [src/commands/metadata/refresh/deleted.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/metadata/refresh/deleted.ts)_
957
961
 
958
962
  ## `agentia metadata refresh run`
959
963
 
@@ -996,7 +1000,7 @@ EXAMPLES
996
1000
  $ agentia metadata refresh run --env <environment-id> --user-id <id> --organization-id <id> --all --json
997
1001
  ```
998
1002
 
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)_
1003
+ _See code: [src/commands/metadata/refresh/run.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/metadata/refresh/run.ts)_
1000
1004
 
1001
1005
  ## `agentia metadata refresh status`
1002
1006
 
@@ -1028,7 +1032,7 @@ EXAMPLES
1028
1032
  $ agentia metadata refresh status --job-id <event-id> --user-id <id> --organization-id <id> --json
1029
1033
  ```
1030
1034
 
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)_
1035
+ _See code: [src/commands/metadata/refresh/status.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/metadata/refresh/status.ts)_
1032
1036
 
1033
1037
  ## `agentia pipeline connection list`
1034
1038
 
@@ -1055,7 +1059,7 @@ EXAMPLES
1055
1059
  $ agentia pipeline connection list --pipeline-id <pipeline-id> --user-id <id> --organization-id <id> --json
1056
1060
  ```
1057
1061
 
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)_
1062
+ _See code: [src/commands/pipeline/connection/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/pipeline/connection/list.ts)_
1059
1063
 
1060
1064
  ## `agentia pipeline get ID`
1061
1065
 
@@ -1084,7 +1088,7 @@ EXAMPLES
1084
1088
  $ agentia pipeline get <pipeline-id> --user-id <id> --organization-id <id> --json
1085
1089
  ```
1086
1090
 
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)_
1091
+ _See code: [src/commands/pipeline/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/pipeline/get.ts)_
1088
1092
 
1089
1093
  ## `agentia pipeline list`
1090
1094
 
@@ -1110,7 +1114,7 @@ EXAMPLES
1110
1114
  $ agentia pipeline list --user-id <id> --organization-id <id> --json
1111
1115
  ```
1112
1116
 
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)_
1117
+ _See code: [src/commands/pipeline/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/pipeline/list.ts)_
1114
1118
 
1115
1119
  ## `agentia plugins`
1116
1120
 
@@ -1437,7 +1441,7 @@ EXAMPLES
1437
1441
  $ agentia project default get --json
1438
1442
  ```
1439
1443
 
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)_
1444
+ _See code: [src/commands/project/default/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/project/default/get.ts)_
1441
1445
 
1442
1446
  ## `agentia project default set`
1443
1447
 
@@ -1474,7 +1478,7 @@ EXAMPLES
1474
1478
  $ agentia project default set --project my-project --json
1475
1479
  ```
1476
1480
 
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)_
1481
+ _See code: [src/commands/project/default/set.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/project/default/set.ts)_
1478
1482
 
1479
1483
  ## `agentia project default unset`
1480
1484
 
@@ -1511,7 +1515,7 @@ EXAMPLES
1511
1515
  $ agentia project default unset --project --json
1512
1516
  ```
1513
1517
 
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)_
1518
+ _See code: [src/commands/project/default/unset.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/project/default/unset.ts)_
1515
1519
 
1516
1520
  ## `agentia project list`
1517
1521
 
@@ -1538,7 +1542,7 @@ EXAMPLES
1538
1542
  $ agentia project list --mine --json
1539
1543
  ```
1540
1544
 
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)_
1545
+ _See code: [src/commands/project/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/project/list.ts)_
1542
1546
 
1543
1547
  ## `agentia promotion conflict get ID`
1544
1548
 
@@ -1569,7 +1573,7 @@ EXAMPLES
1569
1573
  $ agentia promotion conflict get <conflict-id> -p <promotion-id> --json
1570
1574
  ```
1571
1575
 
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)_
1576
+ _See code: [src/commands/promotion/conflict/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/promotion/conflict/get.ts)_
1573
1577
 
1574
1578
  ## `agentia promotion conflict list`
1575
1579
 
@@ -1594,7 +1598,7 @@ EXAMPLES
1594
1598
  $ agentia promotion conflict list -p <promotion-id> --json
1595
1599
  ```
1596
1600
 
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)_
1601
+ _See code: [src/commands/promotion/conflict/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/promotion/conflict/list.ts)_
1598
1602
 
1599
1603
  ## `agentia promotion conflict resolve ID`
1600
1604
 
@@ -1627,7 +1631,7 @@ EXAMPLES
1627
1631
  $ agentia promotion conflict resolve <conflict-id> -p <promotion-id> --mode auto --json
1628
1632
  ```
1629
1633
 
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)_
1634
+ _See code: [src/commands/promotion/conflict/resolve.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/promotion/conflict/resolve.ts)_
1631
1635
 
1632
1636
  ## `agentia promotion conflict unresolve ID`
1633
1637
 
@@ -1655,7 +1659,75 @@ EXAMPLES
1655
1659
  $ agentia promotion conflict unresolve <conflict-id> -p <promotion-id> --json
1656
1660
  ```
1657
1661
 
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)_
1662
+ _See code: [src/commands/promotion/conflict/unresolve.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/promotion/conflict/unresolve.ts)_
1663
+
1664
+ ## `agentia promotion get ID`
1665
+
1666
+ Get a Copado promotion by ID
1667
+
1668
+ ```
1669
+ USAGE
1670
+ $ agentia promotion get ID [--json]
1671
+
1672
+ ARGUMENTS
1673
+ ID Copado promotion ID
1674
+
1675
+ GLOBAL FLAGS
1676
+ --json Format output as json.
1677
+
1678
+ DESCRIPTION
1679
+ Get a Copado promotion by ID
1680
+
1681
+ EXAMPLES
1682
+ $ agentia promotion get <promotion-id>
1683
+
1684
+ $ agentia promotion get <promotion-id> --json
1685
+ ```
1686
+
1687
+ _See code: [src/commands/promotion/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/promotion/get.ts)_
1688
+
1689
+ ## `agentia promotion list`
1690
+
1691
+ List Copado promotions
1692
+
1693
+ ```
1694
+ USAGE
1695
+ $ agentia promotion list [--json] [--created-by-id <value>] [--created-by-name <value>]
1696
+ [--destination-environment-id <value>] [--destination-environment-name <value>] [--is-back-promotion] [--limit
1697
+ <value>] [--name <value>] [--pipeline-id <value>] [--pipeline-name <value>] [--project-id <value>] [--project-name
1698
+ <value>] [--source-environment-id <value>] [--source-environment-name <value>] [--status <value>]
1699
+
1700
+ FLAGS
1701
+ --created-by-id=<value> Filter by creator ID
1702
+ --created-by-name=<value> Filter by creator name
1703
+ --destination-environment-id=<value> Filter by destination environment ID
1704
+ --destination-environment-name=<value> Filter by destination environment name
1705
+ --[no-]is-back-promotion Filter by back promotion
1706
+ --limit=<value> Maximum number of promotions to return (1-200)
1707
+ --name=<value> Filter by name
1708
+ --pipeline-id=<value> Filter by pipeline ID
1709
+ --pipeline-name=<value> Filter by pipeline name
1710
+ --project-id=<value> Filter by project ID
1711
+ --project-name=<value> Filter by project name
1712
+ --source-environment-id=<value> Filter by source environment ID
1713
+ --source-environment-name=<value> Filter by source environment name
1714
+ --status=<value> Filter by status
1715
+
1716
+ GLOBAL FLAGS
1717
+ --json Format output as json.
1718
+
1719
+ DESCRIPTION
1720
+ List Copado promotions
1721
+
1722
+ EXAMPLES
1723
+ $ agentia promotion list
1724
+
1725
+ $ agentia promotion list --status Completed --project-name "My Project" --limit 50
1726
+
1727
+ $ agentia promotion list --json
1728
+ ```
1729
+
1730
+ _See code: [src/commands/promotion/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/promotion/list.ts)_
1659
1731
 
1660
1732
  ## `agentia user get`
1661
1733
 
@@ -1684,7 +1756,7 @@ EXAMPLES
1684
1756
  $ agentia user get --json
1685
1757
  ```
1686
1758
 
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)_
1759
+ _See code: [src/commands/user/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/user/get.ts)_
1688
1760
 
1689
1761
  ## `agentia work create`
1690
1762
 
@@ -1739,7 +1811,7 @@ EXAMPLES
1739
1811
  $ agentia work create --title "My story" --json
1740
1812
  ```
1741
1813
 
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)_
1814
+ _See code: [src/commands/work/create.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/work/create.ts)_
1743
1815
 
1744
1816
  ## `agentia work delete ID`
1745
1817
 
@@ -1764,7 +1836,7 @@ EXAMPLES
1764
1836
  $ agentia work delete a0SKC000000CmZ2AU --json
1765
1837
  ```
1766
1838
 
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)_
1839
+ _See code: [src/commands/work/delete.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/work/delete.ts)_
1768
1840
 
1769
1841
  ## `agentia work get ID`
1770
1842
 
@@ -1789,7 +1861,7 @@ EXAMPLES
1789
1861
  $ agentia work get a0SKC000000CmZ2AU --json
1790
1862
  ```
1791
1863
 
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)_
1864
+ _See code: [src/commands/work/get.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/work/get.ts)_
1793
1865
 
1794
1866
  ## `agentia work list`
1795
1867
 
@@ -1832,7 +1904,7 @@ EXAMPLES
1832
1904
  $ agentia work list --json
1833
1905
  ```
1834
1906
 
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)_
1907
+ _See code: [src/commands/work/list.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/work/list.ts)_
1836
1908
 
1837
1909
  ## `agentia work update ID`
1838
1910
 
@@ -1890,5 +1962,5 @@ EXAMPLES
1890
1962
  $ agentia work update a0SKC000000CmZ2AU --status "In Progress" --json
1891
1963
  ```
1892
1964
 
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)_
1965
+ _See code: [src/commands/work/update.ts](https://github.com/Copado/agentia-cli/blob/v0.13.0-alpha.0/src/commands/work/update.ts)_
1894
1966
  <!-- 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
+ }
@@ -0,0 +1,48 @@
1
+ import { AgentiaCommand } from '../../lib/agentia-command.js';
2
+ import { CicdGateway } from '../../lib/cicd-gateway.js';
3
+ import { buildPromotionListFilters, promotionListFilterFlags } from '../../lib/promotion-flags.js';
4
+ import { formatPromotionTable, normalizePromotions, promotionListEndpoint, } from '../../lib/promotion-types.js';
5
+ export const PROMOTION_TABLE_DISPLAY_LIMIT = 100;
6
+ export function selectPromotionsForTableDisplay(promotions) {
7
+ const total = promotions.length;
8
+ const truncated = total > PROMOTION_TABLE_DISPLAY_LIMIT;
9
+ return {
10
+ displayed: truncated ? promotions.slice(0, PROMOTION_TABLE_DISPLAY_LIMIT) : promotions,
11
+ total,
12
+ truncated,
13
+ };
14
+ }
15
+ export function formatPromotionTableTruncationMessage(total) {
16
+ return `Showing first ${PROMOTION_TABLE_DISPLAY_LIMIT} of ${total} promotions.`;
17
+ }
18
+ export default class PromotionList extends AgentiaCommand {
19
+ static description = 'List Copado promotions';
20
+ static examples = [
21
+ '<%= config.bin %> <%= command.id %>',
22
+ '<%= config.bin %> <%= command.id %> --status Completed --project-name "My Project" --limit 50',
23
+ '<%= config.bin %> <%= command.id %> --json',
24
+ ];
25
+ static flags = promotionListFilterFlags;
26
+ async run() {
27
+ const { flags } = await this.parse(PromotionList);
28
+ const filters = buildPromotionListFilters(flags);
29
+ const response = await this.withSpinner('Fetching promotions', () => CicdGateway.call({
30
+ endpoint: promotionListEndpoint(filters),
31
+ method: 'GET',
32
+ }));
33
+ const promotions = normalizePromotions(response);
34
+ this.display(() => {
35
+ if (promotions.length === 0) {
36
+ this.log('No promotions found.');
37
+ return;
38
+ }
39
+ const { displayed, total, truncated } = selectPromotionsForTableDisplay(promotions);
40
+ if (truncated) {
41
+ this.log(formatPromotionTableTruncationMessage(total));
42
+ }
43
+ this.log(formatPromotionTable(displayed));
44
+ });
45
+ return promotions;
46
+ }
47
+ }
48
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../src/commands/promotion/list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAC3D,OAAO,EAAC,WAAW,EAAC,MAAM,2BAA2B,CAAA;AACrD,OAAO,EAAC,yBAAyB,EAAE,wBAAwB,EAAC,MAAM,8BAA8B,CAAA;AAChG,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EAEnB,qBAAqB,GAEtB,MAAM,8BAA8B,CAAA;AAErC,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAA;AAEhD,MAAM,UAAU,+BAA+B,CAAC,UAAuB;IAKrE,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAA;IAC/B,MAAM,SAAS,GAAG,KAAK,GAAG,6BAA6B,CAAA;IAEvD,OAAO;QACL,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,EAAE,6BAA6B,CAAC,CAAC,CAAC,CAAC,UAAU;QACtF,KAAK;QACL,SAAS;KACV,CAAA;AACH,CAAC;AAED,MAAM,UAAU,qCAAqC,CAAC,KAAa;IACjE,OAAO,iBAAiB,6BAA6B,OAAO,KAAK,cAAc,CAAA;AACjF,CAAC;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,cAAc;IACvD,MAAM,CAAU,WAAW,GAAG,wBAAwB,CAAA;IACtD,MAAM,CAAU,QAAQ,GAAG;QACzB,qCAAqC;QACrC,+FAA+F;QAC/F,4CAA4C;KAC7C,CAAA;IACD,MAAM,CAAU,KAAK,GAAG,wBAAwB,CAAA;IAEzC,KAAK,CAAC,GAAG;QACd,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;QAC/C,MAAM,OAAO,GAAG,yBAAyB,CAAC,KAAK,CAAC,CAAA;QAEhD,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,qBAAqB,EAAE,GAAG,EAAE,CAClE,WAAW,CAAC,IAAI,CAAwB;YACtC,QAAQ,EAAE,qBAAqB,CAAC,OAAO,CAAC;YACxC,MAAM,EAAE,KAAK;SACd,CAAC,CACH,CAAA;QAED,MAAM,UAAU,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAA;QAEhD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;YAChB,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBAC5B,IAAI,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAA;gBAChC,OAAM;YACR,CAAC;YAED,MAAM,EAAC,SAAS,EAAE,KAAK,EAAE,SAAS,EAAC,GAAG,+BAA+B,CAAC,UAAU,CAAC,CAAA;YAEjF,IAAI,SAAS,EAAE,CAAC;gBACd,IAAI,CAAC,GAAG,CAAC,qCAAqC,CAAC,KAAK,CAAC,CAAC,CAAA;YACxD,CAAC;YAED,IAAI,CAAC,GAAG,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;QAEF,OAAO,UAAU,CAAA;IACnB,CAAC"}