@copado/agentia-cli 1.2.0 → 1.4.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 (302) hide show
  1. package/CHANGELOG.md +58 -1
  2. package/README.md +2299 -1615
  3. package/dist/commands/auth/get.js +21 -1
  4. package/dist/commands/auth/set.js +13 -0
  5. package/dist/commands/auth/unset.js +37 -0
  6. package/dist/commands/cicd/cloud/commit.js +6 -5
  7. package/dist/commands/cicd/cloud/promote.js +44 -8
  8. package/dist/commands/cicd/credential/auth/status.js +2 -2
  9. package/dist/commands/cicd/credential/auth/web/login.js +2 -2
  10. package/dist/commands/cicd/credential/create.js +2 -2
  11. package/dist/commands/cicd/credential/list.js +4 -3
  12. package/dist/commands/cicd/credential/open.js +2 -2
  13. package/dist/commands/cicd/credential/update.js +2 -2
  14. package/dist/commands/cicd/data/commit/create.js +2 -2
  15. package/dist/commands/cicd/data/commit/list.js +2 -2
  16. package/dist/commands/cicd/data/dataset-file/content.js +2 -2
  17. package/dist/commands/cicd/data/dataset-file/list.js +2 -2
  18. package/dist/commands/cicd/data/filter/add.js +2 -2
  19. package/dist/commands/cicd/data/filter/delete.js +2 -2
  20. package/dist/commands/cicd/data/filter/list.js +2 -2
  21. package/dist/commands/cicd/data/filter/update.js +2 -2
  22. package/dist/commands/cicd/data/formula/create.js +2 -2
  23. package/dist/commands/cicd/data/formula/list.js +2 -2
  24. package/dist/commands/cicd/data/formula/update.js +2 -2
  25. package/dist/commands/cicd/data/records/match.js +2 -2
  26. package/dist/commands/cicd/data/records/search.js +2 -2
  27. package/dist/commands/cicd/data/sobject/fields.js +2 -2
  28. package/dist/commands/cicd/data/sobject/relationships.js +2 -2
  29. package/dist/commands/cicd/data/sync/apply.js +2 -2
  30. package/dist/commands/cicd/data/sync/preview-updates.js +2 -2
  31. package/dist/commands/cicd/data/template/convert-old.js +2 -2
  32. package/dist/commands/cicd/data/template/create.js +2 -2
  33. package/dist/commands/cicd/data/template/delete.js +2 -2
  34. package/dist/commands/cicd/data/template/get-detail.js +2 -2
  35. package/dist/commands/cicd/data/template/get.js +2 -2
  36. package/dist/commands/cicd/data/template/list.js +2 -2
  37. package/dist/commands/cicd/data/template/open.js +2 -2
  38. package/dist/commands/cicd/data/template/save-detail.js +2 -2
  39. package/dist/commands/cicd/environment/auth/status.js +2 -2
  40. package/dist/commands/cicd/environment/auth/web/login.js +2 -2
  41. package/dist/commands/cicd/environment/create.js +2 -2
  42. package/dist/commands/cicd/environment/get.js +2 -2
  43. package/dist/commands/cicd/environment/list.js +4 -3
  44. package/dist/commands/cicd/environment/open.js +2 -2
  45. package/dist/commands/cicd/environment/update.js +2 -2
  46. package/dist/commands/cicd/extension/create.js +2 -2
  47. package/dist/commands/cicd/extension/install.js +2 -2
  48. package/dist/commands/cicd/extension/package.js +2 -2
  49. package/dist/commands/cicd/extension/publish.js +2 -2
  50. package/dist/commands/cicd/extension/uninstall.js +2 -2
  51. package/dist/commands/cicd/extension/validate.js +2 -2
  52. package/dist/commands/cicd/extension-configuration/get.js +2 -2
  53. package/dist/commands/cicd/extension-configuration/list.js +4 -3
  54. package/dist/commands/cicd/extension-configuration/open.js +2 -2
  55. package/dist/commands/cicd/function/defaults.js +2 -2
  56. package/dist/commands/cicd/function/delete.js +2 -2
  57. package/dist/commands/cicd/function/get.js +2 -2
  58. package/dist/commands/cicd/function/list.js +12 -15
  59. package/dist/commands/cicd/function/open.js +2 -2
  60. package/dist/commands/cicd/function/result/get.js +2 -2
  61. package/dist/commands/cicd/function/result/log/get.js +2 -2
  62. package/dist/commands/cicd/function/run-local.js +2 -2
  63. package/dist/commands/cicd/function/run.js +2 -2
  64. package/dist/commands/cicd/function/upsert.js +2 -2
  65. package/dist/commands/cicd/health-check.js +2 -2
  66. package/dist/commands/cicd/job/get.js +2 -2
  67. package/dist/commands/cicd/job/kill.js +2 -2
  68. package/dist/commands/cicd/job/list.js +4 -3
  69. package/dist/commands/cicd/job/log/get.js +2 -2
  70. package/dist/commands/cicd/job/open.js +2 -2
  71. package/dist/commands/cicd/job/pause.js +2 -2
  72. package/dist/commands/cicd/job/result-file/get.js +13 -8
  73. package/dist/commands/cicd/job/result-file/list.js +2 -2
  74. package/dist/commands/cicd/job/resume.js +2 -2
  75. package/dist/commands/cicd/job/run.js +2 -2
  76. package/dist/commands/cicd/metadata/content/compare.js +2 -2
  77. package/dist/commands/cicd/metadata/content/get.js +2 -2
  78. package/dist/commands/cicd/metadata/dependency/list.js +44 -21
  79. package/dist/commands/cicd/metadata/explore.js +2 -2
  80. package/dist/commands/cicd/metadata/index/compare.js +2 -2
  81. package/dist/commands/cicd/metadata/list.js +2 -2
  82. package/dist/commands/cicd/metadata/refresh/deleted.js +2 -2
  83. package/dist/commands/cicd/metadata/refresh/run.js +2 -2
  84. package/dist/commands/cicd/metadata/refresh/status.js +2 -2
  85. package/dist/commands/cicd/notification/configure.js +2 -2
  86. package/dist/commands/cicd/notification/get.js +2 -2
  87. package/dist/commands/cicd/pipeline/automation/activate.js +2 -2
  88. package/dist/commands/cicd/pipeline/automation/create.js +2 -2
  89. package/dist/commands/cicd/pipeline/automation/deactivate.js +2 -2
  90. package/dist/commands/cicd/pipeline/automation/delete.js +2 -2
  91. package/dist/commands/cicd/pipeline/automation/get.js +2 -2
  92. package/dist/commands/cicd/pipeline/automation/list.js +4 -3
  93. package/dist/commands/cicd/pipeline/automation/open.js +2 -2
  94. package/dist/commands/cicd/pipeline/automation/update.js +2 -2
  95. package/dist/commands/cicd/pipeline/connection/create.js +2 -2
  96. package/dist/commands/cicd/pipeline/connection/delete.js +2 -2
  97. package/dist/commands/cicd/pipeline/connection/list.js +2 -2
  98. package/dist/commands/cicd/pipeline/connection/open.js +2 -2
  99. package/dist/commands/cicd/pipeline/connection/update.js +2 -2
  100. package/dist/commands/cicd/pipeline/create.js +2 -2
  101. package/dist/commands/cicd/pipeline/get.js +2 -2
  102. package/dist/commands/cicd/pipeline/list.js +4 -3
  103. package/dist/commands/cicd/pipeline/open.js +2 -2
  104. package/dist/commands/cicd/pipeline/quality-gate/activate.js +2 -2
  105. package/dist/commands/cicd/pipeline/quality-gate/create.js +2 -2
  106. package/dist/commands/cicd/pipeline/quality-gate/deactivate.js +2 -2
  107. package/dist/commands/cicd/pipeline/quality-gate/delete.js +2 -2
  108. package/dist/commands/cicd/pipeline/quality-gate/get.js +2 -2
  109. package/dist/commands/cicd/pipeline/quality-gate/list.js +4 -3
  110. package/dist/commands/cicd/pipeline/quality-gate/open.js +2 -2
  111. package/dist/commands/cicd/pipeline/quality-gate/update.js +2 -2
  112. package/dist/commands/cicd/pipeline/stage-connection/create.js +2 -2
  113. package/dist/commands/cicd/pipeline/stage-connection/delete.js +2 -2
  114. package/dist/commands/cicd/pipeline/stage-connection/list.js +2 -2
  115. package/dist/commands/cicd/pipeline/stage-connection/open.js +2 -2
  116. package/dist/commands/cicd/pipeline/stage-connection/update.js +2 -2
  117. package/dist/commands/cicd/pipeline/update.js +2 -2
  118. package/dist/commands/cicd/project/create.js +2 -2
  119. package/dist/commands/cicd/project/default/get.js +2 -2
  120. package/dist/commands/cicd/project/default/set.js +2 -2
  121. package/dist/commands/cicd/project/default/unset.js +2 -2
  122. package/dist/commands/cicd/project/delete.js +2 -2
  123. package/dist/commands/cicd/project/get.js +2 -2
  124. package/dist/commands/cicd/project/list.js +4 -3
  125. package/dist/commands/cicd/project/open.js +2 -2
  126. package/dist/commands/cicd/project/update.js +2 -2
  127. package/dist/commands/cicd/promotion/conflict/get.js +2 -2
  128. package/dist/commands/cicd/promotion/conflict/list.js +2 -2
  129. package/dist/commands/cicd/promotion/conflict/resolve.js +2 -2
  130. package/dist/commands/cicd/promotion/conflict/unresolve.js +2 -2
  131. package/dist/commands/cicd/promotion/get.js +2 -2
  132. package/dist/commands/cicd/promotion/job-step/update.js +2 -2
  133. package/dist/commands/cicd/promotion/list.js +4 -3
  134. package/dist/commands/cicd/promotion/open.js +2 -2
  135. package/dist/commands/cicd/promotion/queue/list.js +28 -0
  136. package/dist/commands/cicd/promotion/queue/remove.js +37 -0
  137. package/dist/commands/cicd/promotion/run.js +2 -2
  138. package/dist/commands/cicd/promotion/status.js +29 -0
  139. package/dist/commands/cicd/repository/auth/https/configure.js +2 -2
  140. package/dist/commands/cicd/repository/auth/oauth/login.js +2 -2
  141. package/dist/commands/cicd/repository/auth/setup.js +2 -2
  142. package/dist/commands/cicd/repository/auth/ssh/configure.js +2 -2
  143. package/dist/commands/cicd/repository/create.js +2 -2
  144. package/dist/commands/cicd/repository/delete.js +2 -2
  145. package/dist/commands/cicd/repository/get.js +2 -2
  146. package/dist/commands/cicd/repository/list.js +7 -10
  147. package/dist/commands/cicd/repository/open.js +2 -2
  148. package/dist/commands/cicd/repository/reset.js +2 -2
  149. package/dist/commands/cicd/repository/update.js +2 -2
  150. package/dist/commands/cicd/repository/validate.js +2 -2
  151. package/dist/commands/cicd/stage/create.js +2 -2
  152. package/dist/commands/cicd/stage/delete.js +2 -2
  153. package/dist/commands/cicd/stage/get.js +2 -2
  154. package/dist/commands/cicd/stage/list.js +4 -3
  155. package/dist/commands/cicd/stage/open.js +2 -2
  156. package/dist/commands/cicd/stage/update.js +2 -2
  157. package/dist/commands/cicd/template/defaults.js +2 -2
  158. package/dist/commands/cicd/template/delete.js +2 -2
  159. package/dist/commands/cicd/template/get.js +2 -2
  160. package/dist/commands/cicd/template/list.js +11 -14
  161. package/dist/commands/cicd/template/upsert.js +2 -2
  162. package/dist/commands/cicd/user/get.js +2 -2
  163. package/dist/commands/cicd/work/ahead-behind.js +2 -2
  164. package/dist/commands/cicd/work/create.js +2 -2
  165. package/dist/commands/cicd/work/delete.js +4 -4
  166. package/dist/commands/cicd/work/deployment-step/create.js +2 -2
  167. package/dist/commands/cicd/work/deployment-step/delete.js +2 -2
  168. package/dist/commands/cicd/work/deployment-step/list.js +2 -2
  169. package/dist/commands/cicd/work/deployment-step/reorder.js +2 -2
  170. package/dist/commands/cicd/work/deployment-step/salesforce-flows.js +2 -2
  171. package/dist/commands/cicd/work/deployment-step/types.js +2 -2
  172. package/dist/commands/cicd/work/deployment-step/update.js +2 -2
  173. package/dist/commands/cicd/work/done.js +2 -2
  174. package/dist/commands/cicd/work/environment-sync.js +140 -64
  175. package/dist/commands/cicd/work/get.js +4 -4
  176. package/dist/commands/cicd/work/list.js +4 -3
  177. package/dist/commands/cicd/work/open.js +2 -2
  178. package/dist/commands/cicd/work/promote.js +2 -2
  179. package/dist/commands/cicd/work/publish.js +2 -2
  180. package/dist/commands/cicd/work/push.js +2 -2
  181. package/dist/commands/cicd/work/set.js +2 -2
  182. package/dist/commands/cicd/work/status.js +2 -2
  183. package/dist/commands/cicd/work/submit.js +2 -2
  184. package/dist/commands/cicd/work/test/apex.js +20 -35
  185. package/dist/commands/cicd/work/test.js +116 -11
  186. package/dist/commands/cicd/work/update.js +4 -4
  187. package/dist/commands/help-agent.js +15 -0
  188. package/dist/commands/help.js +38 -0
  189. package/dist/commands/history/clear.js +42 -0
  190. package/dist/commands/history/list.js +50 -0
  191. package/dist/commands/support.js +15 -0
  192. package/dist/commands/testing/browser/execute.js +49 -0
  193. package/dist/commands/testing/browser/history.js +49 -0
  194. package/dist/commands/testing/browser/inspect.js +35 -0
  195. package/dist/commands/testing/browser/recorder.js +52 -0
  196. package/dist/commands/testing/browser/screenshot.js +27 -0
  197. package/dist/commands/testing/browser/set-options.js +35 -0
  198. package/dist/commands/testing/browser/start.js +51 -0
  199. package/dist/commands/testing/browser/status.js +26 -0
  200. package/dist/commands/testing/browser/stop.js +34 -0
  201. package/dist/commands/testing/browser/view.js +35 -0
  202. package/dist/commands/testing/job/runs/abort.js +1 -1
  203. package/dist/commands/testing/job/runs/get.js +1 -1
  204. package/dist/commands/testing/job/runs/list.js +1 -1
  205. package/dist/commands/testing/job/runs/logs.js +1 -1
  206. package/dist/commands/testing/job/runs/search.js +1 -1
  207. package/dist/hooks/init/cicd-connection.js +59 -0
  208. package/dist/lib/agentia-command.js +69 -6
  209. package/dist/lib/cicd-command.js +3 -0
  210. package/dist/lib/cicd-connection.js +22 -0
  211. package/dist/lib/cicd-gateway.js +2 -1
  212. package/dist/lib/command-history-sanitization.js +9 -0
  213. package/dist/lib/command-history.js +11 -0
  214. package/dist/lib/command-output-buffer.js +6 -1
  215. package/dist/lib/defaults-store.js +5 -1
  216. package/dist/lib/dependency-from-changes.js +3 -1
  217. package/dist/lib/dependency-source-context.js +3 -0
  218. package/dist/lib/function-list.js +3 -0
  219. package/dist/lib/git-worktree.js +4 -1
  220. package/dist/lib/help-agent-command.js +3 -0
  221. package/dist/lib/help-agent-interaction-history.js +10 -0
  222. package/dist/lib/help-agent-session.js +3 -0
  223. package/dist/lib/job-get.js +2 -1
  224. package/dist/lib/job-types.js +2 -1
  225. package/dist/lib/list-pagination.js +6 -1
  226. package/dist/lib/local-quality-gates.js +4 -1
  227. package/dist/lib/mcp/result.js +41 -3
  228. package/dist/lib/mcp/server.js +3 -2
  229. package/dist/lib/mcp/testing-browser-tools.js +179 -0
  230. package/dist/lib/mcp/testing-tools.js +4 -3
  231. package/dist/lib/mcp/tool-annotations.js +31 -12
  232. package/dist/lib/mcp/tools.js +115 -59
  233. package/dist/lib/mcp/work-tools.js +100 -47
  234. package/dist/lib/promotion-queue.js +5 -0
  235. package/dist/lib/promotion-run.js +4 -1
  236. package/dist/lib/promotion-status.js +12 -0
  237. package/dist/lib/quality-gates.js +13 -0
  238. package/dist/lib/repository-list.js +3 -0
  239. package/dist/lib/runtime.js +1 -1
  240. package/dist/lib/stock-quality-gates.js +2 -1
  241. package/dist/lib/support-ai-context.js +11 -0
  242. package/dist/lib/support-ai-stream-parser.js +4 -0
  243. package/dist/lib/support-ai.js +9 -0
  244. package/dist/lib/template-list.js +3 -0
  245. package/dist/lib/testing-browser-command.js +6 -0
  246. package/dist/lib/testing-browser-operations.js +16 -0
  247. package/dist/lib/testing-browser-requests.js +11 -0
  248. package/dist/lib/testing-browser-robot.js +9 -0
  249. package/dist/lib/testing-browser-session.js +13 -0
  250. package/dist/lib/testing-browser-state.js +17 -0
  251. package/dist/lib/testing-browser-stream.js +7 -0
  252. package/dist/lib/testing-browser-types.js +3 -0
  253. package/dist/lib/testing-browser-viewer-key.js +7 -0
  254. package/dist/lib/testing-gateway.js +2 -1
  255. package/dist/lib/testing-operations.js +21 -1
  256. package/dist/lib/testing-sanitization.js +2 -1
  257. package/dist/lib/work-apex-test-failures.js +2 -1
  258. package/dist/lib/work-environment-sync-ready.js +7 -1
  259. package/dist/lib/work-environment-sync.js +8 -1
  260. package/dist/lib/work-local-run-tests.js +2 -1
  261. package/dist/lib/work-promote-deploy.js +3 -1
  262. package/dist/lib/work-promote.js +2 -1
  263. package/dist/lib/work-types.js +3 -1
  264. package/oclif.manifest.json +3544 -1828
  265. package/package.json +11 -4
  266. package/templates/skills/agentia-ai/SKILL.md +6 -2
  267. package/templates/skills/agentia-ai/references/ai-agents.md +19 -1
  268. package/templates/skills/agentia-cicd/SKILL.md +6 -5
  269. package/templates/skills/agentia-cicd/references/environments-and-credentials.md +16 -0
  270. package/templates/skills/agentia-cicd/references/jobs.md +3 -2
  271. package/templates/skills/agentia-cicd/references/promotions.md +26 -5
  272. package/templates/skills/agentia-cicd/references/work.md +25 -11
  273. package/templates/skills/agentia-metadata/SKILL.md +9 -3
  274. package/templates/skills/agentia-metadata/references/metadata-dependency.md +70 -0
  275. package/templates/skills/agentia-metadata/references/metadata-explore.md +8 -4
  276. package/templates/skills/agentia-testing/SKILL.md +9 -4
  277. package/templates/skills/agentia-testing/references/browser-testing.md +92 -0
  278. package/templates/skills/agentia-testing/references/flow-automation.md +112 -0
  279. package/templates/skills/agentia-testing/references/qforce.md +88 -0
  280. package/templates/skills/agentia-testing/references/qweb.md +103 -0
  281. package/templates/skills/agentia-testing/references/tests.md +17 -9
  282. package/vendor/java/var-replace-command.jar +0 -0
  283. package/dist/commands/testing/live/continue.js +0 -16
  284. package/dist/commands/testing/live/execute.js +0 -43
  285. package/dist/commands/testing/live/history.js +0 -40
  286. package/dist/commands/testing/live/inspect.js +0 -31
  287. package/dist/commands/testing/live/interrupt.js +0 -16
  288. package/dist/commands/testing/live/recorder.js +0 -42
  289. package/dist/commands/testing/live/reports.js +0 -31
  290. package/dist/commands/testing/live/screenshot.js +0 -25
  291. package/dist/commands/testing/live/set-options.js +0 -35
  292. package/dist/commands/testing/live/start.js +0 -58
  293. package/dist/commands/testing/live/status.js +0 -24
  294. package/dist/commands/testing/live/stop.js +0 -36
  295. package/dist/commands/testing/live/view.js +0 -36
  296. package/dist/lib/mcp/testing-live-tools.js +0 -226
  297. package/dist/lib/testing-live-command.js +0 -8
  298. package/dist/lib/testing-live-operations.js +0 -25
  299. package/dist/lib/testing-live-recorder.js +0 -11
  300. package/dist/lib/testing-live-robot.js +0 -9
  301. package/dist/lib/testing-live-state.js +0 -12
  302. package/dist/lib/testing-live-types.js +0 -3
package/package.json CHANGED
@@ -69,7 +69,8 @@
69
69
  "init": [
70
70
  "./dist/hooks/init/version-warning",
71
71
  "./dist/hooks/init/migrate-user-config",
72
- "./dist/hooks/init/plugin-host"
72
+ "./dist/hooks/init/plugin-host",
73
+ "./dist/hooks/init/cicd-connection"
73
74
  ]
74
75
  },
75
76
  "plugins": [
@@ -97,6 +98,9 @@
97
98
  "auth": {
98
99
  "description": "Manage authentication credentials"
99
100
  },
101
+ "history": {
102
+ "description": "Inspect temporary local command history"
103
+ },
100
104
  "adv": {
101
105
  "description": "Manage Copado Pipelines Advanced deployments"
102
106
  },
@@ -217,6 +221,9 @@
217
221
  "cicd:promotion:job-step": {
218
222
  "description": "Manage Copado promotion job steps"
219
223
  },
224
+ "cicd:promotion:queue": {
225
+ "description": "Inspect and clear the promotion job queue"
226
+ },
220
227
  "cicd:notification": {
221
228
  "description": "Configure Copado notification subscriptions"
222
229
  },
@@ -247,8 +254,8 @@
247
254
  "testing:job:schedule": {
248
255
  "description": "Manage the schedule for a Copado Robotic Testing job"
249
256
  },
250
- "testing:live": {
251
- "description": "Manage Copado Robotic Testing live sessions"
257
+ "testing:browser": {
258
+ "description": "Manage Copado Robotic Testing browser sessions"
252
259
  },
253
260
  "testing:project": {
254
261
  "description": "Manage Copado Robotic Testing projects"
@@ -268,7 +275,7 @@
268
275
  }
269
276
  },
270
277
  "type": "module",
271
- "version": "1.2.0",
278
+ "version": "1.4.0",
272
279
  "x-agentia-protected-build": true,
273
280
  "x-agentia-protected-files": [
274
281
  "dist/lib/runtime.js"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agentia-ai
3
- description: Use this skill when prompting Copado AI agents through the Agentia CLI or MCP, including `agentia ai agent ask`, `agentia ai agent chat`, Plan, Build, Test, Release, Operate, Knowledge, workspace, dialogue, user story, Salesforce org, and component context.
3
+ description: Use this skill when prompting Copado AI agents or using interactive in-app support through the Agentia CLI or MCP, including `agentia help-agent`, `agentia ai agent ask`, `agentia ai agent chat`, Plan, Build, Test, Release, Operate, Knowledge, workspace, dialogue, user story, Salesforce org, and component context.
4
4
  ---
5
5
 
6
6
  <!-- Agentia managed skill file: agentia setup skills -->
@@ -11,9 +11,11 @@ Use this skill to ask Copado AI agents through Agentia with the right agent sele
11
11
 
12
12
  Prefer the `agentia_ai_ask` MCP tool when it is available for single-turn prompts. Use CLI examples as the fallback. Use `agentia ai agent chat` only for interactive terminal sessions.
13
13
 
14
+ Use `agentia help-agent` when a person wants interactive Copado product support. It opens without an eager CICD credential preflight, obtains fresh short-lived access per turn, and writes response deltas immediately. Each turn refreshes bounded local context, including dominant CLI/IDE/MCP usage; follow-ups include a bounded redacted digest of successful prior messages. Successful turn pairs are retained separately for at most 24 hours but never restored into a later chat. Use `agentia history list` to inspect sanitized command outcomes or `agentia history clear --yes` to remove command and Help Agent interaction history.
15
+
14
16
  ## Start Here
15
17
 
16
- 1. Confirm AI auth with `agentia auth get --ai --json`. Configure missing credentials with `agentia auth set --ai ...` or the supported `AGENTIA_AI_*` environment variables.
18
+ 1. For `ai agent` and workspace commands, confirm AI auth with `agentia auth get --ai --json`. Configure missing credentials with `agentia auth set --ai ...` or the supported `AGENTIA_AI_*` environment variables. For `help-agent`, confirm CICD auth with `agentia auth get --cicd --json`.
17
19
  2. Omit `--agent` by default: `ask` and `chat` use `orchestrate`, which routes work to the right specialist. Pass `--agent plan`, `build`, `test`, `release`, `operate`, or `knowledge` only to target a specialist explicitly.
18
20
  3. Add useful context flags when available: `--workspace`, `--dialogue`, `--user-story`, `--sf-org`, and `--component`.
19
21
  4. Use `--json` for automation. Use `--no-stream` when the caller needs a buffered response.
@@ -28,6 +30,8 @@ Prefer the `agentia_ai_ask` MCP tool when it is available for single-turn prompt
28
30
  - Use the Knowledge agent for Copado AI Knowledge grounding and product questions.
29
31
  - Use the Plan, Build, Test, Release, and Operate agents according to the lifecycle intent.
30
32
  - Do not paste PATs or secrets into prompts.
33
+ - Use `help-agent` only in an interactive terminal; it has no JSON or MCP mode.
34
+ - Treat history as temporary diagnostic context, not an audit log. CLI/IDE command rows can contain sanitized parameters, structured results, and bounded output tails; MCP rows contain metadata only. Successful Help Agent turn pairs are redacted, bounded, and retained separately for up to 24 hours. Raw User-Agent values, secrets, full paths, conversation IDs, and HMACs are excluded.
31
35
 
32
36
  ## Report Back
33
37
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # AI Agents Reference
4
4
 
5
- Use this reference for `agentia ai agent ask`, `agentia ai agent chat`, and the matching `agentia_ai_ask` MCP tool.
5
+ Use this reference for `agentia help-agent`, `agentia ai agent ask`, `agentia ai agent chat`, and the matching `agentia_ai_ask` MCP tool.
6
6
 
7
7
  ## Authentication And Context
8
8
 
@@ -52,6 +52,22 @@ agentia ai agent chat --agent orchestrate --workspace <workspace-id>
52
52
 
53
53
  Chat creates or reuses one dialogue for the session and supports session slash commands. It is not suitable for headless JSON workflows.
54
54
 
55
+ ## Interactive Product Support
56
+
57
+ Use the experimental Help Agent for Copado product questions when a human is present:
58
+
59
+ ```sh
60
+ agentia help-agent
61
+ agentia support
62
+ agentia help --agent
63
+ agentia history list --limit 10
64
+ agentia history clear --yes
65
+ ```
66
+
67
+ All three Help Agent entry points share the same behavior. They open without a CICD user or credential preflight and do not use the separately configured AI PAT. Every request identifies the assistant as a concise Copado expert on Agentia Headless and Copado tools for developers working locally. The system prompt uses retained history to identify dominant CLI/IDE/MCP usage and asks one brief question when tooling or a local-versus-cloud operations flow is unclear. Each turn requests a fresh short-lived HMAC and refreshes CLI version, platform, architecture, workspace basename, normalized current origin, aggregate tool counts, and the three newest sanitized command summaries. Follow-up turns include a deterministic redacted digest of at most six successful prior messages. SSE response deltas render immediately. `/help`, `/clear`, and `/exit` are supported; `/clear` resets the conversation identifier and in-memory digest.
68
+
69
+ The `history` commands inspect up to 100 sanitized command summaries and clear all temporary history. CLI/IDE rows can contain sanitized parameters, a redacted structured result, and ordered 20 KiB stdout/stderr tails. MCP rows contain only command ID, timing, outcome, CLI version, workspace basename, and `mcp` origin—never arguments, output, results, or errors. Successful Help Agent turn pairs are separately redacted, capped at 4 KiB per message, and retained in private storage for at most 24 hours/100 pairs; they are not restored into later chats. `history clear --yes` deletes both stores. Help Agent has no JSON or MCP mode. Never paste credentials or tokens into prompts.
70
+
55
71
  ## Workspace And Quota Helpers
56
72
 
57
73
  Use these adjacent commands when the prompt workflow needs context setup:
@@ -68,3 +84,5 @@ Use these adjacent commands when the prompt workflow needs context setup:
68
84
  - `--user-story`, `--sf-org`, and `--component` enrich prompt context but do not replace a clear prompt.
69
85
  - Streaming is human-friendly. For tools, CI, or follow-up parsing, use `--json` and consider `--no-stream`.
70
86
  - `chat` has no MCP equivalent and should not be used in non-interactive shells.
87
+ - `help-agent` requires CICD authentication and a CICD environment where Support AI authentication is enabled.
88
+ - Temporary command history is diagnostic context, not a durable audit log; the operating system may remove it.
@@ -13,7 +13,7 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
13
13
 
14
14
  ## Start Here
15
15
 
16
- 1. Confirm `agentia auth get --cicd --json` is configured, or that the current process supplies `AGENTIA_CICD_API_KEY` and `AGENTIA_CICD_BASE_URL`.
16
+ 1. Confirm `agentia auth get --cicd --json` is configured, or that the current process supplies `AGENTIA_CICD_API_KEY` and `AGENTIA_CICD_BASE_URL`. For sandbox function/template/extension work against a different Copado org, use a named connection (`auth set --connection`) plus `--cicd-connection` / MCP `cicdConnection` instead of swapping the default key.
17
17
  2. Identify the domain below and read only the matching reference file.
18
18
  3. Before mutating data, read the target record first with the matching `get`, `list`, or `status` command.
19
19
  4. Never print credentials, PATs, OAuth signatures, or unmasked environment variables.
@@ -21,7 +21,7 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
21
21
  ## References
22
22
 
23
23
  - User stories, git commits, cloud commits, publish, submit, done, quality gates, and deployment steps: [references/work.md](references/work.md)
24
- - Promotion lookup, run, resume, merge conflicts, and story-centric promotion: [references/promotions.md](references/promotions.md)
24
+ - Promotion lookup, status (blockers/Manual Task/queue), run, resume, merge conflicts, and story-centric promotion: [references/promotions.md](references/promotions.md)
25
25
  - Copado JobExecution lookup, actions, logs, and monitoring: [references/jobs.md](references/jobs.md)
26
26
  - Copado Functions lifecycle, remote run/results, and local Docker run: [references/functions.md](references/functions.md)
27
27
  - Git-hosted Copado CICD extensions (`cicd extension`, experimental): [references/extensions.md](references/extensions.md)
@@ -31,7 +31,7 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
31
31
  - Slack notification subscriptions on a pipeline (`agentia_notification_configure` / CLI): [references/notifications.md](references/notifications.md)
32
32
  - Release data templates, records, matching, sync, dataset files, and data commits: [references/data.md](references/data.md)
33
33
 
34
- For **Org Intelligence** (read Salesforce metadata against a sandbox/developer org credential; prefer local files first, then the org; metadata only—not data, not edits), use the separate skill `agentia-metadata/SKILL.md` (`cicd metadata explore` / MCP `agentia_metadata_explore`).
34
+ For **Org Intelligence** (read Salesforce metadata against a sandbox/developer org credential; prefer local files first, then the org; metadata only—not data, not edits), use the separate skill `agentia-metadata/SKILL.md` (`cicd metadata explore` / MCP `agentia_metadata_explore`). For the **Copado dependency graph**—including local DX `--path` and story/project-default context—use the same skill’s [metadata-dependency](../agentia-metadata/references/metadata-dependency.md) reference (`cicd metadata dependency list` / MCP `agentia_metadata_dependency_list`).
35
35
 
36
36
  ## General Rules
37
37
 
@@ -39,13 +39,14 @@ For **Org Intelligence** (read Salesforce metadata against a sandbox/developer o
39
39
  - User Story subscriber custom fields: read `result.customFields` from `work get` / MCP `agentia_work_get`. Write with CLI `--custom-field ApiName=value` (repeatable) or MCP `customFields: [{ apiName, value }]` on create/update. See [references/work.md](references/work.md#subscriber-custom-fields).
40
40
  - Use Salesforce record IDs or generated names read from Copado. Do not invent story names, promotion IDs, job IDs, credential IDs, or pipeline IDs.
41
41
  - Keep human output off stdout in JSON workflows. Prefer `--json`, then parse the result object.
42
+ - Cursor-paginated CICD lists (`--cursor` / MCP `cursor`) self-heal on gateway category `SF-014` (expired or invalid cursor): Agentia retries once without the cursor and returns page 1 with a `warnings` entry (also mirrored at the top level of CLI `--json`). Treat that as a reset to the first page, not a hard failure; do not keep replaying the same cursor.
42
43
  - For local project work, keep the tracked working tree clean before commands that require it: `work set`, `work publish`, and `work submit`. If `work set` returns `status: "warning"`, show the message and do not assume a feature branch was created; branch keys are cleared and the work item id/name/title are still recorded in config.user.json.
43
44
  - Treat `cicd job` as Copado CICD JobExecution. It is different from CRT `testing job`.
44
45
  - Treat `cicd function` as Copado Function definitions and runs. It is different from JobExecution (`cicd job`) and Job Templates (`cicd template`).
45
46
  - Treat `cicd extension` as experimental git-hosted packaging of Functions/Templates (plus optional `force-app`). It is different from per-asset `cicd function` / `cicd template` upserts.
46
47
  - Treat `cicd template` as Copado Job Templates via `/release/jobs/templates`. It is different from Release Data Templates (`cicd data template`).
47
- - Treat `cicd work test` as local quality gates (`--local` is the default). It is different from CRT `testing job run`.
48
- - Treat `cicd work test apex` as the Apex test runner that local quality gates (`.agentia_quality_gates.*`) usually call. An empty `--apex-test-classes` list skips Salesforce CLI. It can also be invoked directly. It is different from CRT.
48
+ - Treat `cicd work test` as local quality gates (`--local` is the default). Use `--gate <id>` / `--list-gates` to run or discover individual gates (apex, lint, lwc, custom). It is different from CRT `testing job run`.
49
+ - Treat `cicd work test --gate apex` as the Apex test runner; the sample local quality gates (`.agentia_quality_gates.*`) call it for their apex gate. Run directly it uploads the result to the work item; inside a script (`AGENTIA_QUALITY_GATES_ACTIVE=1`) it does not, because the outer run reports once. An empty `--apex-test-classes` list skips Salesforce CLI. `cicd work test apex` is the legacy hidden alias. It is different from CRT.
49
50
  - Treat `auth` credentials as keychain/API credentials and `cicd credential` records as Copado environment credentials.
50
51
 
51
52
  ## Report Back
@@ -6,6 +6,22 @@ Use this reference for `agentia cicd environment ...`, `agentia cicd environment
6
6
 
7
7
  `auth set --cicd` stores the API key used by the CLI. `cicd credential` lists, creates, updates, opens, or authenticates Copado environment credential records. They are different credential types.
8
8
 
9
+ ## Named CICD Connections
10
+
11
+ Use a named connection when story lifecycle should stay on the default/production Copado org while function, template, or extension work targets a sandbox.
12
+
13
+ ```sh
14
+ agentia auth set --cicd "$SANDBOX_KEY" --custom-url https://test.api.copado.com --connection sandbox --kind sandbox
15
+ agentia cicd function upsert MyFn --file ./fn.json --cicd-connection sandbox
16
+ agentia auth get --cicd --json
17
+ agentia auth unset --connection sandbox --yes
18
+ ```
19
+
20
+ - `--cicd-connection <name>` is available only on `agentia cicd ...` commands (and MCP `cicdConnection` on CICD tools). It does not appear on `ai`, `adv`, `testing`, or `auth`.
21
+ - `AGENTIA_CICD_CONNECTION=<name>` sets a session default for `cicd` commands without changing keychain storage.
22
+ - Do not combine a named connection with `AGENTIA_CICD_API_KEY` / `AGENTIA_CICD_BASE_URL`; the CLI errors instead of silently picking one.
23
+ - Connections tagged `--kind production` require confirmation (CLI TTY), `--yes`, or `AGENTIA_CICD_ALLOW_PRODUCTION=true` (required for MCP).
24
+
9
25
  ## Environment Commands
10
26
 
11
27
  | Command | Use For | Notes |
@@ -13,8 +13,8 @@ Use this reference for Copado CICD JobExecution commands under `agentia cicd job
13
13
  | `job list` | Search job executions | Filter by `--status`, `--type`, `--parent`, `--context`, `--mine`, cursor, and page size. |
14
14
  | `job get ID` | Inspect a job and ordered steps | Read before action commands or log lookup. |
15
15
  | `job log get ID` | Read execution logs | Use `--step <step-id>` when a specific step is needed. |
16
- | `job result-file list RESULT_ID` | Discover files linked to a job-step Result | Returns file metadata; use its `fileId` with `get`. |
17
- | `job result-file get RESULT_ID --file-id CONTENT_VERSION_ID` | Retrieve one Result-linked Salesforce File | Use `--output-file <path>` to write validated decoded bytes; JSON and MCP return Base64 content. |
16
+ | `job result-file list RESULT_ID` | Discover files linked to a job-step Result | Human table includes FILE ID (`fileId`, 068); JSON returns `fileId` and `contentDocumentId`. |
17
+ | `job result-file get RESULT_ID --file-id FILE_ID` | Retrieve one Result-linked file | Pass `fileId` from list (068). A ContentDocument id (069) is resolved via list before download. |
18
18
  | `job run ID` | Run all steps | Use `--restart` only when the user asks to restart from the beginning. |
19
19
  | `job resume ID` | Resume outstanding steps | Good after a paused or partially completed job. |
20
20
  | `job pause ID` | Pause/cancel resumably | Confirm intent before interrupting active work. |
@@ -45,5 +45,6 @@ agentia cicd job resume <job-execution-id> --json
45
45
  - Some job tools require user and organization context at the gateway layer. If the CLI reports missing context, inspect auth and user context before retrying.
46
46
  - Logs can be large. Prefer a specific step when available.
47
47
  - Result-file commands require the job-step Result ID, not the JobExecution ID. They accept only 15- or 18-character Salesforce IDs and never derive output paths from remote filenames.
48
+ - Use `fileId` (068) from `result-file list` for downloads. The list table shows FILE ID; JSON also includes `contentDocumentId` (069), which must not be used directly in the download path. `result-file get` and MCP `agentia_job_result_file_get` resolve a 069 id when it matches a listed file.
48
49
  - `--output-file` can replace an existing file after Base64 validation. Use an explicitly controlled destination; malformed content leaves an existing target unchanged.
49
50
  - Do not use CICD job commands for Robot Framework builds; use the `agentia-testing` skill for CRT run status and logs.
@@ -2,14 +2,14 @@
2
2
 
3
3
  # CICD Promotions Reference
4
4
 
5
- Use this reference for `agentia cicd promotion ...`, `agentia cicd promotion conflict ...`, and `agentia cicd cloud promote`.
5
+ Use this reference for `agentia cicd promotion ...`, `agentia cicd promotion conflict ...`, `agentia cicd promotion queue ...`, and `agentia cicd cloud promote`.
6
6
 
7
7
  ## Entry Points
8
8
 
9
9
  | Command | Starts From | Use When |
10
10
  | --- | --- | --- |
11
11
  | `agentia cicd promotion run <promotion-id>` | Promotion ID | You already know the Promotion record and want explicit merge or merge-and-deploy control. |
12
- | `agentia cicd cloud promote [story-id]` | User Story | You want Agentia to resolve the story's Promotion before running it. |
12
+ | `agentia cicd cloud promote [story-id]` | User Story | Resolve the story's Promotion before running; creates a forward Draft promotion and adds the story when none exists. |
13
13
  | `agentia cicd work submit --done` | Active User Story branch | The story is approved and should move to the next stage (Copado UI Submit promote). |
14
14
 
15
15
  Prefer `cloud promote` when the user talks about a story. Prefer `promotion run` when the user provides a Promotion ID.
@@ -19,15 +19,27 @@ Prefer `cloud promote` when the user talks about a story. Prefer `promotion run`
19
19
  | Command | Use For | Notes |
20
20
  | --- | --- | --- |
21
21
  | `promotion list` | Find promotions | Filter by `--work-id`, status, project, pipeline, source/destination environment, or back-promotion flags. |
22
- | `promotion get ID` | Inspect one promotion | Read this before running, resuming, or resolving conflicts. |
22
+ | `promotion status ID` | Actionable run status | Prefer when the user asks "promotion status", what is running, or what is blocking. Includes user stories, current job step, queue, and Manual Task action-needed. MCP: `agentia_promotion_status`. |
23
+ | `promotion get ID` | Inspect one promotion record | Read this before running, resuming, or resolving conflicts. Does not load job steps; use `promotion status` for blockers. |
23
24
  | `promotion run ID` | Preflight and submit a run | Requires `--operation merge` or `--operation merge_and_deploy` unless `--resume` is used. |
24
25
  | `promotion open ID` | Open in browser | CLI-only navigation helper. |
25
- | `cloud promote [ID]` | Story-centric run | Use `--deploy` for merge and deploy; use `--promotion-id` if the story has multiple promotions. |
26
+ | `cloud promote [ID]` | Story-centric run | Use `--deploy` for merge and deploy; use `--promotion-id` if the story has multiple promotions (explicit ID is used as is and never creates one). JSON/MCP return `createdPromotion` when auto-created. |
27
+
28
+ ## Status Reports
29
+
30
+ When the user asks about a promotion's progress or blockers, call `agentia cicd promotion status <id> --json` (or MCP `agentia_promotion_status`) and report **all** of:
31
+
32
+ 1. Promotion name/id and status (and Salesforce status when present).
33
+ 2. User stories involved (name and id).
34
+ 3. Current job and current step (name, status, type).
35
+ 4. Whether `actionNeeded.kind` is `manual_task` or `queue` — quote `actionNeeded.message` and tell the user they must act; do not say only "In Progress".
36
+ 5. Queue summary when present; call `promotion queue list` if they need item-level detail.
26
37
 
27
38
  Example:
28
39
 
29
40
  ```sh
30
41
  agentia cicd promotion list --work-id <story-id> --json
42
+ agentia cicd promotion status <promotion-id> --json
31
43
  agentia cicd promotion run <promotion-id> --operation merge_and_deploy --json
32
44
  agentia cicd cloud promote <story-id> --deploy --json
33
45
  ```
@@ -50,9 +62,18 @@ Use `--resume <job-execution-id>` to resume the original execution after conflic
50
62
 
51
63
  Read conflict content before manual resolution. Do not invent resolved content; use the user's reviewed file or ask for confirmation.
52
64
 
65
+ ## Queue Commands
66
+
67
+ | Command | Use For |
68
+ | --- | --- |
69
+ | `promotion queue list <promotion-id>` | Show the job queue holding the promotion's destination (status, step, owner, whether the user can manage the queue). |
70
+ | `promotion queue remove <promotion-id> --item <queue-item-id> --yes` | Remove queued items; needs the Manage Queue permission. Repeat `--item` for several. |
71
+
72
+ List first and take item IDs from the output. Removal is destructive: confirm the item with the user. A conflict error means the queue changed since the read; list again. MCP: `agentia_promotion_queue_list`, `agentia_promotion_queue_remove` (`itemIds`).
73
+
53
74
  ## Gotchas
54
75
 
55
- - Promotion IDs are not User Story IDs. Use `cloud promote` if you only have the story.
76
+ - Promotion IDs are not User Story IDs. Use `cloud promote` if you only have the story; do not create the promotion manually first when none contains the story.
56
77
  - `--deploy` on `cloud promote` maps to promotion operation `merge_and_deploy`; without it, the default is merge only.
57
78
  - `--recreate-promotion-branch` is a sensitive run option and should be paired with explicit user intent and `--yes` when required.
58
79
  - If conflicts exist, resolve them first and then resume the same execution.
@@ -36,7 +36,7 @@ Use this path when the change exists in the local repository:
36
36
  1. Discover and inspect: `agentia cicd work list --assigned-to-me --json`, then `agentia cicd work get <id-or-name> --json`.
37
37
  2. Activate: `agentia cicd work set <id-or-name> --json`. This fetches the configured base branch, fetches the Story feature branch when it exists on origin, then checks out `feature/<story-name>` from that remote branch when present (otherwise from the base), and records the story, base branch, dev org branch, and pull-request context in `.agentia/config.user.json`. Use `--base-branch <branch>` only when intentionally overriding the Pipeline default. If the JSON result has `status: "warning"` (missing pipeline or credential), show that `message`, do not assume a feature branch was created, and note that branch keys (`lastBaseBranch`, `lastDevOrgBranch`, `lastPullRequestBaseUrl`) were cleared while `lastWorkItemId`/`lastWorkItem`/`lastWorkItemTitle` were recorded — stop until the Story setup is fixed; publish and submit will not work. If the Story source credential differs from the project default, work set warns with the current credential and environment and does not PATCH; use `agentia cicd work update <id> --source-credential <credential-id>` to change it.
38
38
  3. Implement with Salesforce CLI, VS Code, or an IDE. Stage and commit with `git add` / `git commit`. Do not use `agentia cicd cloud commit` for local Git work.
39
- 4. Run project-owned gates: `agentia cicd work test --json`. This runs `.agentia_quality_gates.sh` or `.agentia_quality_gates.cmd` from the repository root when present. If those files are missing, it warns and runs `agentia cicd work test apex` via the stock sample from a temporary file. Local tests can be slow; pass `--apex-test-classes=MyTest,OtherTest` for faster, earlier Apex checks.
39
+ 4. Run project-owned gates: `agentia cicd work test --json`. This runs `.agentia_quality_gates.sh` or `.agentia_quality_gates.cmd` from the repository root when present. If those files are missing, it warns and runs the stock sample from a temporary file. Local tests can be slow; pass `--apex-test-classes=MyTest,OtherTest` for faster, earlier Apex checks.
40
40
  5. Register and synchronize: `agentia cicd work publish --json`. A plain `git push` does not register a Copado Commit or merge the feature branch into the recorded dev org branch. Pass `--permissions` and `--full-metadata` when nested detection is not enough.
41
41
  6. Validate and open the merge-request flow: `agentia cicd work submit --json`. Submit runs the local gates unless `--skip-local-tests` is explicit, pushes ahead commits, waits if the last pending related job is a Commit template, and submits with validate-only behavior. `--skip-pull-request` skips opening the compare URL.
42
42
  7. Only with explicit approval to promote and deploy, run `agentia cicd work submit --deploy --json` (or `--done`). `work done` is a compatibility alias.
@@ -51,7 +51,7 @@ Use this path when Copado should retrieve metadata from a configured source envi
51
51
  1. Inspect the Story and pass its Salesforce ID explicitly when possible. An active Story from `work set` is optional, not a prerequisite for the cloud operation.
52
52
  2. Start a cloud commit with `agentia cicd cloud commit <story-id> ... --json`. Use the simple metadata flags for one change, or `--file`/`--stdin` for a multi-change request. Always pass `--metadata-category` (use `SFDX` for Salesforce metadata). With `--file`/`--stdin`, each change requires `c` (or `category`).
53
53
  3. Let the command wait for its Job Execution by default. After a timeout, use the returned execution ID with `agentia cicd job get` and `agentia cicd job log get`; do not immediately submit a duplicate commit.
54
- 4. When explicitly approved to promote an existing Promotion, use `agentia cicd cloud promote <story-id> --json`; add `--deploy` only for promote-and-deploy. This is independent of local `work submit`.
54
+ 4. When explicitly approved to promote, use `agentia cicd cloud promote <story-id> --json`; add `--deploy` only for promote-and-deploy. Creates a forward Draft promotion when none contains the story (`createdPromotion` in JSON/MCP). This is independent of local `work submit`.
55
55
 
56
56
  Cloud commit checks Story readiness and source credentials before submission. Avoid concurrent cloud commits to one Story. Treat `--recreate-feature-branch` as destructive because it can overwrite Story-branch work.
57
57
 
@@ -60,20 +60,20 @@ Cloud commit checks Story readiness and source credentials before submission. Av
60
60
 
61
61
  | Command | Use For | Notes |
62
62
  | ------------------ | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
63
- | `work list` | Find candidate stories | Use `--assigned-to-me`, `--status`, `--project-name`, `--name`, pagination flags. |
63
+ | `work list` | Find candidate stories | Use `--assigned-to-me`, `--status`, `--project-name`, `--name`, pagination flags. An expired or invalid `--cursor` (`SF-014`) self-heals to page 1 with a `warnings` entry in human/`--json`/MCP. |
64
64
  | `work get [ID]` | Read story details | ID is optional after `work set`. Human output redacts OAuth signatures; JSON preserves structured fields including subscriber `customFields` (`apiName`, `label`, `type`, `value`, `displayValue`, `updateable`, optional `options`). `--committed-metadata` also includes the Story committed metadata list as `committedMetadata` in the result. |
65
65
  | `work create` | Create a story | Use `--title`, project/team/assignee/theme fields, specs, and short acceptance criteria. Write subscriber fields with repeatable `--custom-field ApiName=value` (MCP: `customFields: [{ apiName, value }]`). `--source-credential` sends `sourceEnvironment` as null so Salesforce assigns the environment. |
66
66
  | `work update [ID]` | Mutate story fields or status | ID is optional after `work set`. Acceptance criteria must be fewer than 255 chars. Same `--custom-field` / MCP `customFields` write shape as create; update-only custom fields is allowed. `--source-credential` sends `sourceEnvironment` as null. |
67
67
  | `work set ID` | Mark active and prepare branch | Fetches the base branch and, when present, the remote feature branch; creates/checks out `feature/<story-name>` from `origin/feature` when that ref exists, otherwise from the base; stores local context. A gateway warning prints the message, skips git, clears branch keys, and records work-item id/name/title. Warns without PATCHing when the Story credential differs from the project default; use `work update --source-credential` to change it. `--none` clears every `last*` key and checks out `lastBaseBranch`, else `main`, else `master`. |
68
68
  | `cloud commit` | Copado cloud metadata commit | Prefer `agentia cicd cloud commit`. Requires `--metadata-category` (or `c`/`category` per `--file` change); use `SFDX` for Salesforce metadata. For local Git work, use `git commit` then `work publish`. `cicd work commit` remains a hidden compatibility alias. |
69
69
  | `work publish` | Publish local commits and register with Copado | Requires active story context and clean tree. Accepts `--permissions` and `--full-metadata` when nested detection is not enough. `work push` is a compatibility alias. |
70
- | `work test` | Run local quality gate scripts | `--local` is default. Runs `.agentia_quality_gates.sh` or `.agentia_quality_gates.cmd` from repo root. If missing, warns and runs the stock setup sample from a temp file. `--cloud` is not implemented yet. |
71
- | `work test apex` | Run named Apex test classes | Optional `--apex-test-classes`. Omit or pass empty to log a skip and exit 0 without calling Salesforce CLI. `--rerun-failed-apex-tests` reruns classes from `.agentia/apex.tests.<user-story>.json`. Optional `--wait` minutes (default 60). Usually invoked from `.agentia_quality_gates.*`. |
70
+ | `work test` | Run local quality gate scripts | `--local` is default. Runs `.agentia_quality_gates.sh` or `.agentia_quality_gates.cmd` from repo root. If missing, warns and runs the stock setup sample from a temp file. `--gate <id>` (repeatable) runs only selected gates, `--all` runs everything (default), `--list-gates` lists gates declared via `# agentia-gate: <id> - <description>` in the script. Standard ids: `apex`, `lint`, `lwc`; custom ids allowed. The selection is exported as `AGENTIA_GATES`. `--gate apex` alone skips the script and runs the Apex tests directly (`--apex-test-classes`, `--rerun-failed-apex-tests`, `--wait`). `--cloud` is not implemented yet. |
71
+ | `work test apex` | Legacy alias of `work test --gate apex` | Optional `--apex-test-classes`. Omit or pass empty to log a skip and exit 0 without calling Salesforce CLI. `--rerun-failed-apex-tests` reruns classes from `.agentia/apex.tests.<user-story>.json`. Optional `--wait` minutes (default 60). Prefer `work test --gate apex`. |
72
72
  | `work submit` | Submit for review/validation or promote | Runs local gates unless `--skip-local-tests`; can push ahead commits. Waits up to 5 minutes when the last pending related job template contains `Commit`. `--skip-pull-request` skips opening the MR URL. `--done` and `--deploy` match Copado UI Submit when promoting. |
73
73
  | `work done` | Compatibility alias | Prefer `work submit --done`; both promote and deploy rather than validate-only. |
74
74
  | `work promote` | Experimental local promotion | Skips Quality Gates. Requires `enableLocalPromote: true` in `.agentia/config.json`. Merges `feature/<name>` into `promotion/<promotionName>`. Use `--backpromote --destination-branch` for back promotions; `--continue` after conflict resolution. |
75
- | `work environment-sync` | Sync next-env commits onto dest/dev | Back-promotes every story behind the destination environment. Use `--destination-environment` or `--dev-org-branch`. On conflict, stores `lastEnvironmentSyncName` so `--continue` / `--abort` can omit `--promotion` (cleared on success, abort, and `work set`). |
76
- | `cloud promote` | Story-centric cloud promotion run | Use `--deploy` for merge and deploy. Prefer this over local `work promote` unless you explicitly enabled local promote. |
75
+ | `work environment-sync` | Sync next-env commits onto dest/dev (experimental) | Experimental. Back-promotes every story behind the destination environment onto `promotion/<name>` (from dest org), then merges that branch into dest and pushes both. On a feature branch, unpublished commits stop the command (`work publish` first); after a successful sync, feature files changed vs base are refreshed from dest and you are told to re-check and publish again. On conflict, resolve on `promotion/<name>` (or dest) and `--continue` / `--abort` (`lastEnvironmentSyncName` can omit `--promotion`; cleared on success, abort, and `work set`). Success/abort call `promote-action/complete` with `--deployment` resolved to `none`\|`local`\|`cloud` (`auto` → `local` when every change is Add and `--sf-alias` is set, else `cloud`). Local deploy runs on the dest org branch (before feature refresh) via `sf project deploy start --ignore-conflicts` (Add-only); failures include full `package.xml` and raw `sf` stdout/stderr (human and `--json`). After success with cloud deployment, waits for the JobExecution by default (`--no-wait` / `--wait-timeout`). |
76
+ | `cloud promote` | Story-centric cloud promotion run | Auto-creates a forward Draft promotion when none contains the story. Use `--deploy` for merge and deploy. Prefer this over local `work promote` unless you explicitly enabled local promote. |
77
77
  | `work status [ID]` | Check story and related executions | Useful after submit, promote, or commit jobs. |
78
78
  | `work open [ID]` | Open story in browser | CLI-only browser helper. |
79
79
 
@@ -94,7 +94,7 @@ agentia cicd work submit --json
94
94
 
95
95
  `--permissions` on publish names metadata that Copado should treat as Retrieve Only. List the components whose access changed, not the permission set or profile files; naming those parent types is rejected. Use `--full-metadata` only for `Profile`, `PermissionSet`, `MutingPermissionSet`, `CustomObject`, or `CustomObjectTranslation` when that complete file should travel; other types are rejected. Both flags apply to that publish only.
96
96
 
97
- `work test` and `work submit` take `--apex-test-classes` when you want the local gate script to receive them as `AGENTIA_APEX_TEST_CLASSES`. Sample quality-gate scripts pass that value to `work test apex`.
97
+ `work test` and `work submit` take `--apex-test-classes` when you want the local gate script to receive them as `AGENTIA_APEX_TEST_CLASSES`. Sample quality-gate scripts pass that value to the apex gate (`work test --gate apex`). Run one gate with `work test --gate lint` (MCP `gates: ["lint"]`); `work submit` always runs every gate. The sample lint gate scans only branch-changed files (diff vs `AGENTIA_BASE_BRANCH` merge-base, plus uncommitted/untracked); set `LINT_SCOPE=all` for a full scan, which is also the fallback outside git.
98
98
 
99
99
  `work publish` detects nested metadata across the full branch diff from the merge base to `HEAD`, applies Copado environment-variable and YAML replacements, registers every commit in the range, and merges into the recorded dev org branch. Review unexpected Retrieve Only, Full Metadata, or nested-deletion output before continuing.
100
100
 
@@ -107,15 +107,29 @@ agentia cicd cloud commit <story-id> --message "Commit AccountService" --metadat
107
107
  agentia cicd cloud commit <story-id> --file commit-request.json --json
108
108
  ```
109
109
 
110
- `--metadata-category` is required on simple flag input. Each `--file`/`--stdin` change requires `c` (or `category`). For Salesforce metadata, use `SFDX`. Without `c:SFDX`, Copado deploy logs can report "Salesforce changes not found."
110
+ Example `commit-request.json` for multiple components:
111
111
 
112
- For a cloud promotion, the Story must already belong to a Promotion:
112
+ ```json
113
+ {
114
+ "message": "Account service and trigger",
115
+ "changes": [
116
+ {"a": "Add", "c": "SFDX", "n": "AccountService", "t": "ApexClass"},
117
+ {"a": "Add", "c": "SFDX", "n": "AccountTrigger", "t": "ApexTrigger"}
118
+ ]
119
+ }
120
+ ```
121
+
122
+ `--metadata-category` is required on simple flag input (one component only). Each `--file`/`--stdin` change requires `c` (or `category`). For Salesforce metadata, use `SFDX`. Without `c:SFDX`, Copado deploy logs can report "Salesforce changes not found."
123
+
124
+ For cloud promotion from a User Story:
113
125
 
114
126
  ```sh
115
127
  agentia cicd cloud promote <story-id> --json
116
128
  agentia cicd cloud promote <story-id> --deploy --json
117
129
  ```
118
130
 
131
+ When no Promotion contains the story, `cloud promote` and MCP `agentia_cloud_promote` create one automatically before running.
132
+
119
133
  Cloud commit and promotion wait for Job Executions by default and return nonzero on failed or timed-out jobs while preserving diagnostic IDs. If a Promotion reaches Merge Conflict, resolve it and resume the original execution; do not start a replacement run.
120
134
 
121
135
  ## Subscriber Custom Fields
@@ -154,7 +168,7 @@ Prefer explicit flags for standard step types. Use `--config-json`, `--file`, or
154
168
  ## Gotchas
155
169
 
156
170
  - `work test` is not CRT. For Robot Framework execution, use the `agentia-testing` skill.
157
- - `work test apex` runs named Apex classes. Local quality gates (`.agentia_quality_gates.*`) usually call it with `-t "${AGENTIA_APEX_TEST_CLASSES}"` and `${AGENTIA_APEX_RERUN_FAILED}` (empty or `--rerun-failed-apex-tests`); an empty class list skips Apex without failing the script. `--rerun-failed-apex-tests` reruns classes saved in `.agentia/apex.tests.<user-story>.json` after a failure. Direct use is for a targeted rerun without the rest of the gates.
171
+ - `work test --gate apex` runs named Apex classes directly (the legacy `work test apex` is an alias). Sample local quality gates (`.agentia_quality_gates.*`) call it with `--apex-test-classes="${AGENTIA_APEX_TEST_CLASSES}"` and `${AGENTIA_APEX_RERUN_FAILED}` (empty or `--rerun-failed-apex-tests`); an empty class list skips Apex without failing the script. `--rerun-failed-apex-tests` reruns classes saved in `.agentia/apex.tests.<user-story>.json` after a failure. Run it directly for a targeted rerun without the rest of the gates.
158
172
  - Local Git work uses `git commit` then `work publish`. Cloud `cloud commit` is a separate path.
159
173
  - `work submit` may push ahead commits, but the local flow still needs story and branch context from `work set`.
160
174
  - `work submit --done` (or `--deploy`) promotes/deploys. Do not run it unless the user explicitly asked to promote or finish the story.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: agentia-metadata
3
- description: Org Intelligence — read Salesforce metadata in a sandbox or developer org through Agentia `cicd metadata explore` (and MCP `agentia_metadata_explore`). Use when listing or searching metadata names, reading items by API name, finding where a class/field/etc is referenced, describing types, reading type documentation, or running specified Apex tests. Prefer local project files first, then the org. Reads metadata only (not org data); does not edit or deploy metadata.
3
+ description: Org Intelligence — read Salesforce metadata in a sandbox or developer org through Agentia `cicd metadata explore` (and MCP `agentia_metadata_explore`). Use when listing or searching metadata names, reading items by API name, finding where a class/field/etc is referenced, describing types, reading type documentation, or running specified Apex tests. Also covers Copado `cicd metadata dependency list` (MCP `agentia_metadata_dependency_list`), including `--path` for local DX files. Prefer local project files first, then the org. Reads metadata only (not org data); does not edit or deploy metadata.
4
4
  ---
5
5
 
6
6
  <!-- Agentia managed skill file: agentia setup skills -->
@@ -45,14 +45,17 @@ local when reconciling differences unless the user asks for the org version.
45
45
  | List metadata names that match a pattern | `list` |
46
46
  | Search source (Apex Page/Class/Trigger/Component only) | `search` |
47
47
  | Retrieve one item by API name | `read` |
48
- | Find where a class/field/etc is used or called | `find_references` |
48
+ | Find where a class/field/etc is used or called (org) | `find_references` |
49
+ | Copado dependency graph (pipeline/org; local DX `--path`) | `cicd metadata dependency list` |
49
50
  | Describe a metadata type shape | `describe_type` |
50
51
  | Get type documentation from the tool | `read_documentation` |
51
52
  | Run specific Apex test classes | `run_apex_tests` |
52
53
 
53
54
  Use `list` / `search` to discover exact names before `read` or
54
55
  `find_references`. Pass type + name for references. Confirm with the user
55
- before `run_apex_tests`.
56
+ before `run_apex_tests`. For Copado uses/dependants from a local DX file,
57
+ prefer `cicd metadata dependency list --path` (see dependency reference)—do
58
+ not invent type/name when a path is available.
56
59
 
57
60
  ## Org And Scope
58
61
 
@@ -133,6 +136,9 @@ When helping the user design or draft Salesforce metadata (local edits only):
133
136
  Flags, MCP args, examples, and gotchas:
134
137
  [references/metadata-explore.md](references/metadata-explore.md)
135
138
 
139
+ Copado dependency graph (`--path`, context defaults, human table):
140
+ [references/metadata-dependency.md](references/metadata-dependency.md)
141
+
136
142
  ## Report Back
137
143
 
138
144
  Report actions run, object type / fullName / pattern, credential Id (never
@@ -0,0 +1,70 @@
1
+ <!-- Agentia managed skill file: agentia setup skills -->
2
+
3
+ # Copado Metadata Dependency List
4
+
5
+ Use `agentia cicd metadata dependency list` (MCP `agentia_metadata_dependency_list`)
6
+ for the **Copado CICD dependency graph** against pipeline/org context—not Org
7
+ Intelligence `find_references` (org Metadata API references).
8
+
9
+ Prefer this when the caller has local Salesforce DX source paths (for example
10
+ IDEX) or already knows metadata type/name and needs uses / dependants from
11
+ Copado.
12
+
13
+ ## Choose An Input Mode
14
+
15
+ Use **only one**:
16
+
17
+ | Mode | When |
18
+ | --- | --- |
19
+ | `--path` / MCP `path` | Local DX file path(s). Resolves type/name via existing SDR helpers. |
20
+ | `--metadata-name` + `--metadata-type` | Explicit selection. |
21
+ | `--from-changes` | Committed branch diff + staged index (not unstaged). |
22
+ | `--file` / `--stdin` | Full JSON dependency request body. |
23
+
24
+ Do not invent a second path mapper—`--path` reuses the same resolvers as
25
+ `--from-changes`. Unresolvable paths fail with a clear error and do not call
26
+ the gateway.
27
+
28
+ ```sh
29
+ agentia cicd metadata dependency list \
30
+ --path force-app/main/default/classes/MyClass.cls \
31
+ --target-org-id <id> \
32
+ --retrieve-mode all \
33
+ --json
34
+ ```
35
+
36
+ MCP accepts `path` as a string or string array. Mutually exclusive with
37
+ `metadataName` / `metadataType`.
38
+
39
+ ## Context Defaults
40
+
41
+ When omitted, these resolve from the **active work item**, then **project
42
+ defaults**:
43
+
44
+ - `--pipeline-id` / `pipelineId`
45
+ - `--source-credential-id` / `sourceCredentialId`
46
+ - `--source-org-id` / `sourceOrgId`
47
+ - `--platform-experience` / `platformExperience` (from story `platform`, else
48
+ `sfdx`)
49
+
50
+ `--target-org-id` / `targetOrgId` is **never** inferred—pass it when compare
51
+ status is needed.
52
+
53
+ Explicit flags always win.
54
+
55
+ ## Output
56
+
57
+ - **`--json` / MCP:** gateway `DependencyResult` (including enriched
58
+ `localPaths` for `--path` / `--from-changes` when resolvable).
59
+ - **Human table columns:** `PARENT` (evaluated metadata), `RELATION`
60
+ (`used by` from `u`, `dependant` from `d`), `NAME`, `TYPE`, and `STATUS`
61
+ from gateway `s`. The STATUS column is omitted when `s` is absent (typical
62
+ without a target org).
63
+
64
+ ## Vs Org Intelligence
65
+
66
+ | Need | Command |
67
+ | --- | --- |
68
+ | Org Metadata API references | `cicd metadata explore --action find_references` |
69
+ | Copado dependency graph (pipeline/org compare) | `cicd metadata dependency list` |
70
+ | Local DX path → dependency graph | `cicd metadata dependency list --path …` |
@@ -107,9 +107,13 @@ agentia cicd metadata explore --action read --object-type ApexClass --full-name
107
107
 
108
108
  ### `find_references`
109
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.
110
+ Partial **org** reference lookup: metadata that uses or calls a given item via
111
+ the Metadata API tool. Requires `--object-type` and `--full-name`. Coverage may
112
+ be incomplete—treat results as a starting point.
113
+
114
+ For the **Copado CICD dependency graph** (including local DX `--path`), use
115
+ `cicd metadata dependency list` instead—see
116
+ [metadata-dependency.md](metadata-dependency.md).
113
117
 
114
118
  ```sh
115
119
  agentia cicd metadata explore --action find_references --object-type ApexClass --full-name MyClass --json
@@ -139,4 +143,4 @@ agentia cicd metadata explore --action run_apex_tests --apex-unit-tests MyClassT
139
143
  | Copado metadata index search | `cicd metadata list` |
140
144
  | Indexed/Git content blobs | `cicd metadata content get` |
141
145
  | Org/Git content diff | `cicd metadata content compare` |
142
- | Copado dependency graph | `cicd metadata dependency list` |
146
+ | Copado dependency graph (local DX `--path`, story/defaults context) | `cicd metadata dependency list` — [metadata-dependency.md](metadata-dependency.md) |
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: agentia-testing
3
- description: Use this skill when creating, updating, running, inspecting, or troubleshooting Copado Robotic Testing with the Agentia CLI, including projects, permissions, robots, jobs, builds, schedules, data tables, variables, user parameters, live testing, Git-backed storage, and Robot Framework execution.
3
+ description: Use this skill when creating, updating, running, inspecting, or troubleshooting Copado Robotic Testing with the Agentia CLI, including projects, permissions, robots, jobs, builds, schedules, data tables, variables, user parameters, browser testing, Git-backed storage, and Robot Framework execution.
4
4
  ---
5
5
 
6
6
  <!-- Agentia managed skill file: agentia setup skills -->
7
7
 
8
8
  # Agentia Testing
9
9
 
10
- Use this skill to operate Copado Robotic Testing through Agentia without confusing CRT resources, executions, live sessions, and Copado CICD records.
10
+ Use this skill to operate Copado Robotic Testing through Agentia without confusing CRT resources, executions, browser sessions, and Copado CICD records.
11
11
 
12
12
  Prefer Agentia MCP tools when they are available and match the task. Use CLI examples as the fallback, and add `--json` whenever the result will be parsed or reused.
13
13
 
@@ -20,7 +20,11 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
20
20
 
21
21
  ## Reference
22
22
 
23
- - CRT lifecycle, execution, schedules, data tables, live testing, and safety rules: [references/tests.md](references/tests.md)
23
+ - CRT lifecycle, execution, schedules, data tables, browser testing, and safety rules: [references/tests.md](references/tests.md)
24
+ - Browser session lifecycle, parallel recorder subagent workflow, 600s idle keepalive, and troubleshooting: [references/browser-testing.md](references/browser-testing.md)
25
+ - Goal-driven browser-testing automation loop (Observe -> Act -> Verify -> Recover), screenshot detection overlays, and script export: [references/flow-automation.md](references/flow-automation.md)
26
+ - QWeb Robot Framework keyword catalog, 4-space separator rule, locator priority, and decision tree: [references/qweb.md](references/qweb.md)
27
+ - QForce & Salesforce Lightning automation (`--library QForce`, `LaunchApp`, `VerifyField`, `PickList`, `ComboBox`): [references/qforce.md](references/qforce.md)
24
28
 
25
29
  ## General Rules
26
30
 
@@ -30,8 +34,9 @@ Prefer Agentia MCP tools when they are available and match the task. Use CLI exa
30
34
  - Use Git-backed job flags only when the user or project clearly uses repository-backed CRT test storage.
31
35
  - In JSON or non-interactive CLI calls, destructive actions require `--yes`; matching MCP tools require `confirm: true`.
32
36
  - Prefer `--value-stdin` and `--git-password-stdin` over putting secrets in process arguments.
37
+ - Always pass `--no-open` to `agentia testing browser view` by default (`agentia testing browser view --project <project-id> --no-open --json`) and share the returned URL; omit `--no-open` only when the user explicitly asks to open the browser.
33
38
  - Use the currently configured CRT credential context for validation. Test14 credentials belong to CICD and must not be substituted for CRT credentials.
34
39
 
35
40
  ## Report Back
36
41
 
37
- Report the CRT project, robot, job/test ID, build or live-session ID when present, final status, cleanup, and where outputs were written. Do not include PAKs or other secrets.
42
+ Report the CRT project, robot, job/test ID, build or browser-session ID when present, final status, cleanup, and where outputs were written. Do not include PAKs or other secrets.