@agentuity/cli 0.0.60 → 0.0.62

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 (609) hide show
  1. package/bin/cli.ts +15 -4
  2. package/dist/banner.d.ts +1 -0
  3. package/dist/banner.d.ts.map +1 -1
  4. package/dist/banner.js +28 -13
  5. package/dist/banner.js.map +1 -1
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +85 -9
  8. package/dist/cli.js.map +1 -1
  9. package/dist/cmd/ai/capabilities/index.d.ts.map +1 -1
  10. package/dist/cmd/ai/capabilities/index.js +4 -0
  11. package/dist/cmd/ai/capabilities/index.js.map +1 -1
  12. package/dist/cmd/ai/capabilities/show.d.ts.map +1 -1
  13. package/dist/cmd/ai/capabilities/show.js +13 -2
  14. package/dist/cmd/ai/capabilities/show.js.map +1 -1
  15. package/dist/cmd/ai/index.d.ts.map +1 -1
  16. package/dist/cmd/ai/index.js +11 -0
  17. package/dist/cmd/ai/index.js.map +1 -1
  18. package/dist/cmd/ai/prompt/agent.d.ts +3 -0
  19. package/dist/cmd/ai/prompt/agent.d.ts.map +1 -0
  20. package/dist/cmd/ai/prompt/agent.js +340 -0
  21. package/dist/cmd/ai/prompt/agent.js.map +1 -0
  22. package/dist/cmd/ai/prompt/api.d.ts +3 -0
  23. package/dist/cmd/ai/prompt/api.d.ts.map +1 -0
  24. package/dist/cmd/ai/prompt/api.js +272 -0
  25. package/dist/cmd/ai/prompt/api.js.map +1 -0
  26. package/dist/cmd/ai/prompt/index.d.ts +1 -2
  27. package/dist/cmd/ai/prompt/index.d.ts.map +1 -1
  28. package/dist/cmd/ai/prompt/index.js +17 -1
  29. package/dist/cmd/ai/prompt/index.js.map +1 -1
  30. package/dist/cmd/ai/prompt/llm.d.ts +1 -0
  31. package/dist/cmd/ai/prompt/llm.d.ts.map +1 -1
  32. package/dist/cmd/ai/prompt/llm.js +2 -2
  33. package/dist/cmd/ai/prompt/llm.js.map +1 -1
  34. package/dist/cmd/ai/prompt/web.d.ts +3 -0
  35. package/dist/cmd/ai/prompt/web.d.ts.map +1 -0
  36. package/dist/cmd/ai/prompt/web.js +299 -0
  37. package/dist/cmd/ai/prompt/web.js.map +1 -0
  38. package/dist/cmd/ai/schema/generate.js +1 -1
  39. package/dist/cmd/ai/schema/generate.js.map +1 -1
  40. package/dist/cmd/ai/schema/index.d.ts.map +1 -1
  41. package/dist/cmd/ai/schema/index.js +2 -0
  42. package/dist/cmd/ai/schema/index.js.map +1 -1
  43. package/dist/cmd/ai/schema/show.d.ts.map +1 -1
  44. package/dist/cmd/ai/schema/show.js +4 -1
  45. package/dist/cmd/ai/schema/show.js.map +1 -1
  46. package/dist/cmd/auth/api.d.ts.map +1 -1
  47. package/dist/cmd/auth/api.js +12 -6
  48. package/dist/cmd/auth/api.js.map +1 -1
  49. package/dist/cmd/auth/index.d.ts.map +1 -1
  50. package/dist/cmd/auth/index.js +5 -0
  51. package/dist/cmd/auth/index.js.map +1 -1
  52. package/dist/cmd/auth/login.d.ts.map +1 -1
  53. package/dist/cmd/auth/login.js +5 -22
  54. package/dist/cmd/auth/login.js.map +1 -1
  55. package/dist/cmd/auth/logout.d.ts.map +1 -1
  56. package/dist/cmd/auth/logout.js +4 -1
  57. package/dist/cmd/auth/logout.js.map +1 -1
  58. package/dist/cmd/auth/signup.d.ts.map +1 -1
  59. package/dist/cmd/auth/signup.js +4 -1
  60. package/dist/cmd/auth/signup.js.map +1 -1
  61. package/dist/cmd/auth/ssh/add.d.ts.map +1 -1
  62. package/dist/cmd/auth/ssh/add.js +13 -4
  63. package/dist/cmd/auth/ssh/add.js.map +1 -1
  64. package/dist/cmd/auth/ssh/api.d.ts.map +1 -1
  65. package/dist/cmd/auth/ssh/api.js +11 -5
  66. package/dist/cmd/auth/ssh/api.js.map +1 -1
  67. package/dist/cmd/auth/ssh/delete.js +4 -4
  68. package/dist/cmd/auth/ssh/delete.js.map +1 -1
  69. package/dist/cmd/auth/ssh/index.d.ts.map +1 -1
  70. package/dist/cmd/auth/ssh/index.js +5 -0
  71. package/dist/cmd/auth/ssh/index.js.map +1 -1
  72. package/dist/cmd/auth/ssh/list.js +3 -3
  73. package/dist/cmd/auth/ssh/list.js.map +1 -1
  74. package/dist/cmd/auth/whoami.d.ts.map +1 -1
  75. package/dist/cmd/auth/whoami.js +4 -4
  76. package/dist/cmd/auth/whoami.js.map +1 -1
  77. package/dist/cmd/build/ast.d.ts +24 -1
  78. package/dist/cmd/build/ast.d.ts.map +1 -1
  79. package/dist/cmd/build/ast.js +558 -21
  80. package/dist/cmd/build/ast.js.map +1 -1
  81. package/dist/cmd/build/bundler.d.ts +3 -1
  82. package/dist/cmd/build/bundler.d.ts.map +1 -1
  83. package/dist/cmd/build/bundler.js +89 -38
  84. package/dist/cmd/build/bundler.js.map +1 -1
  85. package/dist/cmd/build/file.js +1 -1
  86. package/dist/cmd/build/file.js.map +1 -1
  87. package/dist/cmd/build/fix-duplicate-exports.d.ts.map +1 -1
  88. package/dist/cmd/build/fix-duplicate-exports.js +4 -1
  89. package/dist/cmd/build/fix-duplicate-exports.js.map +1 -1
  90. package/dist/cmd/build/index.d.ts.map +1 -1
  91. package/dist/cmd/build/index.js +55 -13
  92. package/dist/cmd/build/index.js.map +1 -1
  93. package/dist/cmd/build/plugin.d.ts.map +1 -1
  94. package/dist/cmd/build/plugin.js +183 -38
  95. package/dist/cmd/build/plugin.js.map +1 -1
  96. package/dist/cmd/cloud/agent/get.d.ts.map +1 -1
  97. package/dist/cmd/cloud/agent/get.js +5 -2
  98. package/dist/cmd/cloud/agent/get.js.map +1 -1
  99. package/dist/cmd/cloud/agent/index.d.ts.map +1 -1
  100. package/dist/cmd/cloud/agent/index.js +5 -0
  101. package/dist/cmd/cloud/agent/index.js.map +1 -1
  102. package/dist/cmd/cloud/agent/list.js +3 -3
  103. package/dist/cmd/cloud/agent/list.js.map +1 -1
  104. package/dist/cmd/cloud/apikey/create.d.ts.map +1 -1
  105. package/dist/cmd/cloud/apikey/create.js +12 -3
  106. package/dist/cmd/cloud/apikey/create.js.map +1 -1
  107. package/dist/cmd/cloud/apikey/delete.js +3 -3
  108. package/dist/cmd/cloud/apikey/delete.js.map +1 -1
  109. package/dist/cmd/cloud/apikey/get.js +1 -1
  110. package/dist/cmd/cloud/apikey/get.js.map +1 -1
  111. package/dist/cmd/cloud/apikey/index.d.ts.map +1 -1
  112. package/dist/cmd/cloud/apikey/index.js +8 -0
  113. package/dist/cmd/cloud/apikey/index.js.map +1 -1
  114. package/dist/cmd/cloud/apikey/list.d.ts.map +1 -1
  115. package/dist/cmd/cloud/apikey/list.js +4 -1
  116. package/dist/cmd/cloud/apikey/list.js.map +1 -1
  117. package/dist/cmd/cloud/db/create.d.ts.map +1 -1
  118. package/dist/cmd/cloud/db/create.js +35 -21
  119. package/dist/cmd/cloud/db/create.js.map +1 -1
  120. package/dist/cmd/cloud/db/delete.d.ts.map +1 -1
  121. package/dist/cmd/cloud/db/delete.js +34 -21
  122. package/dist/cmd/cloud/db/delete.js.map +1 -1
  123. package/dist/cmd/cloud/db/get.d.ts.map +1 -1
  124. package/dist/cmd/cloud/db/get.js +9 -3
  125. package/dist/cmd/cloud/db/get.js.map +1 -1
  126. package/dist/cmd/cloud/db/index.d.ts.map +1 -1
  127. package/dist/cmd/cloud/db/index.js +5 -0
  128. package/dist/cmd/cloud/db/index.js.map +1 -1
  129. package/dist/cmd/cloud/db/list.d.ts.map +1 -1
  130. package/dist/cmd/cloud/db/list.js +16 -6
  131. package/dist/cmd/cloud/db/list.js.map +1 -1
  132. package/dist/cmd/cloud/db/sql.d.ts.map +1 -1
  133. package/dist/cmd/cloud/db/sql.js +12 -3
  134. package/dist/cmd/cloud/db/sql.js.map +1 -1
  135. package/dist/cmd/cloud/deploy.d.ts.map +1 -1
  136. package/dist/cmd/cloud/deploy.js +9 -3
  137. package/dist/cmd/cloud/deploy.js.map +1 -1
  138. package/dist/cmd/cloud/deployment/index.d.ts.map +1 -1
  139. package/dist/cmd/cloud/deployment/index.js +5 -0
  140. package/dist/cmd/cloud/deployment/index.js.map +1 -1
  141. package/dist/cmd/cloud/deployment/list.d.ts.map +1 -1
  142. package/dist/cmd/cloud/deployment/list.js +12 -3
  143. package/dist/cmd/cloud/deployment/list.js.map +1 -1
  144. package/dist/cmd/cloud/deployment/logs.d.ts.map +1 -1
  145. package/dist/cmd/cloud/deployment/logs.js +16 -4
  146. package/dist/cmd/cloud/deployment/logs.js.map +1 -1
  147. package/dist/cmd/cloud/deployment/remove.d.ts.map +1 -1
  148. package/dist/cmd/cloud/deployment/remove.js +12 -3
  149. package/dist/cmd/cloud/deployment/remove.js.map +1 -1
  150. package/dist/cmd/cloud/deployment/rollback.d.ts.map +1 -1
  151. package/dist/cmd/cloud/deployment/rollback.js +8 -2
  152. package/dist/cmd/cloud/deployment/rollback.js.map +1 -1
  153. package/dist/cmd/cloud/deployment/show.d.ts.map +1 -1
  154. package/dist/cmd/cloud/deployment/show.js +8 -2
  155. package/dist/cmd/cloud/deployment/show.js.map +1 -1
  156. package/dist/cmd/cloud/deployment/undeploy.d.ts.map +1 -1
  157. package/dist/cmd/cloud/deployment/undeploy.js +12 -3
  158. package/dist/cmd/cloud/deployment/undeploy.js.map +1 -1
  159. package/dist/cmd/cloud/deployment/utils.d.ts.map +1 -1
  160. package/dist/cmd/cloud/deployment/utils.js +3 -1
  161. package/dist/cmd/cloud/deployment/utils.js.map +1 -1
  162. package/dist/cmd/cloud/domain.d.ts.map +1 -1
  163. package/dist/cmd/cloud/domain.js +4 -2
  164. package/dist/cmd/cloud/domain.js.map +1 -1
  165. package/dist/cmd/cloud/env/delete.d.ts.map +1 -1
  166. package/dist/cmd/cloud/env/delete.js +4 -1
  167. package/dist/cmd/cloud/env/delete.js.map +1 -1
  168. package/dist/cmd/cloud/env/get.d.ts.map +1 -1
  169. package/dist/cmd/cloud/env/get.js +4 -1
  170. package/dist/cmd/cloud/env/get.js.map +1 -1
  171. package/dist/cmd/cloud/env/import.d.ts.map +1 -1
  172. package/dist/cmd/cloud/env/import.js +10 -0
  173. package/dist/cmd/cloud/env/import.js.map +1 -1
  174. package/dist/cmd/cloud/env/index.d.ts.map +1 -1
  175. package/dist/cmd/cloud/env/index.js +8 -0
  176. package/dist/cmd/cloud/env/index.js.map +1 -1
  177. package/dist/cmd/cloud/env/list.d.ts.map +1 -1
  178. package/dist/cmd/cloud/env/list.js +4 -1
  179. package/dist/cmd/cloud/env/list.js.map +1 -1
  180. package/dist/cmd/cloud/env/pull.d.ts.map +1 -1
  181. package/dist/cmd/cloud/env/pull.js +4 -1
  182. package/dist/cmd/cloud/env/pull.js.map +1 -1
  183. package/dist/cmd/cloud/env/push.js +1 -1
  184. package/dist/cmd/cloud/env/push.js.map +1 -1
  185. package/dist/cmd/cloud/env/set.js +3 -3
  186. package/dist/cmd/cloud/env/set.js.map +1 -1
  187. package/dist/cmd/cloud/index.d.ts.map +1 -1
  188. package/dist/cmd/cloud/index.js +7 -0
  189. package/dist/cmd/cloud/index.js.map +1 -1
  190. package/dist/cmd/cloud/keyvalue/create-namespace.d.ts.map +1 -1
  191. package/dist/cmd/cloud/keyvalue/create-namespace.js +9 -3
  192. package/dist/cmd/cloud/keyvalue/create-namespace.js.map +1 -1
  193. package/dist/cmd/cloud/keyvalue/delete-namespace.d.ts.map +1 -1
  194. package/dist/cmd/cloud/keyvalue/delete-namespace.js +12 -3
  195. package/dist/cmd/cloud/keyvalue/delete-namespace.js.map +1 -1
  196. package/dist/cmd/cloud/keyvalue/delete.d.ts.map +1 -1
  197. package/dist/cmd/cloud/keyvalue/delete.js +6 -3
  198. package/dist/cmd/cloud/keyvalue/delete.js.map +1 -1
  199. package/dist/cmd/cloud/keyvalue/get.d.ts.map +1 -1
  200. package/dist/cmd/cloud/keyvalue/get.js +3 -3
  201. package/dist/cmd/cloud/keyvalue/get.js.map +1 -1
  202. package/dist/cmd/cloud/keyvalue/index.d.ts.map +1 -1
  203. package/dist/cmd/cloud/keyvalue/index.js +8 -0
  204. package/dist/cmd/cloud/keyvalue/index.js.map +1 -1
  205. package/dist/cmd/cloud/keyvalue/keys.d.ts.map +1 -1
  206. package/dist/cmd/cloud/keyvalue/keys.js +3 -3
  207. package/dist/cmd/cloud/keyvalue/keys.js.map +1 -1
  208. package/dist/cmd/cloud/keyvalue/list-namespaces.d.ts.map +1 -1
  209. package/dist/cmd/cloud/keyvalue/list-namespaces.js +3 -3
  210. package/dist/cmd/cloud/keyvalue/list-namespaces.js.map +1 -1
  211. package/dist/cmd/cloud/keyvalue/repl.d.ts.map +1 -1
  212. package/dist/cmd/cloud/keyvalue/repl.js +1 -1
  213. package/dist/cmd/cloud/keyvalue/repl.js.map +1 -1
  214. package/dist/cmd/cloud/keyvalue/search.d.ts.map +1 -1
  215. package/dist/cmd/cloud/keyvalue/search.js +9 -3
  216. package/dist/cmd/cloud/keyvalue/search.js.map +1 -1
  217. package/dist/cmd/cloud/keyvalue/set.d.ts.map +1 -1
  218. package/dist/cmd/cloud/keyvalue/set.js +12 -3
  219. package/dist/cmd/cloud/keyvalue/set.js.map +1 -1
  220. package/dist/cmd/cloud/keyvalue/stats.d.ts.map +1 -1
  221. package/dist/cmd/cloud/keyvalue/stats.js +6 -3
  222. package/dist/cmd/cloud/keyvalue/stats.js.map +1 -1
  223. package/dist/cmd/cloud/objectstore/delete-bucket.d.ts.map +1 -1
  224. package/dist/cmd/cloud/objectstore/delete-bucket.js +8 -2
  225. package/dist/cmd/cloud/objectstore/delete-bucket.js.map +1 -1
  226. package/dist/cmd/cloud/objectstore/delete.d.ts.map +1 -1
  227. package/dist/cmd/cloud/objectstore/delete.js +12 -3
  228. package/dist/cmd/cloud/objectstore/delete.js.map +1 -1
  229. package/dist/cmd/cloud/objectstore/get.d.ts.map +1 -1
  230. package/dist/cmd/cloud/objectstore/get.js +12 -3
  231. package/dist/cmd/cloud/objectstore/get.js.map +1 -1
  232. package/dist/cmd/cloud/objectstore/index.d.ts.map +1 -1
  233. package/dist/cmd/cloud/objectstore/index.js +8 -0
  234. package/dist/cmd/cloud/objectstore/index.js.map +1 -1
  235. package/dist/cmd/cloud/objectstore/list-buckets.d.ts.map +1 -1
  236. package/dist/cmd/cloud/objectstore/list-buckets.js +6 -1
  237. package/dist/cmd/cloud/objectstore/list-buckets.js.map +1 -1
  238. package/dist/cmd/cloud/objectstore/list-keys.d.ts.map +1 -1
  239. package/dist/cmd/cloud/objectstore/list-keys.js +6 -3
  240. package/dist/cmd/cloud/objectstore/list-keys.js.map +1 -1
  241. package/dist/cmd/cloud/objectstore/put.d.ts.map +1 -1
  242. package/dist/cmd/cloud/objectstore/put.js +12 -3
  243. package/dist/cmd/cloud/objectstore/put.js.map +1 -1
  244. package/dist/cmd/cloud/objectstore/repl.d.ts.map +1 -1
  245. package/dist/cmd/cloud/objectstore/repl.js +6 -1
  246. package/dist/cmd/cloud/objectstore/repl.js.map +1 -1
  247. package/dist/cmd/cloud/objectstore/url.d.ts.map +1 -1
  248. package/dist/cmd/cloud/objectstore/url.js +12 -3
  249. package/dist/cmd/cloud/objectstore/url.js.map +1 -1
  250. package/dist/cmd/cloud/scp/download.d.ts.map +1 -1
  251. package/dist/cmd/cloud/scp/download.js +16 -4
  252. package/dist/cmd/cloud/scp/download.js.map +1 -1
  253. package/dist/cmd/cloud/scp/index.d.ts.map +1 -1
  254. package/dist/cmd/cloud/scp/index.js +11 -0
  255. package/dist/cmd/cloud/scp/index.js.map +1 -1
  256. package/dist/cmd/cloud/scp/upload.d.ts.map +1 -1
  257. package/dist/cmd/cloud/scp/upload.js +16 -4
  258. package/dist/cmd/cloud/scp/upload.js.map +1 -1
  259. package/dist/cmd/cloud/secret/delete.d.ts.map +1 -1
  260. package/dist/cmd/cloud/secret/delete.js +4 -1
  261. package/dist/cmd/cloud/secret/delete.js.map +1 -1
  262. package/dist/cmd/cloud/secret/get.d.ts.map +1 -1
  263. package/dist/cmd/cloud/secret/get.js +5 -2
  264. package/dist/cmd/cloud/secret/get.js.map +1 -1
  265. package/dist/cmd/cloud/secret/import.d.ts.map +1 -1
  266. package/dist/cmd/cloud/secret/import.js +5 -2
  267. package/dist/cmd/cloud/secret/import.js.map +1 -1
  268. package/dist/cmd/cloud/secret/index.d.ts.map +1 -1
  269. package/dist/cmd/cloud/secret/index.js +8 -0
  270. package/dist/cmd/cloud/secret/index.js.map +1 -1
  271. package/dist/cmd/cloud/secret/list.d.ts.map +1 -1
  272. package/dist/cmd/cloud/secret/list.js +4 -1
  273. package/dist/cmd/cloud/secret/list.js.map +1 -1
  274. package/dist/cmd/cloud/secret/pull.d.ts.map +1 -1
  275. package/dist/cmd/cloud/secret/pull.js +4 -1
  276. package/dist/cmd/cloud/secret/pull.js.map +1 -1
  277. package/dist/cmd/cloud/secret/push.js +1 -1
  278. package/dist/cmd/cloud/secret/push.js.map +1 -1
  279. package/dist/cmd/cloud/secret/set.d.ts.map +1 -1
  280. package/dist/cmd/cloud/secret/set.js +8 -2
  281. package/dist/cmd/cloud/secret/set.js.map +1 -1
  282. package/dist/cmd/cloud/session/get.d.ts.map +1 -1
  283. package/dist/cmd/cloud/session/get.js +10 -2
  284. package/dist/cmd/cloud/session/get.js.map +1 -1
  285. package/dist/cmd/cloud/session/index.d.ts.map +1 -1
  286. package/dist/cmd/cloud/session/index.js +5 -0
  287. package/dist/cmd/cloud/session/index.js.map +1 -1
  288. package/dist/cmd/cloud/session/list.d.ts.map +1 -1
  289. package/dist/cmd/cloud/session/list.js +29 -8
  290. package/dist/cmd/cloud/session/list.js.map +1 -1
  291. package/dist/cmd/cloud/session/logs.d.ts.map +1 -1
  292. package/dist/cmd/cloud/session/logs.js +8 -2
  293. package/dist/cmd/cloud/session/logs.js.map +1 -1
  294. package/dist/cmd/cloud/ssh.d.ts.map +1 -1
  295. package/dist/cmd/cloud/ssh.js +15 -6
  296. package/dist/cmd/cloud/ssh.js.map +1 -1
  297. package/dist/cmd/cloud/storage/create.d.ts.map +1 -1
  298. package/dist/cmd/cloud/storage/create.js +12 -3
  299. package/dist/cmd/cloud/storage/create.js.map +1 -1
  300. package/dist/cmd/cloud/storage/delete.d.ts.map +1 -1
  301. package/dist/cmd/cloud/storage/delete.js +16 -4
  302. package/dist/cmd/cloud/storage/delete.js.map +1 -1
  303. package/dist/cmd/cloud/storage/download.d.ts.map +1 -1
  304. package/dist/cmd/cloud/storage/download.js +16 -4
  305. package/dist/cmd/cloud/storage/download.js.map +1 -1
  306. package/dist/cmd/cloud/storage/get.d.ts.map +1 -1
  307. package/dist/cmd/cloud/storage/get.js +12 -3
  308. package/dist/cmd/cloud/storage/get.js.map +1 -1
  309. package/dist/cmd/cloud/storage/index.d.ts.map +1 -1
  310. package/dist/cmd/cloud/storage/index.js +8 -0
  311. package/dist/cmd/cloud/storage/index.js.map +1 -1
  312. package/dist/cmd/cloud/storage/list.d.ts.map +1 -1
  313. package/dist/cmd/cloud/storage/list.js +35 -12
  314. package/dist/cmd/cloud/storage/list.js.map +1 -1
  315. package/dist/cmd/cloud/storage/upload.d.ts.map +1 -1
  316. package/dist/cmd/cloud/storage/upload.js +21 -9
  317. package/dist/cmd/cloud/storage/upload.js.map +1 -1
  318. package/dist/cmd/cloud/stream/delete.d.ts.map +1 -1
  319. package/dist/cmd/cloud/stream/delete.js +9 -3
  320. package/dist/cmd/cloud/stream/delete.js.map +1 -1
  321. package/dist/cmd/cloud/stream/get.d.ts.map +1 -1
  322. package/dist/cmd/cloud/stream/get.js +10 -4
  323. package/dist/cmd/cloud/stream/get.js.map +1 -1
  324. package/dist/cmd/cloud/stream/index.d.ts.map +1 -1
  325. package/dist/cmd/cloud/stream/index.js +5 -0
  326. package/dist/cmd/cloud/stream/index.js.map +1 -1
  327. package/dist/cmd/cloud/stream/list.d.ts.map +1 -1
  328. package/dist/cmd/cloud/stream/list.js +11 -5
  329. package/dist/cmd/cloud/stream/list.js.map +1 -1
  330. package/dist/cmd/cloud/thread/delete.d.ts +2 -0
  331. package/dist/cmd/cloud/thread/delete.d.ts.map +1 -0
  332. package/dist/cmd/cloud/thread/delete.js +41 -0
  333. package/dist/cmd/cloud/thread/delete.js.map +1 -0
  334. package/dist/cmd/cloud/thread/get.d.ts +2 -0
  335. package/dist/cmd/cloud/thread/get.d.ts.map +1 -0
  336. package/dist/cmd/cloud/thread/get.js +80 -0
  337. package/dist/cmd/cloud/thread/get.js.map +1 -0
  338. package/dist/cmd/cloud/thread/index.d.ts +2 -0
  339. package/dist/cmd/cloud/thread/index.d.ts.map +1 -0
  340. package/dist/cmd/cloud/thread/index.js +17 -0
  341. package/dist/cmd/cloud/thread/index.js.map +1 -0
  342. package/dist/cmd/cloud/thread/list.d.ts +2 -0
  343. package/dist/cmd/cloud/thread/list.d.ts.map +1 -0
  344. package/dist/cmd/cloud/thread/list.js +112 -0
  345. package/dist/cmd/cloud/thread/list.js.map +1 -0
  346. package/dist/cmd/cloud/vector/delete.d.ts.map +1 -1
  347. package/dist/cmd/cloud/vector/delete.js +12 -3
  348. package/dist/cmd/cloud/vector/delete.js.map +1 -1
  349. package/dist/cmd/cloud/vector/get.d.ts.map +1 -1
  350. package/dist/cmd/cloud/vector/get.js +12 -3
  351. package/dist/cmd/cloud/vector/get.js.map +1 -1
  352. package/dist/cmd/cloud/vector/index.d.ts.map +1 -1
  353. package/dist/cmd/cloud/vector/index.js +8 -0
  354. package/dist/cmd/cloud/vector/index.js.map +1 -1
  355. package/dist/cmd/cloud/vector/search.d.ts.map +1 -1
  356. package/dist/cmd/cloud/vector/search.js +20 -5
  357. package/dist/cmd/cloud/vector/search.js.map +1 -1
  358. package/dist/cmd/dev/agents.d.ts.map +1 -1
  359. package/dist/cmd/dev/agents.js +7 -2
  360. package/dist/cmd/dev/agents.js.map +1 -1
  361. package/dist/cmd/dev/api.d.ts.map +1 -1
  362. package/dist/cmd/dev/api.js +3 -1
  363. package/dist/cmd/dev/api.js.map +1 -1
  364. package/dist/cmd/dev/index.d.ts.map +1 -1
  365. package/dist/cmd/dev/index.js +13 -5
  366. package/dist/cmd/dev/index.js.map +1 -1
  367. package/dist/cmd/help/index.d.ts +2 -0
  368. package/dist/cmd/help/index.d.ts.map +1 -0
  369. package/dist/cmd/help/index.js +35 -0
  370. package/dist/cmd/help/index.js.map +1 -0
  371. package/dist/cmd/index.d.ts.map +1 -1
  372. package/dist/cmd/index.js +1 -0
  373. package/dist/cmd/index.js.map +1 -1
  374. package/dist/cmd/profile/create.js +3 -3
  375. package/dist/cmd/profile/create.js.map +1 -1
  376. package/dist/cmd/profile/delete.d.ts.map +1 -1
  377. package/dist/cmd/profile/delete.js +6 -3
  378. package/dist/cmd/profile/delete.js.map +1 -1
  379. package/dist/cmd/profile/index.d.ts.map +1 -1
  380. package/dist/cmd/profile/index.js +8 -0
  381. package/dist/cmd/profile/index.js.map +1 -1
  382. package/dist/cmd/profile/list.d.ts.map +1 -1
  383. package/dist/cmd/profile/list.js +4 -1
  384. package/dist/cmd/profile/list.js.map +1 -1
  385. package/dist/cmd/profile/show.d.ts.map +1 -1
  386. package/dist/cmd/profile/show.js +6 -3
  387. package/dist/cmd/profile/show.js.map +1 -1
  388. package/dist/cmd/profile/use.d.ts.map +1 -1
  389. package/dist/cmd/profile/use.js +12 -3
  390. package/dist/cmd/profile/use.js.map +1 -1
  391. package/dist/cmd/project/create.d.ts.map +1 -1
  392. package/dist/cmd/project/create.js +11 -5
  393. package/dist/cmd/project/create.js.map +1 -1
  394. package/dist/cmd/project/delete.d.ts.map +1 -1
  395. package/dist/cmd/project/delete.js +15 -6
  396. package/dist/cmd/project/delete.js.map +1 -1
  397. package/dist/cmd/project/download.d.ts +1 -1
  398. package/dist/cmd/project/download.d.ts.map +1 -1
  399. package/dist/cmd/project/download.js +37 -2
  400. package/dist/cmd/project/download.js.map +1 -1
  401. package/dist/cmd/project/index.d.ts.map +1 -1
  402. package/dist/cmd/project/index.js +5 -0
  403. package/dist/cmd/project/index.js.map +1 -1
  404. package/dist/cmd/project/list.d.ts.map +1 -1
  405. package/dist/cmd/project/list.js +6 -3
  406. package/dist/cmd/project/list.js.map +1 -1
  407. package/dist/cmd/project/show.d.ts.map +1 -1
  408. package/dist/cmd/project/show.js +6 -3
  409. package/dist/cmd/project/show.js.map +1 -1
  410. package/dist/cmd/project/templates.d.ts.map +1 -1
  411. package/dist/cmd/project/templates.js +10 -2
  412. package/dist/cmd/project/templates.js.map +1 -1
  413. package/dist/cmd/repl/index.js +1 -1
  414. package/dist/cmd/repl/index.js.map +1 -1
  415. package/dist/cmd/version/index.d.ts.map +1 -1
  416. package/dist/cmd/version/index.js +7 -1
  417. package/dist/cmd/version/index.js.map +1 -1
  418. package/dist/command-prefix.d.ts.map +1 -1
  419. package/dist/command-prefix.js +5 -3
  420. package/dist/command-prefix.js.map +1 -1
  421. package/dist/config.d.ts +1 -1
  422. package/dist/config.d.ts.map +1 -1
  423. package/dist/config.js +3 -1
  424. package/dist/config.js.map +1 -1
  425. package/dist/crypto/box.d.ts.map +1 -1
  426. package/dist/crypto/box.js +31 -17
  427. package/dist/crypto/box.js.map +1 -1
  428. package/dist/download.d.ts.map +1 -1
  429. package/dist/download.js +7 -1
  430. package/dist/download.js.map +1 -1
  431. package/dist/env-util.d.ts +3 -0
  432. package/dist/env-util.d.ts.map +1 -1
  433. package/dist/env-util.js +43 -2
  434. package/dist/env-util.js.map +1 -1
  435. package/dist/errors.d.ts +4 -2
  436. package/dist/errors.d.ts.map +1 -1
  437. package/dist/errors.js +7 -1
  438. package/dist/errors.js.map +1 -1
  439. package/dist/index.d.ts +1 -1
  440. package/dist/index.d.ts.map +1 -1
  441. package/dist/index.js +1 -1
  442. package/dist/index.js.map +1 -1
  443. package/dist/schema-generator.d.ts +5 -1
  444. package/dist/schema-generator.d.ts.map +1 -1
  445. package/dist/schema-generator.js +1 -0
  446. package/dist/schema-generator.js.map +1 -1
  447. package/dist/steps.js +17 -13
  448. package/dist/steps.js.map +1 -1
  449. package/dist/tui.d.ts +2 -1
  450. package/dist/tui.d.ts.map +1 -1
  451. package/dist/tui.js +21 -14
  452. package/dist/tui.js.map +1 -1
  453. package/dist/types.d.ts +10 -6
  454. package/dist/types.d.ts.map +1 -1
  455. package/dist/types.js.map +1 -1
  456. package/dist/utils/date.d.ts.map +1 -1
  457. package/dist/utils/date.js +7 -2
  458. package/dist/utils/date.js.map +1 -1
  459. package/package.json +4 -3
  460. package/src/banner.ts +29 -13
  461. package/src/cli.ts +109 -13
  462. package/src/cmd/ai/capabilities/index.ts +4 -0
  463. package/src/cmd/ai/capabilities/show.ts +13 -2
  464. package/src/cmd/ai/index.ts +11 -0
  465. package/src/cmd/ai/prompt/agent.ts +342 -0
  466. package/src/cmd/ai/prompt/api.ts +274 -0
  467. package/src/cmd/ai/prompt/index.ts +18 -3
  468. package/src/cmd/ai/prompt/llm.ts +2 -2
  469. package/src/cmd/ai/prompt/web.ts +301 -0
  470. package/src/cmd/ai/schema/generate.ts +1 -1
  471. package/src/cmd/ai/schema/index.ts +2 -0
  472. package/src/cmd/ai/schema/show.ts +4 -1
  473. package/src/cmd/auth/api.ts +28 -6
  474. package/src/cmd/auth/index.ts +5 -0
  475. package/src/cmd/auth/login.ts +5 -22
  476. package/src/cmd/auth/logout.ts +4 -1
  477. package/src/cmd/auth/signup.ts +4 -1
  478. package/src/cmd/auth/ssh/add.ts +13 -4
  479. package/src/cmd/auth/ssh/api.ts +21 -5
  480. package/src/cmd/auth/ssh/delete.ts +4 -4
  481. package/src/cmd/auth/ssh/index.ts +5 -0
  482. package/src/cmd/auth/ssh/list.ts +3 -3
  483. package/src/cmd/auth/whoami.ts +4 -7
  484. package/src/cmd/build/ast.ts +636 -38
  485. package/src/cmd/build/bundler.ts +110 -37
  486. package/src/cmd/build/file.ts +1 -1
  487. package/src/cmd/build/fix-duplicate-exports.ts +4 -1
  488. package/src/cmd/build/index.ts +58 -13
  489. package/src/cmd/build/plugin.ts +210 -46
  490. package/src/cmd/cloud/agent/get.ts +5 -2
  491. package/src/cmd/cloud/agent/index.ts +5 -0
  492. package/src/cmd/cloud/agent/list.ts +3 -3
  493. package/src/cmd/cloud/apikey/create.ts +14 -5
  494. package/src/cmd/cloud/apikey/delete.ts +3 -3
  495. package/src/cmd/cloud/apikey/get.ts +1 -1
  496. package/src/cmd/cloud/apikey/index.ts +8 -0
  497. package/src/cmd/cloud/apikey/list.ts +4 -1
  498. package/src/cmd/cloud/db/create.ts +37 -22
  499. package/src/cmd/cloud/db/delete.ts +36 -21
  500. package/src/cmd/cloud/db/get.ts +12 -4
  501. package/src/cmd/cloud/db/index.ts +5 -0
  502. package/src/cmd/cloud/db/list.ts +19 -7
  503. package/src/cmd/cloud/db/sql.ts +12 -3
  504. package/src/cmd/cloud/deploy.ts +9 -3
  505. package/src/cmd/cloud/deployment/index.ts +5 -0
  506. package/src/cmd/cloud/deployment/list.ts +12 -3
  507. package/src/cmd/cloud/deployment/logs.ts +16 -4
  508. package/src/cmd/cloud/deployment/remove.ts +14 -4
  509. package/src/cmd/cloud/deployment/rollback.ts +8 -3
  510. package/src/cmd/cloud/deployment/show.ts +8 -2
  511. package/src/cmd/cloud/deployment/undeploy.ts +12 -4
  512. package/src/cmd/cloud/deployment/utils.ts +7 -1
  513. package/src/cmd/cloud/domain.ts +9 -2
  514. package/src/cmd/cloud/env/delete.ts +4 -1
  515. package/src/cmd/cloud/env/get.ts +4 -1
  516. package/src/cmd/cloud/env/import.ts +10 -0
  517. package/src/cmd/cloud/env/index.ts +8 -0
  518. package/src/cmd/cloud/env/list.ts +4 -1
  519. package/src/cmd/cloud/env/pull.ts +4 -1
  520. package/src/cmd/cloud/env/push.ts +1 -1
  521. package/src/cmd/cloud/env/set.ts +3 -3
  522. package/src/cmd/cloud/index.ts +7 -1
  523. package/src/cmd/cloud/keyvalue/create-namespace.ts +9 -4
  524. package/src/cmd/cloud/keyvalue/delete-namespace.ts +12 -4
  525. package/src/cmd/cloud/keyvalue/delete.ts +6 -4
  526. package/src/cmd/cloud/keyvalue/get.ts +3 -4
  527. package/src/cmd/cloud/keyvalue/index.ts +8 -0
  528. package/src/cmd/cloud/keyvalue/keys.ts +3 -4
  529. package/src/cmd/cloud/keyvalue/list-namespaces.ts +3 -4
  530. package/src/cmd/cloud/keyvalue/repl.ts +1 -2
  531. package/src/cmd/cloud/keyvalue/search.ts +9 -4
  532. package/src/cmd/cloud/keyvalue/set.ts +14 -4
  533. package/src/cmd/cloud/keyvalue/stats.ts +6 -4
  534. package/src/cmd/cloud/objectstore/delete-bucket.ts +8 -3
  535. package/src/cmd/cloud/objectstore/delete.ts +12 -4
  536. package/src/cmd/cloud/objectstore/get.ts +12 -4
  537. package/src/cmd/cloud/objectstore/index.ts +8 -0
  538. package/src/cmd/cloud/objectstore/list-buckets.ts +6 -2
  539. package/src/cmd/cloud/objectstore/list-keys.ts +6 -4
  540. package/src/cmd/cloud/objectstore/put.ts +16 -4
  541. package/src/cmd/cloud/objectstore/repl.ts +6 -2
  542. package/src/cmd/cloud/objectstore/url.ts +12 -4
  543. package/src/cmd/cloud/scp/download.ts +16 -5
  544. package/src/cmd/cloud/scp/index.ts +11 -0
  545. package/src/cmd/cloud/scp/upload.ts +16 -5
  546. package/src/cmd/cloud/secret/delete.ts +4 -1
  547. package/src/cmd/cloud/secret/get.ts +5 -2
  548. package/src/cmd/cloud/secret/import.ts +5 -2
  549. package/src/cmd/cloud/secret/index.ts +8 -0
  550. package/src/cmd/cloud/secret/list.ts +4 -1
  551. package/src/cmd/cloud/secret/pull.ts +4 -1
  552. package/src/cmd/cloud/secret/push.ts +1 -1
  553. package/src/cmd/cloud/secret/set.ts +8 -2
  554. package/src/cmd/cloud/session/get.ts +16 -2
  555. package/src/cmd/cloud/session/index.ts +5 -0
  556. package/src/cmd/cloud/session/list.ts +29 -8
  557. package/src/cmd/cloud/session/logs.ts +8 -2
  558. package/src/cmd/cloud/ssh.ts +15 -7
  559. package/src/cmd/cloud/storage/create.ts +12 -3
  560. package/src/cmd/cloud/storage/delete.ts +16 -4
  561. package/src/cmd/cloud/storage/download.ts +16 -4
  562. package/src/cmd/cloud/storage/get.ts +12 -3
  563. package/src/cmd/cloud/storage/index.ts +8 -0
  564. package/src/cmd/cloud/storage/list.ts +39 -15
  565. package/src/cmd/cloud/storage/upload.ts +24 -9
  566. package/src/cmd/cloud/stream/delete.ts +9 -4
  567. package/src/cmd/cloud/stream/get.ts +10 -5
  568. package/src/cmd/cloud/stream/index.ts +5 -0
  569. package/src/cmd/cloud/stream/list.ts +11 -6
  570. package/src/cmd/cloud/thread/delete.ts +44 -0
  571. package/src/cmd/cloud/thread/get.ts +88 -0
  572. package/src/cmd/cloud/thread/index.ts +17 -0
  573. package/src/cmd/cloud/thread/list.ts +125 -0
  574. package/src/cmd/cloud/vector/delete.ts +17 -6
  575. package/src/cmd/cloud/vector/get.ts +12 -4
  576. package/src/cmd/cloud/vector/index.ts +8 -0
  577. package/src/cmd/cloud/vector/search.ts +20 -6
  578. package/src/cmd/dev/agents.ts +7 -2
  579. package/src/cmd/dev/api.ts +4 -1
  580. package/src/cmd/dev/index.ts +16 -5
  581. package/src/cmd/help/index.ts +40 -0
  582. package/src/cmd/index.ts +1 -0
  583. package/src/cmd/profile/create.ts +3 -3
  584. package/src/cmd/profile/delete.ts +6 -3
  585. package/src/cmd/profile/index.ts +8 -0
  586. package/src/cmd/profile/list.ts +4 -1
  587. package/src/cmd/profile/show.ts +6 -3
  588. package/src/cmd/profile/use.ts +12 -3
  589. package/src/cmd/project/create.ts +11 -5
  590. package/src/cmd/project/delete.ts +15 -6
  591. package/src/cmd/project/download.ts +44 -3
  592. package/src/cmd/project/index.ts +5 -0
  593. package/src/cmd/project/list.ts +6 -3
  594. package/src/cmd/project/show.ts +6 -3
  595. package/src/cmd/project/templates.ts +12 -2
  596. package/src/cmd/repl/index.ts +1 -1
  597. package/src/cmd/version/index.ts +7 -1
  598. package/src/command-prefix.ts +5 -3
  599. package/src/config.ts +4 -2
  600. package/src/crypto/box.ts +69 -17
  601. package/src/download.ts +7 -1
  602. package/src/env-util.ts +44 -2
  603. package/src/errors.ts +9 -1
  604. package/src/index.ts +6 -1
  605. package/src/schema-generator.ts +7 -1
  606. package/src/steps.ts +22 -13
  607. package/src/tui.ts +28 -16
  608. package/src/types.ts +11 -6
  609. package/src/utils/date.ts +9 -4
@@ -11,7 +11,10 @@ export const listSubcommand = createSubcommand({
11
11
  aliases: ['ls'],
12
12
  description: 'List all secrets',
13
13
  tags: ['read-only', 'fast', 'requires-auth', 'requires-project'],
14
- examples: [getCommand('secret list'), getCommand('secret list --no-mask')],
14
+ examples: [
15
+ { command: getCommand('secret list'), description: 'List items' },
16
+ { command: getCommand('secret list --no-mask'), description: 'Use no mask option' },
17
+ ],
15
18
  requires: { auth: true, project: true, apiClient: true },
16
19
  idempotent: true,
17
20
  schema: {
@@ -24,7 +24,10 @@ export const pullSubcommand = createSubcommand({
24
24
  description: 'Pull secrets from cloud to local .env.production file',
25
25
  tags: ['slow', 'requires-auth', 'requires-project'],
26
26
  idempotent: true,
27
- examples: [getCommand('secret pull'), getCommand('secret pull --force')],
27
+ examples: [
28
+ { command: getCommand('secret pull'), description: 'Run pull command' },
29
+ { command: getCommand('secret pull --force'), description: 'Use force option' },
30
+ ],
28
31
  requires: { auth: true, project: true, apiClient: true },
29
32
  prerequisites: ['cloud deploy'],
30
33
  schema: {
@@ -23,7 +23,7 @@ export const pushSubcommand = createSubcommand({
23
23
  'requires-project',
24
24
  ],
25
25
  idempotent: true,
26
- examples: [getCommand('secret push')],
26
+ examples: [{ command: getCommand('secret push'), description: 'Run push command' }],
27
27
  requires: { auth: true, project: true, apiClient: true },
28
28
  prerequisites: ['secret set'],
29
29
  schema: {
@@ -17,8 +17,14 @@ export const setSubcommand = createSubcommand({
17
17
  tags: ['mutating', 'updates-resource', 'slow', 'requires-auth', 'requires-project'],
18
18
  idempotent: true,
19
19
  examples: [
20
- getCommand('secret set DATABASE_URL "postgres://user:pass@host:5432/db"'),
21
- getCommand('secret set STRIPE_SECRET_KEY "sk_live_..."'),
20
+ {
21
+ command: getCommand('secret set DATABASE_URL "postgres://user:pass@host:5432/db"'),
22
+ description: 'Set the DATABASE_URL environment secret',
23
+ },
24
+ {
25
+ command: getCommand('secret set STRIPE_SECRET_KEY "sk_live_..."'),
26
+ description: 'Set the STRIPE_SECRET_KEY environment secret',
27
+ },
22
28
  ],
23
29
  requires: { auth: true, project: true, apiClient: true },
24
30
  schema: {
@@ -1,7 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import { createSubcommand } from '../../../types';
3
3
  import * as tui from '../../../tui';
4
- import { sessionGet, type SpanNode, type EvalRun, type AgentInfo } from '@agentuity/server';
4
+ import {
5
+ sessionGet,
6
+ type SpanNode,
7
+ type EvalRun,
8
+ type AgentInfo,
9
+ APIError,
10
+ } from '@agentuity/server';
5
11
  import { getCommand } from '../../../command-prefix';
6
12
  import { ErrorCode } from '../../../errors';
7
13
  import { getCatalystAPIClient } from '../../../config';
@@ -104,7 +110,12 @@ export const getSubcommand = createSubcommand({
104
110
  name: 'get',
105
111
  description: 'Get details about a specific session',
106
112
  tags: ['read-only', 'fast', 'requires-auth'],
107
- examples: [`${getCommand('cloud session get')} sess_abc123xyz`],
113
+ examples: [
114
+ {
115
+ command: getCommand('cloud session get sess_abc123xyz'),
116
+ description: 'Get a session by ID',
117
+ },
118
+ ],
108
119
  requires: { auth: true },
109
120
  idempotent: true,
110
121
  schema: {
@@ -233,6 +244,9 @@ export const getSubcommand = createSubcommand({
233
244
 
234
245
  return result;
235
246
  } catch (ex) {
247
+ if (ex instanceof APIError && ex.status === 404) {
248
+ tui.fatal(`Session ${args.session_id} not found`, ErrorCode.RESOURCE_NOT_FOUND);
249
+ }
236
250
  tui.fatal(
237
251
  `Failed to get session: ${ex instanceof Error ? ex.message : String(ex)}`,
238
252
  ErrorCode.API_ERROR
@@ -2,10 +2,15 @@ import { createCommand } from '../../../types';
2
2
  import { getSubcommand } from './get';
3
3
  import { listSubcommand } from './list';
4
4
  import { logsSubcommand } from './logs';
5
+ import { getCommand } from '../../../command-prefix';
5
6
 
6
7
  export const sessionCommand = createCommand({
7
8
  name: 'session',
8
9
  description: 'Manage sessions',
9
10
  tags: ['requires-auth'],
11
+ examples: [
12
+ { command: getCommand('cloud session list'), description: 'List all sessions' },
13
+ { command: getCommand('cloud session logs <id>'), description: 'View session logs' },
14
+ ],
10
15
  subcommands: [getSubcommand, listSubcommand, logsSubcommand],
11
16
  });
@@ -24,14 +24,35 @@ export const listSubcommand = createSubcommand({
24
24
  description: 'List recent sessions',
25
25
  tags: ['read-only', 'fast', 'requires-auth'],
26
26
  examples: [
27
- `${getCommand('cloud session list')} # List 10 most recent sessions`,
28
- `${getCommand('cloud session list')} --count=25 # List 25 most recent sessions`,
29
- `${getCommand('cloud session list')} --project-id=proj_* # Filter by project`,
30
- `${getCommand('cloud session list')} --deployment-id=* # Filter by deployment`,
31
- `${getCommand('cloud session list')} --success=true # Only successful sessions`,
32
- `${getCommand('cloud session list')} --devmode=false # Only production sessions`,
33
- `${getCommand('cloud session list')} --trigger=api # Only API triggered sessions`,
34
- `${getCommand('cloud session list')} --env=production # Only production environment`,
27
+ { command: getCommand('cloud session list'), description: 'List 10 most recent sessions' },
28
+ {
29
+ command: getCommand('cloud session list --count=25'),
30
+ description: 'List 25 most recent sessions',
31
+ },
32
+ {
33
+ command: getCommand('cloud session list --project-id=proj_*'),
34
+ description: 'Filter by project',
35
+ },
36
+ {
37
+ command: getCommand('cloud session list --deployment-id=*'),
38
+ description: 'Filter by deployment',
39
+ },
40
+ {
41
+ command: getCommand('cloud session list --success=true'),
42
+ description: 'Only successful sessions',
43
+ },
44
+ {
45
+ command: getCommand('cloud session list --devmode=false'),
46
+ description: 'Only production sessions',
47
+ },
48
+ {
49
+ command: getCommand('cloud session list --trigger=api'),
50
+ description: 'Only API triggered sessions',
51
+ },
52
+ {
53
+ command: getCommand('cloud session list --env=production'),
54
+ description: 'Only production environment',
55
+ },
35
56
  ],
36
57
  aliases: ['ls'],
37
58
  requires: { auth: true },
@@ -19,8 +19,14 @@ export const logsSubcommand = createSubcommand({
19
19
  description: 'Get logs for a specific session',
20
20
  tags: ['read-only', 'slow', 'requires-auth'],
21
21
  examples: [
22
- `${getCommand('cloud session logs')} sess_abc123xyz`,
23
- `${getCommand('cloud session logs')} --no-timestamps # hide timestamps`,
22
+ {
23
+ command: getCommand('cloud session logs sess_abc123xyz'),
24
+ description: 'View logs for session',
25
+ },
26
+ {
27
+ command: getCommand('cloud session logs sess_abc123xyz --no-timestamps'),
28
+ description: 'Hide timestamps',
29
+ },
24
30
  ],
25
31
  requires: { auth: true, apiClient: true },
26
32
  optional: { project: true },
@@ -3,7 +3,6 @@ import { createSubcommand } from '../../types';
3
3
  import * as tui from '../../tui';
4
4
  import { getIONHost } from '../../config';
5
5
  import { getCommand } from '../../command-prefix';
6
-
7
6
  const args = z.object({
8
7
  identifier: z.string().optional().describe('The project or deployment id to use'),
9
8
  command: z.string().optional().describe('The command to run'),
@@ -19,12 +18,21 @@ export const sshSubcommand = createSubcommand({
19
18
  tags: ['read-only', 'slow', 'requires-auth', 'requires-deployment'],
20
19
  idempotent: true,
21
20
  examples: [
22
- `${getCommand('cloud ssh')} # SSH into current project`,
23
- `${getCommand('cloud ssh')} proj_abc123xyz # SSH into specific project`,
24
- `${getCommand('cloud ssh')} deploy_abc123xyz # SSH into specific deployment`,
25
- `${getCommand('cloud ssh')} 'ps aux' # Run command and exit`,
26
- `${getCommand('cloud ssh')} proj_abc123xyz 'tail -f /var/log/app.log'`,
27
- `${getCommand('cloud ssh')} --show # Show SSH command without executing`,
21
+ { command: getCommand('cloud ssh'), description: 'SSH into current project' },
22
+ { command: getCommand('cloud ssh proj_abc123xyz'), description: 'SSH into specific project' },
23
+ {
24
+ command: getCommand('cloud ssh deploy_abc123xyz'),
25
+ description: 'SSH into specific deployment',
26
+ },
27
+ { command: getCommand("cloud ssh 'ps aux'"), description: 'Run command and exit' },
28
+ {
29
+ command: getCommand("cloud ssh proj_abc123xyz 'tail -f /var/log/app.log'"),
30
+ description: 'Run command on specific project',
31
+ },
32
+ {
33
+ command: getCommand('cloud ssh --show'),
34
+ description: 'Show SSH command without executing',
35
+ },
28
36
  ],
29
37
  toplevel: true,
30
38
  requires: { auth: true, apiClient: true },
@@ -14,9 +14,18 @@ export const createSubcommand = defineSubcommand({
14
14
  idempotent: false,
15
15
  requires: { auth: true, org: true, region: true },
16
16
  examples: [
17
- getCommand('cloud storage create'),
18
- getCommand('cloud storage new'),
19
- getCommand('--dry-run cloud storage create'),
17
+ {
18
+ command: getCommand('cloud storage create'),
19
+ description: 'Create a new cloud storage bucket',
20
+ },
21
+ {
22
+ command: getCommand('cloud storage new'),
23
+ description: 'Alias for "cloud storage create" (shorthand "new")',
24
+ },
25
+ {
26
+ command: getCommand('--dry-run cloud storage create'),
27
+ description: 'Dry-run: display what would be created without making changes',
28
+ },
20
29
  ],
21
30
  schema: {
22
31
  response: z.object({
@@ -17,10 +17,22 @@ export const deleteSubcommand = createSubcommand({
17
17
  idempotent: false,
18
18
  requires: { auth: true, org: true, region: true },
19
19
  examples: [
20
- getCommand('cloud storage delete my-bucket'),
21
- getCommand('cloud storage rm my-bucket file.txt'),
22
- getCommand('cloud storage delete'),
23
- getCommand('--dry-run cloud storage delete my-bucket'),
20
+ {
21
+ command: getCommand('cloud storage delete my-bucket'),
22
+ description: 'Delete a storage bucket',
23
+ },
24
+ {
25
+ command: getCommand('cloud storage rm my-bucket file.txt'),
26
+ description: 'Delete a file from a bucket',
27
+ },
28
+ {
29
+ command: getCommand('cloud storage delete'),
30
+ description: 'Interactive selection to delete a bucket',
31
+ },
32
+ {
33
+ command: getCommand('--dry-run cloud storage delete my-bucket'),
34
+ description: 'Dry-run: show what would be deleted without making changes',
35
+ },
24
36
  ],
25
37
  schema: {
26
38
  args: z.object({
@@ -14,10 +14,22 @@ export const downloadSubcommand = createSubcommand({
14
14
  requires: { auth: true, org: true, region: true },
15
15
  idempotent: true,
16
16
  examples: [
17
- `${getCommand('cloud storage download')} my-bucket file.txt`,
18
- `${getCommand('cloud storage download')} my-bucket file.txt output.txt`,
19
- `${getCommand('cloud storage download')} my-bucket file.txt - > output.txt`,
20
- `${getCommand('cloud storage download')} my-bucket file.txt --metadata`,
17
+ {
18
+ command: `${getCommand('cloud storage download')} my-bucket file.txt`,
19
+ description: 'Download file from bucket',
20
+ },
21
+ {
22
+ command: `${getCommand('cloud storage download')} my-bucket file.txt output.txt`,
23
+ description: 'Download file to specific path',
24
+ },
25
+ {
26
+ command: `${getCommand('cloud storage download')} my-bucket file.txt - > output.txt`,
27
+ description: 'Download file to stdout',
28
+ },
29
+ {
30
+ command: `${getCommand('cloud storage download')} my-bucket file.txt --metadata`,
31
+ description: 'Download metadata only',
32
+ },
21
33
  ],
22
34
  schema: {
23
35
  args: z.object({
@@ -22,9 +22,18 @@ export const getSubcommand = createSubcommand({
22
22
  requires: { auth: true, org: true, region: true },
23
23
  idempotent: true,
24
24
  examples: [
25
- `${getCommand('cloud storage get')} my-bucket`,
26
- `${getCommand('cloud storage show')} my-bucket`,
27
- `${getCommand('cloud storage get')} my-bucket --show-credentials`,
25
+ {
26
+ command: `${getCommand('cloud storage get')} my-bucket`,
27
+ description: 'Get bucket details',
28
+ },
29
+ {
30
+ command: `${getCommand('cloud storage show')} my-bucket`,
31
+ description: 'Show bucket information',
32
+ },
33
+ {
34
+ command: `${getCommand('cloud storage get')} my-bucket --show-credentials`,
35
+ description: 'Get bucket with credentials',
36
+ },
28
37
  ],
29
38
  schema: {
30
39
  args: z.object({
@@ -5,12 +5,20 @@ import { deleteSubcommand } from './delete';
5
5
  import { getSubcommand } from './get';
6
6
  import { uploadSubcommand } from './upload';
7
7
  import { downloadSubcommand } from './download';
8
+ import { getCommand } from '../../../command-prefix';
8
9
 
9
10
  export const storageCommand = createCommand({
10
11
  name: 'storage',
11
12
  aliases: ['s3'],
12
13
  description: 'Manage storage resources',
13
14
  tags: ['slow', 'requires-auth', 'requires-deployment'],
15
+ examples: [
16
+ { command: getCommand('cloud storage list'), description: 'List all storage resources' },
17
+ {
18
+ command: getCommand('cloud storage upload ./file.txt'),
19
+ description: 'Upload file to storage',
20
+ },
21
+ ],
14
22
  subcommands: [
15
23
  createSubcommand,
16
24
  listSubcommand,
@@ -40,12 +40,21 @@ export const listSubcommand = createSubcommand({
40
40
  requires: { auth: true, org: true, region: true },
41
41
  idempotent: true,
42
42
  examples: [
43
- getCommand('cloud storage list'),
44
- getCommand('cloud storage list my-bucket'),
45
- getCommand('cloud storage list my-bucket path/prefix'),
46
- getCommand('--json cloud storage list'),
47
- getCommand('cloud storage ls'),
48
- getCommand('cloud storage list --show-credentials'),
43
+ { command: getCommand('cloud storage list'), description: 'List items' },
44
+ { command: getCommand('cloud storage list my-bucket'), description: 'List items' },
45
+ {
46
+ command: getCommand('cloud storage list my-bucket path/prefix'),
47
+ description: 'List items',
48
+ },
49
+ {
50
+ command: getCommand('--json cloud storage list'),
51
+ description: 'Show output in JSON format',
52
+ },
53
+ { command: getCommand('cloud storage ls'), description: 'List items' },
54
+ {
55
+ command: getCommand('cloud storage list --show-credentials'),
56
+ description: 'Use show credentials option',
57
+ },
49
58
  ],
50
59
  schema: {
51
60
  args: z.object({
@@ -59,6 +68,7 @@ export const listSubcommand = createSubcommand({
59
68
  .describe(
60
69
  'Show credentials in plain text (default: masked in terminal, unmasked in JSON)'
61
70
  ),
71
+ nameOnly: z.boolean().optional().describe('Print the name only'),
62
72
  }),
63
73
  response: StorageListResponseSchema,
64
74
  },
@@ -118,14 +128,22 @@ export const listSubcommand = createSubcommand({
118
128
  if (objects.length === 0) {
119
129
  tui.info('No files found');
120
130
  } else {
121
- tui.info(
122
- tui.bold(`Files in ${args.name}${args.prefix ? ` (prefix: ${args.prefix})` : ''}`)
123
- );
124
- tui.newline();
125
- for (const obj of objects) {
126
- console.log(
127
- `${obj.key} ${tui.muted(`(${obj.size} bytes, ${obj.lastModified})`)}`
131
+ if (opts.nameOnly) {
132
+ for (const obj of objects) {
133
+ console.log(obj.key);
134
+ }
135
+ } else {
136
+ tui.info(
137
+ tui.bold(
138
+ `Files in ${args.name}${args.prefix ? ` (prefix: ${args.prefix})` : ''}`
139
+ )
128
140
  );
141
+ tui.newline();
142
+ for (const obj of objects) {
143
+ console.log(
144
+ `${obj.key} ${tui.muted(`(${obj.size} bytes, ${obj.lastModified})`)}`
145
+ );
146
+ }
129
147
  }
130
148
  }
131
149
  }
@@ -161,9 +179,15 @@ export const listSubcommand = createSubcommand({
161
179
  if (resources.s3.length === 0) {
162
180
  tui.info('No storage buckets found');
163
181
  } else {
164
- tui.info(tui.bold('Storage'));
165
- tui.newline();
182
+ if (!opts.nameOnly) {
183
+ tui.info(tui.bold('Storage'));
184
+ tui.newline();
185
+ }
166
186
  for (const s3 of resources.s3) {
187
+ if (opts.nameOnly) {
188
+ console.log(s3.bucket_name);
189
+ continue;
190
+ }
167
191
  console.log(tui.bold(s3.bucket_name));
168
192
  if (s3.access_key) {
169
193
  const displayAccessKey = shouldMask
@@ -16,9 +16,18 @@ export const uploadSubcommand = createSubcommand({
16
16
  requires: { auth: true, org: true, region: true },
17
17
  idempotent: false,
18
18
  examples: [
19
- `${getCommand('cloud storage upload')} my-bucket file.txt`,
20
- `${getCommand('cloud storage put')} my-bucket file.txt --content-type text/plain`,
21
- `cat file.txt | ${getCommand('cloud storage upload')} my-bucket -`,
19
+ {
20
+ command: `${getCommand('cloud storage upload')} my-bucket file.txt`,
21
+ description: 'Upload file to bucket',
22
+ },
23
+ {
24
+ command: `${getCommand('cloud storage put')} my-bucket file.txt --content-type text/plain`,
25
+ description: 'Upload file with content type',
26
+ },
27
+ {
28
+ command: `cat file.txt | ${getCommand('cloud storage upload')} my-bucket -`,
29
+ description: 'Upload from stdin',
30
+ },
22
31
  ],
23
32
  schema: {
24
33
  args: z.object({
@@ -66,18 +75,24 @@ export const uploadSubcommand = createSubcommand({
66
75
  );
67
76
  }
68
77
 
78
+ // TODO: we need to optimize this to not load the entire file in memory!
79
+
69
80
  // Read file content
70
81
  let fileContent: Buffer;
71
82
  let actualFilename: string;
72
83
 
73
84
  if (args.filename === '-') {
74
- // Read from STDIN
75
- const chunks: Buffer[] = [];
76
- for await (const chunk of Bun.stdin.stream()) {
77
- chunks.push(Buffer.from(chunk));
85
+ // Read from STDIN (binary-safe)
86
+ try {
87
+ const arrayBuffer = await Bun.readableStreamToArrayBuffer(Bun.stdin.stream());
88
+ fileContent = Buffer.from(arrayBuffer);
89
+ actualFilename = 'stdin';
90
+ } catch (error) {
91
+ tui.fatal(
92
+ `Cannot read from stdin: ${error instanceof Error ? error.message : String(error)}`,
93
+ ErrorCode.FILE_NOT_FOUND
94
+ );
78
95
  }
79
- fileContent = Buffer.concat(chunks);
80
- actualFilename = 'stdin';
81
96
  } else {
82
97
  // Read from file
83
98
  const file = Bun.file(args.filename);
@@ -3,7 +3,6 @@ import { createCommand } from '../../../types';
3
3
  import * as tui from '../../../tui';
4
4
  import { createStorageAdapter } from './util';
5
5
  import { getCommand } from '../../../command-prefix';
6
-
7
6
  const DeleteStreamResponseSchema = z.object({
8
7
  id: z.string().describe('Stream ID'),
9
8
  });
@@ -16,9 +15,15 @@ export const deleteSubcommand = createCommand({
16
15
  idempotent: true,
17
16
  requires: { auth: true, project: true },
18
17
  examples: [
19
- `${getCommand('stream delete stream-id-123')} - Delete a stream`,
20
- `${getCommand('stream rm stream-id-456')} - Delete stream (using alias)`,
21
- `${getCommand('stream del stream-id-789')} - Delete stream (using alias)`,
18
+ { command: getCommand('stream delete stream-id-123'), description: 'Delete a stream' },
19
+ {
20
+ command: getCommand('stream rm stream-id-456'),
21
+ description: 'Delete stream (using alias)',
22
+ },
23
+ {
24
+ command: getCommand('stream del stream-id-789'),
25
+ description: 'Delete stream (using alias)',
26
+ },
22
27
  ],
23
28
  schema: {
24
29
  args: z.object({
@@ -3,7 +3,6 @@ import { createCommand } from '../../../types';
3
3
  import * as tui from '../../../tui';
4
4
  import { createStorageAdapter } from './util';
5
5
  import { getCommand } from '../../../command-prefix';
6
-
7
6
  function formatBytes(bytes: number): string {
8
7
  if (bytes === 0) return '0 B';
9
8
  if (bytes < 1024) return `${bytes} B`;
@@ -27,10 +26,16 @@ export const getSubcommand = createCommand({
27
26
  requires: { auth: true, project: true },
28
27
  idempotent: true,
29
28
  examples: [
30
- `${getCommand('stream get stream-id-123')} - Get stream details`,
31
- `${getCommand('stream get stream-id-123 --json')} - Get stream as JSON`,
32
- `${getCommand('stream get stream-id-123 --output stream.dat')} - Download stream to file`,
33
- `${getCommand('stream get stream-id-123 -o stream.dat')} - Download stream (short flag)`,
29
+ { command: getCommand('stream get stream-id-123'), description: 'Get stream details' },
30
+ { command: getCommand('stream get stream-id-123 --json'), description: 'Get stream as JSON' },
31
+ {
32
+ command: getCommand('stream get stream-id-123 --output stream.dat'),
33
+ description: 'Download stream to file',
34
+ },
35
+ {
36
+ command: getCommand('stream get stream-id-123 -o stream.dat'),
37
+ description: 'Download stream (short flag)',
38
+ },
34
39
  ],
35
40
  schema: {
36
41
  args: z.object({
@@ -2,12 +2,17 @@ import { createCommand } from '../../../types';
2
2
  import listSubcommand from './list';
3
3
  import getSubcommand from './get';
4
4
  import deleteSubcommand from './delete';
5
+ import { getCommand } from '../../../command-prefix';
5
6
 
6
7
  export const streamCommand = createCommand({
7
8
  name: 'stream',
8
9
  aliases: ['streams'],
9
10
  description: 'Manage streams',
10
11
  tags: ['slow', 'requires-auth'],
12
+ examples: [
13
+ { command: getCommand('cloud stream list'), description: 'List all streams' },
14
+ { command: getCommand('cloud stream get <id>'), description: 'Get stream details' },
15
+ ],
11
16
  subcommands: [listSubcommand, getSubcommand, deleteSubcommand],
12
17
  });
13
18
 
@@ -3,7 +3,6 @@ import { createCommand } from '../../../types';
3
3
  import * as tui from '../../../tui';
4
4
  import { createStorageAdapter } from './util';
5
5
  import { getCommand } from '../../../command-prefix';
6
-
7
6
  function formatBytes(bytes: number): string {
8
7
  if (bytes === 0) return '0 B';
9
8
  if (bytes < 1024) return `${bytes} B`;
@@ -33,11 +32,17 @@ export const listSubcommand = createCommand({
33
32
  requires: { auth: true, project: true },
34
33
  idempotent: true,
35
34
  examples: [
36
- `${getCommand('stream list')} - List all streams`,
37
- `${getCommand('stream ls --size 50')} - List 50 most recent streams`,
38
- `${getCommand('stream list --name agent-logs')} - Filter by name`,
39
- `${getCommand('stream list --metadata type=export')} - Filter by metadata`,
40
- `${getCommand('stream ls --json')} - Output as JSON`,
35
+ { command: getCommand('cloud stream list'), description: 'List all streams' },
36
+ {
37
+ command: getCommand('cloud stream ls --size 50'),
38
+ description: 'List 50 most recent streams',
39
+ },
40
+ { command: getCommand('cloud stream list --name agent-logs'), description: 'Filter by name' },
41
+ {
42
+ command: getCommand('cloud stream list --metadata type=export'),
43
+ description: 'Filter by metadata',
44
+ },
45
+ { command: getCommand('cloud stream ls --json'), description: 'Output as JSON' },
41
46
  ],
42
47
  schema: {
43
48
  options: z.object({
@@ -0,0 +1,44 @@
1
+ import { z } from 'zod';
2
+ import { createSubcommand } from '../../../types';
3
+ import * as tui from '../../../tui';
4
+ import { threadDelete, APIError } from '@agentuity/server';
5
+ import { getCommand } from '../../../command-prefix';
6
+ import { ErrorCode } from '../../../errors';
7
+ import { getCatalystAPIClient } from '../../../config';
8
+
9
+ export const deleteSubcommand = createSubcommand({
10
+ name: 'delete',
11
+ description: 'Delete a thread',
12
+ tags: ['destructive', 'requires-auth'],
13
+ examples: [
14
+ {
15
+ command: getCommand('cloud thread delete thrd_abc123xyz'),
16
+ description: 'Delete a thread by ID',
17
+ },
18
+ ],
19
+ aliases: ['rm'],
20
+ requires: { auth: true },
21
+ schema: {
22
+ args: z.object({
23
+ thread_id: z.string().describe('Thread ID'),
24
+ }),
25
+ },
26
+ async handler(ctx) {
27
+ const { config, logger, auth, args } = ctx;
28
+ const catalystClient = getCatalystAPIClient(config, logger, auth);
29
+
30
+ try {
31
+ await threadDelete(catalystClient, { id: args.thread_id });
32
+ tui.success(`Thread ${args.thread_id} deleted successfully`);
33
+ } catch (ex) {
34
+ if (ex instanceof APIError && ex.status === 404) {
35
+ tui.fatal(`Thread ${args.thread_id} not found`, ErrorCode.RESOURCE_NOT_FOUND);
36
+ return;
37
+ }
38
+ tui.fatal(
39
+ `Failed to delete thread: ${ex instanceof Error ? ex.message : String(ex)}`,
40
+ ErrorCode.API_ERROR
41
+ );
42
+ }
43
+ },
44
+ });