@copado/agentia-cli 0.38.0-alpha.0 → 0.41.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 (294) hide show
  1. package/README.md +1545 -1420
  2. package/dist/commands/auth/set.d.ts +2 -13
  3. package/dist/commands/auth/set.js +41 -108
  4. package/dist/commands/auth/set.js.map +1 -1
  5. package/dist/commands/auth/unset.d.ts +15 -0
  6. package/dist/commands/auth/unset.js +64 -0
  7. package/dist/commands/auth/unset.js.map +1 -0
  8. package/dist/commands/{environment → cicd/environment}/auth/status.d.ts +2 -2
  9. package/dist/commands/{environment → cicd/environment}/auth/status.js +3 -3
  10. package/dist/commands/cicd/environment/auth/status.js.map +1 -0
  11. package/dist/commands/{environment → cicd/environment}/auth/web/login.d.ts +2 -2
  12. package/dist/commands/{environment → cicd/environment}/auth/web/login.js +2 -2
  13. package/dist/commands/cicd/environment/auth/web/login.js.map +1 -0
  14. package/dist/commands/{environment → cicd/environment}/create.d.ts +2 -2
  15. package/dist/commands/{environment → cicd/environment}/create.js +3 -3
  16. package/dist/commands/cicd/environment/create.js.map +1 -0
  17. package/dist/commands/{environment → cicd/environment}/get.d.ts +2 -2
  18. package/dist/commands/{environment → cicd/environment}/get.js +3 -3
  19. package/dist/commands/cicd/environment/get.js.map +1 -0
  20. package/dist/commands/{environment → cicd/environment}/list.d.ts +4 -4
  21. package/dist/commands/{environment → cicd/environment}/list.js +6 -6
  22. package/dist/commands/cicd/environment/list.js.map +1 -0
  23. package/dist/commands/{environment → cicd/environment}/open.d.ts +1 -1
  24. package/dist/commands/{environment → cicd/environment}/open.js +4 -4
  25. package/dist/commands/cicd/environment/open.js.map +1 -0
  26. package/dist/commands/{environment → cicd/environment}/update.d.ts +2 -2
  27. package/dist/commands/{environment → cicd/environment}/update.js +4 -4
  28. package/dist/commands/cicd/environment/update.js.map +1 -0
  29. package/dist/commands/{job → cicd/job}/get.d.ts +2 -2
  30. package/dist/commands/{job → cicd/job}/get.js +3 -3
  31. package/dist/commands/cicd/job/get.js.map +1 -0
  32. package/dist/commands/{job → cicd/job}/kill.d.ts +2 -2
  33. package/dist/commands/{job → cicd/job}/kill.js +3 -3
  34. package/dist/commands/cicd/job/kill.js.map +1 -0
  35. package/dist/commands/{job → cicd/job}/list.d.ts +3 -3
  36. package/dist/commands/{job → cicd/job}/list.js +5 -5
  37. package/dist/commands/cicd/job/list.js.map +1 -0
  38. package/dist/commands/{job → cicd/job}/log/get.d.ts +1 -1
  39. package/dist/commands/{job → cicd/job}/log/get.js +3 -3
  40. package/dist/commands/cicd/job/log/get.js.map +1 -0
  41. package/dist/commands/{job → cicd/job}/open.d.ts +1 -1
  42. package/dist/commands/{job → cicd/job}/open.js +3 -3
  43. package/dist/commands/cicd/job/open.js.map +1 -0
  44. package/dist/commands/{job → cicd/job}/pause.d.ts +2 -2
  45. package/dist/commands/{job → cicd/job}/pause.js +3 -3
  46. package/dist/commands/cicd/job/pause.js.map +1 -0
  47. package/dist/commands/{job → cicd/job}/resume.d.ts +2 -2
  48. package/dist/commands/{job → cicd/job}/resume.js +3 -3
  49. package/dist/commands/cicd/job/resume.js.map +1 -0
  50. package/dist/commands/{job → cicd/job}/run.d.ts +2 -2
  51. package/dist/commands/{job → cicd/job}/run.js +3 -3
  52. package/dist/commands/cicd/job/run.js.map +1 -0
  53. package/dist/commands/{metadata → cicd/metadata}/content/compare.d.ts +2 -2
  54. package/dist/commands/{metadata → cicd/metadata}/content/compare.js +3 -3
  55. package/dist/commands/cicd/metadata/content/compare.js.map +1 -0
  56. package/dist/commands/{metadata → cicd/metadata}/content/get.d.ts +2 -2
  57. package/dist/commands/{metadata → cicd/metadata}/content/get.js +3 -3
  58. package/dist/commands/cicd/metadata/content/get.js.map +1 -0
  59. package/dist/commands/{metadata → cicd/metadata}/dependency/list.d.ts +2 -2
  60. package/dist/commands/{metadata → cicd/metadata}/dependency/list.js +5 -5
  61. package/dist/commands/cicd/metadata/dependency/list.js.map +1 -0
  62. package/dist/commands/{metadata → cicd/metadata}/index/compare.d.ts +2 -2
  63. package/dist/commands/{metadata → cicd/metadata}/index/compare.js +3 -3
  64. package/dist/commands/cicd/metadata/index/compare.js.map +1 -0
  65. package/dist/commands/{metadata → cicd/metadata}/list.d.ts +2 -2
  66. package/dist/commands/{metadata → cicd/metadata}/list.js +3 -3
  67. package/dist/commands/cicd/metadata/list.js.map +1 -0
  68. package/dist/commands/{metadata → cicd/metadata}/refresh/deleted.d.ts +2 -2
  69. package/dist/commands/{metadata → cicd/metadata}/refresh/deleted.js +5 -5
  70. package/dist/commands/cicd/metadata/refresh/deleted.js.map +1 -0
  71. package/dist/commands/{metadata → cicd/metadata}/refresh/run.d.ts +2 -2
  72. package/dist/commands/{metadata → cicd/metadata}/refresh/run.js +5 -5
  73. package/dist/commands/cicd/metadata/refresh/run.js.map +1 -0
  74. package/dist/commands/{metadata → cicd/metadata}/refresh/status.d.ts +2 -2
  75. package/dist/commands/{metadata → cicd/metadata}/refresh/status.js +5 -5
  76. package/dist/commands/cicd/metadata/refresh/status.js.map +1 -0
  77. package/dist/commands/{pipeline → cicd/pipeline}/connection/list.d.ts +2 -2
  78. package/dist/commands/{pipeline → cicd/pipeline}/connection/list.js +4 -4
  79. package/dist/commands/cicd/pipeline/connection/list.js.map +1 -0
  80. package/dist/commands/{pipeline → cicd/pipeline}/get.d.ts +2 -2
  81. package/dist/commands/{pipeline → cicd/pipeline}/get.js +3 -3
  82. package/dist/commands/cicd/pipeline/get.js.map +1 -0
  83. package/dist/commands/{pipeline → cicd/pipeline}/list.d.ts +3 -3
  84. package/dist/commands/{pipeline → cicd/pipeline}/list.js +4 -4
  85. package/dist/commands/cicd/pipeline/list.js.map +1 -0
  86. package/dist/commands/{pipeline → cicd/pipeline}/open.d.ts +1 -1
  87. package/dist/commands/{pipeline → cicd/pipeline}/open.js +3 -3
  88. package/dist/commands/cicd/pipeline/open.js.map +1 -0
  89. package/dist/commands/{project → cicd/project}/default/get.d.ts +2 -2
  90. package/dist/commands/{project → cicd/project}/default/get.js +4 -4
  91. package/dist/commands/cicd/project/default/get.js.map +1 -0
  92. package/dist/commands/{project → cicd/project}/default/set.d.ts +2 -2
  93. package/dist/commands/{project → cicd/project}/default/set.js +4 -4
  94. package/dist/commands/cicd/project/default/set.js.map +1 -0
  95. package/dist/commands/{project → cicd/project}/default/unset.d.ts +2 -2
  96. package/dist/commands/{project → cicd/project}/default/unset.js +4 -4
  97. package/dist/commands/cicd/project/default/unset.js.map +1 -0
  98. package/dist/commands/{project → cicd/project}/get.d.ts +2 -2
  99. package/dist/commands/{project → cicd/project}/get.js +3 -3
  100. package/dist/commands/cicd/project/get.js.map +1 -0
  101. package/dist/commands/{project → cicd/project}/list.d.ts +3 -3
  102. package/dist/commands/{project → cicd/project}/list.js +5 -5
  103. package/dist/commands/cicd/project/list.js.map +1 -0
  104. package/dist/commands/{project → cicd/project}/open.d.ts +1 -1
  105. package/dist/commands/{project → cicd/project}/open.js +4 -4
  106. package/dist/commands/cicd/project/open.js.map +1 -0
  107. package/dist/commands/{promotion → cicd/promotion}/conflict/get.d.ts +1 -1
  108. package/dist/commands/{promotion → cicd/promotion}/conflict/get.js +3 -3
  109. package/dist/commands/cicd/promotion/conflict/get.js.map +1 -0
  110. package/dist/commands/{promotion → cicd/promotion}/conflict/list.d.ts +2 -2
  111. package/dist/commands/{promotion → cicd/promotion}/conflict/list.js +3 -3
  112. package/dist/commands/cicd/promotion/conflict/list.js.map +1 -0
  113. package/dist/commands/{promotion → cicd/promotion}/conflict/resolve.d.ts +2 -2
  114. package/dist/commands/{promotion → cicd/promotion}/conflict/resolve.js +3 -3
  115. package/dist/commands/cicd/promotion/conflict/resolve.js.map +1 -0
  116. package/dist/commands/{promotion → cicd/promotion}/conflict/unresolve.d.ts +2 -2
  117. package/dist/commands/{promotion → cicd/promotion}/conflict/unresolve.js +3 -3
  118. package/dist/commands/cicd/promotion/conflict/unresolve.js.map +1 -0
  119. package/dist/commands/{promotion → cicd/promotion}/get.d.ts +2 -2
  120. package/dist/commands/{promotion → cicd/promotion}/get.js +3 -3
  121. package/dist/commands/cicd/promotion/get.js.map +1 -0
  122. package/dist/commands/{promotion → cicd/promotion}/list.d.ts +3 -3
  123. package/dist/commands/{promotion → cicd/promotion}/list.js +5 -5
  124. package/dist/commands/cicd/promotion/list.js.map +1 -0
  125. package/dist/commands/{promotion → cicd/promotion}/open.d.ts +1 -1
  126. package/dist/commands/{promotion → cicd/promotion}/open.js +3 -3
  127. package/dist/commands/cicd/promotion/open.js.map +1 -0
  128. package/dist/commands/{user → cicd/user}/get.d.ts +2 -2
  129. package/dist/commands/{user → cicd/user}/get.js +3 -3
  130. package/dist/commands/cicd/user/get.js.map +1 -0
  131. package/dist/commands/{work → cicd/work}/create.d.ts +2 -2
  132. package/dist/commands/{work → cicd/work}/create.js +7 -7
  133. package/dist/commands/cicd/work/create.js.map +1 -0
  134. package/dist/commands/{work → cicd/work}/delete.d.ts +1 -1
  135. package/dist/commands/{work → cicd/work}/delete.js +3 -3
  136. package/dist/commands/cicd/work/delete.js.map +1 -0
  137. package/dist/commands/{work → cicd/work}/done.d.ts +2 -2
  138. package/dist/commands/{work → cicd/work}/done.js +9 -9
  139. package/dist/commands/cicd/work/done.js.map +1 -0
  140. package/dist/commands/{work → cicd/work}/get.d.ts +2 -2
  141. package/dist/commands/{work → cicd/work}/get.js +5 -5
  142. package/dist/commands/cicd/work/get.js.map +1 -0
  143. package/dist/commands/{work → cicd/work}/list.d.ts +3 -3
  144. package/dist/commands/{work → cicd/work}/list.js +6 -6
  145. package/dist/commands/cicd/work/list.js.map +1 -0
  146. package/dist/commands/{work → cicd/work}/open.d.ts +1 -1
  147. package/dist/commands/{work → cicd/work}/open.js +5 -5
  148. package/dist/commands/cicd/work/open.js.map +1 -0
  149. package/dist/commands/{work → cicd/work}/push.d.ts +2 -2
  150. package/dist/commands/{work → cicd/work}/push.js +9 -9
  151. package/dist/commands/cicd/work/push.js.map +1 -0
  152. package/dist/commands/{work → cicd/work}/set.d.ts +2 -2
  153. package/dist/commands/{work → cicd/work}/set.js +6 -6
  154. package/dist/commands/cicd/work/set.js.map +1 -0
  155. package/dist/commands/{work → cicd/work}/status.d.ts +2 -2
  156. package/dist/commands/{work → cicd/work}/status.js +7 -7
  157. package/dist/commands/cicd/work/status.js.map +1 -0
  158. package/dist/commands/{work → cicd/work}/submit.d.ts +3 -2
  159. package/dist/commands/{work → cicd/work}/submit.js +30 -13
  160. package/dist/commands/cicd/work/submit.js.map +1 -0
  161. package/dist/commands/cicd/work/test.d.ts +14 -0
  162. package/dist/commands/cicd/work/test.js +102 -0
  163. package/dist/commands/cicd/work/test.js.map +1 -0
  164. package/dist/commands/{work → cicd/work}/update.d.ts +2 -2
  165. package/dist/commands/{work → cicd/work}/update.js +8 -8
  166. package/dist/commands/cicd/work/update.js.map +1 -0
  167. package/dist/commands/setup.d.ts +1 -1
  168. package/dist/commands/setup.js +16 -7
  169. package/dist/commands/setup.js.map +1 -1
  170. package/dist/commands/testing/job/create.d.ts +7 -0
  171. package/dist/commands/testing/job/create.js +11 -2
  172. package/dist/commands/testing/job/create.js.map +1 -1
  173. package/dist/commands/testing/job/update.d.ts +7 -0
  174. package/dist/commands/testing/job/update.js +14 -2
  175. package/dist/commands/testing/job/update.js.map +1 -1
  176. package/dist/lib/auth-config.d.ts +62 -0
  177. package/dist/lib/auth-config.js +246 -0
  178. package/dist/lib/auth-config.js.map +1 -0
  179. package/dist/lib/cicd-gateway.js +16 -1
  180. package/dist/lib/cicd-gateway.js.map +1 -1
  181. package/dist/lib/credential-store.d.ts +3 -0
  182. package/dist/lib/credential-store.js +9 -0
  183. package/dist/lib/credential-store.js.map +1 -1
  184. package/dist/lib/cursor-mcp-config.d.ts +62 -0
  185. package/dist/lib/cursor-mcp-config.js +173 -0
  186. package/dist/lib/cursor-mcp-config.js.map +1 -0
  187. package/dist/lib/debug.d.ts +3 -0
  188. package/dist/lib/debug.js +23 -0
  189. package/dist/lib/debug.js.map +1 -0
  190. package/dist/lib/local-quality-gates.d.ts +3 -0
  191. package/dist/lib/local-quality-gates.js +10 -4
  192. package/dist/lib/local-quality-gates.js.map +1 -1
  193. package/dist/lib/mcp/testing-tools.d.ts +14 -0
  194. package/dist/lib/mcp/testing-tools.js +32 -4
  195. package/dist/lib/mcp/testing-tools.js.map +1 -1
  196. package/dist/lib/mcp/tools.d.ts +23 -0
  197. package/dist/lib/mcp/tools.js +15 -39
  198. package/dist/lib/mcp/tools.js.map +1 -1
  199. package/dist/lib/mcp/work-tools.d.ts +2 -0
  200. package/dist/lib/mcp/work-tools.js +61 -25
  201. package/dist/lib/mcp/work-tools.js.map +1 -1
  202. package/dist/lib/project-default-id.js +2 -2
  203. package/dist/lib/project-default-id.js.map +1 -1
  204. package/dist/lib/project-setup.d.ts +16 -14
  205. package/dist/lib/project-setup.js +101 -145
  206. package/dist/lib/project-setup.js.map +1 -1
  207. package/dist/lib/setup-prompts.d.ts +30 -0
  208. package/dist/lib/setup-prompts.js +13 -0
  209. package/dist/lib/setup-prompts.js.map +1 -0
  210. package/dist/lib/setup-templates.d.ts +3 -3
  211. package/dist/lib/setup-templates.js +58 -31
  212. package/dist/lib/setup-templates.js.map +1 -1
  213. package/dist/lib/setup-wizard.d.ts +42 -0
  214. package/dist/lib/setup-wizard.js +422 -0
  215. package/dist/lib/setup-wizard.js.map +1 -0
  216. package/dist/lib/testing-config.d.ts +4 -2
  217. package/dist/lib/testing-config.js +23 -3
  218. package/dist/lib/testing-config.js.map +1 -1
  219. package/dist/lib/testing-flags.d.ts +9 -0
  220. package/dist/lib/testing-flags.js +24 -0
  221. package/dist/lib/testing-flags.js.map +1 -1
  222. package/dist/lib/testing-gateway.d.ts +13 -0
  223. package/dist/lib/testing-gateway.js +67 -1
  224. package/dist/lib/testing-gateway.js.map +1 -1
  225. package/dist/lib/testing-operations.d.ts +17 -1
  226. package/dist/lib/testing-operations.js +76 -5
  227. package/dist/lib/testing-operations.js.map +1 -1
  228. package/dist/lib/testing-types.d.ts +24 -4
  229. package/dist/lib/testing-types.js.map +1 -1
  230. package/dist/lib/work-active.js +2 -2
  231. package/dist/lib/work-active.js.map +1 -1
  232. package/dist/lib/work-local-run-tests.d.ts +22 -0
  233. package/dist/lib/work-local-run-tests.js +56 -0
  234. package/dist/lib/work-local-run-tests.js.map +1 -0
  235. package/dist/lib/work-types.d.ts +7 -0
  236. package/dist/lib/work-types.js +3 -0
  237. package/dist/lib/work-types.js.map +1 -1
  238. package/oclif.manifest.json +3258 -3034
  239. package/package.json +42 -11
  240. package/dist/commands/environment/auth/status.js.map +0 -1
  241. package/dist/commands/environment/auth/web/login.js.map +0 -1
  242. package/dist/commands/environment/create.js.map +0 -1
  243. package/dist/commands/environment/get.js.map +0 -1
  244. package/dist/commands/environment/list.js.map +0 -1
  245. package/dist/commands/environment/open.js.map +0 -1
  246. package/dist/commands/environment/update.js.map +0 -1
  247. package/dist/commands/job/get.js.map +0 -1
  248. package/dist/commands/job/kill.js.map +0 -1
  249. package/dist/commands/job/list.js.map +0 -1
  250. package/dist/commands/job/log/get.js.map +0 -1
  251. package/dist/commands/job/open.js.map +0 -1
  252. package/dist/commands/job/pause.js.map +0 -1
  253. package/dist/commands/job/resume.js.map +0 -1
  254. package/dist/commands/job/run.js.map +0 -1
  255. package/dist/commands/metadata/content/compare.js.map +0 -1
  256. package/dist/commands/metadata/content/get.js.map +0 -1
  257. package/dist/commands/metadata/dependency/list.js.map +0 -1
  258. package/dist/commands/metadata/index/compare.js.map +0 -1
  259. package/dist/commands/metadata/list.js.map +0 -1
  260. package/dist/commands/metadata/refresh/deleted.js.map +0 -1
  261. package/dist/commands/metadata/refresh/run.js.map +0 -1
  262. package/dist/commands/metadata/refresh/status.js.map +0 -1
  263. package/dist/commands/pipeline/connection/list.js.map +0 -1
  264. package/dist/commands/pipeline/get.js.map +0 -1
  265. package/dist/commands/pipeline/list.js.map +0 -1
  266. package/dist/commands/pipeline/open.js.map +0 -1
  267. package/dist/commands/project/default/get.js.map +0 -1
  268. package/dist/commands/project/default/set.js.map +0 -1
  269. package/dist/commands/project/default/unset.js.map +0 -1
  270. package/dist/commands/project/get.js.map +0 -1
  271. package/dist/commands/project/list.js.map +0 -1
  272. package/dist/commands/project/open.js.map +0 -1
  273. package/dist/commands/promotion/conflict/get.js.map +0 -1
  274. package/dist/commands/promotion/conflict/list.js.map +0 -1
  275. package/dist/commands/promotion/conflict/resolve.js.map +0 -1
  276. package/dist/commands/promotion/conflict/unresolve.js.map +0 -1
  277. package/dist/commands/promotion/get.js.map +0 -1
  278. package/dist/commands/promotion/list.js.map +0 -1
  279. package/dist/commands/promotion/open.js.map +0 -1
  280. package/dist/commands/user/get.js.map +0 -1
  281. package/dist/commands/work/create.js.map +0 -1
  282. package/dist/commands/work/delete.js.map +0 -1
  283. package/dist/commands/work/done.js.map +0 -1
  284. package/dist/commands/work/get.js.map +0 -1
  285. package/dist/commands/work/list.js.map +0 -1
  286. package/dist/commands/work/open.js.map +0 -1
  287. package/dist/commands/work/push.js.map +0 -1
  288. package/dist/commands/work/set.js.map +0 -1
  289. package/dist/commands/work/status.js.map +0 -1
  290. package/dist/commands/work/submit.js.map +0 -1
  291. package/dist/commands/work/test.d.ts +0 -10
  292. package/dist/commands/work/test.js +0 -61
  293. package/dist/commands/work/test.js.map +0 -1
  294. package/dist/commands/work/update.js.map +0 -1
@@ -0,0 +1,30 @@
1
+ export type ConfirmPromptOptions = {
2
+ default?: boolean;
3
+ message: string;
4
+ };
5
+ export type InputPromptOptions = {
6
+ default?: string;
7
+ message: string;
8
+ validate?: (value: string) => boolean | string;
9
+ };
10
+ export type PasswordPromptOptions = {
11
+ message: string;
12
+ validate?: (value: string) => boolean | string;
13
+ };
14
+ export type SelectChoice<T> = {
15
+ name: string;
16
+ value: T;
17
+ };
18
+ export type SelectPromptOptions<T> = {
19
+ choices: Array<SelectChoice<T>>;
20
+ default?: T;
21
+ message: string;
22
+ };
23
+ export type SetupPrompts = {
24
+ confirm: (options: ConfirmPromptOptions) => Promise<boolean>;
25
+ input: (options: InputPromptOptions) => Promise<string>;
26
+ password: (options: PasswordPromptOptions) => Promise<string>;
27
+ select: <T>(options: SelectPromptOptions<T>) => Promise<T>;
28
+ };
29
+ export declare function isPromptCanceled(error: unknown): boolean;
30
+ export declare function createInquirerSetupPrompts(): SetupPrompts;
@@ -0,0 +1,13 @@
1
+ import { confirm, input, password, select } from '@inquirer/prompts';
2
+ export function isPromptCanceled(error) {
3
+ return typeof error === 'object' && error !== null && error.name === 'ExitPromptError';
4
+ }
5
+ export function createInquirerSetupPrompts() {
6
+ return {
7
+ confirm: (options) => confirm(options),
8
+ input: (options) => input(options),
9
+ password: (options) => password({ ...options, mask: true }),
10
+ select: (options) => select(options),
11
+ };
12
+ }
13
+ //# sourceMappingURL=setup-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup-prompts.js","sourceRoot":"","sources":["../../src/lib/setup-prompts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,mBAAmB,CAAA;AAoClE,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAK,KAAyB,CAAC,IAAI,KAAK,iBAAiB,CAAA;AAC7G,CAAC;AAED,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC;QACtC,KAAK,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;QAClC,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAC,GAAG,OAAO,EAAE,IAAI,EAAE,IAAI,EAAC,CAAC;QACzD,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;KACrC,CAAA;AACH,CAAC"}
@@ -4,8 +4,8 @@
4
4
  */
5
5
  export declare const DEFAULT_AGENTS_MD_URL = "";
6
6
  export declare const AGENTIA_GITIGNORE_ENTRY = ".agentia/";
7
- export declare const SAMPLE_QUALITY_GATES_UNIX = "#!/usr/bin/env bash\nset -euo pipefail\n\n# Local Agentia quality gates (macOS / Linux).\n# Edit this script to match your project. Agentia runs it from the repo root during\n# `agentia work test --local` and `agentia work submit` (unless --skip-local-tests).\n# The script must exit non-zero if any check fails.\n\nsf code-analyzer run\nsf force lightning lwc test run\n";
8
- export declare const SAMPLE_QUALITY_GATES_WINDOWS = "@echo off\nsetlocal EnableExtensions\nREM Local Agentia quality gates (Windows).\nREM Edit this script to match your project. Agentia runs it from the repo root during\nREM `agentia work test --local` and `agentia work submit` (unless --skip-local-tests).\nREM The script must exit non-zero if any check fails.\n\nsf code-analyzer run\nif errorlevel 1 exit /b %errorlevel%\nsf force lightning lwc test run\nif errorlevel 1 exit /b %errorlevel%\n";
7
+ export declare const SAMPLE_QUALITY_GATES_UNIX = "#!/usr/bin/env bash\nset -euo pipefail\n\n# Local Agentia quality gates (macOS / Linux).\n# Edit this script to match your project. Agentia runs it from the repo root during\n# `agentia cicd work test --local` and `agentia cicd work submit` (unless --skip-local-tests).\n# The script must exit non-zero if any check fails.\n\necho \"## Running Code Analyzer\"\nsf code-analyzer run\n\nif [[ -n \"${AGENTIA_APEX_TEST_CLASSES:-}\" ]]; then\n # Normalize commas to spaces so --class-names gets discrete values\n # shellcheck disable=SC2206\n class_names=(${AGENTIA_APEX_TEST_CLASSES//,/ })\n if [[ ${#class_names[@]} -gt 0 ]]; then\n echo \"## Running Apex tests: ${class_names[@]}\"\n sf apex run test --class-names \"${class_names[@]}\" --result-format human --wait 10\n fi\nfi\n\necho \"## Running LWC tests\"\nnpx sfdx-lwc-jest -- # --passWithNoTests\n";
8
+ export declare const SAMPLE_QUALITY_GATES_WINDOWS = "@echo off\nsetlocal EnableExtensions EnableDelayedExpansion\nREM Local Agentia quality gates (Windows).\nREM Edit this script to match your project. Agentia runs it from the repo root during\nREM `agentia cicd work test --local` and `agentia cicd work submit` (unless --skip-local-tests).\nREM The script must exit non-zero if any check fails.\n\necho ## Running Code Analyzer\nsf code-analyzer run\nif errorlevel 1 exit /b %errorlevel%\n\nif defined AGENTIA_APEX_TEST_CLASSES (\n set \"CLASS_NAMES=!AGENTIA_APEX_TEST_CLASSES:,= !\"\n if not \"!CLASS_NAMES!\"==\"\" (\n echo ## Running Apex tests: !CLASS_NAMES!\n sf apex run test --class-names !CLASS_NAMES! --result-format human --wait 10\n if errorlevel 1 exit /b %errorlevel%\n )\n)\n\necho ## Running LWC tests\nnpx sfdx-lwc-jest --\nif errorlevel 1 exit /b %errorlevel%\n";
9
9
  /** Bundled AGENTS.md template (mirrors docs/AGENTS.sample.md). Used when DEFAULT_AGENTS_MD_URL is unset or download fails. */
10
- export declare const BUNDLED_AGENTS_MD = "# Agentia CLI for AI Agents\n\nUse Agentia to manage Copado user stories end-to-end: pick work, prepare a git branch, push changes, submit for review, and promote.\n\n**Prefer the Agentia MCP server when it is available.** If tools such as `agentia_work_list`, `agentia_work_set`, `agentia_work_push`, `agentia_work_submit`, and `agentia_work_done` are registered, call those instead of shelling out to the `agentia` CLI. Fall back to CLI commands only when MCP is not configured.\n\nWhen using the CLI, prefer `--json` on every command so you can parse structured output instead of terminal tables.\n\nAuthentication must already be configured (`agentia auth set` / keychain, or local gateway mode). Run from a git repository that is a Copado-managed project.\n\n## Typical workflow\n\n```text\nlist \u2192 get \u2192 set \u2192 (implement & commit) \u2192 push \u2192 submit \u2192 done\n```\n\n| Step | MCP tool (preferred) | CLI fallback | Purpose |\n| --- | --- | --- | --- |\n| 1 | `agentia_work_list` (`assignedToMe: true`) | `agentia work list --assigned-to-me --json` | Show user stories assigned to you |\n| 2 | `agentia_work_get` | `agentia work get [id] --json` | Read user story details (omit id after `work set`) |\n| 3 | `agentia_work_set` | `agentia work set <id> --json` | Mark in progress and prepare the feature branch |\n| 4 | *(your edits + `git commit`)* | *(your edits + `git commit`)* | Implement the story |\n| 5 | `agentia_work_push` | `agentia work push --json` | Push commits to git and register them with Copado |\n| 6 | `agentia_work_submit` | `agentia work submit --json` | Flag ready for review (pipeline quality gates / validation) |\n| 7 | `agentia_work_done` | `agentia work done --json` | Promote and deploy to the next stage |\n\nDo not skip `work set` before coding. Later steps expect a `feature/<user-story-name>` branch and a recorded base branch from `work set`.\n\n---\n\n## Commands\n\nCLI examples below are the fallback when MCP is unavailable. MCP tool names and arguments mirror these commands (camelCase args instead of flags).\n\n### `agentia work list`\n\nShow user stories. For \u201Cassigned to me\u201D, always use:\n\n```sh\nagentia work list --assigned-to-me --json\n```\n\nUseful filters: `--status`, `--project-name`, `--name`, `--owned-by-me`. Do not combine `--assigned-to-me` with `--owned-by-me` or `--assignee-id`.\n\n### `agentia work get [id]`\n\nRead full details for one user story. After `work set`, omit the ID to use the active work item:\n\n```sh\nagentia work get --json\nagentia work get a0SKC000000CmZ2AU --json\n```\n\nUse this before starting work to understand title, status, acceptance criteria, and related fields.\n\n### `agentia work set <id>`\n\nFlag the user story as the active work item (in progress) and prepare the correct git branch:\n\n```sh\nagentia work set a0SKC000000CmZ2AU --json\n# or by name:\nagentia work set US-0001 --json\n```\n\nWhat it does:\n\n1. Calls Copado to set the work item and resolve the base branch\n2. Requires a **clean tracked working tree** (stash or commit first if dirty)\n3. Fetches `origin/<base-branch>`\n4. Creates or checks out `feature/<user-story-name>`\n5. Records the last work item ID, name, and base branch for later commands\n\nOptional: `--base-branch <name>` overrides the base branch from the API.\n\nAfter success, stay on that feature branch for all implementation commits.\n\n### `agentia work push`\n\nPush committed changes to git and register them with Copado:\n\n```sh\nagentia work push --json\n```\n\nPrerequisites:\n\n- Current branch is `feature/US-XXXX` (from `work set`)\n- No uncommitted tracked changes (commit first)\n- `work set` was run so a base branch is recorded\n\nLocks the tip commit, runs `git push origin <branch>`, then registers the commits with Copado.\n\n### `agentia work test --local`\n\nRun local project quality gates without submitting:\n\n```sh\nagentia work test --local --json\n```\n\nIf the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs and the command stops on failure. Only `--local` is supported for now.\n\n### `agentia work submit`\n\nFlag the user story as ready for review. Runs local project quality gates (when present), then pipeline quality gates and validation:\n\n```sh\nagentia work submit --json\nagentia work submit --skip-local-tests --json\n```\n\nSame branch/clean-tree rules as `work push`. If the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs first and submit stops on failure (same local gates as `work test --local`). Use `--skip-local-tests` to skip it. If the branch has unpushed commits, it pushes and registers them next, then submits.\n\n### `agentia work done`\n\nPromote and deploy the user story to the next pipeline stage:\n\n```sh\nagentia work done --json\n```\n\nSame branch/clean-tree rules as `work submit`. Pushes unpushed commits if needed, then promotes (without the validate-only path used by submit).\n\nOnly run this when the story is approved and ready to move to the next environment.\n\n---\n\n## Agent rules\n\n1. **Prefer MCP over CLI.** When Agentia MCP tools are available, use them instead of running `agentia` in the shell.\n2. **Discover before acting.** List assigned stories, then `get` the chosen ID, then `set` before editing files.\n3. **One story, one feature branch.** Do not mix unrelated commits on the same `feature/US-XXXX` branch.\n4. **Commit yourself; push with Agentia.** Use normal `git add` / `git commit` for local commits. Use `agentia_work_push` / `agentia work push` (not bare `git push`) so Copado receives the commit registration.\n5. **Keep the tree clean** before `set`, `push`, `submit`, and `done`. Those steps fail if tracked changes are pending.\n6. **Prefer structured results.** MCP returns JSON; for CLI, use `--json` and do not scrape human table output.\n7. **Order matters.** `set` \u2192 commit \u2192 `push` \u2192 `submit` \u2192 `done`. `submit` and `done` will auto-push if the branch is ahead of origin, but `set` is still required first.\n8. **Confirm intent for `done`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.\n";
10
+ export declare const BUNDLED_AGENTS_MD = "# Agentia CLI for AI Agents\n\nUse Agentia to manage Copado user stories end-to-end: pick work, prepare a git branch, push changes, submit for review, and promote.\n\n**Prefer the Agentia MCP server when it is available.** If tools such as `agentia_work_list`, `agentia_work_set`, `agentia_work_push`, `agentia_work_submit`, and `agentia_work_done` are registered, call those instead of shelling out to the `agentia` CLI. Fall back to CLI commands only when MCP is not configured.\n\nWhen using the CLI, prefer `--json` on every command so you can parse structured output instead of terminal tables.\n\nAuthentication must already be configured (`agentia auth set` / keychain, or local gateway mode). Run from a git repository that is a Copado-managed project.\n\n## Typical workflow\n\n```text\nlist \u2192 get \u2192 set \u2192 (implement & commit) \u2192 push \u2192 submit \u2192 done\n```\n\n| Step | MCP tool (preferred) | CLI fallback | Purpose |\n| --- | --- | --- | --- |\n| 1 | `agentia_work_list` (`assignedToMe: true`) | `agentia cicd work list --assigned-to-me --json` | Show user stories assigned to you |\n| 2 | `agentia_work_get` | `agentia cicd work get [id] --json` | Read user story details (omit id after `work set`) |\n| 3 | `agentia_work_set` | `agentia cicd work set <id> --json` | Mark in progress and prepare the feature branch |\n| 4 | *(your edits + `git commit`)* | *(your edits + `git commit`)* | Implement the story |\n| 5 | `agentia_work_push` | `agentia cicd work push --json` | Push commits to git and register them with Copado |\n| 6 | `agentia_work_submit` | `agentia cicd work submit --json` | Flag ready for review (pipeline quality gates / validation) |\n| 7 | `agentia_work_done` | `agentia cicd work done --json` | Promote and deploy to the next stage |\n\nDo not skip `work set` before coding. Later steps expect a `feature/<user-story-name>` branch and a recorded base branch from `work set`.\n\n---\n\n## Commands\n\nCLI examples below are the fallback when MCP is unavailable. MCP tool names and arguments mirror these commands (camelCase args instead of flags).\n\n### `agentia cicd work list`\n\nShow user stories. For \u201Cassigned to me\u201D, always use:\n\n```sh\nagentia cicd work list --assigned-to-me --json\n```\n\nUseful filters: `--status`, `--project-name`, `--name`, `--owned-by-me`. Do not combine `--assigned-to-me` with `--owned-by-me` or `--assignee-id`.\n\n### `agentia cicd work get [id]`\n\nRead full details for one user story. After `work set`, omit the ID to use the active work item:\n\n```sh\nagentia cicd work get --json\nagentia cicd work get a0SKC000000CmZ2AU --json\n```\n\nUse this before starting work to understand title, status, acceptance criteria, and related fields.\n\n### `agentia cicd work set <id>`\n\nFlag the user story as the active work item (in progress) and prepare the correct git branch:\n\n```sh\nagentia cicd work set a0SKC000000CmZ2AU --json\n# or by name:\nagentia cicd work set US-0001 --json\n```\n\nWhat it does:\n\n1. Calls Copado to set the work item and resolve the base branch\n2. Requires a **clean tracked working tree** (stash or commit first if dirty)\n3. Fetches `origin/<base-branch>`\n4. Creates or checks out `feature/<user-story-name>`\n5. Records the last work item ID, name, and base branch for later commands\n\nOptional: `--base-branch <name>` overrides the base branch from the API.\n\nAfter success, stay on that feature branch for all implementation commits.\n\n### `agentia cicd work push`\n\nPush committed changes to git and register them with Copado:\n\n```sh\nagentia cicd work push --json\n```\n\nPrerequisites:\n\n- Current branch is `feature/US-XXXX` (from `work set`)\n- No uncommitted tracked changes (commit first)\n- `work set` was run so a base branch is recorded\n\nLocks the tip commit, runs `git push origin <branch>`, then registers the commits with Copado.\n\n### `agentia cicd work test --local`\n\nRun local project quality gates without submitting:\n\n```sh\nagentia cicd work test --local --json\nagentia cicd work test --local --apex-test-classes=MyTest,OtherTest --json\n```\n\nIf the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs and the command stops on failure. Only `--local` is supported for now. Optional `--apex-test-classes=class1,class2` is passed to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`).\n\n### `agentia cicd work submit`\n\nFlag the user story as ready for review. Runs local project quality gates (when present), then pipeline quality gates and validation:\n\n```sh\nagentia cicd work submit --json\nagentia cicd work submit --apex-test-classes=MyTest,OtherTest --json\nagentia cicd work submit --skip-local-tests --json\n```\n\nSame branch/clean-tree rules as `work push`. If the project root contains `.agentia_quality_gates.sh` (macOS/Linux) or `.agentia_quality_gates.cmd` (Windows), that script runs first and submit stops on failure (same local gates as `work test --local`). Use `--apex-test-classes=class1,class2` to pass Apex test classes to the script as `AGENTIA_APEX_TEST_CLASSES` (MCP: `apexTestClasses`). Use `--skip-local-tests` to skip local gates. If the branch has unpushed commits, it pushes and registers them next, then submits.\n\n### `agentia cicd work done`\n\nPromote and deploy the user story to the next pipeline stage:\n\n```sh\nagentia cicd work done --json\n```\n\nSame branch/clean-tree rules as `work submit`. Pushes unpushed commits if needed, then promotes (without the validate-only path used by submit).\n\nOnly run this when the story is approved and ready to move to the next environment.\n\n---\n\n## Agent rules\n\n1. **Prefer MCP over CLI.** When Agentia MCP tools are available, use them instead of running `agentia` in the shell.\n2. **Discover before acting.** List assigned stories, then `get` the chosen ID, then `set` before editing files.\n3. **One story, one feature branch.** Do not mix unrelated commits on the same `feature/US-XXXX` branch.\n4. **Commit yourself; push with Agentia.** Use normal `git add` / `git commit` for local commits. Use `agentia_work_push` / `agentia cicd work push` (not bare `git push`) so Copado receives the commit registration.\n5. **Keep the tree clean** before `set`, `push`, `submit`, and `done`. Those steps fail if tracked changes are pending.\n6. **Prefer structured results.** MCP returns JSON; for CLI, use `--json` and do not scrape human table output.\n7. **Order matters.** `set` \u2192 commit \u2192 `push` \u2192 `submit` \u2192 `done`. `submit` and `done` will auto-push if the branch is ahead of origin, but `set` is still required first.\n8. **Confirm intent for `done`.** Promotion deploys to the next stage; do not run it unless the user asked to promote/deploy.\n";
11
11
  export declare function qualityGatesExplanation(bin?: string): string;
@@ -10,22 +10,47 @@ set -euo pipefail
10
10
 
11
11
  # Local Agentia quality gates (macOS / Linux).
12
12
  # Edit this script to match your project. Agentia runs it from the repo root during
13
- # \`agentia work test --local\` and \`agentia work submit\` (unless --skip-local-tests).
13
+ # \`agentia cicd work test --local\` and \`agentia cicd work submit\` (unless --skip-local-tests).
14
14
  # The script must exit non-zero if any check fails.
15
15
 
16
+ echo "## Running Code Analyzer"
16
17
  sf code-analyzer run
17
- sf force lightning lwc test run
18
+
19
+ if [[ -n "\${AGENTIA_APEX_TEST_CLASSES:-}" ]]; then
20
+ # Normalize commas to spaces so --class-names gets discrete values
21
+ # shellcheck disable=SC2206
22
+ class_names=(\${AGENTIA_APEX_TEST_CLASSES//,/ })
23
+ if [[ \${#class_names[@]} -gt 0 ]]; then
24
+ echo "## Running Apex tests: \${class_names[@]}"
25
+ sf apex run test --class-names "\${class_names[@]}" --result-format human --wait 10
26
+ fi
27
+ fi
28
+
29
+ echo "## Running LWC tests"
30
+ npx sfdx-lwc-jest -- # --passWithNoTests
18
31
  `;
19
32
  export const SAMPLE_QUALITY_GATES_WINDOWS = `@echo off
20
- setlocal EnableExtensions
33
+ setlocal EnableExtensions EnableDelayedExpansion
21
34
  REM Local Agentia quality gates (Windows).
22
35
  REM Edit this script to match your project. Agentia runs it from the repo root during
23
- REM \`agentia work test --local\` and \`agentia work submit\` (unless --skip-local-tests).
36
+ REM \`agentia cicd work test --local\` and \`agentia cicd work submit\` (unless --skip-local-tests).
24
37
  REM The script must exit non-zero if any check fails.
25
38
 
39
+ echo ## Running Code Analyzer
26
40
  sf code-analyzer run
27
41
  if errorlevel 1 exit /b %errorlevel%
28
- sf force lightning lwc test run
42
+
43
+ if defined AGENTIA_APEX_TEST_CLASSES (
44
+ set "CLASS_NAMES=!AGENTIA_APEX_TEST_CLASSES:,= !"
45
+ if not "!CLASS_NAMES!"=="" (
46
+ echo ## Running Apex tests: !CLASS_NAMES!
47
+ sf apex run test --class-names !CLASS_NAMES! --result-format human --wait 10
48
+ if errorlevel 1 exit /b %errorlevel%
49
+ )
50
+ )
51
+
52
+ echo ## Running LWC tests
53
+ npx sfdx-lwc-jest --
29
54
  if errorlevel 1 exit /b %errorlevel%
30
55
  `;
31
56
  /** Bundled AGENTS.md template (mirrors docs/AGENTS.sample.md). Used when DEFAULT_AGENTS_MD_URL is unset or download fails. */
@@ -47,13 +72,13 @@ list → get → set → (implement & commit) → push → submit → done
47
72
 
48
73
  | Step | MCP tool (preferred) | CLI fallback | Purpose |
49
74
  | --- | --- | --- | --- |
50
- | 1 | \`agentia_work_list\` (\`assignedToMe: true\`) | \`agentia work list --assigned-to-me --json\` | Show user stories assigned to you |
51
- | 2 | \`agentia_work_get\` | \`agentia work get [id] --json\` | Read user story details (omit id after \`work set\`) |
52
- | 3 | \`agentia_work_set\` | \`agentia work set <id> --json\` | Mark in progress and prepare the feature branch |
75
+ | 1 | \`agentia_work_list\` (\`assignedToMe: true\`) | \`agentia cicd work list --assigned-to-me --json\` | Show user stories assigned to you |
76
+ | 2 | \`agentia_work_get\` | \`agentia cicd work get [id] --json\` | Read user story details (omit id after \`work set\`) |
77
+ | 3 | \`agentia_work_set\` | \`agentia cicd work set <id> --json\` | Mark in progress and prepare the feature branch |
53
78
  | 4 | *(your edits + \`git commit\`)* | *(your edits + \`git commit\`)* | Implement the story |
54
- | 5 | \`agentia_work_push\` | \`agentia work push --json\` | Push commits to git and register them with Copado |
55
- | 6 | \`agentia_work_submit\` | \`agentia work submit --json\` | Flag ready for review (pipeline quality gates / validation) |
56
- | 7 | \`agentia_work_done\` | \`agentia work done --json\` | Promote and deploy to the next stage |
79
+ | 5 | \`agentia_work_push\` | \`agentia cicd work push --json\` | Push commits to git and register them with Copado |
80
+ | 6 | \`agentia_work_submit\` | \`agentia cicd work submit --json\` | Flag ready for review (pipeline quality gates / validation) |
81
+ | 7 | \`agentia_work_done\` | \`agentia cicd work done --json\` | Promote and deploy to the next stage |
57
82
 
58
83
  Do not skip \`work set\` before coding. Later steps expect a \`feature/<user-story-name>\` branch and a recorded base branch from \`work set\`.
59
84
 
@@ -63,35 +88,35 @@ Do not skip \`work set\` before coding. Later steps expect a \`feature/<user-sto
63
88
 
64
89
  CLI examples below are the fallback when MCP is unavailable. MCP tool names and arguments mirror these commands (camelCase args instead of flags).
65
90
 
66
- ### \`agentia work list\`
91
+ ### \`agentia cicd work list\`
67
92
 
68
93
  Show user stories. For “assigned to me”, always use:
69
94
 
70
95
  \`\`\`sh
71
- agentia work list --assigned-to-me --json
96
+ agentia cicd work list --assigned-to-me --json
72
97
  \`\`\`
73
98
 
74
99
  Useful filters: \`--status\`, \`--project-name\`, \`--name\`, \`--owned-by-me\`. Do not combine \`--assigned-to-me\` with \`--owned-by-me\` or \`--assignee-id\`.
75
100
 
76
- ### \`agentia work get [id]\`
101
+ ### \`agentia cicd work get [id]\`
77
102
 
78
103
  Read full details for one user story. After \`work set\`, omit the ID to use the active work item:
79
104
 
80
105
  \`\`\`sh
81
- agentia work get --json
82
- agentia work get a0SKC000000CmZ2AU --json
106
+ agentia cicd work get --json
107
+ agentia cicd work get a0SKC000000CmZ2AU --json
83
108
  \`\`\`
84
109
 
85
110
  Use this before starting work to understand title, status, acceptance criteria, and related fields.
86
111
 
87
- ### \`agentia work set <id>\`
112
+ ### \`agentia cicd work set <id>\`
88
113
 
89
114
  Flag the user story as the active work item (in progress) and prepare the correct git branch:
90
115
 
91
116
  \`\`\`sh
92
- agentia work set a0SKC000000CmZ2AU --json
117
+ agentia cicd work set a0SKC000000CmZ2AU --json
93
118
  # or by name:
94
- agentia work set US-0001 --json
119
+ agentia cicd work set US-0001 --json
95
120
  \`\`\`
96
121
 
97
122
  What it does:
@@ -106,12 +131,12 @@ Optional: \`--base-branch <name>\` overrides the base branch from the API.
106
131
 
107
132
  After success, stay on that feature branch for all implementation commits.
108
133
 
109
- ### \`agentia work push\`
134
+ ### \`agentia cicd work push\`
110
135
 
111
136
  Push committed changes to git and register them with Copado:
112
137
 
113
138
  \`\`\`sh
114
- agentia work push --json
139
+ agentia cicd work push --json
115
140
  \`\`\`
116
141
 
117
142
  Prerequisites:
@@ -122,33 +147,35 @@ Prerequisites:
122
147
 
123
148
  Locks the tip commit, runs \`git push origin <branch>\`, then registers the commits with Copado.
124
149
 
125
- ### \`agentia work test --local\`
150
+ ### \`agentia cicd work test --local\`
126
151
 
127
152
  Run local project quality gates without submitting:
128
153
 
129
154
  \`\`\`sh
130
- agentia work test --local --json
155
+ agentia cicd work test --local --json
156
+ agentia cicd work test --local --apex-test-classes=MyTest,OtherTest --json
131
157
  \`\`\`
132
158
 
133
- If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs and the command stops on failure. Only \`--local\` is supported for now.
159
+ If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs and the command stops on failure. Only \`--local\` is supported for now. Optional \`--apex-test-classes=class1,class2\` is passed to the script as \`AGENTIA_APEX_TEST_CLASSES\` (MCP: \`apexTestClasses\`).
134
160
 
135
- ### \`agentia work submit\`
161
+ ### \`agentia cicd work submit\`
136
162
 
137
163
  Flag the user story as ready for review. Runs local project quality gates (when present), then pipeline quality gates and validation:
138
164
 
139
165
  \`\`\`sh
140
- agentia work submit --json
141
- agentia work submit --skip-local-tests --json
166
+ agentia cicd work submit --json
167
+ agentia cicd work submit --apex-test-classes=MyTest,OtherTest --json
168
+ agentia cicd work submit --skip-local-tests --json
142
169
  \`\`\`
143
170
 
144
- Same branch/clean-tree rules as \`work push\`. If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs first and submit stops on failure (same local gates as \`work test --local\`). Use \`--skip-local-tests\` to skip it. If the branch has unpushed commits, it pushes and registers them next, then submits.
171
+ Same branch/clean-tree rules as \`work push\`. If the project root contains \`${QUALITY_GATES_SCRIPT_UNIX}\` (macOS/Linux) or \`${QUALITY_GATES_SCRIPT_WINDOWS}\` (Windows), that script runs first and submit stops on failure (same local gates as \`work test --local\`). Use \`--apex-test-classes=class1,class2\` to pass Apex test classes to the script as \`AGENTIA_APEX_TEST_CLASSES\` (MCP: \`apexTestClasses\`). Use \`--skip-local-tests\` to skip local gates. If the branch has unpushed commits, it pushes and registers them next, then submits.
145
172
 
146
- ### \`agentia work done\`
173
+ ### \`agentia cicd work done\`
147
174
 
148
175
  Promote and deploy the user story to the next pipeline stage:
149
176
 
150
177
  \`\`\`sh
151
- agentia work done --json
178
+ agentia cicd work done --json
152
179
  \`\`\`
153
180
 
154
181
  Same branch/clean-tree rules as \`work submit\`. Pushes unpushed commits if needed, then promotes (without the validate-only path used by submit).
@@ -162,7 +189,7 @@ Only run this when the story is approved and ready to move to the next environme
162
189
  1. **Prefer MCP over CLI.** When Agentia MCP tools are available, use them instead of running \`agentia\` in the shell.
163
190
  2. **Discover before acting.** List assigned stories, then \`get\` the chosen ID, then \`set\` before editing files.
164
191
  3. **One story, one feature branch.** Do not mix unrelated commits on the same \`feature/US-XXXX\` branch.
165
- 4. **Commit yourself; push with Agentia.** Use normal \`git add\` / \`git commit\` for local commits. Use \`agentia_work_push\` / \`agentia work push\` (not bare \`git push\`) so Copado receives the commit registration.
192
+ 4. **Commit yourself; push with Agentia.** Use normal \`git add\` / \`git commit\` for local commits. Use \`agentia_work_push\` / \`agentia cicd work push\` (not bare \`git push\`) so Copado receives the commit registration.
166
193
  5. **Keep the tree clean** before \`set\`, \`push\`, \`submit\`, and \`done\`. Those steps fail if tracked changes are pending.
167
194
  6. **Prefer structured results.** MCP returns JSON; for CLI, use \`--json\` and do not scrape human table output.
168
195
  7. **Order matters.** \`set\` → commit → \`push\` → \`submit\` → \`done\`. \`submit\` and \`done\` will auto-push if the branch is ahead of origin, but \`set\` is still required first.
@@ -1 +1 @@
1
- {"version":3,"file":"setup-templates.js","sourceRoot":"","sources":["../../src/lib/setup-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,0BAA0B,CAAA;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAA;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAA;AAElD,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;CAUxC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;CAW3C,CAAA;AAED,8HAA8H;AAC9H,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAqGA,yBAAyB,yBAAyB,4BAA4B;;;;;;;;;;;gFAW/B,yBAAyB,yBAAyB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B7J,CAAA;AAED,MAAM,UAAU,uBAAuB,CAAC,GAAG,GAAG,SAAS;IACrD,OAAO;QACL,sBAAsB;QACtB,OAAO,yBAAyB,yBAAyB,4BAA4B,cAAc;QACnG,OAAO,GAAG,0BAA0B,GAAG,uEAAuE;QAC9G,WAAW,GAAG,qEAAqE;QACnF,mFAAmF;QACnF,8GAA8G;KAC/G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
1
+ {"version":3,"file":"setup-templates.js","sourceRoot":"","sources":["../../src/lib/setup-templates.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,0BAA0B,CAAA;AAEjC;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,EAAE,CAAA;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,WAAW,CAAA;AAElD,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBxC,CAAA;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuB3C,CAAA;AAED,8HAA8H;AAC9H,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAsGA,yBAAyB,yBAAyB,4BAA4B;;;;;;;;;;;;gFAY/B,yBAAyB,yBAAyB,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;CA0B7J,CAAA;AAED,MAAM,UAAU,uBAAuB,CAAC,GAAG,GAAG,SAAS;IACrD,OAAO;QACL,sBAAsB;QACtB,OAAO,yBAAyB,yBAAyB,4BAA4B,cAAc;QACnG,OAAO,GAAG,0BAA0B,GAAG,uEAAuE;QAC9G,WAAW,GAAG,qEAAqE;QACnF,mFAAmF;QACnF,8GAA8G;KAC/G,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACd,CAAC"}
@@ -0,0 +1,42 @@
1
+ import { applyAuthSet, getCicdAuthStatus, getCrtAuthStatus } from './auth-config.js';
2
+ import { type CursorMcpStatus, detectCursorInstall, getCursorMcpStatus, upsertAgentiaCursorMcp } from './cursor-mcp-config.js';
3
+ import { type ProjectAssetSetupResult, type SetupActionStatus, type SetupDeps, type SetupOptions } from './project-setup.js';
4
+ export type SetupWizardAuthResult = {
5
+ baseUrl?: string;
6
+ configured: boolean;
7
+ domain?: string;
8
+ orgId?: string;
9
+ status: SetupActionStatus;
10
+ };
11
+ export type SetupWizardCursorResult = {
12
+ detected: boolean;
13
+ global: CursorMcpStatus & {
14
+ status: SetupActionStatus;
15
+ };
16
+ local: CursorMcpStatus & {
17
+ status: SetupActionStatus;
18
+ };
19
+ };
20
+ export type SetupResult = ProjectAssetSetupResult & {
21
+ auth: {
22
+ cicd: SetupWizardAuthResult;
23
+ crt: SetupWizardAuthResult;
24
+ };
25
+ cursorMcp: SetupWizardCursorResult;
26
+ nextSteps: string[];
27
+ };
28
+ export type SetupWizardOptions = SetupOptions & {
29
+ withSpinner?: <T>(message: string, action: () => Promise<T>) => Promise<T>;
30
+ };
31
+ export type SetupWizardDeps = SetupDeps & {
32
+ applyAuthSet?: typeof applyAuthSet;
33
+ detectCursorInstall?: typeof detectCursorInstall;
34
+ getCicdAuthStatus?: typeof getCicdAuthStatus;
35
+ getCrtAuthStatus?: typeof getCrtAuthStatus;
36
+ getCursorMcpStatus?: typeof getCursorMcpStatus;
37
+ homedir?: () => string;
38
+ upsertAgentiaCursorMcp?: typeof upsertAgentiaCursorMcp;
39
+ };
40
+ export declare function setSetupWizardDepsForTests(deps: SetupWizardDeps | undefined): void;
41
+ export declare function resetSetupWizardDepsForTests(): void;
42
+ export declare function runSetupWizard(options?: SetupWizardOptions, deps?: SetupWizardDeps): Promise<SetupResult>;