@copado/agentia-cli 0.89.0-alpha.0 → 0.91.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.
Files changed (44) hide show
  1. package/README.md +241 -197
  2. package/dist/commands/cicd/work/commit.d.ts +1 -0
  3. package/dist/commands/cicd/work/commit.js +7 -2
  4. package/dist/commands/cicd/work/commit.js.map +1 -1
  5. package/dist/commands/cicd/work/done.d.ts +3 -0
  6. package/dist/commands/cicd/work/done.js +33 -6
  7. package/dist/commands/cicd/work/done.js.map +1 -1
  8. package/dist/commands/cicd/work/push.d.ts +5 -0
  9. package/dist/commands/cicd/work/push.js +26 -3
  10. package/dist/commands/cicd/work/push.js.map +1 -1
  11. package/dist/commands/cicd/work/submit.d.ts +1 -0
  12. package/dist/commands/cicd/work/submit.js +24 -4
  13. package/dist/commands/cicd/work/submit.js.map +1 -1
  14. package/dist/lib/defaults-store.d.ts +4 -0
  15. package/dist/lib/defaults-store.js +18 -3
  16. package/dist/lib/defaults-store.js.map +1 -1
  17. package/dist/lib/deployment-step-types.d.ts +3 -0
  18. package/dist/lib/deployment-step-types.js +10 -0
  19. package/dist/lib/deployment-step-types.js.map +1 -1
  20. package/dist/lib/git-worktree.d.ts +6 -0
  21. package/dist/lib/git-worktree.js +31 -4
  22. package/dist/lib/git-worktree.js.map +1 -1
  23. package/dist/lib/mcp/tools.d.ts +10 -2
  24. package/dist/lib/mcp/work-tools.d.ts +12 -2
  25. package/dist/lib/mcp/work-tools.js +40 -13
  26. package/dist/lib/mcp/work-tools.js.map +1 -1
  27. package/dist/lib/nested-metadata-changes.d.ts +50 -0
  28. package/dist/lib/nested-metadata-changes.js +166 -0
  29. package/dist/lib/nested-metadata-changes.js.map +1 -0
  30. package/dist/lib/nested-metadata-registry.d.ts +24 -0
  31. package/dist/lib/nested-metadata-registry.js +201 -0
  32. package/dist/lib/nested-metadata-registry.js.map +1 -0
  33. package/dist/lib/setup-templates.d.ts +1 -1
  34. package/dist/lib/setup-templates.js +3 -3
  35. package/dist/lib/work-local-commit.d.ts +2 -0
  36. package/dist/lib/work-local-commit.js +4 -0
  37. package/dist/lib/work-local-commit.js.map +1 -1
  38. package/dist/lib/work-push.d.ts +48 -0
  39. package/dist/lib/work-push.js +195 -14
  40. package/dist/lib/work-push.js.map +1 -1
  41. package/dist/lib/work-types.d.ts +30 -1
  42. package/dist/lib/work-types.js.map +1 -1
  43. package/oclif.manifest.json +145 -101
  44. package/package.json +2 -1
@@ -5260,10 +5260,11 @@
5260
5260
  "required": false
5261
5261
  }
5262
5262
  },
5263
- "description": "Commit user story work locally or through the Copado cloud commit API. With --local (the default) it runs a plain git commit and records the Copado selections lastPermissionSelected and lastApexTestClassesSelected in .agentia/config.user.json for `cicd work push`. With --cloud it preflights the story, submits POST /release/commit, and polls the job monitor by default.",
5263
+ "description": "Commit user story work locally or through the Copado cloud commit API. With --local (the default) it runs a plain git commit and records the Copado selections lastPermissionSelected, lastFullMetadataSelected, and lastApexTestClassesSelected in .agentia/config.user.json for `cicd work push`. With --cloud it preflights the story, submits POST /release/commit, and polls the job monitor by default.",
5264
5264
  "examples": [
5265
5265
  "<%= config.bin %> <%= command.id %> --local --all",
5266
5266
  "<%= config.bin %> <%= command.id %> --local -a -m \"US-0000001 add account service\" --permissions CustomField:Account.SLA__c,ApexClass:AccountService --apex-test-classes MyTest,OtherTest",
5267
+ "<%= config.bin %> <%= command.id %> --local -a -m \"US-0000001 full onboarding permission set\" --full-metadata PermissionSet:Sales_Onboarding",
5267
5268
  "<%= config.bin %> <%= command.id %> --cloud --message \"Commit AccountService\" --metadata-name AccountService --metadata-type ApexClass --metadata-category SFDX --action Add",
5268
5269
  "<%= config.bin %> <%= command.id %> a07XXXXXXXXXXXXXXX --cloud --message \"Update Aura files\" --metadata-name accountEditor --metadata-type AuraDefinitionBundle --metadata-category SFDX --action SelectiveCommit --selection accountEditor/accountEditor.cmp --selection accountEditor/accountEditorController.js",
5269
5270
  "cat commit-request.json | <%= config.bin %> <%= command.id %> --cloud --stdin --json"
@@ -5338,6 +5339,13 @@
5338
5339
  "multiple": false,
5339
5340
  "type": "option"
5340
5341
  },
5342
+ "full-metadata": {
5343
+ "description": "Local commit only. Comma-separated type-prefixed metadata such as Profile:Sales_User,PermissionSet:Sales_Onboarding, stored as lastFullMetadataSelected and sent as the `cicd work push` fullMetadata list. The named metadata is committed as a complete file, so every permission it contains is applied instead of only the permissions selected with --permissions. Pass an empty value to clear it.",
5344
+ "name": "full-metadata",
5345
+ "hasDynamicHelp": false,
5346
+ "multiple": false,
5347
+ "type": "option"
5348
+ },
5341
5349
  "local": {
5342
5350
  "description": "Run a local git commit and record Copado selections. Used by default when --cloud is omitted.",
5343
5351
  "name": "local",
@@ -5718,6 +5726,7 @@
5718
5726
  "description": "Mark the current feature/<lastWorkItem> work item done and promote it to the next environment. Pushes and registers commits when the branch is ahead of origin, then calls headless work/done (Promote Action with validate=false).",
5719
5727
  "examples": [
5720
5728
  "<%= config.bin %> <%= command.id %>",
5729
+ "<%= config.bin %> <%= command.id %> --skip-nested-metadata-detection",
5721
5730
  "<%= config.bin %> <%= command.id %> --json"
5722
5731
  ],
5723
5732
  "flags": {
@@ -5727,6 +5736,12 @@
5727
5736
  "name": "json",
5728
5737
  "allowNo": false,
5729
5738
  "type": "boolean"
5739
+ },
5740
+ "skip-nested-metadata-detection": {
5741
+ "description": "Do not detect the nested metadata changed across the branch when pushing (also configurable via skipNestedMetadataDetection in .agentia/config.json or .agentia/config.user.json)",
5742
+ "name": "skip-nested-metadata-detection",
5743
+ "allowNo": false,
5744
+ "type": "boolean"
5730
5745
  }
5731
5746
  },
5732
5747
  "hasDynamicHelp": false,
@@ -6058,9 +6073,12 @@
6058
6073
  "cicd:work:push": {
6059
6074
  "aliases": [],
6060
6075
  "args": {},
6061
- "description": "Push the current feature/<lastWorkItem> branch and register commits with Copado. Requires a clean working tree, base branch, and dev org branch from `.agentia/config.user.json`. Applies Copado environment-variable then yaml replacements when needed, commits both as a single follow-up commit, locks the tip commit, runs `git push origin <branch>`, calls headless work/push with lastPermissionSelected as the retrieveOnly list, then merges the feature branch into the recorded dev org branch.",
6076
+ "description": "Push the current feature/<lastWorkItem> branch and register commits with Copado. Requires a clean working tree, base branch, and dev org branch from `.agentia/config.user.json`. Applies Copado environment-variable then yaml replacements when needed, commits both as a single follow-up commit, locks the tip commit, runs `git push origin <branch>`, reports the nested metadata changed across the branch, such as the CustomField behind a profile field-permission edit, plus the parent components it would ignore, calls headless work/push with lastPermissionSelected and --permissions plus the nested metadata of the changed profiles and permission sets as the retrieveOnly list, lastFullMetadataSelected and --full-metadata as the fullMetadata list, the ignored parents as removeMetadataItems and the remaining nested metadata as addMetadataItems, then merges the feature branch into the recorded dev org branch.",
6062
6077
  "examples": [
6063
6078
  "<%= config.bin %> <%= command.id %>",
6079
+ "<%= config.bin %> <%= command.id %> --permissions CustomField:Account.SLA__c,ApexClass:AccountService",
6080
+ "<%= config.bin %> <%= command.id %> --full-metadata PermissionSet:Sales_Onboarding",
6081
+ "<%= config.bin %> <%= command.id %> --skip-nested-metadata-detection",
6064
6082
  "<%= config.bin %> <%= command.id %> --json"
6065
6083
  ],
6066
6084
  "flags": {
@@ -6070,6 +6088,26 @@
6070
6088
  "name": "json",
6071
6089
  "allowNo": false,
6072
6090
  "type": "boolean"
6091
+ },
6092
+ "full-metadata": {
6093
+ "description": "Comma-separated type-prefixed metadata such as Profile:Sales_User,PermissionSet:Sales_Onboarding, added to lastFullMetadataSelected for this push and sent as the headless push fullMetadata list. The named metadata is committed as a complete file, so it is never decomposed into nested metadata. Not stored; use `cicd work commit --full-metadata` to record it.",
6094
+ "name": "full-metadata",
6095
+ "hasDynamicHelp": false,
6096
+ "multiple": false,
6097
+ "type": "option"
6098
+ },
6099
+ "permissions": {
6100
+ "description": "Comma-separated type-prefixed metadata such as CustomField:Account.SLA__c,ApexClass:AccountService, added to lastPermissionSelected for this push and sent as part of the headless push retrieveOnly list. Not stored; use `cicd work commit --permissions` to record it.",
6101
+ "name": "permissions",
6102
+ "hasDynamicHelp": false,
6103
+ "multiple": false,
6104
+ "type": "option"
6105
+ },
6106
+ "skip-nested-metadata-detection": {
6107
+ "description": "Do not detect the nested metadata changed across the branch (also configurable via skipNestedMetadataDetection in .agentia/config.json or .agentia/config.user.json)",
6108
+ "name": "skip-nested-metadata-detection",
6109
+ "allowNo": false,
6110
+ "type": "boolean"
6073
6111
  }
6074
6112
  },
6075
6113
  "hasDynamicHelp": false,
@@ -6210,6 +6248,12 @@
6210
6248
  "allowNo": false,
6211
6249
  "type": "boolean"
6212
6250
  },
6251
+ "skip-nested-metadata-detection": {
6252
+ "description": "Do not detect the nested metadata changed across the branch when pushing (also configurable via skipNestedMetadataDetection in .agentia/config.json or .agentia/config.user.json)",
6253
+ "name": "skip-nested-metadata-detection",
6254
+ "allowNo": false,
6255
+ "type": "boolean"
6256
+ },
6213
6257
  "skip-pull-request": {
6214
6258
  "description": "Do not open the pull request compare URL after submit (also configurable via skipPullRequest in .agentia/config.json or .agentia/config.user.json)",
6215
6259
  "name": "skip-pull-request",
@@ -10674,6 +10718,104 @@
10674
10718
  "search.js"
10675
10719
  ]
10676
10720
  },
10721
+ "cicd:data:sobject:fields": {
10722
+ "aliases": [],
10723
+ "args": {
10724
+ "sobjectApiName": {
10725
+ "description": "sObject API name",
10726
+ "name": "sobjectApiName",
10727
+ "required": true
10728
+ }
10729
+ },
10730
+ "description": "Describe fields for an sObject via a credential",
10731
+ "examples": [
10732
+ "<%= config.bin %> <%= command.id %> Account --credential-id a0Y...",
10733
+ "<%= config.bin %> <%= command.id %> Account --credential-id a0Y... --json"
10734
+ ],
10735
+ "flags": {
10736
+ "json": {
10737
+ "description": "Format output as json.",
10738
+ "helpGroup": "GLOBAL",
10739
+ "name": "json",
10740
+ "allowNo": false,
10741
+ "type": "boolean"
10742
+ },
10743
+ "credential-id": {
10744
+ "description": "Org credential Id",
10745
+ "name": "credential-id",
10746
+ "required": true,
10747
+ "hasDynamicHelp": false,
10748
+ "multiple": false,
10749
+ "type": "option"
10750
+ }
10751
+ },
10752
+ "hasDynamicHelp": false,
10753
+ "hiddenAliases": [],
10754
+ "id": "cicd:data:sobject:fields",
10755
+ "pluginAlias": "@copado/agentia-cli",
10756
+ "pluginName": "@copado/agentia-cli",
10757
+ "pluginType": "core",
10758
+ "strict": true,
10759
+ "enableJsonFlag": true,
10760
+ "isESM": true,
10761
+ "relativePath": [
10762
+ "dist",
10763
+ "commands",
10764
+ "cicd",
10765
+ "data",
10766
+ "sobject",
10767
+ "fields.js"
10768
+ ]
10769
+ },
10770
+ "cicd:data:sobject:relationships": {
10771
+ "aliases": [],
10772
+ "args": {
10773
+ "sobjectApiName": {
10774
+ "description": "sObject API name",
10775
+ "name": "sobjectApiName",
10776
+ "required": true
10777
+ }
10778
+ },
10779
+ "description": "Describe relationships for an sObject via a credential",
10780
+ "examples": [
10781
+ "<%= config.bin %> <%= command.id %> Account --credential-id a0Y...",
10782
+ "<%= config.bin %> <%= command.id %> Account --credential-id a0Y... --json"
10783
+ ],
10784
+ "flags": {
10785
+ "json": {
10786
+ "description": "Format output as json.",
10787
+ "helpGroup": "GLOBAL",
10788
+ "name": "json",
10789
+ "allowNo": false,
10790
+ "type": "boolean"
10791
+ },
10792
+ "credential-id": {
10793
+ "description": "Org credential Id",
10794
+ "name": "credential-id",
10795
+ "required": true,
10796
+ "hasDynamicHelp": false,
10797
+ "multiple": false,
10798
+ "type": "option"
10799
+ }
10800
+ },
10801
+ "hasDynamicHelp": false,
10802
+ "hiddenAliases": [],
10803
+ "id": "cicd:data:sobject:relationships",
10804
+ "pluginAlias": "@copado/agentia-cli",
10805
+ "pluginName": "@copado/agentia-cli",
10806
+ "pluginType": "core",
10807
+ "strict": true,
10808
+ "enableJsonFlag": true,
10809
+ "isESM": true,
10810
+ "relativePath": [
10811
+ "dist",
10812
+ "commands",
10813
+ "cicd",
10814
+ "data",
10815
+ "sobject",
10816
+ "relationships.js"
10817
+ ]
10818
+ },
10677
10819
  "cicd:data:sync:apply": {
10678
10820
  "aliases": [],
10679
10821
  "args": {},
@@ -11327,104 +11469,6 @@
11327
11469
  "get.js"
11328
11470
  ]
11329
11471
  },
11330
- "cicd:data:sobject:fields": {
11331
- "aliases": [],
11332
- "args": {
11333
- "sobjectApiName": {
11334
- "description": "sObject API name",
11335
- "name": "sobjectApiName",
11336
- "required": true
11337
- }
11338
- },
11339
- "description": "Describe fields for an sObject via a credential",
11340
- "examples": [
11341
- "<%= config.bin %> <%= command.id %> Account --credential-id a0Y...",
11342
- "<%= config.bin %> <%= command.id %> Account --credential-id a0Y... --json"
11343
- ],
11344
- "flags": {
11345
- "json": {
11346
- "description": "Format output as json.",
11347
- "helpGroup": "GLOBAL",
11348
- "name": "json",
11349
- "allowNo": false,
11350
- "type": "boolean"
11351
- },
11352
- "credential-id": {
11353
- "description": "Org credential Id",
11354
- "name": "credential-id",
11355
- "required": true,
11356
- "hasDynamicHelp": false,
11357
- "multiple": false,
11358
- "type": "option"
11359
- }
11360
- },
11361
- "hasDynamicHelp": false,
11362
- "hiddenAliases": [],
11363
- "id": "cicd:data:sobject:fields",
11364
- "pluginAlias": "@copado/agentia-cli",
11365
- "pluginName": "@copado/agentia-cli",
11366
- "pluginType": "core",
11367
- "strict": true,
11368
- "enableJsonFlag": true,
11369
- "isESM": true,
11370
- "relativePath": [
11371
- "dist",
11372
- "commands",
11373
- "cicd",
11374
- "data",
11375
- "sobject",
11376
- "fields.js"
11377
- ]
11378
- },
11379
- "cicd:data:sobject:relationships": {
11380
- "aliases": [],
11381
- "args": {
11382
- "sobjectApiName": {
11383
- "description": "sObject API name",
11384
- "name": "sobjectApiName",
11385
- "required": true
11386
- }
11387
- },
11388
- "description": "Describe relationships for an sObject via a credential",
11389
- "examples": [
11390
- "<%= config.bin %> <%= command.id %> Account --credential-id a0Y...",
11391
- "<%= config.bin %> <%= command.id %> Account --credential-id a0Y... --json"
11392
- ],
11393
- "flags": {
11394
- "json": {
11395
- "description": "Format output as json.",
11396
- "helpGroup": "GLOBAL",
11397
- "name": "json",
11398
- "allowNo": false,
11399
- "type": "boolean"
11400
- },
11401
- "credential-id": {
11402
- "description": "Org credential Id",
11403
- "name": "credential-id",
11404
- "required": true,
11405
- "hasDynamicHelp": false,
11406
- "multiple": false,
11407
- "type": "option"
11408
- }
11409
- },
11410
- "hasDynamicHelp": false,
11411
- "hiddenAliases": [],
11412
- "id": "cicd:data:sobject:relationships",
11413
- "pluginAlias": "@copado/agentia-cli",
11414
- "pluginName": "@copado/agentia-cli",
11415
- "pluginType": "core",
11416
- "strict": true,
11417
- "enableJsonFlag": true,
11418
- "isESM": true,
11419
- "relativePath": [
11420
- "dist",
11421
- "commands",
11422
- "cicd",
11423
- "data",
11424
- "sobject",
11425
- "relationships.js"
11426
- ]
11427
- },
11428
11472
  "cicd:metadata:content:compare": {
11429
11473
  "aliases": [],
11430
11474
  "args": {},
@@ -14062,5 +14106,5 @@
14062
14106
  ]
14063
14107
  }
14064
14108
  },
14065
- "version": "0.89.0-alpha.0"
14109
+ "version": "0.91.0-alpha.0"
14066
14110
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@copado/agentia-cli",
3
3
  "description": "Command-line interface for Agentia",
4
- "version": "0.89.0-alpha.0",
4
+ "version": "0.91.0-alpha.0",
5
5
  "author": "Copado Solutions",
6
6
  "bin": {
7
7
  "agentia": "./bin/run.js"
@@ -14,6 +14,7 @@
14
14
  "@oclif/core": "^4",
15
15
  "@oclif/plugin-help": "^6",
16
16
  "@oclif/plugin-plugins": "^5",
17
+ "@xmldom/xmldom": "^0.9.12",
17
18
  "semver": "^7.8.5",
18
19
  "tty-table": "^5.0.0",
19
20
  "uuid": "^14.0.1",