@agentuity/cli 1.0.21 → 1.0.23

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 (318) hide show
  1. package/dist/auth.d.ts.map +1 -1
  2. package/dist/auth.js +7 -0
  3. package/dist/auth.js.map +1 -1
  4. package/dist/cache/resource-region.d.ts +1 -1
  5. package/dist/cache/resource-region.d.ts.map +1 -1
  6. package/dist/cache/resource-region.js.map +1 -1
  7. package/dist/cmd/ai/claude-code/install.d.ts.map +1 -1
  8. package/dist/cmd/ai/claude-code/install.js +0 -1
  9. package/dist/cmd/ai/claude-code/install.js.map +1 -1
  10. package/dist/cmd/build/vite/public-asset-path-plugin.d.ts +4 -2
  11. package/dist/cmd/build/vite/public-asset-path-plugin.d.ts.map +1 -1
  12. package/dist/cmd/build/vite/public-asset-path-plugin.js +18 -4
  13. package/dist/cmd/build/vite/public-asset-path-plugin.js.map +1 -1
  14. package/dist/cmd/cloud/deploy.d.ts.map +1 -1
  15. package/dist/cmd/cloud/deploy.js +1 -1
  16. package/dist/cmd/cloud/deploy.js.map +1 -1
  17. package/dist/cmd/cloud/email/create.d.ts +3 -0
  18. package/dist/cmd/cloud/email/create.d.ts.map +1 -0
  19. package/dist/cmd/cloud/email/create.js +58 -0
  20. package/dist/cmd/cloud/email/create.js.map +1 -0
  21. package/dist/cmd/cloud/email/delete.d.ts +3 -0
  22. package/dist/cmd/cloud/email/delete.d.ts.map +1 -0
  23. package/dist/cmd/cloud/email/delete.js +47 -0
  24. package/dist/cmd/cloud/email/delete.js.map +1 -0
  25. package/dist/cmd/cloud/email/destination/delete.d.ts +3 -0
  26. package/dist/cmd/cloud/email/destination/delete.d.ts.map +1 -0
  27. package/dist/cmd/cloud/email/destination/delete.js +54 -0
  28. package/dist/cmd/cloud/email/destination/delete.js.map +1 -0
  29. package/dist/cmd/cloud/email/destination/index.d.ts +3 -0
  30. package/dist/cmd/cloud/email/destination/index.d.ts.map +1 -0
  31. package/dist/cmd/cloud/email/destination/index.js +14 -0
  32. package/dist/cmd/cloud/email/destination/index.js.map +1 -0
  33. package/dist/cmd/cloud/email/destination/list.d.ts +3 -0
  34. package/dist/cmd/cloud/email/destination/list.d.ts.map +1 -0
  35. package/dist/cmd/cloud/email/destination/list.js +39 -0
  36. package/dist/cmd/cloud/email/destination/list.js.map +1 -0
  37. package/dist/cmd/cloud/email/destination/schemas.d.ts +9 -0
  38. package/dist/cmd/cloud/email/destination/schemas.d.ts.map +1 -0
  39. package/dist/cmd/cloud/email/destination/schemas.js +9 -0
  40. package/dist/cmd/cloud/email/destination/schemas.js.map +1 -0
  41. package/dist/cmd/cloud/email/destination/url.d.ts +3 -0
  42. package/dist/cmd/cloud/email/destination/url.d.ts.map +1 -0
  43. package/dist/cmd/cloud/email/destination/url.js +64 -0
  44. package/dist/cmd/cloud/email/destination/url.js.map +1 -0
  45. package/dist/cmd/cloud/email/get.d.ts +3 -0
  46. package/dist/cmd/cloud/email/get.d.ts.map +1 -0
  47. package/dist/cmd/cloud/email/get.js +43 -0
  48. package/dist/cmd/cloud/email/get.js.map +1 -0
  49. package/dist/cmd/cloud/email/inbound/get.d.ts +3 -0
  50. package/dist/cmd/cloud/email/inbound/get.d.ts.map +1 -0
  51. package/dist/cmd/cloud/email/inbound/get.js +44 -0
  52. package/dist/cmd/cloud/email/inbound/get.js.map +1 -0
  53. package/dist/cmd/cloud/email/inbound/index.d.ts +3 -0
  54. package/dist/cmd/cloud/email/inbound/index.d.ts.map +1 -0
  55. package/dist/cmd/cloud/email/inbound/index.js +12 -0
  56. package/dist/cmd/cloud/email/inbound/index.js.map +1 -0
  57. package/dist/cmd/cloud/email/inbound/list.d.ts +3 -0
  58. package/dist/cmd/cloud/email/inbound/list.d.ts.map +1 -0
  59. package/dist/cmd/cloud/email/inbound/list.js +43 -0
  60. package/dist/cmd/cloud/email/inbound/list.js.map +1 -0
  61. package/dist/cmd/cloud/email/inbound/schemas.d.ts +11 -0
  62. package/dist/cmd/cloud/email/inbound/schemas.d.ts.map +1 -0
  63. package/dist/cmd/cloud/email/inbound/schemas.js +11 -0
  64. package/dist/cmd/cloud/email/inbound/schemas.js.map +1 -0
  65. package/dist/cmd/cloud/email/index.d.ts +3 -0
  66. package/dist/cmd/cloud/email/index.d.ts.map +1 -0
  67. package/dist/cmd/cloud/email/index.js +28 -0
  68. package/dist/cmd/cloud/email/index.js.map +1 -0
  69. package/dist/cmd/cloud/email/list.d.ts +3 -0
  70. package/dist/cmd/cloud/email/list.d.ts.map +1 -0
  71. package/dist/cmd/cloud/email/list.js +37 -0
  72. package/dist/cmd/cloud/email/list.js.map +1 -0
  73. package/dist/cmd/cloud/email/outbound/get.d.ts +3 -0
  74. package/dist/cmd/cloud/email/outbound/get.d.ts.map +1 -0
  75. package/dist/cmd/cloud/email/outbound/get.js +45 -0
  76. package/dist/cmd/cloud/email/outbound/get.js.map +1 -0
  77. package/dist/cmd/cloud/email/outbound/index.d.ts +3 -0
  78. package/dist/cmd/cloud/email/outbound/index.d.ts.map +1 -0
  79. package/dist/cmd/cloud/email/outbound/index.js +12 -0
  80. package/dist/cmd/cloud/email/outbound/index.js.map +1 -0
  81. package/dist/cmd/cloud/email/outbound/list.d.ts +3 -0
  82. package/dist/cmd/cloud/email/outbound/list.d.ts.map +1 -0
  83. package/dist/cmd/cloud/email/outbound/list.js +43 -0
  84. package/dist/cmd/cloud/email/outbound/list.js.map +1 -0
  85. package/dist/cmd/cloud/email/outbound/schemas.d.ts +15 -0
  86. package/dist/cmd/cloud/email/outbound/schemas.d.ts.map +1 -0
  87. package/dist/cmd/cloud/email/outbound/schemas.js +15 -0
  88. package/dist/cmd/cloud/email/outbound/schemas.js.map +1 -0
  89. package/dist/cmd/cloud/email/send.d.ts +3 -0
  90. package/dist/cmd/cloud/email/send.d.ts.map +1 -0
  91. package/dist/cmd/cloud/email/send.js +77 -0
  92. package/dist/cmd/cloud/email/send.js.map +1 -0
  93. package/dist/cmd/cloud/email/util.d.ts +26 -0
  94. package/dist/cmd/cloud/email/util.d.ts.map +1 -0
  95. package/dist/cmd/cloud/email/util.js +57 -0
  96. package/dist/cmd/cloud/email/util.js.map +1 -0
  97. package/dist/cmd/cloud/index.d.ts.map +1 -1
  98. package/dist/cmd/cloud/index.js +8 -0
  99. package/dist/cmd/cloud/index.js.map +1 -1
  100. package/dist/cmd/cloud/region-lookup.d.ts +1 -1
  101. package/dist/cmd/cloud/region-lookup.d.ts.map +1 -1
  102. package/dist/cmd/cloud/region-lookup.js +44 -2
  103. package/dist/cmd/cloud/region-lookup.js.map +1 -1
  104. package/dist/cmd/cloud/sandbox/snapshot/build.d.ts +7 -0
  105. package/dist/cmd/cloud/sandbox/snapshot/build.d.ts.map +1 -1
  106. package/dist/cmd/cloud/sandbox/snapshot/build.js +46 -28
  107. package/dist/cmd/cloud/sandbox/snapshot/build.js.map +1 -1
  108. package/dist/cmd/cloud/sandbox/snapshot/generate.d.ts.map +1 -1
  109. package/dist/cmd/cloud/sandbox/snapshot/generate.js +5 -1
  110. package/dist/cmd/cloud/sandbox/snapshot/generate.js.map +1 -1
  111. package/dist/cmd/cloud/schedule/create.d.ts +3 -0
  112. package/dist/cmd/cloud/schedule/create.d.ts.map +1 -0
  113. package/dist/cmd/cloud/schedule/create.js +72 -0
  114. package/dist/cmd/cloud/schedule/create.js.map +1 -0
  115. package/dist/cmd/cloud/schedule/delete.d.ts +3 -0
  116. package/dist/cmd/cloud/schedule/delete.d.ts.map +1 -0
  117. package/dist/cmd/cloud/schedule/delete.js +38 -0
  118. package/dist/cmd/cloud/schedule/delete.js.map +1 -0
  119. package/dist/cmd/cloud/schedule/delivery/get.d.ts +3 -0
  120. package/dist/cmd/cloud/schedule/delivery/get.d.ts.map +1 -0
  121. package/dist/cmd/cloud/schedule/delivery/get.js +78 -0
  122. package/dist/cmd/cloud/schedule/delivery/get.js.map +1 -0
  123. package/dist/cmd/cloud/schedule/delivery/index.d.ts +3 -0
  124. package/dist/cmd/cloud/schedule/delivery/index.d.ts.map +1 -0
  125. package/dist/cmd/cloud/schedule/delivery/index.js +23 -0
  126. package/dist/cmd/cloud/schedule/delivery/index.js.map +1 -0
  127. package/dist/cmd/cloud/schedule/delivery/list.d.ts +3 -0
  128. package/dist/cmd/cloud/schedule/delivery/list.d.ts.map +1 -0
  129. package/dist/cmd/cloud/schedule/delivery/list.js +67 -0
  130. package/dist/cmd/cloud/schedule/delivery/list.js.map +1 -0
  131. package/dist/cmd/cloud/schedule/destination/create.d.ts +3 -0
  132. package/dist/cmd/cloud/schedule/destination/create.d.ts.map +1 -0
  133. package/dist/cmd/cloud/schedule/destination/create.js +97 -0
  134. package/dist/cmd/cloud/schedule/destination/create.js.map +1 -0
  135. package/dist/cmd/cloud/schedule/destination/delete.d.ts +3 -0
  136. package/dist/cmd/cloud/schedule/destination/delete.d.ts.map +1 -0
  137. package/dist/cmd/cloud/schedule/destination/delete.js +41 -0
  138. package/dist/cmd/cloud/schedule/destination/delete.js.map +1 -0
  139. package/dist/cmd/cloud/schedule/destination/get.d.ts +3 -0
  140. package/dist/cmd/cloud/schedule/destination/get.d.ts.map +1 -0
  141. package/dist/cmd/cloud/schedule/destination/get.js +57 -0
  142. package/dist/cmd/cloud/schedule/destination/get.js.map +1 -0
  143. package/dist/cmd/cloud/schedule/destination/index.d.ts +3 -0
  144. package/dist/cmd/cloud/schedule/destination/index.d.ts.map +1 -0
  145. package/dist/cmd/cloud/schedule/destination/index.js +26 -0
  146. package/dist/cmd/cloud/schedule/destination/index.js.map +1 -0
  147. package/dist/cmd/cloud/schedule/destination/list.d.ts +3 -0
  148. package/dist/cmd/cloud/schedule/destination/list.d.ts.map +1 -0
  149. package/dist/cmd/cloud/schedule/destination/list.js +58 -0
  150. package/dist/cmd/cloud/schedule/destination/list.js.map +1 -0
  151. package/dist/cmd/cloud/schedule/get.d.ts +3 -0
  152. package/dist/cmd/cloud/schedule/get.d.ts.map +1 -0
  153. package/dist/cmd/cloud/schedule/get.js +76 -0
  154. package/dist/cmd/cloud/schedule/get.js.map +1 -0
  155. package/dist/cmd/cloud/schedule/index.d.ts +3 -0
  156. package/dist/cmd/cloud/schedule/index.d.ts.map +1 -0
  157. package/dist/cmd/cloud/schedule/index.js +35 -0
  158. package/dist/cmd/cloud/schedule/index.js.map +1 -0
  159. package/dist/cmd/cloud/schedule/list.d.ts +3 -0
  160. package/dist/cmd/cloud/schedule/list.d.ts.map +1 -0
  161. package/dist/cmd/cloud/schedule/list.js +60 -0
  162. package/dist/cmd/cloud/schedule/list.js.map +1 -0
  163. package/dist/cmd/cloud/schedule/update.d.ts +3 -0
  164. package/dist/cmd/cloud/schedule/update.d.ts.map +1 -0
  165. package/dist/cmd/cloud/schedule/update.js +65 -0
  166. package/dist/cmd/cloud/schedule/update.js.map +1 -0
  167. package/dist/cmd/cloud/schedule/util.d.ts +11 -0
  168. package/dist/cmd/cloud/schedule/util.d.ts.map +1 -0
  169. package/dist/cmd/cloud/schedule/util.js +17 -0
  170. package/dist/cmd/cloud/schedule/util.js.map +1 -0
  171. package/dist/cmd/cloud/task/create.d.ts +3 -0
  172. package/dist/cmd/cloud/task/create.d.ts.map +1 -0
  173. package/dist/cmd/cloud/task/create.js +108 -0
  174. package/dist/cmd/cloud/task/create.js.map +1 -0
  175. package/dist/cmd/cloud/task/get.d.ts +3 -0
  176. package/dist/cmd/cloud/task/get.d.ts.map +1 -0
  177. package/dist/cmd/cloud/task/get.js +124 -0
  178. package/dist/cmd/cloud/task/get.js.map +1 -0
  179. package/dist/cmd/cloud/task/index.d.ts +3 -0
  180. package/dist/cmd/cloud/task/index.d.ts.map +1 -0
  181. package/dist/cmd/cloud/task/index.js +33 -0
  182. package/dist/cmd/cloud/task/index.js.map +1 -0
  183. package/dist/cmd/cloud/task/list.d.ts +3 -0
  184. package/dist/cmd/cloud/task/list.d.ts.map +1 -0
  185. package/dist/cmd/cloud/task/list.js +174 -0
  186. package/dist/cmd/cloud/task/list.js.map +1 -0
  187. package/dist/cmd/cloud/task/update.d.ts +3 -0
  188. package/dist/cmd/cloud/task/update.d.ts.map +1 -0
  189. package/dist/cmd/cloud/task/update.js +118 -0
  190. package/dist/cmd/cloud/task/update.js.map +1 -0
  191. package/dist/cmd/cloud/task/util.d.ts +18 -0
  192. package/dist/cmd/cloud/task/util.d.ts.map +1 -0
  193. package/dist/cmd/cloud/task/util.js +45 -0
  194. package/dist/cmd/cloud/task/util.js.map +1 -0
  195. package/dist/cmd/cloud/webhook/create.d.ts +3 -0
  196. package/dist/cmd/cloud/webhook/create.d.ts.map +1 -0
  197. package/dist/cmd/cloud/webhook/create.js +54 -0
  198. package/dist/cmd/cloud/webhook/create.js.map +1 -0
  199. package/dist/cmd/cloud/webhook/delete.d.ts +3 -0
  200. package/dist/cmd/cloud/webhook/delete.d.ts.map +1 -0
  201. package/dist/cmd/cloud/webhook/delete.js +50 -0
  202. package/dist/cmd/cloud/webhook/delete.js.map +1 -0
  203. package/dist/cmd/cloud/webhook/deliveries.d.ts +3 -0
  204. package/dist/cmd/cloud/webhook/deliveries.d.ts.map +1 -0
  205. package/dist/cmd/cloud/webhook/deliveries.js +123 -0
  206. package/dist/cmd/cloud/webhook/deliveries.js.map +1 -0
  207. package/dist/cmd/cloud/webhook/destinations.d.ts +3 -0
  208. package/dist/cmd/cloud/webhook/destinations.d.ts.map +1 -0
  209. package/dist/cmd/cloud/webhook/destinations.js +212 -0
  210. package/dist/cmd/cloud/webhook/destinations.js.map +1 -0
  211. package/dist/cmd/cloud/webhook/get.d.ts +3 -0
  212. package/dist/cmd/cloud/webhook/get.d.ts.map +1 -0
  213. package/dist/cmd/cloud/webhook/get.js +50 -0
  214. package/dist/cmd/cloud/webhook/get.js.map +1 -0
  215. package/dist/cmd/cloud/webhook/index.d.ts +3 -0
  216. package/dist/cmd/cloud/webhook/index.d.ts.map +1 -0
  217. package/dist/cmd/cloud/webhook/index.js +45 -0
  218. package/dist/cmd/cloud/webhook/index.js.map +1 -0
  219. package/dist/cmd/cloud/webhook/list.d.ts +3 -0
  220. package/dist/cmd/cloud/webhook/list.d.ts.map +1 -0
  221. package/dist/cmd/cloud/webhook/list.js +72 -0
  222. package/dist/cmd/cloud/webhook/list.js.map +1 -0
  223. package/dist/cmd/cloud/webhook/receipts.d.ts +3 -0
  224. package/dist/cmd/cloud/webhook/receipts.d.ts.map +1 -0
  225. package/dist/cmd/cloud/webhook/receipts.js +128 -0
  226. package/dist/cmd/cloud/webhook/receipts.js.map +1 -0
  227. package/dist/cmd/cloud/webhook/util.d.ts +27 -0
  228. package/dist/cmd/cloud/webhook/util.d.ts.map +1 -0
  229. package/dist/cmd/cloud/webhook/util.js +20 -0
  230. package/dist/cmd/cloud/webhook/util.js.map +1 -0
  231. package/dist/cmd/project/add/domain.d.ts.map +1 -1
  232. package/dist/cmd/project/add/domain.js +6 -4
  233. package/dist/cmd/project/add/domain.js.map +1 -1
  234. package/dist/cmd/project/domain/check.d.ts.map +1 -1
  235. package/dist/cmd/project/domain/check.js +10 -5
  236. package/dist/cmd/project/domain/check.js.map +1 -1
  237. package/dist/cmd/project/template-flow.d.ts.map +1 -1
  238. package/dist/cmd/project/template-flow.js +2 -1
  239. package/dist/cmd/project/template-flow.js.map +1 -1
  240. package/dist/config.d.ts +8 -0
  241. package/dist/config.d.ts.map +1 -1
  242. package/dist/domain.d.ts +3 -2
  243. package/dist/domain.d.ts.map +1 -1
  244. package/dist/domain.js +87 -21
  245. package/dist/domain.js.map +1 -1
  246. package/dist/types.d.ts +10 -2
  247. package/dist/types.d.ts.map +1 -1
  248. package/dist/types.js +3 -2
  249. package/dist/types.js.map +1 -1
  250. package/dist/version-check.d.ts.map +1 -1
  251. package/dist/version-check.js +18 -3
  252. package/dist/version-check.js.map +1 -1
  253. package/package.json +6 -6
  254. package/src/auth.ts +7 -0
  255. package/src/cache/resource-region.ts +4 -1
  256. package/src/cmd/ai/claude-code/install.ts +0 -3
  257. package/src/cmd/build/vite/public-asset-path-plugin.ts +18 -4
  258. package/src/cmd/cloud/deploy.ts +1 -0
  259. package/src/cmd/cloud/email/create.ts +70 -0
  260. package/src/cmd/cloud/email/delete.ts +53 -0
  261. package/src/cmd/cloud/email/destination/delete.ts +65 -0
  262. package/src/cmd/cloud/email/destination/index.ts +15 -0
  263. package/src/cmd/cloud/email/destination/list.ts +46 -0
  264. package/src/cmd/cloud/email/destination/schemas.ts +9 -0
  265. package/src/cmd/cloud/email/destination/url.ts +75 -0
  266. package/src/cmd/cloud/email/get.ts +52 -0
  267. package/src/cmd/cloud/email/inbound/get.ts +53 -0
  268. package/src/cmd/cloud/email/inbound/index.ts +13 -0
  269. package/src/cmd/cloud/email/inbound/list.ts +50 -0
  270. package/src/cmd/cloud/email/inbound/schemas.ts +11 -0
  271. package/src/cmd/cloud/email/index.ts +29 -0
  272. package/src/cmd/cloud/email/list.ts +44 -0
  273. package/src/cmd/cloud/email/outbound/get.ts +54 -0
  274. package/src/cmd/cloud/email/outbound/index.ts +13 -0
  275. package/src/cmd/cloud/email/outbound/list.ts +50 -0
  276. package/src/cmd/cloud/email/outbound/schemas.ts +15 -0
  277. package/src/cmd/cloud/email/send.ts +91 -0
  278. package/src/cmd/cloud/email/util.ts +89 -0
  279. package/src/cmd/cloud/index.ts +8 -0
  280. package/src/cmd/cloud/region-lookup.ts +58 -2
  281. package/src/cmd/cloud/sandbox/snapshot/build.ts +59 -55
  282. package/src/cmd/cloud/sandbox/snapshot/generate.ts +5 -1
  283. package/src/cmd/cloud/schedule/create.ts +83 -0
  284. package/src/cmd/cloud/schedule/delete.ts +43 -0
  285. package/src/cmd/cloud/schedule/delivery/get.ts +85 -0
  286. package/src/cmd/cloud/schedule/delivery/index.ts +24 -0
  287. package/src/cmd/cloud/schedule/delivery/list.ts +82 -0
  288. package/src/cmd/cloud/schedule/destination/create.ts +110 -0
  289. package/src/cmd/cloud/schedule/destination/delete.ts +46 -0
  290. package/src/cmd/cloud/schedule/destination/get.ts +66 -0
  291. package/src/cmd/cloud/schedule/destination/index.ts +27 -0
  292. package/src/cmd/cloud/schedule/destination/list.ts +72 -0
  293. package/src/cmd/cloud/schedule/get.ts +92 -0
  294. package/src/cmd/cloud/schedule/index.ts +36 -0
  295. package/src/cmd/cloud/schedule/list.ts +78 -0
  296. package/src/cmd/cloud/schedule/update.ts +74 -0
  297. package/src/cmd/cloud/schedule/util.ts +34 -0
  298. package/src/cmd/cloud/task/create.ts +124 -0
  299. package/src/cmd/cloud/task/get.ts +138 -0
  300. package/src/cmd/cloud/task/index.ts +34 -0
  301. package/src/cmd/cloud/task/list.ts +191 -0
  302. package/src/cmd/cloud/task/update.ts +123 -0
  303. package/src/cmd/cloud/task/util.ts +74 -0
  304. package/src/cmd/cloud/webhook/create.ts +66 -0
  305. package/src/cmd/cloud/webhook/delete.ts +57 -0
  306. package/src/cmd/cloud/webhook/deliveries.ts +149 -0
  307. package/src/cmd/cloud/webhook/destinations.ts +274 -0
  308. package/src/cmd/cloud/webhook/get.ts +59 -0
  309. package/src/cmd/cloud/webhook/index.ts +46 -0
  310. package/src/cmd/cloud/webhook/list.ts +82 -0
  311. package/src/cmd/cloud/webhook/receipts.ts +157 -0
  312. package/src/cmd/cloud/webhook/util.ts +35 -0
  313. package/src/cmd/project/add/domain.ts +10 -4
  314. package/src/cmd/project/domain/check.ts +16 -5
  315. package/src/cmd/project/template-flow.ts +2 -1
  316. package/src/domain.ts +96 -21
  317. package/src/types.ts +3 -1
  318. package/src/version-check.ts +22 -3
@@ -0,0 +1,78 @@
1
+ import { z } from 'zod';
2
+ import { createCommand } from '../../../types';
3
+ import * as tui from '../../../tui';
4
+ import { createScheduleAdapter } from './util';
5
+ import { getCommand } from '../../../command-prefix';
6
+
7
+ const ScheduleListResponseSchema = z.object({
8
+ schedules: z.array(
9
+ z.object({
10
+ id: z.string(),
11
+ created_at: z.string(),
12
+ updated_at: z.string(),
13
+ created_by: z.string(),
14
+ name: z.string(),
15
+ description: z.string().nullable(),
16
+ expression: z.string(),
17
+ due_date: z.string(),
18
+ })
19
+ ),
20
+ total: z.number(),
21
+ });
22
+
23
+ export const listSubcommand = createCommand({
24
+ name: 'list',
25
+ aliases: ['ls'],
26
+ description: 'List schedules',
27
+ tags: ['read-only', 'fast', 'requires-auth'],
28
+ requires: { auth: true, region: true },
29
+ optional: { project: true },
30
+ idempotent: true,
31
+ examples: [
32
+ { command: getCommand('cloud schedule list'), description: 'List schedules' },
33
+ { command: getCommand('cloud schedule list --limit 20'), description: 'List 20 schedules' },
34
+ ],
35
+ schema: {
36
+ options: z.object({
37
+ limit: z.coerce.number().min(0).optional().describe('Maximum number of schedules'),
38
+ offset: z.coerce.number().min(0).optional().describe('Pagination offset'),
39
+ }),
40
+ response: ScheduleListResponseSchema,
41
+ },
42
+
43
+ async handler(ctx) {
44
+ const { opts, options } = ctx;
45
+ const schedule = createScheduleAdapter(ctx);
46
+ const result = await schedule.list({ limit: opts.limit, offset: opts.offset });
47
+
48
+ if (!options.json) {
49
+ if (result.schedules.length === 0) {
50
+ tui.info('No schedules found');
51
+ } else {
52
+ tui.table(
53
+ result.schedules.map((item: {
54
+ id: string;
55
+ created_at: string;
56
+ updated_at: string;
57
+ created_by: string;
58
+ name: string;
59
+ description: string | null;
60
+ expression: string;
61
+ due_date: string;
62
+ }) => ({
63
+ Name: item.name,
64
+ ID: item.id,
65
+ Expression: item.expression,
66
+ 'Next Due': item.due_date,
67
+ Created: new Date(item.created_at).toLocaleString(),
68
+ })),
69
+ ['Name', 'ID', 'Expression', 'Next Due', 'Created']
70
+ );
71
+ }
72
+ }
73
+
74
+ return result;
75
+ },
76
+ });
77
+
78
+ export default listSubcommand;
@@ -0,0 +1,74 @@
1
+ import { z } from 'zod';
2
+ import { createCommand } from '../../../types';
3
+ import * as tui from '../../../tui';
4
+ import { createScheduleAdapter } from './util';
5
+ import { getCommand } from '../../../command-prefix';
6
+
7
+ const ScheduleUpdateResponseSchema = z.object({
8
+ schedule: z.object({
9
+ id: z.string(),
10
+ created_at: z.string(),
11
+ updated_at: z.string(),
12
+ created_by: z.string(),
13
+ name: z.string(),
14
+ description: z.string().nullable(),
15
+ expression: z.string(),
16
+ due_date: z.string(),
17
+ }),
18
+ });
19
+
20
+ export const updateSubcommand = createCommand({
21
+ name: 'update',
22
+ description: 'Update a schedule',
23
+ tags: ['mutating', 'requires-auth'],
24
+ requires: { auth: true, region: true },
25
+ optional: { project: true },
26
+ examples: [
27
+ {
28
+ command: getCommand("cloud schedule update sched_abc123 --expression '*/5 * * * *'"),
29
+ description: 'Update schedule expression',
30
+ },
31
+ ],
32
+ schema: {
33
+ args: z.object({
34
+ schedule_id: z.string().min(1).describe('Schedule ID'),
35
+ }),
36
+ options: z.object({
37
+ name: z.string().optional().describe('Schedule name'),
38
+ expression: z.string().optional().describe('Cron expression'),
39
+ description: z.string().optional().describe('Schedule description'),
40
+ }),
41
+ response: ScheduleUpdateResponseSchema,
42
+ },
43
+
44
+ async handler(ctx) {
45
+ const { args, opts, options } = ctx;
46
+ const schedule = createScheduleAdapter(ctx);
47
+ const result = await schedule.update(args.schedule_id, {
48
+ name: opts.name,
49
+ expression: opts.expression,
50
+ description: opts.description,
51
+ });
52
+
53
+ if (!options.json) {
54
+ tui.success(`Updated schedule: ${result.schedule.name}`);
55
+ tui.table(
56
+ [
57
+ {
58
+ Name: result.schedule.name,
59
+ ID: result.schedule.id,
60
+ Expression: result.schedule.expression,
61
+ Description: result.schedule.description ?? '-',
62
+ Updated: new Date(result.schedule.updated_at).toLocaleString(),
63
+ },
64
+ ],
65
+ undefined,
66
+ { layout: 'vertical' }
67
+ );
68
+ }
69
+
70
+ return result;
71
+ },
72
+ });
73
+
74
+ export default updateSubcommand;
@@ -0,0 +1,34 @@
1
+ import { ScheduleService, type Logger } from '@agentuity/core';
2
+ import { createServerFetchAdapter } from '@agentuity/server';
3
+ import type { AuthData, Config, GlobalOptions, ProjectConfig } from '../../../types';
4
+ import { getCatalystUrl } from '../../../catalyst';
5
+ import * as tui from '../../../tui';
6
+
7
+ export function createScheduleAdapter(
8
+ ctx: {
9
+ logger: Logger;
10
+ auth: AuthData;
11
+ region: string;
12
+ project?: ProjectConfig;
13
+ config: Config | null;
14
+ options: GlobalOptions;
15
+ },
16
+ explicitOrgId?: string
17
+ ) {
18
+ const orgId =
19
+ explicitOrgId ??
20
+ ctx.project?.orgId ??
21
+ ctx.options.orgId ??
22
+ (process.env.AGENTUITY_CLOUD_ORG_ID || ctx.config?.preferences?.orgId);
23
+ if (!orgId) {
24
+ tui.fatal(
25
+ 'Organization ID is required. Either run from a project directory or use --org-id flag.'
26
+ );
27
+ }
28
+ const adapter = createServerFetchAdapter(
29
+ { headers: { Authorization: `Bearer ${ctx.auth.apiKey}`, 'x-agentuity-orgid': orgId } },
30
+ ctx.logger
31
+ );
32
+ const baseUrl = getCatalystUrl(ctx.region);
33
+ return new ScheduleService(baseUrl, adapter);
34
+ }
@@ -0,0 +1,124 @@
1
+ import { z } from 'zod';
2
+ import { createCommand } from '../../../types';
3
+ import * as tui from '../../../tui';
4
+ import { createStorageAdapter, parseMetadataFlag, cacheTaskId } from './util';
5
+ import { getCommand } from '../../../command-prefix';
6
+ import type { TaskPriority, TaskStatus, TaskType } from '@agentuity/core';
7
+
8
+ const TaskCreateResponseSchema = z.object({
9
+ success: z.boolean().describe('Whether the operation succeeded'),
10
+ task: z.object({
11
+ id: z.string().describe('Task ID'),
12
+ title: z.string().describe('Task title'),
13
+ type: z.string().describe('Task type'),
14
+ status: z.string().describe('Task status'),
15
+ priority: z.string().describe('Task priority'),
16
+ created_at: z.string().describe('Creation timestamp'),
17
+ }),
18
+ durationMs: z.number().describe('Operation duration in milliseconds'),
19
+ });
20
+
21
+ export const createSubcommand = createCommand({
22
+ name: 'create',
23
+ aliases: ['new', 'add'],
24
+ description: 'Create a new task',
25
+ tags: ['mutating', 'slow', 'requires-auth'],
26
+ requires: { auth: true },
27
+ optional: { project: true },
28
+ examples: [
29
+ {
30
+ command: getCommand('cloud task create "Fix login bug" --type bug --created-id agent_001'),
31
+ description: 'Create a bug task',
32
+ },
33
+ {
34
+ command: getCommand(
35
+ 'cloud task create "Add dark mode" --type feature --created-id agent_001 --priority high --description "Implement dark mode toggle"'
36
+ ),
37
+ description: 'Create a feature with priority and description',
38
+ },
39
+ {
40
+ command: getCommand(
41
+ 'cloud task create "Q1 Planning" --type epic --created-id agent_001 --metadata \'{"team":"engineering"}\''
42
+ ),
43
+ description: 'Create an epic with metadata',
44
+ },
45
+ ],
46
+ schema: {
47
+ args: z.object({
48
+ title: z.string().min(1).describe('the task title'),
49
+ }),
50
+ options: z.object({
51
+ type: z.enum(['epic', 'feature', 'enhancement', 'bug', 'task']).describe('the task type'),
52
+ createdId: z.string().min(1).describe('the ID of the creator (agent or user)'),
53
+ description: z.string().optional().describe('task description'),
54
+ priority: z
55
+ .enum(['high', 'medium', 'low', 'none'])
56
+ .optional()
57
+ .describe('task priority (default: none)'),
58
+ status: z
59
+ .enum(['open', 'in_progress', 'closed'])
60
+ .optional()
61
+ .describe('initial task status (default: open)'),
62
+ parentId: z.string().optional().describe('parent task ID for subtasks'),
63
+ assignedId: z.string().optional().describe('ID of the assigned agent or user'),
64
+ metadata: z.string().optional().describe('JSON metadata object'),
65
+ }),
66
+ response: TaskCreateResponseSchema,
67
+ },
68
+
69
+ async handler(ctx) {
70
+ const { args, opts, options } = ctx;
71
+ const started = Date.now();
72
+ const storage = await createStorageAdapter(ctx);
73
+
74
+ const metadata = parseMetadataFlag(opts.metadata);
75
+
76
+ const task = await storage.create({
77
+ title: args.title,
78
+ type: opts.type as TaskType,
79
+ created_id: opts.createdId,
80
+ description: opts.description,
81
+ priority: opts.priority as TaskPriority,
82
+ status: opts.status as TaskStatus,
83
+ parent_id: opts.parentId,
84
+ assigned_id: opts.assignedId,
85
+ metadata,
86
+ });
87
+
88
+ const durationMs = Date.now() - started;
89
+ await cacheTaskId(ctx, task.id);
90
+
91
+ if (!options.json) {
92
+ tui.success(`Task created: ${tui.bold(task.id)}`);
93
+
94
+ const tableData: Record<string, string> = {
95
+ Title: task.title,
96
+ Type: task.type,
97
+ Status: task.status,
98
+ Priority: task.priority,
99
+ Created: new Date(task.created_at).toLocaleString(),
100
+ };
101
+
102
+ if (task.description) {
103
+ tableData['Description'] = task.description;
104
+ }
105
+
106
+ tui.table([tableData], Object.keys(tableData), { layout: 'vertical', padStart: ' ' });
107
+ }
108
+
109
+ return {
110
+ success: true,
111
+ task: {
112
+ id: task.id,
113
+ title: task.title,
114
+ type: task.type,
115
+ status: task.status,
116
+ priority: task.priority,
117
+ created_at: task.created_at,
118
+ },
119
+ durationMs,
120
+ };
121
+ },
122
+ });
123
+
124
+ export default createSubcommand;
@@ -0,0 +1,138 @@
1
+ import { z } from 'zod';
2
+ import { createCommand } from '../../../types';
3
+ import * as tui from '../../../tui';
4
+ import { createStorageAdapter, cacheTaskId } from './util';
5
+ import { getCommand } from '../../../command-prefix';
6
+
7
+ const TaskGetResponseSchema = z.object({
8
+ success: z.boolean().describe('Whether the operation succeeded'),
9
+ task: z.object({
10
+ id: z.string().describe('Task ID'),
11
+ title: z.string().describe('Task title'),
12
+ description: z.string().optional().describe('Task description'),
13
+ type: z.string().describe('Task type'),
14
+ status: z.string().describe('Task status'),
15
+ priority: z.string().describe('Task priority'),
16
+ parent_id: z.string().optional().describe('Parent task ID'),
17
+ assigned_id: z.string().optional().describe('Assigned agent or user ID'),
18
+ created_id: z.string().describe('Creator ID'),
19
+ closed_id: z.string().optional().describe('Closer ID'),
20
+ metadata: z.record(z.string(), z.unknown()).optional().describe('Task metadata'),
21
+ created_at: z.string().describe('Creation timestamp'),
22
+ updated_at: z.string().describe('Last update timestamp'),
23
+ open_date: z.string().optional().describe('Date task was opened'),
24
+ in_progress_date: z.string().optional().describe('Date task moved to in-progress'),
25
+ closed_date: z.string().optional().describe('Date task was closed'),
26
+ }),
27
+ durationMs: z.number().describe('Operation duration in milliseconds'),
28
+ });
29
+
30
+ export const getSubcommand = createCommand({
31
+ name: 'get',
32
+ aliases: ['show', 'info'],
33
+ description: 'Get details of a task by ID',
34
+ tags: ['read-only', 'slow', 'requires-auth'],
35
+ idempotent: true,
36
+ requires: { auth: true },
37
+ optional: { project: true },
38
+ examples: [
39
+ {
40
+ command: getCommand('cloud task get task_abc123'),
41
+ description: 'Get task details',
42
+ },
43
+ {
44
+ command: getCommand('cloud task get task_abc123 --json'),
45
+ description: 'Get task details as JSON',
46
+ },
47
+ ],
48
+ schema: {
49
+ args: z.object({
50
+ id: z.string().min(1).describe('the task ID to get'),
51
+ }),
52
+ response: TaskGetResponseSchema,
53
+ },
54
+
55
+ async handler(ctx) {
56
+ const { args, options } = ctx;
57
+ const started = Date.now();
58
+ const storage = await createStorageAdapter(ctx);
59
+
60
+ const task = await storage.get(args.id);
61
+ const durationMs = Date.now() - started;
62
+
63
+ if (!task) {
64
+ tui.fatal(`Task not found: ${args.id}`);
65
+ }
66
+
67
+ await cacheTaskId(ctx, task.id);
68
+
69
+ if (!options.json) {
70
+ const tableData: Record<string, string> = {
71
+ ID: task.id,
72
+ Title: task.title,
73
+ Type: task.type,
74
+ Status: task.status,
75
+ Priority: task.priority,
76
+ };
77
+
78
+ if (task.description) {
79
+ tableData['Description'] = task.description;
80
+ }
81
+
82
+ tableData['Creator'] = task.created_id;
83
+
84
+ if (task.assigned_id) {
85
+ tableData['Assigned'] = task.assigned_id;
86
+ }
87
+ if (task.parent_id) {
88
+ tableData['Parent'] = task.parent_id;
89
+ }
90
+ if (task.closed_id) {
91
+ tableData['Closed By'] = task.closed_id;
92
+ }
93
+
94
+ tableData['Created'] = new Date(task.created_at).toLocaleString();
95
+ tableData['Updated'] = new Date(task.updated_at).toLocaleString();
96
+
97
+ if (task.open_date) {
98
+ tableData['Opened'] = new Date(task.open_date).toLocaleString();
99
+ }
100
+ if (task.in_progress_date) {
101
+ tableData['In Progress'] = new Date(task.in_progress_date).toLocaleString();
102
+ }
103
+ if (task.closed_date) {
104
+ tableData['Closed'] = new Date(task.closed_date).toLocaleString();
105
+ }
106
+ if (task.metadata && Object.keys(task.metadata).length > 0) {
107
+ tableData['Metadata'] = JSON.stringify(task.metadata);
108
+ }
109
+
110
+ tui.table([tableData], Object.keys(tableData), { layout: 'vertical', padStart: ' ' });
111
+ }
112
+
113
+ return {
114
+ success: true,
115
+ task: {
116
+ id: task.id,
117
+ title: task.title,
118
+ description: task.description,
119
+ type: task.type,
120
+ status: task.status,
121
+ priority: task.priority,
122
+ parent_id: task.parent_id,
123
+ assigned_id: task.assigned_id,
124
+ created_id: task.created_id,
125
+ closed_id: task.closed_id,
126
+ metadata: task.metadata,
127
+ created_at: task.created_at,
128
+ updated_at: task.updated_at,
129
+ open_date: task.open_date,
130
+ in_progress_date: task.in_progress_date,
131
+ closed_date: task.closed_date,
132
+ },
133
+ durationMs,
134
+ };
135
+ },
136
+ });
137
+
138
+ export default getSubcommand;
@@ -0,0 +1,34 @@
1
+ import { createCommand } from '../../../types';
2
+ import { getSubcommand } from './get';
3
+ import { createSubcommand } from './create';
4
+ import { updateSubcommand } from './update';
5
+ import { listSubcommand } from './list';
6
+ import { getCommand } from '../../../command-prefix';
7
+
8
+ export const taskCommand = createCommand({
9
+ name: 'task',
10
+ description: 'Manage tasks for your projects',
11
+ tags: ['requires-auth', 'slow'],
12
+ examples: [
13
+ {
14
+ command: getCommand('cloud task get task_abc123'),
15
+ description: 'Get task details',
16
+ },
17
+ {
18
+ command: getCommand('cloud task create "Fix bug" --type bug --created-id agent_001'),
19
+ description: 'Create a new bug task',
20
+ },
21
+ {
22
+ command: getCommand('cloud task list --status open'),
23
+ description: 'List open tasks',
24
+ },
25
+ {
26
+ command: getCommand('cloud task update task_abc123 --status in_progress'),
27
+ description: 'Update task status',
28
+ },
29
+ ],
30
+ subcommands: [getSubcommand, createSubcommand, updateSubcommand, listSubcommand],
31
+ requires: { auth: true },
32
+ });
33
+
34
+ export default taskCommand;
@@ -0,0 +1,191 @@
1
+ import { z } from 'zod';
2
+ import { createCommand } from '../../../types';
3
+ import * as tui from '../../../tui';
4
+ import { createStorageAdapter } from './util';
5
+ import { getCommand } from '../../../command-prefix';
6
+ import type { TaskPriority, TaskStatus, TaskType, Task } from '@agentuity/core';
7
+
8
+ const TaskListResponseSchema = z.object({
9
+ success: z.boolean().describe('Whether the operation succeeded'),
10
+ tasks: z.array(
11
+ z.object({
12
+ id: z.string(),
13
+ title: z.string(),
14
+ type: z.string(),
15
+ status: z.string(),
16
+ priority: z.string(),
17
+ assigned_id: z.string().optional(),
18
+ created_at: z.string(),
19
+ updated_at: z.string(),
20
+ })
21
+ ),
22
+ total: z.number().describe('Total number of matching tasks'),
23
+ limit: z.number().describe('Page size'),
24
+ offset: z.number().describe('Page offset'),
25
+ durationMs: z.number().describe('Operation duration in milliseconds'),
26
+ });
27
+
28
+ const PRIORITY_COLORS: Record<string, (s: string) => string> = {
29
+ high: tui.colorError,
30
+ medium: tui.colorWarning,
31
+ low: tui.colorInfo,
32
+ none: tui.muted,
33
+ };
34
+
35
+ const STATUS_COLORS: Record<string, (s: string) => string> = {
36
+ open: tui.colorSuccess,
37
+ in_progress: tui.colorWarning,
38
+ closed: tui.muted,
39
+ };
40
+
41
+ function formatPriority(p: string): string {
42
+ const colorFn = PRIORITY_COLORS[p] ?? tui.muted;
43
+ return colorFn(p);
44
+ }
45
+
46
+ function formatStatus(s: string): string {
47
+ const colorFn = STATUS_COLORS[s] ?? tui.muted;
48
+ return colorFn(s);
49
+ }
50
+
51
+ function truncate(s: string, max: number): string {
52
+ if (s.length <= max) return s;
53
+ return `${s.slice(0, max - 1)}…`;
54
+ }
55
+
56
+ export const listSubcommand = createCommand({
57
+ name: 'list',
58
+ aliases: ['ls'],
59
+ description: 'List tasks with optional filtering and sorting',
60
+ tags: ['read-only', 'slow', 'requires-auth'],
61
+ requires: { auth: true },
62
+ optional: { project: true },
63
+ idempotent: true,
64
+ pagination: {
65
+ supported: true,
66
+ defaultLimit: 50,
67
+ maxLimit: 100,
68
+ parameters: { limit: 'limit', offset: 'offset' },
69
+ },
70
+ examples: [
71
+ {
72
+ command: getCommand('cloud task list'),
73
+ description: 'List all tasks',
74
+ },
75
+ {
76
+ command: getCommand('cloud task list --status open --priority high'),
77
+ description: 'List open high-priority tasks',
78
+ },
79
+ {
80
+ command: getCommand('cloud task list --type bug --sort created_at --order asc'),
81
+ description: 'List bugs sorted by oldest first',
82
+ },
83
+ {
84
+ command: getCommand('cloud task list --assigned-id agent_001 --limit 10'),
85
+ description: 'List first 10 tasks assigned to an agent',
86
+ },
87
+ ],
88
+ schema: {
89
+ options: z.object({
90
+ status: z.enum(['open', 'in_progress', 'closed']).optional().describe('filter by status'),
91
+ type: z
92
+ .enum(['epic', 'feature', 'enhancement', 'bug', 'task'])
93
+ .optional()
94
+ .describe('filter by type'),
95
+ priority: z
96
+ .enum(['high', 'medium', 'low', 'none'])
97
+ .optional()
98
+ .describe('filter by priority'),
99
+ assignedId: z.string().optional().describe('filter by assigned agent or user ID'),
100
+ parentId: z.string().optional().describe('filter by parent task ID'),
101
+ sort: z
102
+ .enum([
103
+ 'created_at',
104
+ 'updated_at',
105
+ 'priority',
106
+ 'status',
107
+ 'title',
108
+ 'type',
109
+ 'open_date',
110
+ 'in_progress_date',
111
+ 'closed_date',
112
+ ])
113
+ .optional()
114
+ .describe('field to sort by (default: created_at)'),
115
+ order: z.enum(['asc', 'desc']).optional().describe('sort order (default: desc)'),
116
+ limit: z.coerce.number().optional().describe('max results to return (default: 50)'),
117
+ offset: z.coerce.number().optional().describe('offset for pagination'),
118
+ }),
119
+ response: TaskListResponseSchema,
120
+ },
121
+
122
+ async handler(ctx) {
123
+ const { opts, options } = ctx;
124
+ const started = Date.now();
125
+ const storage = await createStorageAdapter(ctx);
126
+
127
+ const result = await storage.list({
128
+ status: opts.status as TaskStatus | undefined,
129
+ type: opts.type as TaskType | undefined,
130
+ priority: opts.priority as TaskPriority | undefined,
131
+ assigned_id: opts.assignedId,
132
+ parent_id: opts.parentId,
133
+ sort: opts.sort,
134
+ order: opts.order,
135
+ limit: opts.limit,
136
+ offset: opts.offset,
137
+ });
138
+
139
+ const durationMs = Date.now() - started;
140
+
141
+ if (!options.json) {
142
+ if (result.tasks.length === 0) {
143
+ tui.info('No tasks found');
144
+ } else {
145
+ const tableData = result.tasks.map((task: Task) => ({
146
+ ID: tui.muted(truncate(task.id, 28)),
147
+ Title: truncate(task.title, 40),
148
+ Type: task.type,
149
+ Status: formatStatus(task.status),
150
+ Priority: formatPriority(task.priority),
151
+ Assigned: task.assigned_id ?? tui.muted('—'),
152
+ Updated: new Date(task.updated_at).toLocaleDateString(),
153
+ }));
154
+
155
+ tui.table(tableData, [
156
+ { name: 'ID', alignment: 'left' },
157
+ { name: 'Title', alignment: 'left' },
158
+ { name: 'Type', alignment: 'left' },
159
+ { name: 'Status', alignment: 'left' },
160
+ { name: 'Priority', alignment: 'left' },
161
+ { name: 'Assigned', alignment: 'left' },
162
+ { name: 'Updated', alignment: 'left' },
163
+ ]);
164
+
165
+ tui.info(
166
+ `\nShowing ${result.tasks.length} of ${result.total} ${tui.plural(result.total, 'task', 'tasks')} (${durationMs.toFixed(1)}ms)`
167
+ );
168
+ }
169
+ }
170
+
171
+ return {
172
+ success: true,
173
+ tasks: result.tasks.map((task: Task) => ({
174
+ id: task.id,
175
+ title: task.title,
176
+ type: task.type,
177
+ status: task.status,
178
+ priority: task.priority,
179
+ assigned_id: task.assigned_id,
180
+ created_at: task.created_at,
181
+ updated_at: task.updated_at,
182
+ })),
183
+ total: result.total,
184
+ limit: result.limit,
185
+ offset: result.offset,
186
+ durationMs,
187
+ };
188
+ },
189
+ });
190
+
191
+ export default listSubcommand;