@agentuity/cli 1.0.31 → 1.0.33

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 (345) hide show
  1. package/dist/agent-detection.js +1 -1
  2. package/dist/agent-detection.js.map +1 -1
  3. package/dist/api.d.ts +1 -1
  4. package/dist/api.d.ts.map +1 -1
  5. package/dist/api.js +1 -1
  6. package/dist/api.js.map +1 -1
  7. package/dist/cache/agent-intro.d.ts.map +1 -1
  8. package/dist/cache/agent-intro.js.map +1 -1
  9. package/dist/cache/resource-region.d.ts.map +1 -1
  10. package/dist/cache/resource-region.js.map +1 -1
  11. package/dist/cache/user-cache.d.ts.map +1 -1
  12. package/dist/cache/user-cache.js.map +1 -1
  13. package/dist/catalyst.d.ts +3 -1
  14. package/dist/catalyst.d.ts.map +1 -1
  15. package/dist/catalyst.js +5 -1
  16. package/dist/catalyst.js.map +1 -1
  17. package/dist/cmd/ai/opencode/install.js +1 -1
  18. package/dist/cmd/ai/opencode/install.js.map +1 -1
  19. package/dist/cmd/build/ast.js +2 -2
  20. package/dist/cmd/build/ast.js.map +1 -1
  21. package/dist/cmd/build/patch/_util.d.ts +1 -1
  22. package/dist/cmd/build/patch/_util.d.ts.map +1 -1
  23. package/dist/cmd/build/patch/_util.js +2 -2
  24. package/dist/cmd/build/patch/_util.js.map +1 -1
  25. package/dist/cmd/build/vite/bun-dev-server.js +9 -1
  26. package/dist/cmd/build/vite/bun-dev-server.js.map +1 -1
  27. package/dist/cmd/build/vite/config-loader.js +9 -1
  28. package/dist/cmd/build/vite/config-loader.js.map +1 -1
  29. package/dist/cmd/build/vite/registry-generator.js.map +1 -1
  30. package/dist/cmd/build/vite/server-bundler.js +9 -1
  31. package/dist/cmd/build/vite/server-bundler.js.map +1 -1
  32. package/dist/cmd/build/vite/static-renderer.js +11 -3
  33. package/dist/cmd/build/vite/static-renderer.js.map +1 -1
  34. package/dist/cmd/build/vite/vite-asset-server-config.js +9 -1
  35. package/dist/cmd/build/vite/vite-asset-server-config.js.map +1 -1
  36. package/dist/cmd/build/vite/vite-asset-server.js +9 -1
  37. package/dist/cmd/build/vite/vite-asset-server.js.map +1 -1
  38. package/dist/cmd/build/vite/vite-builder.js +10 -2
  39. package/dist/cmd/build/vite/vite-builder.js.map +1 -1
  40. package/dist/cmd/build/vite/workbench-generator.d.ts +1 -1
  41. package/dist/cmd/build/vite/workbench-generator.d.ts.map +1 -1
  42. package/dist/cmd/build/vite/workbench-generator.js +1 -1
  43. package/dist/cmd/build/vite/workbench-generator.js.map +1 -1
  44. package/dist/cmd/cloud/db/create.d.ts.map +1 -1
  45. package/dist/cmd/cloud/db/create.js +8 -10
  46. package/dist/cmd/cloud/db/create.js.map +1 -1
  47. package/dist/cmd/cloud/db/delete.d.ts.map +1 -1
  48. package/dist/cmd/cloud/db/delete.js +12 -14
  49. package/dist/cmd/cloud/db/delete.js.map +1 -1
  50. package/dist/cmd/cloud/db/get.d.ts.map +1 -1
  51. package/dist/cmd/cloud/db/get.js +7 -7
  52. package/dist/cmd/cloud/db/get.js.map +1 -1
  53. package/dist/cmd/cloud/db/list.d.ts.map +1 -1
  54. package/dist/cmd/cloud/db/list.js +5 -5
  55. package/dist/cmd/cloud/db/list.js.map +1 -1
  56. package/dist/cmd/cloud/db/logs.d.ts.map +1 -1
  57. package/dist/cmd/cloud/db/logs.js +7 -7
  58. package/dist/cmd/cloud/db/logs.js.map +1 -1
  59. package/dist/cmd/cloud/db/sql.js +5 -5
  60. package/dist/cmd/cloud/db/sql.js.map +1 -1
  61. package/dist/cmd/cloud/db/stats.d.ts.map +1 -1
  62. package/dist/cmd/cloud/db/stats.js +5 -5
  63. package/dist/cmd/cloud/db/stats.js.map +1 -1
  64. package/dist/cmd/cloud/deploy.d.ts.map +1 -1
  65. package/dist/cmd/cloud/deploy.js +1 -1
  66. package/dist/cmd/cloud/deploy.js.map +1 -1
  67. package/dist/cmd/cloud/email/stats.d.ts.map +1 -1
  68. package/dist/cmd/cloud/email/stats.js +5 -5
  69. package/dist/cmd/cloud/email/stats.js.map +1 -1
  70. package/dist/cmd/cloud/email/util.d.ts +2 -2
  71. package/dist/cmd/cloud/email/util.d.ts.map +1 -1
  72. package/dist/cmd/cloud/email/util.js +2 -2
  73. package/dist/cmd/cloud/email/util.js.map +1 -1
  74. package/dist/cmd/cloud/keyvalue/repl.d.ts.map +1 -1
  75. package/dist/cmd/cloud/keyvalue/repl.js +4 -2
  76. package/dist/cmd/cloud/keyvalue/repl.js.map +1 -1
  77. package/dist/cmd/cloud/keyvalue/search.d.ts.map +1 -1
  78. package/dist/cmd/cloud/keyvalue/search.js.map +1 -1
  79. package/dist/cmd/cloud/keyvalue/util.d.ts.map +1 -1
  80. package/dist/cmd/cloud/keyvalue/util.js +1 -1
  81. package/dist/cmd/cloud/keyvalue/util.js.map +1 -1
  82. package/dist/cmd/cloud/machine/delete.d.ts.map +1 -1
  83. package/dist/cmd/cloud/machine/delete.js +6 -6
  84. package/dist/cmd/cloud/machine/delete.js.map +1 -1
  85. package/dist/cmd/cloud/machine/deployments.d.ts.map +1 -1
  86. package/dist/cmd/cloud/machine/deployments.js +5 -5
  87. package/dist/cmd/cloud/machine/deployments.js.map +1 -1
  88. package/dist/cmd/cloud/machine/get.d.ts.map +1 -1
  89. package/dist/cmd/cloud/machine/get.js +5 -5
  90. package/dist/cmd/cloud/machine/get.js.map +1 -1
  91. package/dist/cmd/cloud/machine/list.d.ts.map +1 -1
  92. package/dist/cmd/cloud/machine/list.js +5 -5
  93. package/dist/cmd/cloud/machine/list.js.map +1 -1
  94. package/dist/cmd/cloud/queue/util.d.ts +1 -1
  95. package/dist/cmd/cloud/queue/util.d.ts.map +1 -1
  96. package/dist/cmd/cloud/queue/util.js +1 -1
  97. package/dist/cmd/cloud/queue/util.js.map +1 -1
  98. package/dist/cmd/cloud/redis/get.js +5 -5
  99. package/dist/cmd/cloud/redis/get.js.map +1 -1
  100. package/dist/cmd/cloud/sandbox/cp.js +2 -2
  101. package/dist/cmd/cloud/sandbox/cp.js.map +1 -1
  102. package/dist/cmd/cloud/sandbox/execution/get.d.ts.map +1 -1
  103. package/dist/cmd/cloud/sandbox/execution/get.js +4 -4
  104. package/dist/cmd/cloud/sandbox/execution/get.js.map +1 -1
  105. package/dist/cmd/cloud/sandbox/execution/list.d.ts.map +1 -1
  106. package/dist/cmd/cloud/sandbox/execution/list.js +5 -5
  107. package/dist/cmd/cloud/sandbox/execution/list.js.map +1 -1
  108. package/dist/cmd/cloud/sandbox/runtime/list.d.ts.map +1 -1
  109. package/dist/cmd/cloud/sandbox/runtime/list.js +4 -4
  110. package/dist/cmd/cloud/sandbox/runtime/list.js.map +1 -1
  111. package/dist/cmd/cloud/sandbox/snapshot/build.js +1 -1
  112. package/dist/cmd/cloud/sandbox/snapshot/build.js.map +1 -1
  113. package/dist/cmd/cloud/sandbox/snapshot/create.d.ts.map +1 -1
  114. package/dist/cmd/cloud/sandbox/snapshot/create.js +5 -5
  115. package/dist/cmd/cloud/sandbox/snapshot/create.js.map +1 -1
  116. package/dist/cmd/cloud/sandbox/snapshot/delete.d.ts.map +1 -1
  117. package/dist/cmd/cloud/sandbox/snapshot/delete.js +4 -4
  118. package/dist/cmd/cloud/sandbox/snapshot/delete.js.map +1 -1
  119. package/dist/cmd/cloud/sandbox/snapshot/get.d.ts.map +1 -1
  120. package/dist/cmd/cloud/sandbox/snapshot/get.js +4 -4
  121. package/dist/cmd/cloud/sandbox/snapshot/get.js.map +1 -1
  122. package/dist/cmd/cloud/sandbox/snapshot/list.d.ts.map +1 -1
  123. package/dist/cmd/cloud/sandbox/snapshot/list.js +4 -4
  124. package/dist/cmd/cloud/sandbox/snapshot/list.js.map +1 -1
  125. package/dist/cmd/cloud/sandbox/snapshot/tag.d.ts.map +1 -1
  126. package/dist/cmd/cloud/sandbox/snapshot/tag.js +4 -4
  127. package/dist/cmd/cloud/sandbox/snapshot/tag.js.map +1 -1
  128. package/dist/cmd/cloud/sandbox/stats.d.ts.map +1 -1
  129. package/dist/cmd/cloud/sandbox/stats.js +5 -5
  130. package/dist/cmd/cloud/sandbox/stats.js.map +1 -1
  131. package/dist/cmd/cloud/sandbox/util.d.ts +3 -3
  132. package/dist/cmd/cloud/sandbox/util.d.ts.map +1 -1
  133. package/dist/cmd/cloud/sandbox/util.js +5 -5
  134. package/dist/cmd/cloud/sandbox/util.js.map +1 -1
  135. package/dist/cmd/cloud/schedule/stats.d.ts.map +1 -1
  136. package/dist/cmd/cloud/schedule/stats.js +5 -5
  137. package/dist/cmd/cloud/schedule/stats.js.map +1 -1
  138. package/dist/cmd/cloud/schedule/util.d.ts +1 -1
  139. package/dist/cmd/cloud/schedule/util.d.ts.map +1 -1
  140. package/dist/cmd/cloud/schedule/util.js +1 -1
  141. package/dist/cmd/cloud/schedule/util.js.map +1 -1
  142. package/dist/cmd/cloud/services/stats.d.ts.map +1 -1
  143. package/dist/cmd/cloud/services/stats.js +5 -5
  144. package/dist/cmd/cloud/services/stats.js.map +1 -1
  145. package/dist/cmd/cloud/session/get.d.ts.map +1 -1
  146. package/dist/cmd/cloud/session/get.js +5 -5
  147. package/dist/cmd/cloud/session/get.js.map +1 -1
  148. package/dist/cmd/cloud/session/list.d.ts.map +1 -1
  149. package/dist/cmd/cloud/session/list.js +5 -5
  150. package/dist/cmd/cloud/session/list.js.map +1 -1
  151. package/dist/cmd/cloud/storage/config.d.ts.map +1 -1
  152. package/dist/cmd/cloud/storage/config.js +8 -9
  153. package/dist/cmd/cloud/storage/config.js.map +1 -1
  154. package/dist/cmd/cloud/storage/create.d.ts.map +1 -1
  155. package/dist/cmd/cloud/storage/create.js +8 -10
  156. package/dist/cmd/cloud/storage/create.js.map +1 -1
  157. package/dist/cmd/cloud/storage/delete.d.ts.map +1 -1
  158. package/dist/cmd/cloud/storage/delete.js +12 -14
  159. package/dist/cmd/cloud/storage/delete.js.map +1 -1
  160. package/dist/cmd/cloud/storage/download.d.ts.map +1 -1
  161. package/dist/cmd/cloud/storage/download.js +6 -6
  162. package/dist/cmd/cloud/storage/download.js.map +1 -1
  163. package/dist/cmd/cloud/storage/get.d.ts.map +1 -1
  164. package/dist/cmd/cloud/storage/get.js +6 -6
  165. package/dist/cmd/cloud/storage/get.js.map +1 -1
  166. package/dist/cmd/cloud/storage/list.d.ts.map +1 -1
  167. package/dist/cmd/cloud/storage/list.js +6 -6
  168. package/dist/cmd/cloud/storage/list.js.map +1 -1
  169. package/dist/cmd/cloud/storage/upload.d.ts.map +1 -1
  170. package/dist/cmd/cloud/storage/upload.js +7 -7
  171. package/dist/cmd/cloud/storage/upload.js.map +1 -1
  172. package/dist/cmd/cloud/stream/create.js +1 -1
  173. package/dist/cmd/cloud/stream/create.js.map +1 -1
  174. package/dist/cmd/cloud/stream/stats.d.ts.map +1 -1
  175. package/dist/cmd/cloud/stream/stats.js +5 -5
  176. package/dist/cmd/cloud/stream/stats.js.map +1 -1
  177. package/dist/cmd/cloud/task/delete.d.ts.map +1 -1
  178. package/dist/cmd/cloud/task/delete.js +6 -1
  179. package/dist/cmd/cloud/task/delete.js.map +1 -1
  180. package/dist/cmd/cloud/task/stats.d.ts.map +1 -1
  181. package/dist/cmd/cloud/task/stats.js +5 -5
  182. package/dist/cmd/cloud/task/stats.js.map +1 -1
  183. package/dist/cmd/cloud/task/util.d.ts +1 -1
  184. package/dist/cmd/cloud/task/util.d.ts.map +1 -1
  185. package/dist/cmd/cloud/task/util.js +2 -2
  186. package/dist/cmd/cloud/task/util.js.map +1 -1
  187. package/dist/cmd/cloud/thread/delete.d.ts.map +1 -1
  188. package/dist/cmd/cloud/thread/delete.js +5 -5
  189. package/dist/cmd/cloud/thread/delete.js.map +1 -1
  190. package/dist/cmd/cloud/thread/get.d.ts.map +1 -1
  191. package/dist/cmd/cloud/thread/get.js +5 -5
  192. package/dist/cmd/cloud/thread/get.js.map +1 -1
  193. package/dist/cmd/cloud/thread/list.d.ts.map +1 -1
  194. package/dist/cmd/cloud/thread/list.js +5 -5
  195. package/dist/cmd/cloud/thread/list.js.map +1 -1
  196. package/dist/cmd/cloud/vector/util.d.ts.map +1 -1
  197. package/dist/cmd/cloud/vector/util.js +1 -1
  198. package/dist/cmd/cloud/vector/util.js.map +1 -1
  199. package/dist/cmd/cloud/webhook/util.d.ts +1 -1
  200. package/dist/cmd/cloud/webhook/util.d.ts.map +1 -1
  201. package/dist/cmd/cloud/webhook/util.js +1 -1
  202. package/dist/cmd/cloud/webhook/util.js.map +1 -1
  203. package/dist/cmd/dev/dev-lock.js +2 -2
  204. package/dist/cmd/dev/dev-lock.js.map +1 -1
  205. package/dist/cmd/dev/templates.d.ts.map +1 -1
  206. package/dist/cmd/dev/templates.js +0 -1
  207. package/dist/cmd/dev/templates.js.map +1 -1
  208. package/dist/cmd/git/api.d.ts +38 -0
  209. package/dist/cmd/git/api.d.ts.map +1 -1
  210. package/dist/cmd/git/api.js +55 -0
  211. package/dist/cmd/git/api.js.map +1 -1
  212. package/dist/cmd/project/add/database.js +8 -8
  213. package/dist/cmd/project/add/database.js.map +1 -1
  214. package/dist/cmd/project/add/storage.js +8 -8
  215. package/dist/cmd/project/add/storage.js.map +1 -1
  216. package/dist/cmd/project/auth/init.d.ts.map +1 -1
  217. package/dist/cmd/project/auth/init.js +7 -6
  218. package/dist/cmd/project/auth/init.js.map +1 -1
  219. package/dist/cmd/project/auth/shared.d.ts +2 -3
  220. package/dist/cmd/project/auth/shared.d.ts.map +1 -1
  221. package/dist/cmd/project/auth/shared.js +7 -7
  222. package/dist/cmd/project/auth/shared.js.map +1 -1
  223. package/dist/cmd/project/download.d.ts +12 -1
  224. package/dist/cmd/project/download.d.ts.map +1 -1
  225. package/dist/cmd/project/download.js +38 -15
  226. package/dist/cmd/project/download.js.map +1 -1
  227. package/dist/cmd/project/import.d.ts.map +1 -1
  228. package/dist/cmd/project/import.js +67 -9
  229. package/dist/cmd/project/import.js.map +1 -1
  230. package/dist/cmd/project/remote-import.d.ts +41 -0
  231. package/dist/cmd/project/remote-import.d.ts.map +1 -0
  232. package/dist/cmd/project/remote-import.js +1074 -0
  233. package/dist/cmd/project/remote-import.js.map +1 -0
  234. package/dist/cmd/project/template-flow.d.ts +1 -1
  235. package/dist/cmd/project/template-flow.d.ts.map +1 -1
  236. package/dist/cmd/project/template-flow.js +27 -11
  237. package/dist/cmd/project/template-flow.js.map +1 -1
  238. package/dist/config.d.ts +29 -5
  239. package/dist/config.d.ts.map +1 -1
  240. package/dist/config.js +13 -14
  241. package/dist/config.js.map +1 -1
  242. package/dist/domain.js +1 -1
  243. package/dist/domain.js.map +1 -1
  244. package/dist/schema-generator.d.ts +1 -1
  245. package/dist/schema-generator.d.ts.map +1 -1
  246. package/dist/schema-generator.js +1 -1
  247. package/dist/schema-generator.js.map +1 -1
  248. package/dist/schema-parser.d.ts.map +1 -1
  249. package/dist/schema-parser.js +48 -6
  250. package/dist/schema-parser.js.map +1 -1
  251. package/dist/terminal.d.ts.map +1 -1
  252. package/dist/terminal.js +12 -17
  253. package/dist/terminal.js.map +1 -1
  254. package/dist/tui.js +1 -1
  255. package/dist/tui.js.map +1 -1
  256. package/dist/types.d.ts +28 -3
  257. package/dist/types.d.ts.map +1 -1
  258. package/dist/types.js +42 -0
  259. package/dist/types.js.map +1 -1
  260. package/dist/utils/date.js +1 -1
  261. package/dist/utils/date.js.map +1 -1
  262. package/package.json +6 -6
  263. package/src/agent-detection.ts +1 -1
  264. package/src/api.ts +1 -1
  265. package/src/cache/agent-intro.ts +3 -4
  266. package/src/cache/resource-region.ts +3 -1
  267. package/src/cache/user-cache.ts +3 -4
  268. package/src/catalyst.ts +9 -1
  269. package/src/cmd/ai/opencode/install.ts +1 -1
  270. package/src/cmd/build/ast.ts +2 -2
  271. package/src/cmd/build/patch/_util.ts +2 -2
  272. package/src/cmd/build/vite/registry-generator.ts +4 -4
  273. package/src/cmd/build/vite/workbench-generator.ts +1 -1
  274. package/src/cmd/cloud/db/create.ts +8 -9
  275. package/src/cmd/cloud/db/delete.ts +18 -13
  276. package/src/cmd/cloud/db/get.ts +13 -7
  277. package/src/cmd/cloud/db/list.ts +11 -5
  278. package/src/cmd/cloud/db/logs.ts +13 -7
  279. package/src/cmd/cloud/db/sql.ts +5 -5
  280. package/src/cmd/cloud/db/stats.ts +11 -5
  281. package/src/cmd/cloud/deploy.ts +7 -1
  282. package/src/cmd/cloud/email/stats.ts +11 -5
  283. package/src/cmd/cloud/email/util.ts +4 -4
  284. package/src/cmd/cloud/keyvalue/repl.ts +6 -2
  285. package/src/cmd/cloud/keyvalue/search.ts +2 -1
  286. package/src/cmd/cloud/keyvalue/util.ts +2 -2
  287. package/src/cmd/cloud/machine/delete.ts +12 -6
  288. package/src/cmd/cloud/machine/deployments.ts +11 -5
  289. package/src/cmd/cloud/machine/get.ts +11 -5
  290. package/src/cmd/cloud/machine/list.ts +11 -5
  291. package/src/cmd/cloud/queue/util.ts +2 -2
  292. package/src/cmd/cloud/redis/get.ts +5 -5
  293. package/src/cmd/cloud/sandbox/cp.ts +2 -2
  294. package/src/cmd/cloud/sandbox/execution/get.ts +10 -4
  295. package/src/cmd/cloud/sandbox/execution/list.ts +6 -5
  296. package/src/cmd/cloud/sandbox/runtime/list.ts +10 -4
  297. package/src/cmd/cloud/sandbox/snapshot/build.ts +1 -1
  298. package/src/cmd/cloud/sandbox/snapshot/create.ts +12 -5
  299. package/src/cmd/cloud/sandbox/snapshot/delete.ts +10 -4
  300. package/src/cmd/cloud/sandbox/snapshot/get.ts +12 -6
  301. package/src/cmd/cloud/sandbox/snapshot/list.ts +10 -4
  302. package/src/cmd/cloud/sandbox/snapshot/tag.ts +10 -4
  303. package/src/cmd/cloud/sandbox/stats.ts +11 -5
  304. package/src/cmd/cloud/sandbox/util.ts +14 -7
  305. package/src/cmd/cloud/schedule/stats.ts +11 -5
  306. package/src/cmd/cloud/schedule/util.ts +3 -3
  307. package/src/cmd/cloud/services/stats.ts +13 -7
  308. package/src/cmd/cloud/session/get.ts +14 -8
  309. package/src/cmd/cloud/session/list.ts +11 -5
  310. package/src/cmd/cloud/storage/config.ts +27 -20
  311. package/src/cmd/cloud/storage/create.ts +8 -9
  312. package/src/cmd/cloud/storage/delete.ts +18 -13
  313. package/src/cmd/cloud/storage/download.ts +12 -6
  314. package/src/cmd/cloud/storage/get.ts +12 -6
  315. package/src/cmd/cloud/storage/list.ts +20 -9
  316. package/src/cmd/cloud/storage/upload.ts +13 -7
  317. package/src/cmd/cloud/stream/create.ts +1 -1
  318. package/src/cmd/cloud/stream/stats.ts +11 -5
  319. package/src/cmd/cloud/task/delete.ts +13 -2
  320. package/src/cmd/cloud/task/stats.ts +11 -5
  321. package/src/cmd/cloud/task/util.ts +4 -4
  322. package/src/cmd/cloud/thread/delete.ts +11 -5
  323. package/src/cmd/cloud/thread/get.ts +11 -5
  324. package/src/cmd/cloud/thread/list.ts +11 -5
  325. package/src/cmd/cloud/vector/util.ts +2 -2
  326. package/src/cmd/cloud/webhook/util.ts +2 -2
  327. package/src/cmd/dev/dev-lock.ts +2 -2
  328. package/src/cmd/dev/templates.ts +0 -1
  329. package/src/cmd/git/api.ts +127 -0
  330. package/src/cmd/project/add/database.ts +9 -9
  331. package/src/cmd/project/add/storage.ts +9 -9
  332. package/src/cmd/project/auth/init.ts +11 -10
  333. package/src/cmd/project/auth/shared.ts +15 -10
  334. package/src/cmd/project/download.ts +53 -17
  335. package/src/cmd/project/import.ts +71 -9
  336. package/src/cmd/project/remote-import.ts +1347 -0
  337. package/src/cmd/project/template-flow.ts +38 -22
  338. package/src/config.ts +23 -18
  339. package/src/domain.ts +3 -3
  340. package/src/schema-generator.ts +1 -1
  341. package/src/schema-parser.ts +49 -6
  342. package/src/terminal.ts +12 -14
  343. package/src/tui.ts +1 -1
  344. package/src/types.ts +45 -0
  345. package/src/utils/date.ts +1 -1
@@ -1,10 +1,10 @@
1
- import { TaskStorageService, type Logger } from '@agentuity/core';
1
+ import { type Logger, TaskStorageService } from '@agentuity/core';
2
2
  import { createServerFetchAdapter } from '@agentuity/server';
3
- import type { AuthData, Config, GlobalOptions } from '../../../types';
4
- import { getCatalystUrl } from '../../../catalyst';
5
3
  import { setResourceInfo } from '../../../cache';
4
+ import { getCatalystUrl } from '../../../catalyst';
6
5
  import { defaultProfileName, getDefaultRegion } from '../../../config';
7
6
  import * as tui from '../../../tui';
7
+ import type { AuthData, Config, GlobalOptions } from '../../../types';
8
8
 
9
9
  export interface TaskContext {
10
10
  logger: Logger;
@@ -32,7 +32,7 @@ export async function createStorageAdapter(ctx: TaskContext) {
32
32
 
33
33
  // Task tenant DB is not regional — any Catalyst can serve the request.
34
34
  const region = await getDefaultRegion(ctx.config?.name ?? defaultProfileName, ctx.config);
35
- const baseUrl = getCatalystUrl(region);
35
+ const baseUrl = getCatalystUrl(region, ctx.config?.overrides);
36
36
  return new TaskStorageService(baseUrl, adapter);
37
37
  }
38
38
 
@@ -1,10 +1,10 @@
1
+ import { APIError, threadDelete } from '@agentuity/server';
1
2
  import { z } from 'zod';
2
- import { createSubcommand } from '../../../types';
3
- import * as tui from '../../../tui';
4
- import { threadDelete, APIError } from '@agentuity/server';
5
3
  import { getCommand } from '../../../command-prefix';
6
- import { ErrorCode } from '../../../errors';
7
4
  import { getGlobalCatalystAPIClient } from '../../../config';
5
+ import { ErrorCode } from '../../../errors';
6
+ import * as tui from '../../../tui';
7
+ import { createSubcommand } from '../../../types';
8
8
 
9
9
  export const deleteSubcommand = createSubcommand({
10
10
  name: 'delete',
@@ -25,7 +25,13 @@ export const deleteSubcommand = createSubcommand({
25
25
  },
26
26
  async handler(ctx) {
27
27
  const { logger, auth, args, config } = ctx;
28
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, config?.name);
28
+ const catalystClient = await getGlobalCatalystAPIClient(
29
+ logger,
30
+ auth,
31
+ config?.name,
32
+ undefined,
33
+ config
34
+ );
29
35
 
30
36
  try {
31
37
  await threadDelete(catalystClient, { id: args.thread_id });
@@ -1,10 +1,10 @@
1
+ import { APIError, threadGet } from '@agentuity/server';
1
2
  import { z } from 'zod';
2
- import { createSubcommand } from '../../../types';
3
- import * as tui from '../../../tui';
4
- import { threadGet, APIError } from '@agentuity/server';
5
3
  import { getCommand } from '../../../command-prefix';
6
- import { ErrorCode } from '../../../errors';
7
4
  import { getGlobalCatalystAPIClient } from '../../../config';
5
+ import { ErrorCode } from '../../../errors';
6
+ import * as tui from '../../../tui';
7
+ import { createSubcommand } from '../../../types';
8
8
 
9
9
  const ThreadGetResponseSchema = z.object({
10
10
  id: z.string().describe('Thread ID'),
@@ -38,7 +38,13 @@ export const getSubcommand = createSubcommand({
38
38
  },
39
39
  async handler(ctx) {
40
40
  const { logger, auth, args, options, config } = ctx;
41
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, config?.name);
41
+ const catalystClient = await getGlobalCatalystAPIClient(
42
+ logger,
43
+ auth,
44
+ config?.name,
45
+ undefined,
46
+ config
47
+ );
42
48
 
43
49
  try {
44
50
  const thread = await threadGet(catalystClient, { id: args.thread_id });
@@ -1,10 +1,10 @@
1
+ import { type Thread, threadList } from '@agentuity/server';
1
2
  import { z } from 'zod';
2
- import { createSubcommand } from '../../../types';
3
- import * as tui from '../../../tui';
4
- import { threadList, type Thread } from '@agentuity/server';
5
3
  import { getCommand } from '../../../command-prefix';
6
- import { ErrorCode } from '../../../errors';
7
4
  import { getGlobalCatalystAPIClient } from '../../../config';
5
+ import { ErrorCode } from '../../../errors';
6
+ import * as tui from '../../../tui';
7
+ import { createSubcommand } from '../../../types';
8
8
 
9
9
  const ThreadListResponseSchema = z.array(
10
10
  z.object({
@@ -73,7 +73,13 @@ export const listSubcommand = createSubcommand({
73
73
  },
74
74
  async handler(ctx) {
75
75
  const { logger, auth, project, opts, options, config } = ctx;
76
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, config?.name);
76
+ const catalystClient = await getGlobalCatalystAPIClient(
77
+ logger,
78
+ auth,
79
+ config?.name,
80
+ undefined,
81
+ config
82
+ );
77
83
 
78
84
  if (opts?.orgId && opts?.projectId) {
79
85
  tui.fatal('--org-id and --project-id are mutually exclusive. Use one or the other.');
@@ -1,8 +1,8 @@
1
1
  import { type Logger, VectorStorageService } from '@agentuity/core';
2
2
  import { createServerFetchAdapter } from '@agentuity/server';
3
- import type { AuthData, Config, GlobalOptions, ProjectConfig } from '../../../types';
4
3
  import { getCatalystUrl } from '../../../catalyst';
5
4
  import * as tui from '../../../tui';
5
+ import type { AuthData, Config, GlobalOptions, ProjectConfig } from '../../../types';
6
6
 
7
7
  export function createStorageAdapter(
8
8
  ctx: {
@@ -36,6 +36,6 @@ export function createStorageAdapter(
36
36
  ctx.logger
37
37
  );
38
38
 
39
- const baseUrl = getCatalystUrl(ctx.region);
39
+ const baseUrl = getCatalystUrl(ctx.region, ctx.config?.overrides);
40
40
  return new VectorStorageService(baseUrl, adapter);
41
41
  }
@@ -1,5 +1,5 @@
1
1
  import type { Logger } from '@agentuity/core';
2
- import { APIClient, type WebhookApiOptions } from '@agentuity/server';
2
+ import type { APIClient, WebhookApiOptions } from '@agentuity/server';
3
3
  import { getGlobalCatalystAPIClient } from '../../../config';
4
4
  import type { AuthData, Config, GlobalOptions } from '../../../types';
5
5
 
@@ -21,7 +21,7 @@ export interface WebhookContext {
21
21
  * Uses the global Catalyst API client with user authentication.
22
22
  */
23
23
  export async function createWebhookAPIClient(ctx: WebhookContext): Promise<APIClient> {
24
- return getGlobalCatalystAPIClient(ctx.logger, ctx.auth, ctx.config?.name);
24
+ return getGlobalCatalystAPIClient(ctx.logger, ctx.auth, ctx.config?.name, undefined, ctx.config);
25
25
  }
26
26
 
27
27
  /**
@@ -205,7 +205,7 @@ async function cleanupStaleLock(
205
205
  */
206
206
  async function ensureNoActiveDevForProject(
207
207
  rootDir: string,
208
- port: number,
208
+ _port: number,
209
209
  logger: LoggerLike
210
210
  ): Promise<void> {
211
211
  const lockPath = getLockPath(rootDir);
@@ -214,7 +214,7 @@ async function ensureNoActiveDevForProject(
214
214
 
215
215
  const now = Date.now();
216
216
  const createdAt = Date.parse(existing.createdAt || '');
217
- const ageMs = isFinite(createdAt) ? now - createdAt : Infinity;
217
+ const ageMs = Number.isFinite(createdAt) ? now - createdAt : Infinity;
218
218
 
219
219
  const mainAlive = pidExists(existing.mainPid);
220
220
 
@@ -35,7 +35,6 @@ export default router;
35
35
 
36
36
  const invalidDirRegex = /[<>:"/\\|?*]/;
37
37
 
38
- // biome-ignore lint/suspicious/noControlCharactersInRegex: checking for invalid control characters in directory names
39
38
  const invalidControlChars = /[\u0000-\u001F]/;
40
39
  const reservedWindowsNames = /^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i;
41
40
  const invalidTrailing = /[. ]$/;
@@ -315,3 +315,130 @@ export async function getProjectGithubStatus(
315
315
 
316
316
  return resp.data;
317
317
  }
318
+
319
+ // ─── GitHub Token ───
320
+
321
+ const GithubTokenDataSchema = z.object({
322
+ token: z.string(),
323
+ username: z.string(),
324
+ });
325
+
326
+ export type GithubTokenResult = z.infer<typeof GithubTokenDataSchema>;
327
+
328
+ const GithubTokenError = StructuredError(
329
+ 'GithubTokenError',
330
+ 'Failed to retrieve GitHub token from Agentuity'
331
+ );
332
+
333
+ export async function getGithubToken(apiClient: APIClient): Promise<GithubTokenResult> {
334
+ const resp = await apiClient.get('/cli/github/token', APIResponseSchema(GithubTokenDataSchema));
335
+
336
+ if (!resp.success || !resp.data) {
337
+ throw new GithubTokenError();
338
+ }
339
+
340
+ return resp.data;
341
+ }
342
+
343
+ const GithubRepoCheckDataSchema = z.object({
344
+ available: z.boolean(),
345
+ exists: z.boolean(),
346
+ error: z.string().optional(),
347
+ });
348
+
349
+ export type GithubRepoCheckResult = z.infer<typeof GithubRepoCheckDataSchema>;
350
+
351
+ const GithubRepoCheckError = StructuredError(
352
+ 'GithubRepoCheckError',
353
+ 'Error checking GitHub repository availability'
354
+ );
355
+
356
+ export async function checkGithubRepo(
357
+ apiClient: APIClient,
358
+ params: { owner: string; name: string }
359
+ ): Promise<GithubRepoCheckResult> {
360
+ const resp = await apiClient.get(
361
+ `/cli/github/repo/check?owner=${encodeURIComponent(params.owner)}&name=${encodeURIComponent(params.name)}`,
362
+ APIResponseSchema(GithubRepoCheckDataSchema)
363
+ );
364
+
365
+ if (!resp.success || !resp.data) {
366
+ throw new GithubRepoCheckError();
367
+ }
368
+
369
+ return resp.data;
370
+ }
371
+
372
+ // Repo creation
373
+
374
+ const GithubRepoCreateDataSchema = z.object({
375
+ url: z.string(),
376
+ cloneUrl: z.string(),
377
+ fullName: z.string(),
378
+ private: z.boolean(),
379
+ created: z.boolean(),
380
+ });
381
+
382
+ export interface GithubRepoCreateResult {
383
+ url: string;
384
+ cloneUrl: string;
385
+ fullName: string;
386
+ private: boolean;
387
+ created: boolean;
388
+ }
389
+
390
+ export interface GithubRepoCreateOptions {
391
+ name: string;
392
+ owner: string;
393
+ private: boolean;
394
+ description?: string;
395
+ }
396
+
397
+ const GithubRepoCreateError = StructuredError(
398
+ 'GithubRepoCreateError',
399
+ 'Error creating GitHub repository'
400
+ );
401
+
402
+ export async function createGithubRepo(
403
+ apiClient: APIClient,
404
+ params: GithubRepoCreateOptions
405
+ ): Promise<GithubRepoCreateResult> {
406
+ const resp = await apiClient.post(
407
+ '/cli/github/repo',
408
+ params,
409
+ APIResponseSchema(GithubRepoCreateDataSchema)
410
+ );
411
+
412
+ if (!resp.success || !resp.data) {
413
+ throw new GithubRepoCreateError();
414
+ }
415
+
416
+ return resp.data;
417
+ }
418
+
419
+ // ─── Bot Identity ───
420
+
421
+ const GithubBotIdentityDataSchema = z.object({
422
+ name: z.string(),
423
+ email: z.string(),
424
+ });
425
+
426
+ export type GithubBotIdentity = z.infer<typeof GithubBotIdentityDataSchema>;
427
+
428
+ const GithubBotIdentityError = StructuredError(
429
+ 'GithubBotIdentityError',
430
+ 'Error fetching GitHub App bot identity'
431
+ );
432
+
433
+ export async function getGithubBotIdentity(apiClient: APIClient): Promise<GithubBotIdentity> {
434
+ const resp = await apiClient.get(
435
+ '/cli/github/bot-identity',
436
+ APIResponseSchema(GithubBotIdentityDataSchema)
437
+ );
438
+
439
+ if (!resp.success || !resp.data) {
440
+ throw new GithubBotIdentityError();
441
+ }
442
+
443
+ return resp.data;
444
+ }
@@ -1,19 +1,19 @@
1
- import { z } from 'zod';
2
1
  import { listResources, projectEnvUpdate } from '@agentuity/server';
3
- import { createSubcommand } from '../../../types';
4
- import * as tui from '../../../tui';
5
- import { createPrompt } from '../../../tui';
6
- import { getCatalystAPIClient } from '../../../config';
2
+ import { z } from 'zod';
7
3
  import { getCommand } from '../../../command-prefix';
8
- import { isDryRunMode, outputDryRun } from '../../../explain';
9
- import { ErrorCode } from '../../../errors';
4
+ import { getCatalystAPIClient } from '../../../config';
10
5
  import {
11
6
  addResourceEnvVars,
7
+ filterAgentuitySdkKeys,
12
8
  findExistingEnvFile,
13
9
  readEnvFile,
14
- filterAgentuitySdkKeys,
15
10
  splitEnvAndSecrets,
16
11
  } from '../../../env-util';
12
+ import { ErrorCode } from '../../../errors';
13
+ import { isDryRunMode, outputDryRun } from '../../../explain';
14
+ import * as tui from '../../../tui';
15
+ import { createPrompt } from '../../../tui';
16
+ import { createSubcommand } from '../../../types';
17
17
 
18
18
  export const databaseSubcommand = createSubcommand({
19
19
  name: 'database',
@@ -65,7 +65,7 @@ export const databaseSubcommand = createSubcommand({
65
65
  };
66
66
  }
67
67
 
68
- const catalystClient = getCatalystAPIClient(logger, auth, region);
68
+ const catalystClient = getCatalystAPIClient(logger, auth, region, undefined, ctx.config);
69
69
 
70
70
  const resources = await tui.spinner({
71
71
  message: 'Fetching databases',
@@ -1,19 +1,19 @@
1
- import { z } from 'zod';
2
1
  import { listResources, projectEnvUpdate } from '@agentuity/server';
3
- import { createSubcommand } from '../../../types';
4
- import * as tui from '../../../tui';
5
- import { createPrompt } from '../../../tui';
6
- import { getCatalystAPIClient } from '../../../config';
2
+ import { z } from 'zod';
7
3
  import { getCommand } from '../../../command-prefix';
8
- import { isDryRunMode, outputDryRun } from '../../../explain';
9
- import { ErrorCode } from '../../../errors';
4
+ import { getCatalystAPIClient } from '../../../config';
10
5
  import {
11
6
  addResourceEnvVars,
7
+ filterAgentuitySdkKeys,
12
8
  findExistingEnvFile,
13
9
  readEnvFile,
14
- filterAgentuitySdkKeys,
15
10
  splitEnvAndSecrets,
16
11
  } from '../../../env-util';
12
+ import { ErrorCode } from '../../../errors';
13
+ import { isDryRunMode, outputDryRun } from '../../../explain';
14
+ import * as tui from '../../../tui';
15
+ import { createPrompt } from '../../../tui';
16
+ import { createSubcommand } from '../../../types';
17
17
 
18
18
  export const storageSubcommand = createSubcommand({
19
19
  name: 'storage',
@@ -65,7 +65,7 @@ export const storageSubcommand = createSubcommand({
65
65
  };
66
66
  }
67
67
 
68
- const catalystClient = getCatalystAPIClient(logger, auth, region);
68
+ const catalystClient = getCatalystAPIClient(logger, auth, region, undefined, ctx.config);
69
69
 
70
70
  const resources = await tui.spinner({
71
71
  message: 'Fetching storage buckets',
@@ -1,21 +1,21 @@
1
+ import enquirer from 'enquirer';
2
+ import * as fs from 'fs';
3
+ import * as path from 'path';
1
4
  import { z } from 'zod';
2
- import { createSubcommand } from '../../../types';
3
- import * as tui from '../../../tui';
4
5
  import { getCommand } from '../../../command-prefix';
6
+ import { readEnvFile, writeEnvFile } from '../../../env-util';
7
+ import * as tui from '../../../tui';
8
+ import { createSubcommand } from '../../../types';
5
9
  import {
6
- selectOrCreateDatabase,
10
+ detectOrmSetup,
7
11
  ensureAuthDependencies,
8
- runAuthMigrations,
9
12
  generateAuthFileContent,
10
- printIntegrationExamples,
11
- detectOrmSetup,
12
13
  generateAuthSchemaSql,
13
14
  getGeneratedSqlDir,
15
+ printIntegrationExamples,
16
+ runAuthMigrations,
17
+ selectOrCreateDatabase,
14
18
  } from './shared';
15
- import { readEnvFile, writeEnvFile } from '../../../env-util';
16
- import enquirer from 'enquirer';
17
- import * as fs from 'fs';
18
- import * as path from 'path';
19
19
 
20
20
  export const initSubcommand = createSubcommand({
21
21
  name: 'init',
@@ -232,6 +232,7 @@ export const initSubcommand = createSubcommand({
232
232
  region,
233
233
  databaseName,
234
234
  sql,
235
+ config,
235
236
  });
236
237
  migrationsRun = true;
237
238
  }
@@ -3,18 +3,16 @@
3
3
  */
4
4
 
5
5
  import * as path from 'node:path';
6
- import { listOrgResources, createResources, dbQuery } from '@agentuity/server';
7
- import * as tui from '../../../tui';
6
+ import { createResources, dbQuery, listOrgResources } from '@agentuity/server';
7
+ import enquirer from 'enquirer';
8
8
  import {
9
9
  getCatalystAPIClient,
10
10
  getGlobalCatalystAPIClient,
11
11
  loadProjectConfig,
12
12
  ProjectConfigNotFoundException,
13
13
  } from '../../../config';
14
- import type { Logger } from '../../../types';
15
- import type { AuthData } from '../../../types';
16
- import type { Config } from '../../../types';
17
- import enquirer from 'enquirer';
14
+ import * as tui from '../../../tui';
15
+ import type { AuthData, Config, Logger } from '../../../types';
18
16
 
19
17
  /**
20
18
  * Database info returned from selection
@@ -39,7 +37,13 @@ export async function selectOrCreateDatabase(options: {
39
37
  }): Promise<DatabaseInfo> {
40
38
  const { logger, auth, orgId, config, existingUrl, projectDir } = options;
41
39
  const profileName = config?.name;
42
- const globalClient = await getGlobalCatalystAPIClient(logger, auth, profileName);
40
+ const globalClient = await getGlobalCatalystAPIClient(
41
+ logger,
42
+ auth,
43
+ profileName,
44
+ undefined,
45
+ config
46
+ );
43
47
 
44
48
  const resources = await tui.spinner({
45
49
  message: `Fetching databases for ${orgId}`,
@@ -122,7 +126,7 @@ export async function selectOrCreateDatabase(options: {
122
126
  logger.trace(`[auth init] Using fallback region: ${region}`);
123
127
  }
124
128
 
125
- const regionalClient = getCatalystAPIClient(logger, auth, region);
129
+ const regionalClient = getCatalystAPIClient(logger, auth, region, undefined, config);
126
130
 
127
131
  const created = await tui.spinner({
128
132
  message: `Creating database in ${region}`,
@@ -393,9 +397,10 @@ export async function runAuthMigrations(options: {
393
397
  region: string;
394
398
  databaseName: string;
395
399
  sql: string;
400
+ config?: Config | null;
396
401
  }): Promise<void> {
397
- const { logger, auth, orgId, region, databaseName, sql } = options;
398
- const catalystClient = getCatalystAPIClient(logger, auth, region);
402
+ const { logger, auth, orgId, region, databaseName, sql, config } = options;
403
+ const catalystClient = getCatalystAPIClient(logger, auth, region, undefined, config);
399
404
 
400
405
  const statements = splitSqlStatements(sql);
401
406
 
@@ -1,22 +1,22 @@
1
- import { join, resolve } from 'node:path';
2
1
  import {
2
+ cpSync,
3
+ createReadStream,
3
4
  existsSync,
4
5
  mkdirSync,
5
6
  mkdtempSync,
6
- renameSync,
7
7
  readdirSync,
8
- cpSync,
8
+ renameSync,
9
9
  rmSync,
10
- createReadStream,
11
10
  } from 'node:fs';
12
11
  import { tmpdir } from 'node:os';
12
+ import { join, resolve } from 'node:path';
13
13
  import { finished } from 'node:stream/promises';
14
14
  import { createGunzip } from 'node:zlib';
15
+ import { type Logger, StructuredError } from '@agentuity/core';
15
16
  import { extract, type Headers } from 'tar-fs';
16
- import { StructuredError, type Logger } from '@agentuity/core';
17
- import * as tui from '../../tui';
18
- import { downloadWithSpinner } from '../../download';
19
17
  import { writeAgentsDocs } from '../../agents-docs';
18
+ import { downloadWithSpinner } from '../../download';
19
+ import * as tui from '../../tui';
20
20
  import type { TemplateInfo } from './templates';
21
21
 
22
22
  const GITHUB_BRANCH = 'main';
@@ -122,7 +122,7 @@ async function _cleanup(sourceDir: string, dest: string) {
122
122
  });
123
123
  }
124
124
 
125
- await tui.spinner(`📦 Copying template files...`, async () => {
125
+ await tui.spinner('📦 Copying template files...', async () => {
126
126
  // Copy all files from source to dest
127
127
  const files = readdirSync(sourceDir);
128
128
  for (const file of files) {
@@ -275,7 +275,7 @@ export async function downloadTemplate(options: DownloadOptions): Promise<void>
275
275
  },
276
276
  // ignore callback: called AFTER map, receives the MAPPED name
277
277
  // Return true to skip the entry, false to extract it
278
- ignore: (name: string, header?: Headers) => {
278
+ ignore: (_name: string, header?: Headers) => {
279
279
  if (!header) {
280
280
  ignoredCount++;
281
281
  return true;
@@ -396,7 +396,21 @@ export async function setupProject(options: SetupOptions): Promise<{ success: bo
396
396
  return { success: !hasError };
397
397
  }
398
398
 
399
- export async function initGitRepo(dest: string): Promise<void> {
399
+ interface InitGitRepoOptions {
400
+ /** Project name (e.g. "My Agent") */
401
+ projectName?: string;
402
+ /** Where the template came from (e.g. "github.com/owner/repo" or "TypeScript / Hello World") */
403
+ source?: string;
404
+ /** Git commit author (e.g. { name: "app-slug[bot]", email: "id+slug[bot]@users.noreply.github.com" }) */
405
+ author?: { name: string; email: string };
406
+ }
407
+
408
+ export async function initGitRepo(dest: string, options?: InitGitRepoOptions): Promise<void> {
409
+ // Safety: refuse to init if .git already exists (prevents clobbering existing repos)
410
+ if (existsSync(join(dest, '.git'))) {
411
+ throw new Error(`Refusing to initialize git: "${dest}" already contains a .git directory.`);
412
+ }
413
+
400
414
  // Initialize git repository if git is available
401
415
  // Check for real git (not macOS stub that triggers Xcode CLT popup)
402
416
  const { isGitAvailable, getDefaultBranch } = await import('../../git-helper');
@@ -414,19 +428,22 @@ export async function initGitRepo(dest: string): Promise<void> {
414
428
  clearOnSuccess: true,
415
429
  });
416
430
 
417
- // Configure git user in CI environments (where git config may not be set)
418
- if (process.env.CI) {
431
+ // Configure git user in CI/sandbox environments (where git config may not be set)
432
+ if (process.env.CI || process.env.AGENTUITY_SANDBOX_ID) {
433
+ const cfgEmail = options?.author?.email ?? 'bot@agentuity.com';
434
+ const cfgName = options?.author?.name ?? 'Agentuity';
435
+
419
436
  await tui.runCommand({
420
437
  command: 'git config user.email',
421
438
  cwd: dest,
422
- cmd: ['git', 'config', 'user.email', 'agentuity@example.com'],
439
+ cmd: ['git', 'config', 'user.email', cfgEmail],
423
440
  clearOnSuccess: true,
424
441
  });
425
442
 
426
443
  await tui.runCommand({
427
444
  command: 'git config user.name',
428
445
  cwd: dest,
429
- cmd: ['git', 'config', 'user.name', 'Agentuity'],
446
+ cmd: ['git', 'config', 'user.name', cfgName],
430
447
  clearOnSuccess: true,
431
448
  });
432
449
  }
@@ -439,11 +456,30 @@ export async function initGitRepo(dest: string): Promise<void> {
439
456
  clearOnSuccess: true,
440
457
  });
441
458
 
442
- // Create initial commit (disable GPG signing to avoid lock issues)
459
+ const commitMessage = 'Initial Setup';
460
+
461
+ // Create initial commit — authored by the GitHub App bot if available,
462
+ // otherwise fallback to generic Agentuity identity
463
+ const authorName = options?.author?.name ?? 'Agentuity';
464
+ const authorEmail = options?.author?.email ?? 'bot@agentuity.com';
465
+ const authorStr = `${authorName} <${authorEmail}>`;
466
+
443
467
  await tui.runCommand({
444
- command: 'git commit -m "Initial Setup"',
468
+ command: 'git commit',
445
469
  cwd: dest,
446
- cmd: ['git', '-c', 'commit.gpgsign=false', 'commit', '-m', 'Initial Setup'],
470
+ cmd: [
471
+ 'git',
472
+ '-c',
473
+ 'commit.gpgsign=false',
474
+ 'commit',
475
+ `--author=${authorStr}`,
476
+ '-m',
477
+ commitMessage,
478
+ ],
479
+ env: {
480
+ GIT_COMMITTER_NAME: authorName,
481
+ GIT_COMMITTER_EMAIL: authorEmail,
482
+ },
447
483
  clearOnSuccess: true,
448
484
  });
449
485
  }