@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
@@ -147,14 +147,17 @@ export const getSubcommand = createCommand({
147
147
  if (resourceParts.length > 0) {
148
148
  tableData['Resources'] = resourceParts.join(', ');
149
149
  }
150
- if (result.metadata && Object.keys(result.metadata).length > 0) {
151
- tableData['Metadata'] = JSON.stringify(result.metadata);
152
- }
153
150
  if (result.url) {
154
151
  tableData['URL'] = tui.link(result.url);
155
152
  }
156
153
 
157
154
  tui.table([tableData], Object.keys(tableData), { layout: 'vertical', padStart: ' ' });
155
+
156
+ if (result.metadata && Object.keys(result.metadata).length > 0) {
157
+ tui.newline();
158
+ tui.header('Metadata');
159
+ tui.json(result.metadata);
160
+ }
158
161
  }
159
162
 
160
163
  return {
@@ -18,6 +18,8 @@ import { uploadSubcommand } from './upload';
18
18
  import { envSubcommand } from './env';
19
19
  import { pauseSubcommand } from './pause';
20
20
  import { resumeSubcommand } from './resume';
21
+ import { checkpointCommand } from './checkpoint';
22
+ import { statsSubcommand } from './stats';
21
23
  import { getCommand } from '../../../command-prefix';
22
24
 
23
25
  export const command = createCommand({
@@ -59,6 +61,8 @@ export const command = createCommand({
59
61
  envSubcommand,
60
62
  pauseSubcommand,
61
63
  resumeSubcommand,
64
+ checkpointCommand,
65
+ statsSubcommand,
62
66
  ],
63
67
  requires: { auth: true, org: true },
64
68
  });
@@ -358,7 +358,9 @@ export const buildSubcommand = createCommand({
358
358
  description: 'Build using a custom build file',
359
359
  },
360
360
  {
361
- command: getCommand('cloud sandbox snapshot build . --env API_KEY=secret --tag production'),
361
+ command: getCommand(
362
+ 'cloud sandbox snapshot build . --env API_KEY=secret --tag production'
363
+ ),
362
364
  description: 'Build with environment variable substitution and custom tag',
363
365
  },
364
366
  {
@@ -379,7 +381,10 @@ export const buildSubcommand = createCommand({
379
381
  .string()
380
382
  .optional()
381
383
  .describe('Path to build file (defaults to agentuity-snapshot.[json|yaml|yml])'),
382
- env: z.array(z.string()).optional().describe('Environment variable substitution (KEY=VALUE)'),
384
+ env: z
385
+ .array(z.string())
386
+ .optional()
387
+ .describe('Environment variable substitution (KEY=VALUE)'),
383
388
  name: z.string().optional().describe('Snapshot name (overrides build file)'),
384
389
  tag: z.string().optional().describe('Snapshot tag (defaults to "latest")'),
385
390
  description: z.string().optional().describe('Snapshot description (overrides build file)'),
@@ -529,7 +534,9 @@ export const buildSubcommand = createCommand({
529
534
 
530
535
  if (opts.tag) {
531
536
  if (opts.tag.length > MAX_SNAPSHOT_TAG_LENGTH) {
532
- logger.fatal(`Invalid snapshot tag: must be at most ${MAX_SNAPSHOT_TAG_LENGTH} characters`);
537
+ logger.fatal(
538
+ `Invalid snapshot tag: must be at most ${MAX_SNAPSHOT_TAG_LENGTH} characters`
539
+ );
533
540
  }
534
541
  if (!SNAPSHOT_TAG_REGEX.test(opts.tag)) {
535
542
  logger.fatal(
@@ -576,7 +583,12 @@ export const buildSubcommand = createCommand({
576
583
  message: 'Validating apt dependencies...',
577
584
  type: 'simple',
578
585
  callback: async () => {
579
- return await validateAptDependencies(buildConfig.dependencies!, region, config, logger);
586
+ return await validateAptDependencies(
587
+ buildConfig.dependencies!,
588
+ region,
589
+ config,
590
+ logger
591
+ );
580
592
  },
581
593
  });
582
594
 
@@ -676,7 +688,7 @@ export const buildSubcommand = createCommand({
676
688
 
677
689
  if (buildConfig.dependencies && buildConfig.dependencies.length > 0) {
678
690
  console.log('');
679
- tui.info('Dependencies:');
691
+ tui.header('Dependencies');
680
692
  for (const dep of buildConfig.dependencies) {
681
693
  console.log(` ${tui.muted('•')} ${dep}`);
682
694
  }
@@ -684,7 +696,7 @@ export const buildSubcommand = createCommand({
684
696
 
685
697
  if (buildConfig.packages && buildConfig.packages.length > 0) {
686
698
  console.log('');
687
- tui.info('Packages (npm/bun):');
699
+ tui.header('Packages (npm/bun)');
688
700
  for (const pkg of buildConfig.packages) {
689
701
  console.log(` ${tui.muted('•')} ${pkg}`);
690
702
  }
@@ -692,7 +704,7 @@ export const buildSubcommand = createCommand({
692
704
 
693
705
  if (finalEnv && Object.keys(finalEnv).length > 0) {
694
706
  console.log('');
695
- tui.info('Environment:');
707
+ tui.header('Environment');
696
708
  for (const [envKey, envValue] of Object.entries(finalEnv)) {
697
709
  console.log(` ${tui.muted('•')} ${envKey}=${tui.maskSecret(envValue)}`);
698
710
  }
@@ -700,7 +712,7 @@ export const buildSubcommand = createCommand({
700
712
 
701
713
  if (fileList.length > 0) {
702
714
  console.log('');
703
- tui.info('Files:');
715
+ tui.header('Files');
704
716
  printFileTree(fileList);
705
717
  }
706
718
  }
@@ -890,7 +902,11 @@ export const buildSubcommand = createCommand({
890
902
  clearOnError: true,
891
903
  callback: async (updateProgress) => {
892
904
  const uploadFile = Bun.file(uploadPath);
893
- const progressStream = createProgressStream(uploadFile, uploadSize, updateProgress);
905
+ const progressStream = createProgressStream(
906
+ uploadFile,
907
+ uploadSize,
908
+ updateProgress
909
+ );
894
910
  await snapshotUpload(client, {
895
911
  snapshotId: initResult.snapshotId!,
896
912
  body: progressStream,
@@ -933,7 +949,10 @@ export const buildSubcommand = createCommand({
933
949
  'Malware Detected',
934
950
  `Your snapshot was rejected because it contains malware.\n\nVirus: ${virusName}\n\nPlease remove the infected files and try again.`
935
951
  );
936
- tui.fatal('Snapshot build failed due to malware detection', ErrorCode.MALWARE_DETECTED);
952
+ tui.fatal(
953
+ 'Snapshot build failed due to malware detection',
954
+ ErrorCode.MALWARE_DETECTED
955
+ );
937
956
  }
938
957
 
939
958
  throw err;
@@ -980,7 +999,7 @@ export const buildSubcommand = createCommand({
980
999
 
981
1000
  if (buildConfig.dependencies && buildConfig.dependencies.length > 0) {
982
1001
  console.log('');
983
- tui.info('Dependencies:');
1002
+ tui.header('Dependencies');
984
1003
  for (const dep of buildConfig.dependencies) {
985
1004
  console.log(` ${tui.muted('•')} ${dep}`);
986
1005
  }
@@ -988,7 +1007,7 @@ export const buildSubcommand = createCommand({
988
1007
 
989
1008
  if (buildConfig.packages && buildConfig.packages.length > 0) {
990
1009
  console.log('');
991
- tui.info('Packages (npm/bun):');
1010
+ tui.header('Packages (npm/bun)');
992
1011
  for (const pkg of buildConfig.packages) {
993
1012
  console.log(` ${tui.muted('•')} ${pkg}`);
994
1013
  }
@@ -996,7 +1015,7 @@ export const buildSubcommand = createCommand({
996
1015
 
997
1016
  if (finalEnv && Object.keys(finalEnv).length > 0) {
998
1017
  console.log('');
999
- tui.info('Environment:');
1018
+ tui.header('Environment');
1000
1019
  for (const [envKey, envValue] of Object.entries(finalEnv)) {
1001
1020
  console.log(` ${tui.muted('•')} ${envKey}=${tui.maskSecret(envValue)}`);
1002
1021
  }
@@ -1004,7 +1023,7 @@ export const buildSubcommand = createCommand({
1004
1023
 
1005
1024
  if (finalMetadata && Object.keys(finalMetadata).length > 0) {
1006
1025
  console.log('');
1007
- tui.info('Metadata:');
1026
+ tui.header('Metadata');
1008
1027
  for (const key of Object.keys(finalMetadata)) {
1009
1028
  console.log(` ${tui.muted('•')} ${key}=${finalMetadata[key]}`);
1010
1029
  }
@@ -1012,7 +1031,7 @@ export const buildSubcommand = createCommand({
1012
1031
 
1013
1032
  if (snapshot.files && snapshot.files.length > 0) {
1014
1033
  console.log('');
1015
- tui.info('Files:');
1034
+ tui.header('Files');
1016
1035
  printFileTree(snapshot.files);
1017
1036
  }
1018
1037
  }
@@ -138,7 +138,7 @@ export const getSubcommand = createCommand({
138
138
  Object.keys(snapshot.userMetadata).length > 0
139
139
  ) {
140
140
  console.log('');
141
- tui.info('Metadata:');
141
+ tui.header('Metadata');
142
142
  for (const [key, value] of Object.entries(snapshot.userMetadata)) {
143
143
  console.log(` ${tui.muted('•')} ${key}=${value}`);
144
144
  }
@@ -146,13 +146,13 @@ export const getSubcommand = createCommand({
146
146
 
147
147
  if (snapshot.files && snapshot.files.length > 0) {
148
148
  console.log('');
149
- tui.info('Files:');
149
+ tui.header('Files');
150
150
  printFileTree(snapshot.files);
151
151
  }
152
152
 
153
153
  if (activeSandboxes.length > 0) {
154
154
  console.log('');
155
- tui.info(`Attached Sandboxes (${activeSandboxes.length}):`);
155
+ tui.header(`Attached Sandboxes (${activeSandboxes.length}):`);
156
156
  printSandboxTree(activeSandboxes);
157
157
  }
158
158
  }
@@ -0,0 +1,82 @@
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 formatLatency(ms: number): string {
15
+ if (ms >= 1000) return `${(ms / 1000).toFixed(1)}s`;
16
+ return `${Math.round(ms)}ms`;
17
+ }
18
+
19
+ function displayStats(data: ServiceStatsData): void {
20
+ const svc = data.services.sandbox;
21
+ if (!svc) {
22
+ tui.info('No sandbox data found.');
23
+ return;
24
+ }
25
+ tui.header('Sandbox Statistics');
26
+ tui.newline();
27
+ console.log(
28
+ ` ${tui.muted('Active:')} ${formatNumber(svc.totalActive)} (${svc.running} running, ${svc.idle} idle, ${svc.creating} creating)`
29
+ );
30
+ console.log(` ${tui.muted('Executions:')} ${formatNumber(svc.totalExecutions)}`);
31
+ console.log(` ${tui.muted('CPU Time:')} ${formatLatency(svc.totalCpuTimeMs)}`);
32
+ console.log(` ${tui.muted('Memory:')} ${tui.formatBytes(svc.totalMemoryByteSec)}`);
33
+ console.log(
34
+ ` ${tui.muted('Network Out:')} ${tui.formatBytes(svc.totalNetworkEgressBytes)}`
35
+ );
36
+ }
37
+
38
+ export const statsSubcommand = createCommand({
39
+ name: 'stats',
40
+ description: 'View sandbox statistics',
41
+ tags: ['read-only', 'requires-auth'],
42
+ requires: { auth: true, org: true },
43
+ examples: [
44
+ {
45
+ command: getCommand('cloud sandbox stats'),
46
+ description: 'View sandbox statistics',
47
+ },
48
+ ],
49
+ schema: {
50
+ options: z.object({
51
+ start: z.string().optional().describe('Start time (ISO 8601)'),
52
+ end: z.string().optional().describe('End time (ISO 8601)'),
53
+ }),
54
+ },
55
+ idempotent: true,
56
+
57
+ async handler(ctx) {
58
+ const { opts, options } = ctx;
59
+ const client = await getGlobalCatalystAPIClient(ctx.logger, ctx.auth, ctx.config?.name);
60
+ const orgId = ctx.orgId ?? ctx.options.orgId ?? ctx.config?.preferences?.orgId;
61
+
62
+ if (!orgId) {
63
+ ctx.logger.fatal('Organization ID is required. Use --org-id or set a preferred org.');
64
+ return;
65
+ }
66
+
67
+ const data = await getServiceStats(client, orgId, {
68
+ service: 'sandbox',
69
+ start: opts.start,
70
+ end: opts.end,
71
+ orgIdHeader: orgId,
72
+ });
73
+
74
+ if (!options.json) {
75
+ displayStats(data);
76
+ }
77
+
78
+ return data;
79
+ },
80
+ });
81
+
82
+ export default statsSubcommand;
@@ -32,8 +32,7 @@ export const createSubcommand = createCommand({
32
32
  name: 'create',
33
33
  description: 'Create a schedule',
34
34
  tags: ['mutating', 'creates-resource', 'requires-auth'],
35
- requires: { auth: true, region: true },
36
- optional: { project: true },
35
+ requires: { auth: true },
37
36
  examples: [
38
37
  {
39
38
  command: getCommand("cloud schedule create --name nightly --expression '0 0 * * *'"),
@@ -51,7 +50,7 @@ export const createSubcommand = createCommand({
51
50
 
52
51
  async handler(ctx) {
53
52
  const { opts, options } = ctx;
54
- const schedule = createScheduleAdapter(ctx);
53
+ const schedule = await createScheduleAdapter(ctx);
55
54
  const result = await schedule.create({
56
55
  name: opts.name,
57
56
  expression: opts.expression,
@@ -66,7 +65,7 @@ export const createSubcommand = createCommand({
66
65
  Name: result.schedule.name,
67
66
  ID: result.schedule.id,
68
67
  Expression: result.schedule.expression,
69
- Description: result.schedule.description ?? '-',
68
+ Description: result.schedule.description || '-',
70
69
  'Next Due': result.schedule.due_date,
71
70
  Created: new Date(result.schedule.created_at).toLocaleString(),
72
71
  },
@@ -14,11 +14,13 @@ export const deleteSubcommand = createCommand({
14
14
  aliases: ['rm'],
15
15
  description: 'Delete a schedule',
16
16
  tags: ['destructive', 'deletes-resource', 'slow', 'requires-auth'],
17
- requires: { auth: true, region: true },
18
- optional: { project: true },
17
+ requires: { auth: true },
19
18
  idempotent: true,
20
19
  examples: [
21
- { command: getCommand('cloud schedule delete sched_abc123'), description: 'Delete a schedule' },
20
+ {
21
+ command: getCommand('cloud schedule delete sched_abc123'),
22
+ description: 'Delete a schedule',
23
+ },
22
24
  ],
23
25
  schema: {
24
26
  args: z.object({
@@ -29,7 +31,7 @@ export const deleteSubcommand = createCommand({
29
31
 
30
32
  async handler(ctx) {
31
33
  const { args, options } = ctx;
32
- const schedule = createScheduleAdapter(ctx);
34
+ const schedule = await createScheduleAdapter(ctx);
33
35
  await schedule.delete(args.schedule_id);
34
36
 
35
37
  if (!options.json) {
@@ -21,8 +21,7 @@ export const getSubcommand = createCommand({
21
21
  name: 'get',
22
22
  description: 'Get delivery details',
23
23
  tags: ['read-only', 'fast', 'requires-auth'],
24
- requires: { auth: true, region: true },
25
- optional: { project: true },
24
+ requires: { auth: true },
26
25
  idempotent: true,
27
26
  examples: [
28
27
  {
@@ -52,7 +51,7 @@ export const getSubcommand = createCommand({
52
51
 
53
52
  async handler(ctx) {
54
53
  const { args, opts, options } = ctx;
55
- const schedule = createScheduleAdapter(ctx);
54
+ const schedule = await createScheduleAdapter(ctx);
56
55
  const delivery = await schedule.getDelivery(args.schedule_id, args.delivery_id, {
57
56
  limit: opts.limit,
58
57
  offset: opts.offset,
@@ -73,7 +72,7 @@ export const getSubcommand = createCommand({
73
72
 
74
73
  if (delivery.response) {
75
74
  tui.newline();
76
- tui.info('Response');
75
+ tui.header('Response');
77
76
  tui.json(delivery.response);
78
77
  }
79
78
  }
@@ -24,8 +24,7 @@ export const listSubcommand = createCommand({
24
24
  aliases: ['ls'],
25
25
  description: 'List deliveries for a schedule',
26
26
  tags: ['read-only', 'fast', 'requires-auth'],
27
- requires: { auth: true, region: true },
28
- optional: { project: true },
27
+ requires: { auth: true },
29
28
  idempotent: true,
30
29
  examples: [
31
30
  {
@@ -46,7 +45,7 @@ export const listSubcommand = createCommand({
46
45
 
47
46
  async handler(ctx) {
48
47
  const { args, opts, options } = ctx;
49
- const schedule = createScheduleAdapter(ctx);
48
+ const schedule = await createScheduleAdapter(ctx);
50
49
  const result = await schedule.listDeliveries(args.schedule_id, {
51
50
  limit: opts.limit,
52
51
  offset: opts.offset,
@@ -57,19 +56,21 @@ export const listSubcommand = createCommand({
57
56
  tui.info('No deliveries found');
58
57
  } else {
59
58
  tui.table(
60
- result.deliveries.map((delivery: {
61
- id: string;
62
- date: string;
63
- status: 'pending' | 'success' | 'failed';
64
- retries: number;
65
- schedule_destination_id: string;
66
- }) => ({
67
- ID: delivery.id,
68
- Date: new Date(delivery.date).toLocaleString(),
69
- Status: delivery.status,
70
- Retries: delivery.retries,
71
- 'Destination ID': delivery.schedule_destination_id,
72
- })),
59
+ result.deliveries.map(
60
+ (delivery: {
61
+ id: string;
62
+ date: string;
63
+ status: 'pending' | 'success' | 'failed';
64
+ retries: number;
65
+ schedule_destination_id: string;
66
+ }) => ({
67
+ ID: delivery.id,
68
+ Date: new Date(delivery.date).toLocaleString(),
69
+ Status: delivery.status,
70
+ Retries: delivery.retries,
71
+ 'Destination ID': delivery.schedule_destination_id,
72
+ })
73
+ ),
73
74
  ['ID', 'Date', 'Status', 'Retries', 'Destination ID']
74
75
  );
75
76
  }
@@ -20,15 +20,18 @@ export const createSubcommand = createCommand({
20
20
  name: 'create',
21
21
  description: 'Create destination for a schedule',
22
22
  tags: ['mutating', 'creates-resource', 'requires-auth'],
23
- requires: { auth: true, region: true },
24
- optional: { project: true },
23
+ requires: { auth: true },
25
24
  examples: [
26
25
  {
27
- command: getCommand('cloud schedule destination create url sched_abc123 https://example.com'),
26
+ command: getCommand(
27
+ 'cloud schedule destination create url sched_abc123 https://example.com'
28
+ ),
28
29
  description: 'Create URL destination',
29
30
  },
30
31
  {
31
- command: getCommand('cloud schedule destination create url sched_abc123 https://example.com --method POST'),
32
+ command: getCommand(
33
+ 'cloud schedule destination create url sched_abc123 https://example.com --method POST'
34
+ ),
32
35
  description: 'Create URL destination with POST method',
33
36
  },
34
37
  ],
@@ -48,12 +51,16 @@ export const createSubcommand = createCommand({
48
51
 
49
52
  async handler(ctx) {
50
53
  const { args, opts, options } = ctx;
51
- const schedule = createScheduleAdapter(ctx);
54
+ const schedule = await createScheduleAdapter(ctx);
52
55
 
53
56
  if (args.type === 'sandbox' && !args.target.startsWith('sbx_')) {
54
57
  tui.fatal('Sandbox target must start with "sbx_"');
55
58
  }
56
- if (args.type === 'url' && !args.target.startsWith('http://') && !args.target.startsWith('https://')) {
59
+ if (
60
+ args.type === 'url' &&
61
+ !args.target.startsWith('http://') &&
62
+ !args.target.startsWith('https://')
63
+ ) {
57
64
  tui.fatal('URL target must start with http:// or https://');
58
65
  }
59
66
 
@@ -95,12 +102,17 @@ export const createSubcommand = createCommand({
95
102
  {
96
103
  ID: result.destination.id,
97
104
  Type: result.destination.type,
98
- Config: JSON.stringify(result.destination.config),
99
105
  },
100
106
  ],
101
107
  undefined,
102
108
  { layout: 'vertical' }
103
109
  );
110
+
111
+ if (result.destination.config && Object.keys(result.destination.config).length > 0) {
112
+ tui.newline();
113
+ tui.header('Config');
114
+ tui.json(result.destination.config);
115
+ }
104
116
  }
105
117
 
106
118
  return result;
@@ -14,8 +14,7 @@ export const deleteSubcommand = createCommand({
14
14
  aliases: ['rm'],
15
15
  description: 'Delete a destination',
16
16
  tags: ['destructive', 'deletes-resource', 'slow', 'requires-auth'],
17
- requires: { auth: true, region: true },
18
- optional: { project: true },
17
+ requires: { auth: true },
19
18
  idempotent: true,
20
19
  examples: [
21
20
  {
@@ -32,7 +31,7 @@ export const deleteSubcommand = createCommand({
32
31
 
33
32
  async handler(ctx) {
34
33
  const { args, options } = ctx;
35
- const schedule = createScheduleAdapter(ctx);
34
+ const schedule = await createScheduleAdapter(ctx);
36
35
  await schedule.deleteDestination(args.destination_id);
37
36
 
38
37
  if (!options.json) {
@@ -20,8 +20,7 @@ export const getSubcommand = createCommand({
20
20
  name: 'get',
21
21
  description: 'Get destination details',
22
22
  tags: ['read-only', 'fast', 'requires-auth'],
23
- requires: { auth: true, region: true },
24
- optional: { project: true },
23
+ requires: { auth: true },
25
24
  idempotent: true,
26
25
  examples: [
27
26
  {
@@ -39,24 +38,25 @@ export const getSubcommand = createCommand({
39
38
 
40
39
  async handler(ctx) {
41
40
  const { args, options } = ctx;
42
- const schedule = createScheduleAdapter(ctx);
41
+ const schedule = await createScheduleAdapter(ctx);
43
42
  const destination = await schedule.getDestination(args.schedule_id, args.destination_id);
44
43
 
45
44
  if (!options.json) {
46
- tui.table(
47
- [
48
- {
49
- ID: destination.id,
50
- 'Schedule ID': destination.schedule_id,
51
- Type: destination.type,
52
- Config: JSON.stringify(destination.config),
53
- Created: new Date(destination.created_at).toLocaleString(),
54
- Updated: new Date(destination.updated_at).toLocaleString(),
55
- },
56
- ],
57
- undefined,
58
- { layout: 'vertical' }
59
- );
45
+ const details: Record<string, unknown> = {
46
+ ID: destination.id,
47
+ 'Schedule ID': destination.schedule_id,
48
+ Type: destination.type,
49
+ Created: new Date(destination.created_at).toLocaleString(),
50
+ Updated: new Date(destination.updated_at).toLocaleString(),
51
+ };
52
+
53
+ tui.table([details], undefined, { layout: 'vertical' });
54
+
55
+ if (destination.config && Object.keys(destination.config).length > 0) {
56
+ tui.newline();
57
+ tui.header('Config');
58
+ tui.json(destination.config);
59
+ }
60
60
  }
61
61
 
62
62
  return { destination };
@@ -18,7 +18,9 @@ export const command = createCommand({
18
18
  description: 'List destinations',
19
19
  },
20
20
  {
21
- command: getCommand('cloud schedule destination create url sched_abc123 https://example.com'),
21
+ command: getCommand(
22
+ 'cloud schedule destination create url sched_abc123 https://example.com'
23
+ ),
22
24
  description: 'Create URL destination',
23
25
  },
24
26
  ],
@@ -23,8 +23,7 @@ export const listSubcommand = createCommand({
23
23
  aliases: ['ls'],
24
24
  description: 'List destinations for a schedule',
25
25
  tags: ['read-only', 'fast', 'requires-auth'],
26
- requires: { auth: true, region: true },
27
- optional: { project: true },
26
+ requires: { auth: true },
28
27
  idempotent: true,
29
28
  examples: [
30
29
  {
@@ -41,7 +40,7 @@ export const listSubcommand = createCommand({
41
40
 
42
41
  async handler(ctx) {
43
42
  const { args, options } = ctx;
44
- const schedule = createScheduleAdapter(ctx);
43
+ const schedule = await createScheduleAdapter(ctx);
45
44
  const result = await schedule.get(args.schedule_id);
46
45
 
47
46
  if (!options.json) {
@@ -49,18 +48,26 @@ export const listSubcommand = createCommand({
49
48
  tui.info('No destinations configured');
50
49
  } else {
51
50
  tui.table(
52
- result.destinations.map((destination: {
53
- id: string;
54
- type: 'url' | 'sandbox';
55
- config: Record<string, unknown>;
56
- created_at: string;
57
- }) => ({
58
- ID: destination.id,
59
- Type: destination.type,
60
- Config: JSON.stringify(destination.config),
61
- Created: new Date(destination.created_at).toLocaleString(),
62
- })),
63
- ['ID', 'Type', 'Config', 'Created']
51
+ result.destinations.map(
52
+ (destination: {
53
+ id: string;
54
+ type: 'url' | 'sandbox';
55
+ config: Record<string, unknown>;
56
+ created_at: string;
57
+ }) => {
58
+ const configDisplay =
59
+ destination.type === 'url' && destination.config?.url
60
+ ? String(destination.config.url)
61
+ : JSON.stringify(destination.config);
62
+ return {
63
+ ID: destination.id,
64
+ Type: destination.type,
65
+ URL: configDisplay,
66
+ Created: new Date(destination.created_at).toLocaleString(),
67
+ };
68
+ }
69
+ ),
70
+ ['ID', 'Type', 'URL', 'Created']
64
71
  );
65
72
  }
66
73
  }