@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
@@ -1,8 +1,13 @@
1
1
  import * as acornLoose from 'acorn-loose';
2
2
  import { basename, dirname, relative } from 'node:path';
3
+ import { parse as parseCronExpression } from '@datasert/cronjs-parser';
3
4
  import { generate } from 'astring';
4
5
  import { createLogger } from '@agentuity/server';
5
6
  import * as ts from 'typescript';
7
+ import { StructuredError } from '@agentuity/core';
8
+ import { join } from 'node:path';
9
+ import { existsSync, mkdirSync } from 'node:fs';
10
+ import JSON5 from 'json5';
6
11
  const logger = createLogger((process.env.AGENTUITY_LOG_LEVEL || 'info'));
7
12
  function parseObjectExpressionToMap(expr) {
8
13
  const result = new Map();
@@ -76,16 +81,25 @@ function generateStableAgentId(projectId, name) {
76
81
  function generateStableEvalId(projectId, agentId, name) {
77
82
  return `evalid_${hashSHA1(projectId, agentId, name)}`.substring(0, 64);
78
83
  }
84
+ const MetadataError = StructuredError('MetatadataNameMissingError')();
79
85
  function augmentAgentMetadataNode(projectId, id, identifier, rel, version, ast, propvalue, filename) {
80
86
  const metadata = parseObjectExpressionToMap(propvalue);
81
87
  if (!metadata.has('name')) {
82
- const location = ast.loc?.start ? ` on line ${ast.loc.start}` : '';
83
- throw new Error(`missing required metadata.name in ${filename}${location}. This Agent should have a unique and human readable name for this project.`);
88
+ const location = ast.loc?.start?.line ? ` on line ${ast.loc.start.line}` : '';
89
+ throw new MetadataError({
90
+ filename,
91
+ line: ast.loc?.start?.line,
92
+ message: `missing required metadata.name in ${filename}${location}. This Agent should have a unique and human readable name for this project.`,
93
+ });
84
94
  }
85
95
  const name = metadata.get('name');
86
96
  if (metadata.has('identifier') && identifier !== metadata.get('identifier')) {
87
- const location = ast.loc?.start ? ` on line ${ast.loc.start}` : '';
88
- throw new Error(`metadata.identifier (${metadata.get('identifier')}) in ${filename}${location} is mismatched (${name}). This is an internal error.`);
97
+ const location = ast.loc?.start?.line ? ` on line ${ast.loc.start.line}` : '';
98
+ throw new MetadataError({
99
+ filename,
100
+ line: ast.loc?.start?.line,
101
+ message: `metadata.identifier (${metadata.get('identifier')}) in ${filename}${location} is mismatched (${name}). This is an internal error.`,
102
+ });
89
103
  }
90
104
  const descriptionNode = propvalue.properties.find((x) => x.key.name === 'description')?.value;
91
105
  const description = descriptionNode ? descriptionNode.value : '';
@@ -120,7 +134,7 @@ function createAgentMetadataNode(id, name, rel, version, ast, callargexp, _filen
120
134
  function camelToKebab(str) {
121
135
  return str
122
136
  .replace(/([a-z0-9])([A-Z])/g, '$1-$2')
123
- .replace(/([A-Z])([A-Z][a-z])/g, '$1-$2')
137
+ .replace(/([A-Z]+)([A-Z][a-z])/g, '$1-$2')
124
138
  .toLowerCase();
125
139
  }
126
140
  function setLiteralValue(literal, value) {
@@ -229,11 +243,16 @@ function augmentEvalMetadataNode(projectId, agentId, id, name, rel, version, _as
229
243
  }
230
244
  }
231
245
  }
246
+ const DuplicateNameError = StructuredError('DuplicateNameError')();
232
247
  export function parseEvalMetadata(rootDir, filename, contents, projectId, deploymentId, agentId) {
233
248
  const logLevel = (process.env.AGENTUITY_LOG_LEVEL || 'info');
234
249
  const logger = createLogger(logLevel);
235
250
  logger.trace(`Parsing evals from ${filename}`);
236
- const ast = acornLoose.parse(contents, { ecmaVersion: 'latest', sourceType: 'module' });
251
+ const ast = acornLoose.parse(contents, {
252
+ locations: true,
253
+ ecmaVersion: 'latest',
254
+ sourceType: 'module',
255
+ });
237
256
  const rel = relative(rootDir, filename);
238
257
  const version = hash(contents);
239
258
  const evals = [];
@@ -302,7 +321,11 @@ export function parseEvalMetadata(rootDir, filename, contents, projectId, deploy
302
321
  finalName = camelToKebab(variableName);
303
322
  }
304
323
  else {
305
- throw new Error('Eval is missing a name. Please provide metadata.name or use a named export.');
324
+ throw new MetadataError({
325
+ filename,
326
+ line: body.loc?.start?.line,
327
+ message: 'Eval is missing a name. Please provide metadata.name or use a named export.',
328
+ });
306
329
  }
307
330
  logger.trace(`Found eval: ${finalName}${evalDescription ? ` - ${evalDescription}` : ''}`);
308
331
  const evalId = getEvalId(projectId, deploymentId, rel, finalName, version);
@@ -352,15 +375,24 @@ export function parseEvalMetadata(rootDir, filename, contents, projectId, deploy
352
375
  }
353
376
  }
354
377
  if (duplicates.length > 0) {
355
- throw new Error(`Duplicate eval names found in ${rel}: ${duplicates.join(', ')}. ` +
356
- 'Eval names must be unique within the same file to prevent ID collisions.');
378
+ throw new DuplicateNameError({
379
+ filename,
380
+ message: `Duplicate eval names found in ${rel}: ${duplicates.join(', ')}. ` +
381
+ 'Eval names must be unique within the same file to prevent ID collisions.',
382
+ });
357
383
  }
358
384
  const newsource = generate(ast);
359
385
  logger.trace(`Parsed ${evals.length} eval(s) from ${filename}`);
360
386
  return [newsource, evals];
361
387
  }
388
+ const InvalidExportError = StructuredError('InvalidExportError')();
389
+ const InvalidCreateAgentError = StructuredError('InvalidCreateAgentError')();
362
390
  export async function parseAgentMetadata(rootDir, filename, contents, projectId, deploymentId) {
363
- const ast = acornLoose.parse(contents, { ecmaVersion: 'latest', sourceType: 'module' });
391
+ const ast = acornLoose.parse(contents, {
392
+ locations: true,
393
+ ecmaVersion: 'latest',
394
+ sourceType: 'module',
395
+ });
364
396
  let exportName;
365
397
  const rel = relative(rootDir, filename);
366
398
  const name = basename(dirname(filename));
@@ -395,7 +427,10 @@ export async function parseAgentMetadata(rootDir, filename, contents, projectId,
395
427
  }
396
428
  }
397
429
  if (!result && !exportName) {
398
- throw new Error(`could not find default export for ${filename} using ${rootDir}`);
430
+ throw new InvalidExportError({
431
+ filename,
432
+ message: `could not find default export for ${filename} using ${rootDir}`,
433
+ });
399
434
  }
400
435
  if (!result) {
401
436
  for (const body of ast.body) {
@@ -430,7 +465,10 @@ export async function parseAgentMetadata(rootDir, filename, contents, projectId,
430
465
  }
431
466
  }
432
467
  if (!result) {
433
- throw new Error(`error parsing: ${filename}. could not find an proper createAgent defined in this file`);
468
+ throw new InvalidCreateAgentError({
469
+ filename,
470
+ message: `error parsing: ${filename}. could not find an proper createAgent defined in this file`,
471
+ });
434
472
  }
435
473
  // Parse evals from eval.ts file in the same directory
436
474
  const logLevel = (process.env.AGENTUITY_LOG_LEVEL || 'info');
@@ -459,10 +497,16 @@ export async function parseAgentMetadata(rootDir, filename, contents, projectId,
459
497
  }
460
498
  return result;
461
499
  }
500
+ const InvalidCreateRouterError = StructuredError('InvalidCreateRouterError')();
501
+ const InvalidRouterConfigError = StructuredError('InvalidRouterConfigError')();
462
502
  export async function parseRoute(rootDir, filename, projectId, deploymentId) {
463
503
  const contents = await Bun.file(filename).text();
464
504
  const version = hash(contents);
465
- const ast = acornLoose.parse(contents, { ecmaVersion: 'latest', sourceType: 'module' });
505
+ const ast = acornLoose.parse(contents, {
506
+ locations: true,
507
+ ecmaVersion: 'latest',
508
+ sourceType: 'module',
509
+ });
466
510
  let exportName;
467
511
  let variableName;
468
512
  for (const body of ast.body) {
@@ -473,7 +517,10 @@ export async function parseRoute(rootDir, filename, projectId, deploymentId) {
473
517
  }
474
518
  }
475
519
  if (!exportName) {
476
- throw new Error(`could not find default export for ${filename} using ${rootDir}`);
520
+ throw new InvalidExportError({
521
+ filename,
522
+ message: `could not find default export for ${filename} using ${rootDir}`,
523
+ });
477
524
  }
478
525
  for (const body of ast.body) {
479
526
  if (body.type === 'VariableDeclaration') {
@@ -494,7 +541,10 @@ export async function parseRoute(rootDir, filename, projectId, deploymentId) {
494
541
  }
495
542
  }
496
543
  if (!variableName) {
497
- throw new Error(`error parsing: ${filename}. could not find an proper createRouter defined in this file`);
544
+ throw new InvalidCreateRouterError({
545
+ filename,
546
+ message: `error parsing: ${filename}. could not find an proper createRouter defined in this file`,
547
+ });
498
548
  }
499
549
  const rel = relative(rootDir, filename);
500
550
  const dir = dirname(filename);
@@ -541,7 +591,11 @@ export async function parseRoute(rootDir, filename, projectId, deploymentId) {
541
591
  suffix = action.value;
542
592
  }
543
593
  else {
544
- throw new Error(`unsupported HTTP method ${method} in ${filename} at line ${body.start}`);
594
+ throw new InvalidRouterConfigError({
595
+ filename,
596
+ line: body.loc?.start?.line,
597
+ message: `unsupported HTTP method ${method} in ${filename} at line ${body.loc?.start?.line}`,
598
+ });
545
599
  }
546
600
  break;
547
601
  }
@@ -594,14 +648,30 @@ export async function parseRoute(rootDir, filename, projectId, deploymentId) {
594
648
  method = 'post';
595
649
  const theaction = action;
596
650
  if (theaction.type === 'Literal') {
597
- const number = theaction.value;
598
- suffix = hash(number);
651
+ const expression = theaction.value;
652
+ try {
653
+ parseCronExpression(expression, { hasSeconds: false });
654
+ }
655
+ catch (ex) {
656
+ throw new InvalidRouterConfigError({
657
+ filename,
658
+ cause: ex,
659
+ line: body.loc?.start?.line,
660
+ message: `invalid cron expression "${expression}" in ${filename} at line ${body.loc?.start?.line}`,
661
+ });
662
+ }
663
+ suffix = hash(expression);
664
+ config = { expression };
599
665
  break;
600
666
  }
601
667
  break;
602
668
  }
603
669
  default: {
604
- throw new Error(`unsupported router method ${method} in ${filename} at line ${body.start}`);
670
+ throw new InvalidRouterConfigError({
671
+ filename,
672
+ line: body.loc?.start?.line,
673
+ message: `unsupported router method ${method} in ${filename} at line ${body.loc?.start?.line}`,
674
+ });
605
675
  }
606
676
  }
607
677
  const thepath = `${routePrefix}/${routeName}/${suffix}`
@@ -623,8 +693,13 @@ export async function parseRoute(rootDir, filename, projectId, deploymentId) {
623
693
  }
624
694
  }
625
695
  catch (error) {
626
- const err = error instanceof Error ? error : new Error(String(error));
627
- throw new Error(`Failed to parse route file ${filename}: ${err.message}`);
696
+ if (error instanceof InvalidRouterConfigError) {
697
+ throw error;
698
+ }
699
+ throw new InvalidRouterConfigError({
700
+ filename,
701
+ cause: error,
702
+ });
628
703
  }
629
704
  return routes;
630
705
  }
@@ -700,6 +775,383 @@ export function checkRouteConflicts(content, workbenchEndpoint) {
700
775
  return false;
701
776
  }
702
777
  }
778
+ /**
779
+ * Extract AppState type from setup() return value in createApp call
780
+ *
781
+ * @param content - The TypeScript source code from app.ts
782
+ * @returns Type definition string or null if no setup found
783
+ */
784
+ export function extractAppStateType(content) {
785
+ try {
786
+ const sourceFile = ts.createSourceFile('app.ts', content, ts.ScriptTarget.Latest, true);
787
+ let appStateType = null;
788
+ let foundCreateApp = false;
789
+ let foundSetup = false;
790
+ function visitNode(node) {
791
+ // Look for createApp call expression (can be on await expression)
792
+ let callExpr;
793
+ if (ts.isCallExpression(node) && ts.isIdentifier(node.expression)) {
794
+ if (node.expression.text === 'createApp') {
795
+ foundCreateApp = true;
796
+ callExpr = node;
797
+ }
798
+ }
799
+ else if (ts.isAwaitExpression(node) && ts.isCallExpression(node.expression)) {
800
+ const call = node.expression;
801
+ if (ts.isIdentifier(call.expression) && call.expression.text === 'createApp') {
802
+ foundCreateApp = true;
803
+ callExpr = call;
804
+ }
805
+ }
806
+ if (callExpr) {
807
+ // Check if it has a config object argument
808
+ if (callExpr.arguments.length > 0) {
809
+ const configArg = callExpr.arguments[0];
810
+ if (ts.isObjectLiteralExpression(configArg)) {
811
+ // Find setup property
812
+ for (const prop of configArg.properties) {
813
+ if (ts.isPropertyAssignment(prop) &&
814
+ ts.isIdentifier(prop.name) &&
815
+ prop.name.text === 'setup') {
816
+ foundSetup = true;
817
+ // Found setup function - extract return type
818
+ const setupFunc = prop.initializer;
819
+ if (ts.isFunctionExpression(setupFunc) || ts.isArrowFunction(setupFunc)) {
820
+ // Find return statement
821
+ const returnObj = findReturnObject(setupFunc);
822
+ if (returnObj) {
823
+ appStateType = objectLiteralToTypeDefinition(returnObj, sourceFile);
824
+ }
825
+ else {
826
+ logger.debug('No return object found in setup function');
827
+ }
828
+ }
829
+ else {
830
+ logger.debug(`Setup is not a function expression or arrow function, it's: ${ts.SyntaxKind[setupFunc.kind]}`);
831
+ }
832
+ }
833
+ }
834
+ }
835
+ }
836
+ }
837
+ ts.forEachChild(node, visitNode);
838
+ }
839
+ function findReturnObject(func) {
840
+ let returnObject = null;
841
+ function visitFuncNode(node) {
842
+ if (ts.isReturnStatement(node) && node.expression) {
843
+ // Handle direct object literal
844
+ if (ts.isObjectLiteralExpression(node.expression)) {
845
+ returnObject = node.expression;
846
+ }
847
+ // Handle variable reference (const state = {...}; return state;)
848
+ else if (ts.isIdentifier(node.expression)) {
849
+ // Try to find the variable declaration
850
+ const varName = node.expression.text;
851
+ // Walk back through the function to find the declaration
852
+ findVariableDeclaration(func.body, varName);
853
+ }
854
+ }
855
+ ts.forEachChild(node, visitFuncNode);
856
+ }
857
+ function findVariableDeclaration(body, varName) {
858
+ function visitForVar(node) {
859
+ if (ts.isVariableStatement(node)) {
860
+ for (const decl of node.declarationList.declarations) {
861
+ if (ts.isIdentifier(decl.name) && decl.name.text === varName) {
862
+ if (decl.initializer && ts.isObjectLiteralExpression(decl.initializer)) {
863
+ returnObject = decl.initializer;
864
+ }
865
+ }
866
+ }
867
+ }
868
+ ts.forEachChild(node, visitForVar);
869
+ }
870
+ visitForVar(body);
871
+ }
872
+ if (func.body) {
873
+ visitFuncNode(func.body);
874
+ }
875
+ return returnObject;
876
+ }
877
+ function objectLiteralToTypeDefinition(obj, sourceFile) {
878
+ const properties = [];
879
+ for (const prop of obj.properties) {
880
+ if (ts.isPropertyAssignment(prop)) {
881
+ const name = prop.name.getText(sourceFile);
882
+ const value = prop.initializer;
883
+ const typeStr = inferTypeFromValue(value, sourceFile);
884
+ properties.push(`\t${name}: ${typeStr};`);
885
+ }
886
+ else if (ts.isShorthandPropertyAssignment(prop)) {
887
+ const name = prop.name.getText(sourceFile);
888
+ properties.push(`\t${name}: unknown;`);
889
+ }
890
+ }
891
+ return `{\n${properties.join('\n')}\n}`;
892
+ }
893
+ function inferTypeFromValue(value, sourceFile) {
894
+ if (ts.isStringLiteral(value)) {
895
+ return 'string';
896
+ }
897
+ if (ts.isNumericLiteral(value)) {
898
+ return 'number';
899
+ }
900
+ if (value.kind === ts.SyntaxKind.TrueKeyword ||
901
+ value.kind === ts.SyntaxKind.FalseKeyword) {
902
+ return 'boolean';
903
+ }
904
+ if (ts.isNewExpression(value) && ts.isIdentifier(value.expression)) {
905
+ if (value.expression.text === 'Date') {
906
+ return 'Date';
907
+ }
908
+ }
909
+ if (ts.isObjectLiteralExpression(value)) {
910
+ return objectLiteralToTypeDefinition(value, sourceFile);
911
+ }
912
+ if (ts.isArrayLiteralExpression(value)) {
913
+ return 'unknown[]';
914
+ }
915
+ return 'unknown';
916
+ }
917
+ visitNode(sourceFile);
918
+ if (!foundCreateApp) {
919
+ logger.debug('Did not find createApp call in app.ts');
920
+ }
921
+ else if (!foundSetup) {
922
+ logger.debug('Found createApp but no setup property');
923
+ }
924
+ else if (!appStateType) {
925
+ logger.debug('Found createApp and setup but could not extract type');
926
+ }
927
+ return appStateType;
928
+ }
929
+ catch (error) {
930
+ logger.warn('AppState type extraction failed:', error);
931
+ return null;
932
+ }
933
+ }
934
+ /**
935
+ * Update tsconfig.json to add path mapping for @agentuity/runtime
936
+ *
937
+ * @param rootDir - Root directory of the project
938
+ * @param shouldAdd - If true, add the mapping; if false, remove it
939
+ */
940
+ async function updateTsconfigPathMapping(rootDir, shouldAdd) {
941
+ const tsconfigPath = join(rootDir, 'tsconfig.json');
942
+ if (!(await Bun.file(tsconfigPath).exists())) {
943
+ logger.debug('No tsconfig.json found, skipping path mapping update');
944
+ return;
945
+ }
946
+ try {
947
+ const tsconfigContent = await Bun.file(tsconfigPath).text();
948
+ // Use JSON5 to parse tsconfig.json (handles comments in input)
949
+ const tsconfig = JSON5.parse(tsconfigContent);
950
+ const _before = JSON.stringify(tsconfig);
951
+ // Initialize compilerOptions and paths if they don't exist
952
+ if (!tsconfig.compilerOptions) {
953
+ tsconfig.compilerOptions = {};
954
+ }
955
+ if (!tsconfig.compilerOptions.paths) {
956
+ tsconfig.compilerOptions.paths = {};
957
+ }
958
+ if (shouldAdd) {
959
+ // Add or update the path mapping
960
+ tsconfig.compilerOptions.paths['@agentuity/runtime'] = [
961
+ './.agentuity/.agentuity_runtime.ts',
962
+ ];
963
+ // Ensure .agentuity_types.ts is included so module augmentation works
964
+ if (!tsconfig.include) {
965
+ tsconfig.include = [];
966
+ }
967
+ if (!tsconfig.include.includes('.agentuity/.agentuity_types.ts')) {
968
+ tsconfig.include.push('.agentuity/.agentuity_types.ts');
969
+ }
970
+ logger.debug('Added @agentuity/runtime path mapping to tsconfig.json');
971
+ }
972
+ else {
973
+ // Remove the path mapping if it exists
974
+ if (tsconfig.compilerOptions.paths['@agentuity/runtime']) {
975
+ delete tsconfig.compilerOptions.paths['@agentuity/runtime'];
976
+ logger.debug('Removed @agentuity/runtime path mapping from tsconfig.json');
977
+ }
978
+ // Clean up empty paths object
979
+ if (Object.keys(tsconfig.compilerOptions.paths).length === 0) {
980
+ delete tsconfig.compilerOptions.paths;
981
+ }
982
+ }
983
+ const _after = JSON.stringify(tsconfig);
984
+ if (_before === _after) {
985
+ return;
986
+ }
987
+ // Write back using standard JSON (TypeScript requires strict JSON format)
988
+ await Bun.write(tsconfigPath, JSON.stringify(tsconfig, null, '\t') + '\n');
989
+ }
990
+ catch (error) {
991
+ logger.warn('Failed to update tsconfig.json:', error);
992
+ }
993
+ }
994
+ const RuntimePackageNotFound = StructuredError('RuntimePackageNotFound');
995
+ /**
996
+ * Generate lifecycle type files (.agentuity/types.ts and .agentuity/.agentuity_runtime.ts)
997
+ *
998
+ * @param rootDir - Root directory of the project
999
+ * @param appFilePath - Path to app.ts file
1000
+ * @returns true if files were generated, false if no setup found
1001
+ */
1002
+ export async function generateLifecycleTypes(rootDir, outDir, appFilePath) {
1003
+ const appContent = await Bun.file(appFilePath).text();
1004
+ if (typeof appContent !== 'string') {
1005
+ return false;
1006
+ }
1007
+ const appStateType = extractAppStateType(appContent);
1008
+ if (!appStateType) {
1009
+ logger.debug('No setup() function found in app.ts, skipping lifecycle type generation');
1010
+ // Remove path mapping if no setup found
1011
+ await updateTsconfigPathMapping(rootDir, false);
1012
+ return false;
1013
+ }
1014
+ const agentuityDir = join(rootDir, '.agentuity');
1015
+ // Ensure .agentuity directory exists
1016
+ if (!existsSync(agentuityDir)) {
1017
+ mkdirSync(agentuityDir, { recursive: true });
1018
+ }
1019
+ // First, determine the runtime package location
1020
+ // Try multiple locations: app-level node_modules, then monorepo root
1021
+ const appLevelPath = join(rootDir, 'node_modules', '@agentuity', 'runtime');
1022
+ // From apps/testing/auth-app to monorepo root is 3 levels up (../../..)
1023
+ const rootLevelPath = join(rootDir, '..', '..', '..', 'node_modules', '@agentuity', 'runtime');
1024
+ let runtimePkgPath;
1025
+ if (existsSync(appLevelPath)) {
1026
+ runtimePkgPath = appLevelPath;
1027
+ logger.debug(`Found runtime package at app level: ${appLevelPath}`);
1028
+ }
1029
+ else if (existsSync(rootLevelPath)) {
1030
+ runtimePkgPath = rootLevelPath;
1031
+ logger.debug(`Found runtime package at root level: ${rootLevelPath}`);
1032
+ }
1033
+ else {
1034
+ throw new RuntimePackageNotFound({
1035
+ message: `@agentuity/runtime package not found in:\n` +
1036
+ ` - ${appLevelPath}\n` +
1037
+ ` - ${rootLevelPath}\n` +
1038
+ `Make sure dependencies are installed by running 'bun install' or 'npm install'`,
1039
+ });
1040
+ }
1041
+ let runtimeImportPath = null;
1042
+ // Calculate relative path from .agentuity/ to the package location
1043
+ // Don't resolve symlinks - we want to use the symlink path so it works in both
1044
+ // local dev (symlinked to packages/) and CI (actual node_modules)
1045
+ if (existsSync(runtimePkgPath)) {
1046
+ // Calculate relative path from .agentuity/ to node_modules package
1047
+ const relPath = relative(agentuityDir, runtimePkgPath);
1048
+ runtimeImportPath = relPath;
1049
+ logger.debug(`Using relative path to runtime package: ${relPath}`);
1050
+ }
1051
+ else {
1052
+ throw new RuntimePackageNotFound({
1053
+ message: `Failed to access @agentuity/runtime package at ${runtimePkgPath}\n` +
1054
+ `Make sure dependencies are installed`,
1055
+ });
1056
+ }
1057
+ if (!runtimeImportPath) {
1058
+ throw new RuntimePackageNotFound({
1059
+ message: `Failed to determine import path for @agentuity/runtime`,
1060
+ });
1061
+ }
1062
+ // Now generate .agentuity_types.ts
1063
+ // NOTE: We can ONLY augment the package name, not relative paths
1064
+ // TypeScript resolves @agentuity/runtime through path mapping -> wrapper -> actual package
1065
+ const typesContent = `// AUTO-GENERATED from app.ts setup() return type
1066
+ // This file is auto-generated by the build tool - do not edit manually
1067
+
1068
+ /**
1069
+ * Application state type inferred from your createApp setup function.
1070
+ * This type is automatically generated and available throughout your app via ctx.app.
1071
+ *
1072
+ * @example
1073
+ * \`\`\`typescript
1074
+ * // In your agents:
1075
+ * const agent = createAgent({
1076
+ * handler: async (ctx, input) => {
1077
+ * // ctx.app is strongly typed as GeneratedAppState
1078
+ * const value = ctx.app; // All properties from your setup return value
1079
+ * return 'result';
1080
+ * }
1081
+ * });
1082
+ * \`\`\`
1083
+ */
1084
+ export type GeneratedAppState = ${appStateType};
1085
+
1086
+ // Augment the @agentuity/runtime module with AppState
1087
+ // This will be picked up when imported through the wrapper
1088
+ declare module '@agentuity/runtime' {
1089
+ interface AppState extends GeneratedAppState {}
1090
+ }
1091
+ `;
1092
+ const typesPath = join(outDir, '.agentuity_types.ts');
1093
+ await Bun.write(typesPath, typesContent);
1094
+ logger.debug(`Generated lifecycle types: ${typesPath}`);
1095
+ const wrapperContent = `// AUTO-GENERATED runtime wrapper
1096
+ // This file is auto-generated by the build tool - do not edit manually
1097
+
1098
+ // Import augmentations file (NOT type-only) to trigger module augmentation
1099
+ import type { GeneratedAppState } from './.agentuity_types';
1100
+ import './.agentuity_types';
1101
+
1102
+ // Import from actual package location
1103
+ import { createRouter as baseCreateRouter, type Env } from '${runtimeImportPath}/src/index';
1104
+ import type { Hono } from 'hono';
1105
+
1106
+ // Type aliases to avoid repeating the generic parameter
1107
+ type AppEnv = Env<GeneratedAppState>;
1108
+ type AppRouter = Hono<AppEnv>;
1109
+
1110
+ /**
1111
+ * Creates a Hono router with extended methods for Agentuity-specific routing patterns.
1112
+ *
1113
+ * In addition to standard HTTP methods (get, post, put, delete, patch), the router includes:
1114
+ * - **stream()** - Stream responses with ReadableStream
1115
+ * - **websocket()** - WebSocket connections
1116
+ * - **sse()** - Server-Sent Events
1117
+ * - **email()** - Email handler routing
1118
+ * - **sms()** - SMS handler routing
1119
+ * - **cron()** - Scheduled task routing
1120
+ *
1121
+ * @returns Extended Hono router with custom methods and app state typing
1122
+ *
1123
+ * @example
1124
+ * \`\`\`typescript
1125
+ * const router = createRouter();
1126
+ *
1127
+ * // Standard HTTP routes
1128
+ * router.get('/hello', (c) => c.text('Hello!'));
1129
+ * router.post('/data', async (c) => {
1130
+ * const body = await c.req.json();
1131
+ * return c.json({ received: body });
1132
+ * });
1133
+ *
1134
+ * // Access app state (strongly typed!)
1135
+ * router.get('/db', (c) => {
1136
+ * const db = c.var.app; // Your app state from createApp setup
1137
+ * return c.json({ connected: true });
1138
+ * });
1139
+ * \`\`\`
1140
+ */
1141
+ export function createRouter(): AppRouter {
1142
+ return baseCreateRouter() as any;
1143
+ }
1144
+
1145
+ // Re-export everything else
1146
+ export * from '${runtimeImportPath}/src/index';
1147
+ `;
1148
+ const wrapperPath = join(outDir, '.agentuity_runtime.ts');
1149
+ await Bun.write(wrapperPath, wrapperContent);
1150
+ logger.debug(`Generated lifecycle wrapper: ${wrapperPath}`);
1151
+ // Update tsconfig.json with path mapping
1152
+ await updateTsconfigPathMapping(rootDir, true);
1153
+ return true;
1154
+ }
703
1155
  /**
704
1156
  * Analyze workbench usage and extract configuration
705
1157
  *
@@ -784,4 +1236,89 @@ function parseConfigObject(node) {
784
1236
  }
785
1237
  return config;
786
1238
  }
1239
+ /**
1240
+ * Find the end position of createApp call statement in the source code
1241
+ * Uses AST parsing to reliably find the complete statement including await/const assignment
1242
+ *
1243
+ * @param content - The source code content
1244
+ * @returns The character position after the createApp statement, or -1 if not found
1245
+ */
1246
+ export function findCreateAppEndPosition(content) {
1247
+ try {
1248
+ const ast = acornLoose.parse(content, {
1249
+ ecmaVersion: 'latest',
1250
+ sourceType: 'module',
1251
+ });
1252
+ // Walk through all top-level statements
1253
+ for (const node of ast.body) {
1254
+ let targetNode;
1255
+ // Check for: const app = await createApp(...)
1256
+ if (node.type === 'VariableDeclaration') {
1257
+ const varDecl = node;
1258
+ for (const declarator of varDecl.declarations) {
1259
+ if (declarator.init) {
1260
+ // Handle await createApp(...)
1261
+ if (declarator.init.type === 'AwaitExpression') {
1262
+ const awaitExpr = declarator.init;
1263
+ if (awaitExpr.argument?.type === 'CallExpression' &&
1264
+ isCreateAppCall(awaitExpr.argument)) {
1265
+ targetNode = node;
1266
+ break;
1267
+ }
1268
+ }
1269
+ // Handle createApp(...) without await
1270
+ else if (declarator.init.type === 'CallExpression') {
1271
+ if (isCreateAppCall(declarator.init)) {
1272
+ targetNode = node;
1273
+ break;
1274
+ }
1275
+ }
1276
+ }
1277
+ }
1278
+ }
1279
+ // Check for: await createApp(...)
1280
+ else if (node.type === 'ExpressionStatement') {
1281
+ const exprStmt = node;
1282
+ if (exprStmt.expression.type === 'AwaitExpression') {
1283
+ const awaitExpr = exprStmt.expression;
1284
+ if (awaitExpr.argument?.type === 'CallExpression' &&
1285
+ isCreateAppCall(awaitExpr.argument)) {
1286
+ targetNode = node;
1287
+ }
1288
+ }
1289
+ else if (exprStmt.expression.type === 'CallExpression') {
1290
+ if (isCreateAppCall(exprStmt.expression)) {
1291
+ targetNode = node;
1292
+ }
1293
+ }
1294
+ }
1295
+ if (targetNode && targetNode.end !== undefined) {
1296
+ // Find the semicolon after the statement (if it exists)
1297
+ const afterStmt = content.slice(targetNode.end);
1298
+ const semiMatch = afterStmt.match(/^\s*;/);
1299
+ if (semiMatch) {
1300
+ return targetNode.end + semiMatch[0].length;
1301
+ }
1302
+ // No semicolon, return end of statement
1303
+ return targetNode.end;
1304
+ }
1305
+ }
1306
+ return -1;
1307
+ }
1308
+ catch (error) {
1309
+ logger.warn('Failed to parse AST for createApp detection:', error);
1310
+ return -1;
1311
+ }
1312
+ }
1313
+ /**
1314
+ * Check if a CallExpression is a call to createApp
1315
+ */
1316
+ function isCreateAppCall(node) {
1317
+ const callee = node.callee;
1318
+ if (callee.type === 'Identifier') {
1319
+ const id = callee;
1320
+ return id.name === 'createApp';
1321
+ }
1322
+ return false;
1323
+ }
787
1324
  //# sourceMappingURL=ast.js.map