@agentuity/cli 1.0.23 → 1.0.25

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 (309) hide show
  1. package/dist/cache/index.d.ts +1 -0
  2. package/dist/cache/index.d.ts.map +1 -1
  3. package/dist/cache/index.js +1 -0
  4. package/dist/cache/index.js.map +1 -1
  5. package/dist/cache/user-cache.d.ts +20 -0
  6. package/dist/cache/user-cache.d.ts.map +1 -0
  7. package/dist/cache/user-cache.js +79 -0
  8. package/dist/cache/user-cache.js.map +1 -0
  9. package/dist/cmd/auth/logout.d.ts.map +1 -1
  10. package/dist/cmd/auth/logout.js +3 -1
  11. package/dist/cmd/auth/logout.js.map +1 -1
  12. package/dist/cmd/build/entry-generator.d.ts +4 -0
  13. package/dist/cmd/build/entry-generator.d.ts.map +1 -1
  14. package/dist/cmd/build/entry-generator.js +18 -3
  15. package/dist/cmd/build/entry-generator.js.map +1 -1
  16. package/dist/cmd/build/vite/bun-dev-server.d.ts +1 -0
  17. package/dist/cmd/build/vite/bun-dev-server.d.ts.map +1 -1
  18. package/dist/cmd/build/vite/bun-dev-server.js +11 -9
  19. package/dist/cmd/build/vite/bun-dev-server.js.map +1 -1
  20. package/dist/cmd/cloud/db/index.d.ts.map +1 -1
  21. package/dist/cmd/cloud/db/index.js +2 -0
  22. package/dist/cmd/cloud/db/index.js.map +1 -1
  23. package/dist/cmd/cloud/db/stats.d.ts +3 -0
  24. package/dist/cmd/cloud/db/stats.d.ts.map +1 -0
  25. package/dist/cmd/cloud/db/stats.js +66 -0
  26. package/dist/cmd/cloud/db/stats.js.map +1 -0
  27. package/dist/cmd/cloud/email/create.d.ts.map +1 -1
  28. package/dist/cmd/cloud/email/create.js +15 -10
  29. package/dist/cmd/cloud/email/create.js.map +1 -1
  30. package/dist/cmd/cloud/email/delete.js +1 -1
  31. package/dist/cmd/cloud/email/delete.js.map +1 -1
  32. package/dist/cmd/cloud/email/destination/delete.d.ts.map +1 -1
  33. package/dist/cmd/cloud/email/destination/delete.js +6 -2
  34. package/dist/cmd/cloud/email/destination/delete.js.map +1 -1
  35. package/dist/cmd/cloud/email/destination/list.js +1 -1
  36. package/dist/cmd/cloud/email/destination/list.js.map +1 -1
  37. package/dist/cmd/cloud/email/destination/url.d.ts.map +1 -1
  38. package/dist/cmd/cloud/email/destination/url.js +5 -4
  39. package/dist/cmd/cloud/email/destination/url.js.map +1 -1
  40. package/dist/cmd/cloud/email/get.d.ts.map +1 -1
  41. package/dist/cmd/cloud/email/get.js +2 -4
  42. package/dist/cmd/cloud/email/get.js.map +1 -1
  43. package/dist/cmd/cloud/email/inbound/get.d.ts.map +1 -1
  44. package/dist/cmd/cloud/email/inbound/get.js +2 -3
  45. package/dist/cmd/cloud/email/inbound/get.js.map +1 -1
  46. package/dist/cmd/cloud/email/inbound/list.d.ts.map +1 -1
  47. package/dist/cmd/cloud/email/inbound/list.js +1 -3
  48. package/dist/cmd/cloud/email/inbound/list.js.map +1 -1
  49. package/dist/cmd/cloud/email/inbound/schemas.d.ts +3 -1
  50. package/dist/cmd/cloud/email/inbound/schemas.d.ts.map +1 -1
  51. package/dist/cmd/cloud/email/inbound/schemas.js +3 -1
  52. package/dist/cmd/cloud/email/inbound/schemas.js.map +1 -1
  53. package/dist/cmd/cloud/email/index.d.ts.map +1 -1
  54. package/dist/cmd/cloud/email/index.js +2 -0
  55. package/dist/cmd/cloud/email/index.js.map +1 -1
  56. package/dist/cmd/cloud/email/list.d.ts.map +1 -1
  57. package/dist/cmd/cloud/email/list.js +9 -2
  58. package/dist/cmd/cloud/email/list.js.map +1 -1
  59. package/dist/cmd/cloud/email/outbound/get.js +4 -4
  60. package/dist/cmd/cloud/email/outbound/get.js.map +1 -1
  61. package/dist/cmd/cloud/email/outbound/list.js +3 -3
  62. package/dist/cmd/cloud/email/outbound/list.js.map +1 -1
  63. package/dist/cmd/cloud/email/outbound/schemas.d.ts +2 -2
  64. package/dist/cmd/cloud/email/outbound/schemas.js +2 -2
  65. package/dist/cmd/cloud/email/outbound/schemas.js.map +1 -1
  66. package/dist/cmd/cloud/email/send.d.ts.map +1 -1
  67. package/dist/cmd/cloud/email/send.js +9 -15
  68. package/dist/cmd/cloud/email/send.js.map +1 -1
  69. package/dist/cmd/cloud/email/stats.d.ts +3 -0
  70. package/dist/cmd/cloud/email/stats.d.ts.map +1 -0
  71. package/dist/cmd/cloud/email/stats.js +65 -0
  72. package/dist/cmd/cloud/email/stats.js.map +1 -0
  73. package/dist/cmd/cloud/email/util.d.ts +4 -7
  74. package/dist/cmd/cloud/email/util.d.ts.map +1 -1
  75. package/dist/cmd/cloud/email/util.js +8 -24
  76. package/dist/cmd/cloud/email/util.js.map +1 -1
  77. package/dist/cmd/cloud/index.d.ts.map +1 -1
  78. package/dist/cmd/cloud/index.js +2 -0
  79. package/dist/cmd/cloud/index.js.map +1 -1
  80. package/dist/cmd/cloud/queue/get.js +4 -4
  81. package/dist/cmd/cloud/queue/get.js.map +1 -1
  82. package/dist/cmd/cloud/queue/receive.d.ts.map +1 -1
  83. package/dist/cmd/cloud/queue/receive.js +11 -7
  84. package/dist/cmd/cloud/queue/receive.js.map +1 -1
  85. package/dist/cmd/cloud/queue/stats.js +3 -3
  86. package/dist/cmd/cloud/queue/stats.js.map +1 -1
  87. package/dist/cmd/cloud/sandbox/checkpoint/create.d.ts +3 -0
  88. package/dist/cmd/cloud/sandbox/checkpoint/create.d.ts.map +1 -0
  89. package/dist/cmd/cloud/sandbox/checkpoint/create.js +71 -0
  90. package/dist/cmd/cloud/sandbox/checkpoint/create.js.map +1 -0
  91. package/dist/cmd/cloud/sandbox/checkpoint/delete.d.ts +3 -0
  92. package/dist/cmd/cloud/sandbox/checkpoint/delete.d.ts.map +1 -0
  93. package/dist/cmd/cloud/sandbox/checkpoint/delete.js +78 -0
  94. package/dist/cmd/cloud/sandbox/checkpoint/delete.js.map +1 -0
  95. package/dist/cmd/cloud/sandbox/checkpoint/index.d.ts +2 -0
  96. package/dist/cmd/cloud/sandbox/checkpoint/index.d.ts.map +1 -0
  97. package/dist/cmd/cloud/sandbox/checkpoint/index.js +33 -0
  98. package/dist/cmd/cloud/sandbox/checkpoint/index.js.map +1 -0
  99. package/dist/cmd/cloud/sandbox/checkpoint/list.d.ts +3 -0
  100. package/dist/cmd/cloud/sandbox/checkpoint/list.d.ts.map +1 -0
  101. package/dist/cmd/cloud/sandbox/checkpoint/list.js +72 -0
  102. package/dist/cmd/cloud/sandbox/checkpoint/list.js.map +1 -0
  103. package/dist/cmd/cloud/sandbox/checkpoint/restore.d.ts +3 -0
  104. package/dist/cmd/cloud/sandbox/checkpoint/restore.d.ts.map +1 -0
  105. package/dist/cmd/cloud/sandbox/checkpoint/restore.js +61 -0
  106. package/dist/cmd/cloud/sandbox/checkpoint/restore.js.map +1 -0
  107. package/dist/cmd/cloud/sandbox/get.d.ts.map +1 -1
  108. package/dist/cmd/cloud/sandbox/get.js +5 -3
  109. package/dist/cmd/cloud/sandbox/get.js.map +1 -1
  110. package/dist/cmd/cloud/sandbox/index.d.ts.map +1 -1
  111. package/dist/cmd/cloud/sandbox/index.js +4 -0
  112. package/dist/cmd/cloud/sandbox/index.js.map +1 -1
  113. package/dist/cmd/cloud/sandbox/snapshot/build.d.ts.map +1 -1
  114. package/dist/cmd/cloud/sandbox/snapshot/build.js +13 -10
  115. package/dist/cmd/cloud/sandbox/snapshot/build.js.map +1 -1
  116. package/dist/cmd/cloud/sandbox/snapshot/get.js +3 -3
  117. package/dist/cmd/cloud/sandbox/snapshot/get.js.map +1 -1
  118. package/dist/cmd/cloud/sandbox/stats.d.ts +3 -0
  119. package/dist/cmd/cloud/sandbox/stats.d.ts.map +1 -0
  120. package/dist/cmd/cloud/sandbox/stats.js +72 -0
  121. package/dist/cmd/cloud/sandbox/stats.js.map +1 -0
  122. package/dist/cmd/cloud/schedule/create.d.ts.map +1 -1
  123. package/dist/cmd/cloud/schedule/create.js +3 -4
  124. package/dist/cmd/cloud/schedule/create.js.map +1 -1
  125. package/dist/cmd/cloud/schedule/delete.d.ts.map +1 -1
  126. package/dist/cmd/cloud/schedule/delete.js +6 -4
  127. package/dist/cmd/cloud/schedule/delete.js.map +1 -1
  128. package/dist/cmd/cloud/schedule/delivery/get.d.ts.map +1 -1
  129. package/dist/cmd/cloud/schedule/delivery/get.js +3 -4
  130. package/dist/cmd/cloud/schedule/delivery/get.js.map +1 -1
  131. package/dist/cmd/cloud/schedule/delivery/list.d.ts.map +1 -1
  132. package/dist/cmd/cloud/schedule/delivery/list.js +2 -3
  133. package/dist/cmd/cloud/schedule/delivery/list.js.map +1 -1
  134. package/dist/cmd/cloud/schedule/destination/create.d.ts.map +1 -1
  135. package/dist/cmd/cloud/schedule/destination/create.js +10 -5
  136. package/dist/cmd/cloud/schedule/destination/create.js.map +1 -1
  137. package/dist/cmd/cloud/schedule/destination/delete.d.ts.map +1 -1
  138. package/dist/cmd/cloud/schedule/destination/delete.js +2 -3
  139. package/dist/cmd/cloud/schedule/destination/delete.js.map +1 -1
  140. package/dist/cmd/cloud/schedule/destination/get.js +15 -13
  141. package/dist/cmd/cloud/schedule/destination/get.js.map +1 -1
  142. package/dist/cmd/cloud/schedule/destination/index.d.ts.map +1 -1
  143. package/dist/cmd/cloud/schedule/destination/index.js.map +1 -1
  144. package/dist/cmd/cloud/schedule/destination/list.d.ts.map +1 -1
  145. package/dist/cmd/cloud/schedule/destination/list.js +13 -9
  146. package/dist/cmd/cloud/schedule/destination/list.js.map +1 -1
  147. package/dist/cmd/cloud/schedule/get.d.ts.map +1 -1
  148. package/dist/cmd/cloud/schedule/get.js +19 -12
  149. package/dist/cmd/cloud/schedule/get.js.map +1 -1
  150. package/dist/cmd/cloud/schedule/index.d.ts.map +1 -1
  151. package/dist/cmd/cloud/schedule/index.js +6 -1
  152. package/dist/cmd/cloud/schedule/index.js.map +1 -1
  153. package/dist/cmd/cloud/schedule/list.d.ts.map +1 -1
  154. package/dist/cmd/cloud/schedule/list.js +2 -3
  155. package/dist/cmd/cloud/schedule/list.js.map +1 -1
  156. package/dist/cmd/cloud/schedule/stats.d.ts +3 -0
  157. package/dist/cmd/cloud/schedule/stats.d.ts.map +1 -0
  158. package/dist/cmd/cloud/schedule/stats.js +64 -0
  159. package/dist/cmd/cloud/schedule/stats.js.map +1 -0
  160. package/dist/cmd/cloud/schedule/update.js +5 -5
  161. package/dist/cmd/cloud/schedule/update.js.map +1 -1
  162. package/dist/cmd/cloud/schedule/util.d.ts +4 -5
  163. package/dist/cmd/cloud/schedule/util.d.ts.map +1 -1
  164. package/dist/cmd/cloud/schedule/util.js +6 -7
  165. package/dist/cmd/cloud/schedule/util.js.map +1 -1
  166. package/dist/cmd/cloud/services/index.d.ts +3 -0
  167. package/dist/cmd/cloud/services/index.d.ts.map +1 -0
  168. package/dist/cmd/cloud/services/index.js +10 -0
  169. package/dist/cmd/cloud/services/index.js.map +1 -0
  170. package/dist/cmd/cloud/services/stats.d.ts +3 -0
  171. package/dist/cmd/cloud/services/stats.d.ts.map +1 -0
  172. package/dist/cmd/cloud/services/stats.js +153 -0
  173. package/dist/cmd/cloud/services/stats.js.map +1 -0
  174. package/dist/cmd/cloud/stream/index.d.ts.map +1 -1
  175. package/dist/cmd/cloud/stream/index.js +8 -1
  176. package/dist/cmd/cloud/stream/index.js.map +1 -1
  177. package/dist/cmd/cloud/stream/stats.d.ts +3 -0
  178. package/dist/cmd/cloud/stream/stats.d.ts.map +1 -0
  179. package/dist/cmd/cloud/stream/stats.js +64 -0
  180. package/dist/cmd/cloud/stream/stats.js.map +1 -0
  181. package/dist/cmd/cloud/task/attachment.d.ts +2 -0
  182. package/dist/cmd/cloud/task/attachment.d.ts.map +1 -0
  183. package/dist/cmd/cloud/task/attachment.js +393 -0
  184. package/dist/cmd/cloud/task/attachment.js.map +1 -0
  185. package/dist/cmd/cloud/task/create.d.ts.map +1 -1
  186. package/dist/cmd/cloud/task/create.js +125 -5
  187. package/dist/cmd/cloud/task/create.js.map +1 -1
  188. package/dist/cmd/cloud/task/get.d.ts.map +1 -1
  189. package/dist/cmd/cloud/task/get.js +33 -14
  190. package/dist/cmd/cloud/task/get.js.map +1 -1
  191. package/dist/cmd/cloud/task/index.d.ts.map +1 -1
  192. package/dist/cmd/cloud/task/index.js +14 -1
  193. package/dist/cmd/cloud/task/index.js.map +1 -1
  194. package/dist/cmd/cloud/task/list.d.ts.map +1 -1
  195. package/dist/cmd/cloud/task/list.js +32 -17
  196. package/dist/cmd/cloud/task/list.js.map +1 -1
  197. package/dist/cmd/cloud/task/stats.d.ts +3 -0
  198. package/dist/cmd/cloud/task/stats.d.ts.map +1 -0
  199. package/dist/cmd/cloud/task/stats.js +68 -0
  200. package/dist/cmd/cloud/task/stats.js.map +1 -0
  201. package/dist/cmd/cloud/task/update.d.ts.map +1 -1
  202. package/dist/cmd/cloud/task/update.js +0 -1
  203. package/dist/cmd/cloud/task/update.js.map +1 -1
  204. package/dist/cmd/cloud/task/util.d.ts +4 -7
  205. package/dist/cmd/cloud/task/util.d.ts.map +1 -1
  206. package/dist/cmd/cloud/task/util.js +6 -12
  207. package/dist/cmd/cloud/task/util.js.map +1 -1
  208. package/dist/cmd/cloud/vector/get.d.ts.map +1 -1
  209. package/dist/cmd/cloud/vector/get.js +17 -12
  210. package/dist/cmd/cloud/vector/get.js.map +1 -1
  211. package/dist/cmd/cloud/vector/stats.d.ts.map +1 -1
  212. package/dist/cmd/cloud/vector/stats.js +10 -7
  213. package/dist/cmd/cloud/vector/stats.js.map +1 -1
  214. package/dist/cmd/cloud/webhook/create.d.ts.map +1 -1
  215. package/dist/cmd/cloud/webhook/create.js +6 -1
  216. package/dist/cmd/cloud/webhook/create.js.map +1 -1
  217. package/dist/cmd/cloud/webhook/deliveries.d.ts.map +1 -1
  218. package/dist/cmd/cloud/webhook/deliveries.js +12 -3
  219. package/dist/cmd/cloud/webhook/deliveries.js.map +1 -1
  220. package/dist/cmd/cloud/webhook/destinations.d.ts.map +1 -1
  221. package/dist/cmd/cloud/webhook/destinations.js +19 -9
  222. package/dist/cmd/cloud/webhook/destinations.js.map +1 -1
  223. package/dist/cmd/cloud/webhook/get.js +2 -2
  224. package/dist/cmd/cloud/webhook/get.js.map +1 -1
  225. package/dist/cmd/cloud/webhook/receipts.d.ts.map +1 -1
  226. package/dist/cmd/cloud/webhook/receipts.js +19 -3
  227. package/dist/cmd/cloud/webhook/receipts.js.map +1 -1
  228. package/dist/cmd/dev/index.d.ts.map +1 -1
  229. package/dist/cmd/dev/index.js +80 -34
  230. package/dist/cmd/dev/index.js.map +1 -1
  231. package/dist/tui.d.ts +4 -0
  232. package/dist/tui.d.ts.map +1 -1
  233. package/dist/tui.js +8 -0
  234. package/dist/tui.js.map +1 -1
  235. package/package.json +6 -6
  236. package/src/cache/index.ts +2 -0
  237. package/src/cache/user-cache.ts +93 -0
  238. package/src/cmd/auth/logout.ts +3 -1
  239. package/src/cmd/build/entry-generator.ts +34 -4
  240. package/src/cmd/build/vite/bun-dev-server.ts +21 -9
  241. package/src/cmd/cloud/db/index.ts +2 -0
  242. package/src/cmd/cloud/db/stats.ts +72 -0
  243. package/src/cmd/cloud/email/create.ts +17 -10
  244. package/src/cmd/cloud/email/delete.ts +1 -1
  245. package/src/cmd/cloud/email/destination/delete.ts +6 -2
  246. package/src/cmd/cloud/email/destination/list.ts +1 -1
  247. package/src/cmd/cloud/email/destination/url.ts +5 -4
  248. package/src/cmd/cloud/email/get.ts +2 -4
  249. package/src/cmd/cloud/email/inbound/get.ts +2 -3
  250. package/src/cmd/cloud/email/inbound/list.ts +1 -3
  251. package/src/cmd/cloud/email/inbound/schemas.ts +3 -1
  252. package/src/cmd/cloud/email/index.ts +2 -0
  253. package/src/cmd/cloud/email/list.ts +9 -2
  254. package/src/cmd/cloud/email/outbound/get.ts +4 -4
  255. package/src/cmd/cloud/email/outbound/list.ts +3 -3
  256. package/src/cmd/cloud/email/outbound/schemas.ts +2 -2
  257. package/src/cmd/cloud/email/send.ts +9 -15
  258. package/src/cmd/cloud/email/stats.ts +73 -0
  259. package/src/cmd/cloud/email/util.ts +11 -31
  260. package/src/cmd/cloud/index.ts +2 -0
  261. package/src/cmd/cloud/queue/get.ts +4 -4
  262. package/src/cmd/cloud/queue/receive.ts +15 -7
  263. package/src/cmd/cloud/queue/stats.ts +3 -3
  264. package/src/cmd/cloud/sandbox/checkpoint/create.ts +85 -0
  265. package/src/cmd/cloud/sandbox/checkpoint/delete.ts +93 -0
  266. package/src/cmd/cloud/sandbox/checkpoint/index.ts +33 -0
  267. package/src/cmd/cloud/sandbox/checkpoint/list.ts +83 -0
  268. package/src/cmd/cloud/sandbox/checkpoint/restore.ts +72 -0
  269. package/src/cmd/cloud/sandbox/get.ts +6 -3
  270. package/src/cmd/cloud/sandbox/index.ts +4 -0
  271. package/src/cmd/cloud/sandbox/snapshot/build.ts +34 -15
  272. package/src/cmd/cloud/sandbox/snapshot/get.ts +3 -3
  273. package/src/cmd/cloud/sandbox/stats.ts +82 -0
  274. package/src/cmd/cloud/schedule/create.ts +3 -4
  275. package/src/cmd/cloud/schedule/delete.ts +6 -4
  276. package/src/cmd/cloud/schedule/delivery/get.ts +3 -4
  277. package/src/cmd/cloud/schedule/delivery/list.ts +17 -16
  278. package/src/cmd/cloud/schedule/destination/create.ts +19 -7
  279. package/src/cmd/cloud/schedule/destination/delete.ts +2 -3
  280. package/src/cmd/cloud/schedule/destination/get.ts +17 -17
  281. package/src/cmd/cloud/schedule/destination/index.ts +3 -1
  282. package/src/cmd/cloud/schedule/destination/list.ts +22 -15
  283. package/src/cmd/cloud/schedule/get.ts +30 -20
  284. package/src/cmd/cloud/schedule/index.ts +6 -1
  285. package/src/cmd/cloud/schedule/list.ts +20 -19
  286. package/src/cmd/cloud/schedule/stats.ts +72 -0
  287. package/src/cmd/cloud/schedule/update.ts +5 -5
  288. package/src/cmd/cloud/schedule/util.ts +14 -20
  289. package/src/cmd/cloud/services/index.ts +11 -0
  290. package/src/cmd/cloud/services/stats.ts +199 -0
  291. package/src/cmd/cloud/stream/index.ts +8 -1
  292. package/src/cmd/cloud/stream/stats.ts +70 -0
  293. package/src/cmd/cloud/task/attachment.ts +432 -0
  294. package/src/cmd/cloud/task/create.ts +130 -5
  295. package/src/cmd/cloud/task/get.ts +35 -16
  296. package/src/cmd/cloud/task/index.ts +14 -1
  297. package/src/cmd/cloud/task/list.ts +32 -17
  298. package/src/cmd/cloud/task/stats.ts +74 -0
  299. package/src/cmd/cloud/task/update.ts +0 -1
  300. package/src/cmd/cloud/task/util.ts +14 -28
  301. package/src/cmd/cloud/vector/get.ts +16 -11
  302. package/src/cmd/cloud/vector/stats.ts +10 -8
  303. package/src/cmd/cloud/webhook/create.ts +6 -1
  304. package/src/cmd/cloud/webhook/deliveries.ts +15 -3
  305. package/src/cmd/cloud/webhook/destinations.ts +21 -9
  306. package/src/cmd/cloud/webhook/get.ts +2 -2
  307. package/src/cmd/cloud/webhook/receipts.ts +16 -3
  308. package/src/cmd/dev/index.ts +91 -48
  309. package/src/tui.ts +9 -0
@@ -4,6 +4,13 @@ import * as tui from '../../../tui';
4
4
  import { createStorageAdapter, cacheTaskId } from './util';
5
5
  import { getCommand } from '../../../command-prefix';
6
6
 
7
+ const EntityRefSchema = z
8
+ .object({
9
+ id: z.string(),
10
+ name: z.string(),
11
+ })
12
+ .optional();
13
+
7
14
  const TaskGetResponseSchema = z.object({
8
15
  success: z.boolean().describe('Whether the operation succeeded'),
9
16
  task: z.object({
@@ -14,15 +21,17 @@ const TaskGetResponseSchema = z.object({
14
21
  status: z.string().describe('Task status'),
15
22
  priority: z.string().describe('Task priority'),
16
23
  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'),
24
+ creator: EntityRefSchema.describe('Creator'),
25
+ assignee: EntityRefSchema.describe('Assignee'),
26
+ closer: EntityRefSchema.describe('Closer'),
27
+ project: EntityRefSchema.describe('Project'),
20
28
  metadata: z.record(z.string(), z.unknown()).optional().describe('Task metadata'),
21
29
  created_at: z.string().describe('Creation timestamp'),
22
30
  updated_at: z.string().describe('Last update timestamp'),
23
31
  open_date: z.string().optional().describe('Date task was opened'),
24
32
  in_progress_date: z.string().optional().describe('Date task moved to in-progress'),
25
33
  closed_date: z.string().optional().describe('Date task was closed'),
34
+ cancelled_date: z.string().optional().describe('Date task was cancelled'),
26
35
  }),
27
36
  durationMs: z.number().describe('Operation duration in milliseconds'),
28
37
  });
@@ -34,7 +43,6 @@ export const getSubcommand = createCommand({
34
43
  tags: ['read-only', 'slow', 'requires-auth'],
35
44
  idempotent: true,
36
45
  requires: { auth: true },
37
- optional: { project: true },
38
46
  examples: [
39
47
  {
40
48
  command: getCommand('cloud task get task_abc123'),
@@ -79,16 +87,20 @@ export const getSubcommand = createCommand({
79
87
  tableData['Description'] = task.description;
80
88
  }
81
89
 
82
- tableData['Creator'] = task.created_id;
83
-
84
- if (task.assigned_id) {
85
- tableData['Assigned'] = task.assigned_id;
90
+ if (task.creator) {
91
+ tableData['Creator'] = `${task.creator.name} (${task.creator.id})`;
92
+ }
93
+ if (task.assignee) {
94
+ tableData['Assigned'] = `${task.assignee.name} (${task.assignee.id})`;
95
+ }
96
+ if (task.project) {
97
+ tableData['Project'] = `${task.project.name} (${task.project.id})`;
86
98
  }
87
99
  if (task.parent_id) {
88
100
  tableData['Parent'] = task.parent_id;
89
101
  }
90
- if (task.closed_id) {
91
- tableData['Closed By'] = task.closed_id;
102
+ if (task.closer) {
103
+ tableData['Closed By'] = `${task.closer.name} (${task.closer.id})`;
92
104
  }
93
105
 
94
106
  tableData['Created'] = new Date(task.created_at).toLocaleString();
@@ -103,11 +115,16 @@ export const getSubcommand = createCommand({
103
115
  if (task.closed_date) {
104
116
  tableData['Closed'] = new Date(task.closed_date).toLocaleString();
105
117
  }
106
- if (task.metadata && Object.keys(task.metadata).length > 0) {
107
- tableData['Metadata'] = JSON.stringify(task.metadata);
118
+ if (task.cancelled_date) {
119
+ tableData['Cancelled'] = new Date(task.cancelled_date).toLocaleString();
108
120
  }
109
-
110
121
  tui.table([tableData], Object.keys(tableData), { layout: 'vertical', padStart: ' ' });
122
+
123
+ if (task.metadata && Object.keys(task.metadata).length > 0) {
124
+ tui.newline();
125
+ tui.header('Metadata');
126
+ tui.json(task.metadata);
127
+ }
111
128
  }
112
129
 
113
130
  return {
@@ -120,15 +137,17 @@ export const getSubcommand = createCommand({
120
137
  status: task.status,
121
138
  priority: task.priority,
122
139
  parent_id: task.parent_id,
123
- assigned_id: task.assigned_id,
124
- created_id: task.created_id,
125
- closed_id: task.closed_id,
140
+ creator: task.creator,
141
+ assignee: task.assignee,
142
+ closer: task.closer,
143
+ project: task.project,
126
144
  metadata: task.metadata,
127
145
  created_at: task.created_at,
128
146
  updated_at: task.updated_at,
129
147
  open_date: task.open_date,
130
148
  in_progress_date: task.in_progress_date,
131
149
  closed_date: task.closed_date,
150
+ cancelled_date: task.cancelled_date,
132
151
  },
133
152
  durationMs,
134
153
  };
@@ -3,6 +3,8 @@ import { getSubcommand } from './get';
3
3
  import { createSubcommand } from './create';
4
4
  import { updateSubcommand } from './update';
5
5
  import { listSubcommand } from './list';
6
+ import { statsSubcommand } from './stats';
7
+ import { attachmentSubcommand } from './attachment';
6
8
  import { getCommand } from '../../../command-prefix';
7
9
 
8
10
  export const taskCommand = createCommand({
@@ -26,8 +28,19 @@ export const taskCommand = createCommand({
26
28
  command: getCommand('cloud task update task_abc123 --status in_progress'),
27
29
  description: 'Update task status',
28
30
  },
31
+ {
32
+ command: getCommand('cloud task attachment upload task_abc123 ./report.pdf'),
33
+ description: 'Upload a file attachment to a task',
34
+ },
35
+ ],
36
+ subcommands: [
37
+ getSubcommand,
38
+ createSubcommand,
39
+ updateSubcommand,
40
+ listSubcommand,
41
+ statsSubcommand,
42
+ attachmentSubcommand,
29
43
  ],
30
- subcommands: [getSubcommand, createSubcommand, updateSubcommand, listSubcommand],
31
44
  requires: { auth: true },
32
45
  });
33
46
 
@@ -14,7 +14,24 @@ const TaskListResponseSchema = z.object({
14
14
  type: z.string(),
15
15
  status: z.string(),
16
16
  priority: z.string(),
17
- assigned_id: z.string().optional(),
17
+ creator: z
18
+ .object({
19
+ id: z.string(),
20
+ name: z.string(),
21
+ })
22
+ .optional(),
23
+ assignee: z
24
+ .object({
25
+ id: z.string(),
26
+ name: z.string(),
27
+ })
28
+ .optional(),
29
+ project: z
30
+ .object({
31
+ id: z.string(),
32
+ name: z.string(),
33
+ })
34
+ .optional(),
18
35
  created_at: z.string(),
19
36
  updated_at: z.string(),
20
37
  })
@@ -35,7 +52,9 @@ const PRIORITY_COLORS: Record<string, (s: string) => string> = {
35
52
  const STATUS_COLORS: Record<string, (s: string) => string> = {
36
53
  open: tui.colorSuccess,
37
54
  in_progress: tui.colorWarning,
55
+ done: tui.colorInfo,
38
56
  closed: tui.muted,
57
+ cancelled: tui.muted,
39
58
  };
40
59
 
41
60
  function formatPriority(p: string): string {
@@ -59,7 +78,6 @@ export const listSubcommand = createCommand({
59
78
  description: 'List tasks with optional filtering and sorting',
60
79
  tags: ['read-only', 'slow', 'requires-auth'],
61
80
  requires: { auth: true },
62
- optional: { project: true },
63
81
  idempotent: true,
64
82
  pagination: {
65
83
  supported: true,
@@ -87,7 +105,10 @@ export const listSubcommand = createCommand({
87
105
  ],
88
106
  schema: {
89
107
  options: z.object({
90
- status: z.enum(['open', 'in_progress', 'closed']).optional().describe('filter by status'),
108
+ status: z
109
+ .enum(['open', 'in_progress', 'done', 'closed', 'cancelled'])
110
+ .optional()
111
+ .describe('filter by status'),
91
112
  type: z
92
113
  .enum(['epic', 'feature', 'enhancement', 'bug', 'task'])
93
114
  .optional()
@@ -99,17 +120,7 @@ export const listSubcommand = createCommand({
99
120
  assignedId: z.string().optional().describe('filter by assigned agent or user ID'),
100
121
  parentId: z.string().optional().describe('filter by parent task ID'),
101
122
  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
- ])
123
+ .enum(['created_at', 'updated_at', 'priority'])
113
124
  .optional()
114
125
  .describe('field to sort by (default: created_at)'),
115
126
  order: z.enum(['asc', 'desc']).optional().describe('sort order (default: desc)'),
@@ -148,7 +159,8 @@ export const listSubcommand = createCommand({
148
159
  Type: task.type,
149
160
  Status: formatStatus(task.status),
150
161
  Priority: formatPriority(task.priority),
151
- Assigned: task.assigned_id ?? tui.muted('—'),
162
+ Creator: task.creator?.name ? truncate(task.creator.name, 20) : tui.muted('—'),
163
+ Assigned: task.assignee?.name ? truncate(task.assignee.name, 20) : tui.muted('—'),
152
164
  Updated: new Date(task.updated_at).toLocaleDateString(),
153
165
  }));
154
166
 
@@ -158,12 +170,13 @@ export const listSubcommand = createCommand({
158
170
  { name: 'Type', alignment: 'left' },
159
171
  { name: 'Status', alignment: 'left' },
160
172
  { name: 'Priority', alignment: 'left' },
173
+ { name: 'Creator', alignment: 'left' },
161
174
  { name: 'Assigned', alignment: 'left' },
162
175
  { name: 'Updated', alignment: 'left' },
163
176
  ]);
164
177
 
165
178
  tui.info(
166
- `\nShowing ${result.tasks.length} of ${result.total} ${tui.plural(result.total, 'task', 'tasks')} (${durationMs.toFixed(1)}ms)`
179
+ `Showing ${result.tasks.length} of ${result.total} ${tui.plural(result.total, 'task', 'tasks')} (${durationMs.toFixed(1)}ms)`
167
180
  );
168
181
  }
169
182
  }
@@ -176,7 +189,9 @@ export const listSubcommand = createCommand({
176
189
  type: task.type,
177
190
  status: task.status,
178
191
  priority: task.priority,
179
- assigned_id: task.assigned_id,
192
+ creator: task.creator,
193
+ assignee: task.assignee,
194
+ project: task.project,
180
195
  created_at: task.created_at,
181
196
  updated_at: task.updated_at,
182
197
  })),
@@ -0,0 +1,74 @@
1
+ import { z } from 'zod';
2
+ import { createCommand } from '../../../types';
3
+ import * as tui from '../../../tui';
4
+ import { getGlobalCatalystAPIClient } from '../../../config';
5
+ import { getCommand } from '../../../command-prefix';
6
+ import { getServiceStats, type ServiceStatsData } from '@agentuity/server';
7
+
8
+ function formatNumber(n: number): string {
9
+ if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`;
10
+ if (n >= 1_000) return `${(n / 1_000).toFixed(1)}K`;
11
+ return String(n);
12
+ }
13
+
14
+ function displayStats(data: ServiceStatsData): void {
15
+ const svc = data.services.task;
16
+ if (!svc) {
17
+ tui.info('No task data found.');
18
+ return;
19
+ }
20
+ tui.header('Task Statistics');
21
+ tui.newline();
22
+ console.log(` ${tui.muted('Total:')} ${formatNumber(svc.total)}`);
23
+ console.log(` ${tui.muted('Open:')} ${formatNumber(svc.open)}`);
24
+ console.log(` ${tui.muted('In Progress:')} ${formatNumber(svc.inProgress)}`);
25
+ console.log(` ${tui.muted('Done:')} ${formatNumber(svc.done)}`);
26
+ console.log(` ${tui.muted('Closed:')} ${formatNumber(svc.closed)}`);
27
+ console.log(` ${tui.muted('Cancelled:')} ${formatNumber(svc.cancelled)}`);
28
+ }
29
+
30
+ export const statsSubcommand = createCommand({
31
+ name: 'stats',
32
+ description: 'View task statistics',
33
+ tags: ['read-only', 'requires-auth'],
34
+ requires: { auth: true, org: true },
35
+ examples: [
36
+ {
37
+ command: getCommand('cloud task stats'),
38
+ description: 'View task statistics',
39
+ },
40
+ ],
41
+ schema: {
42
+ options: z.object({
43
+ start: z.string().optional().describe('Start time (ISO 8601)'),
44
+ end: z.string().optional().describe('End time (ISO 8601)'),
45
+ }),
46
+ },
47
+ idempotent: true,
48
+
49
+ async handler(ctx) {
50
+ const { opts, options } = ctx;
51
+ const client = await getGlobalCatalystAPIClient(ctx.logger, ctx.auth, ctx.config?.name);
52
+ const orgId = ctx.orgId ?? ctx.options.orgId ?? ctx.config?.preferences?.orgId;
53
+
54
+ if (!orgId) {
55
+ ctx.logger.fatal('Organization ID is required. Use --org-id or set a preferred org.');
56
+ return;
57
+ }
58
+
59
+ const data = await getServiceStats(client, orgId, {
60
+ service: 'task',
61
+ start: opts.start,
62
+ end: opts.end,
63
+ orgIdHeader: orgId,
64
+ });
65
+
66
+ if (!options.json) {
67
+ displayStats(data);
68
+ }
69
+
70
+ return data;
71
+ },
72
+ });
73
+
74
+ export default statsSubcommand;
@@ -24,7 +24,6 @@ export const updateSubcommand = createCommand({
24
24
  description: 'Update an existing task',
25
25
  tags: ['mutating', 'slow', 'requires-auth'],
26
26
  requires: { auth: true },
27
- optional: { project: true },
28
27
  examples: [
29
28
  {
30
29
  command: getCommand('cloud task update task_abc123 --status in_progress'),
@@ -1,31 +1,23 @@
1
1
  import { TaskStorageService, type Logger } from '@agentuity/core';
2
2
  import { createServerFetchAdapter } from '@agentuity/server';
3
- import type { AuthData, Config, GlobalOptions, ProjectConfig } from '../../../types';
3
+ import type { AuthData, Config, GlobalOptions } from '../../../types';
4
4
  import { getCatalystUrl } from '../../../catalyst';
5
5
  import { setResourceInfo } from '../../../cache';
6
6
  import { defaultProfileName, getDefaultRegion } from '../../../config';
7
7
  import * as tui from '../../../tui';
8
8
 
9
- export async function createStorageAdapter(
10
- ctx: {
11
- logger: Logger;
12
- auth: AuthData;
13
- region?: string;
14
- project?: ProjectConfig;
15
- config: Config | null;
16
- options: GlobalOptions;
17
- },
18
- explicitOrgId?: string
19
- ) {
9
+ export interface TaskContext {
10
+ logger: Logger;
11
+ auth: AuthData;
12
+ config: Config | null;
13
+ options: GlobalOptions;
14
+ }
15
+
16
+ export async function createStorageAdapter(ctx: TaskContext) {
20
17
  const orgId =
21
- explicitOrgId ??
22
- ctx.project?.orgId ??
23
- ctx.options.orgId ??
24
- (process.env.AGENTUITY_CLOUD_ORG_ID || ctx.config?.preferences?.orgId);
18
+ ctx.options.orgId ?? (process.env.AGENTUITY_CLOUD_ORG_ID || ctx.config?.preferences?.orgId);
25
19
  if (!orgId) {
26
- tui.fatal(
27
- 'Organization ID is required. Either run from a project directory or use --org-id flag.'
28
- );
20
+ tui.fatal('Organization ID is required. Use --org-id flag or set AGENTUITY_CLOUD_ORG_ID.');
29
21
  }
30
22
 
31
23
  const adapter = createServerFetchAdapter(
@@ -39,28 +31,22 @@ export async function createStorageAdapter(
39
31
  );
40
32
 
41
33
  // Task tenant DB is not regional — any Catalyst can serve the request.
42
- // Use provided region or fall back to default.
43
- const region =
44
- ctx.region ?? (await getDefaultRegion(ctx.config?.name ?? defaultProfileName, ctx.config));
34
+ const region = await getDefaultRegion(ctx.config?.name ?? defaultProfileName, ctx.config);
45
35
  const baseUrl = getCatalystUrl(region);
46
36
  return new TaskStorageService(baseUrl, adapter);
47
37
  }
48
38
 
49
39
  export async function cacheTaskId(
50
40
  ctx: {
51
- region?: string;
52
- project?: ProjectConfig;
53
41
  config: Config | null;
54
42
  options: GlobalOptions;
55
43
  },
56
44
  taskId: string
57
45
  ) {
58
46
  const profileName = ctx.config?.name ?? defaultProfileName;
59
- const region = ctx.region ?? (await getDefaultRegion(profileName, ctx.config));
47
+ const region = await getDefaultRegion(profileName, ctx.config);
60
48
  const orgId =
61
- ctx.project?.orgId ??
62
- ctx.options.orgId ??
63
- (process.env.AGENTUITY_CLOUD_ORG_ID || ctx.config?.preferences?.orgId);
49
+ ctx.options.orgId ?? (process.env.AGENTUITY_CLOUD_ORG_ID || ctx.config?.preferences?.orgId);
64
50
  await setResourceInfo('task', profileName, taskId, region, orgId);
65
51
  }
66
52
 
@@ -58,31 +58,36 @@ export const getSubcommand = createCommand({
58
58
  );
59
59
 
60
60
  const data = result.data;
61
- tui.info(` ID: ${data.id}`);
62
- tui.info(` Key: ${data.key}`);
61
+ const details: Record<string, unknown> = {
62
+ ID: data.id,
63
+ Key: data.key,
64
+ };
63
65
 
64
66
  if (data.similarity !== undefined) {
65
- tui.info(` Similarity: ${(data.similarity * 100).toFixed(1)}%`);
67
+ details.Similarity = `${(data.similarity * 100).toFixed(1)}%`;
66
68
  }
67
69
 
68
70
  if (data.document) {
69
- const docPreview =
71
+ details.Document =
70
72
  data.document.length > 200
71
73
  ? data.document.substring(0, 197) + '...'
72
74
  : data.document;
73
- tui.info(` Document: ${docPreview}`);
74
- }
75
-
76
- if (data.metadata && Object.keys(data.metadata).length > 0) {
77
- tui.info(` Metadata: ${JSON.stringify(data.metadata, null, 2)}`);
78
75
  }
79
76
 
80
77
  if (data.embeddings) {
81
- tui.info(` Embeddings: [${data.embeddings.length} dimensions]`);
78
+ details.Embeddings = `[${data.embeddings.length} dimensions]`;
82
79
  }
83
80
 
84
81
  if (data.expiresAt) {
85
- tui.info(` Expires: ${new Date(data.expiresAt).toLocaleString()}`);
82
+ details.Expires = new Date(data.expiresAt).toLocaleString();
83
+ }
84
+
85
+ tui.table([details], undefined, { layout: 'vertical' });
86
+
87
+ if (data.metadata && Object.keys(data.metadata).length > 0) {
88
+ tui.newline();
89
+ tui.header('Metadata');
90
+ tui.json(data.metadata);
86
91
  }
87
92
  } else {
88
93
  tui.warning(`Vector "${tui.bold(args.key)}" not found in ${tui.bold(args.namespace)}`);
@@ -85,24 +85,26 @@ export const statsSubcommand = createCommand({
85
85
  if (stats.count === 0 && stats.sum === 0) {
86
86
  tui.info(`Namespace ${tui.bold(args.name)} is empty or does not exist`);
87
87
  } else {
88
- tui.info(`Statistics for ${tui.bold(args.name)}:`);
89
- tui.info(` Vectors: ${stats.count}`);
88
+ tui.header(`Statistics for ${tui.bold(args.name)}`);
90
89
  const sizeDisplay =
91
90
  stats.sum < 1024 * 1024
92
91
  ? `${stats.sum.toLocaleString()} bytes`
93
92
  : `${(stats.sum / (1024 * 1024)).toFixed(2)} MB`;
94
- tui.info(` Total size: ${sizeDisplay}`);
95
-
93
+ const statsDetails: Record<string, unknown> = {
94
+ Vectors: stats.count,
95
+ 'Total size': sizeDisplay,
96
+ };
96
97
  if (stats.createdAt) {
97
- tui.info(` Created: ${new Date(stats.createdAt).toLocaleString()}`);
98
+ statsDetails.Created = new Date(stats.createdAt).toLocaleString();
98
99
  }
99
100
  if (stats.lastUsed) {
100
- tui.info(` Last used: ${new Date(stats.lastUsed).toLocaleString()}`);
101
+ statsDetails['Last used'] = new Date(stats.lastUsed).toLocaleString();
101
102
  }
103
+ tui.table([statsDetails], undefined, { layout: 'vertical' });
102
104
 
103
105
  if (stats.sampledResults && Object.keys(stats.sampledResults).length > 0) {
104
- tui.info('');
105
- tui.info(` Sample vectors (${Object.keys(stats.sampledResults).length}):`);
106
+ tui.newline();
107
+ tui.header(`Sample vectors (${Object.keys(stats.sampledResults).length})`);
106
108
 
107
109
  const tableData = Object.entries(stats.sampledResults).map(([key, item]) => {
108
110
  const docPreview = item.document
@@ -5,7 +5,12 @@ import { createWebhookAPIClient, getWebhookApiOptions } from './util';
5
5
  import { getCommand } from '../../../command-prefix';
6
6
  import { createWebhook, WebhookSchema } from '@agentuity/server';
7
7
 
8
- const WebhookCreateResponseSchema = WebhookSchema.pick({ id: true, name: true, url: true, created_at: true });
8
+ const WebhookCreateResponseSchema = WebhookSchema.pick({
9
+ id: true,
10
+ name: true,
11
+ url: true,
12
+ created_at: true,
13
+ });
9
14
 
10
15
  export const createSubcommand = createCommand({
11
16
  name: 'create',
@@ -18,6 +18,7 @@ const DeliveriesListResponseSchema = z.object({
18
18
  status: z.string(),
19
19
  retries: z.number(),
20
20
  webhook_destination_id: z.string(),
21
+ error: z.string().nullable().optional(),
21
22
  })
22
23
  ),
23
24
  });
@@ -73,8 +74,15 @@ const listDeliveriesSubcommand = createSubcommand({
73
74
  Status: d.status,
74
75
  Retries: d.retries,
75
76
  'Destination ID': d.webhook_destination_id,
77
+ ...(d.error != null ? { Error: d.error } : {}),
76
78
  }));
77
- tui.table(tableData, ['ID', 'Date', 'Status', 'Retries', 'Destination ID']);
79
+ const hasErrors = result.deliveries.some((d: WebhookDelivery) => d.error != null);
80
+ tui.table(
81
+ tableData,
82
+ hasErrors
83
+ ? ['ID', 'Date', 'Status', 'Retries', 'Destination ID', 'Error']
84
+ : ['ID', 'Date', 'Status', 'Retries', 'Destination ID']
85
+ );
78
86
  }
79
87
  }
80
88
 
@@ -85,6 +93,7 @@ const listDeliveriesSubcommand = createSubcommand({
85
93
  status: d.status,
86
94
  retries: d.retries,
87
95
  webhook_destination_id: d.webhook_destination_id,
96
+ ...(d.error != null ? { error: d.error } : {}),
88
97
  })),
89
98
  };
90
99
  },
@@ -120,8 +129,11 @@ const retryDeliverySubcommand = createSubcommand({
120
129
  );
121
130
 
122
131
  if (!options.json) {
123
- tui.success(`Retried delivery: ${delivery.id}`);
124
- console.log(` Status: ${delivery.status}`);
132
+ tui.success(`Retried delivery: ${tui.bold(delivery.id)}`);
133
+ tui.table([{ ID: delivery.id, Status: delivery.status }], ['ID', 'Status'], {
134
+ layout: 'vertical',
135
+ padStart: ' ',
136
+ });
125
137
  }
126
138
 
127
139
  return delivery;
@@ -57,13 +57,19 @@ const listDestinationsSubcommand = createSubcommand({
57
57
  if (destinations.length === 0) {
58
58
  tui.info('No destinations configured');
59
59
  } else {
60
- const tableData = destinations.map((d: WebhookDestination) => ({
61
- ID: d.id,
62
- Type: d.type,
63
- Config: JSON.stringify(d.config),
64
- Created: new Date(d.created_at).toLocaleString(),
65
- }));
66
- tui.table(tableData, ['ID', 'Type', 'Config', 'Created']);
60
+ const tableData = destinations.map((d: WebhookDestination) => {
61
+ const config =
62
+ d.type === 'url' && d.config && typeof d.config === 'object' && 'url' in d.config
63
+ ? String((d.config as Record<string, unknown>).url)
64
+ : JSON.stringify(d.config);
65
+ return {
66
+ ID: d.id,
67
+ Type: d.type,
68
+ URL: config,
69
+ Created: new Date(d.created_at).toLocaleString(),
70
+ };
71
+ });
72
+ tui.table(tableData, ['ID', 'Type', 'URL', 'Created']);
67
73
  }
68
74
  }
69
75
 
@@ -130,7 +136,7 @@ const createDestinationSubcommand = createCommand({
130
136
  examples: [
131
137
  {
132
138
  command: getCommand(
133
- 'cloud webhook destinations create url wh_abc123 --url https://example.com/webhook'
139
+ 'cloud webhook destinations create url wh_abc123 https://example.com/webhook'
134
140
  ),
135
141
  description: 'Create a URL destination',
136
142
  },
@@ -182,7 +188,13 @@ const updateDestinationSubcommand = createSubcommand({
182
188
 
183
189
  if (!options.json) {
184
190
  tui.success(`Updated destination: ${destination.id}`);
185
- console.log(` URL: ${JSON.stringify(destination.config)}`);
191
+ const url =
192
+ destination.config &&
193
+ typeof destination.config === 'object' &&
194
+ 'url' in destination.config
195
+ ? (destination.config as Record<string, unknown>).url
196
+ : JSON.stringify(destination.config);
197
+ console.log(` URL: ${url}`);
186
198
  }
187
199
 
188
200
  return destination;
@@ -46,8 +46,8 @@ export const getSubcommand = createCommand({
46
46
  }
47
47
 
48
48
  details['Created By'] = webhook.created_by;
49
- details.Created = new Date(webhook.created_at).toISOString();
50
- details.Updated = new Date(webhook.updated_at).toISOString();
49
+ details.Created = new Date(webhook.created_at).toLocaleString();
50
+ details.Updated = new Date(webhook.updated_at).toLocaleString();
51
51
 
52
52
  tui.table([details], undefined, { layout: 'vertical' });
53
53
  }
@@ -124,12 +124,25 @@ const getReceiptSubcommand = createSubcommand({
124
124
  tui.table([details], undefined, { layout: 'vertical' });
125
125
 
126
126
  tui.newline();
127
- tui.info('Headers');
127
+ tui.header('Headers');
128
128
  tui.json(receipt.headers);
129
129
 
130
130
  tui.newline();
131
- tui.info('Payload');
132
- tui.json(receipt.payload);
131
+ tui.header('Payload');
132
+ if (typeof receipt.payload === 'string') {
133
+ try {
134
+ const decoded = Buffer.from(receipt.payload, 'base64').toString('utf-8');
135
+ try {
136
+ tui.json(JSON.parse(decoded));
137
+ } catch {
138
+ console.log(decoded);
139
+ }
140
+ } catch {
141
+ tui.json(receipt.payload);
142
+ }
143
+ } else {
144
+ tui.json(receipt.payload);
145
+ }
133
146
  }
134
147
 
135
148
  return receipt;