@agentuity/cli 2.0.11 → 2.0.13

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 (274) hide show
  1. package/dist/cache/resource-region.d.ts.map +1 -1
  2. package/dist/cache/resource-region.js +48 -25
  3. package/dist/cache/resource-region.js.map +1 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +15 -8
  6. package/dist/cli.js.map +1 -1
  7. package/dist/cmd/build/vite/bun-dev-server.d.ts +20 -0
  8. package/dist/cmd/build/vite/bun-dev-server.d.ts.map +1 -1
  9. package/dist/cmd/build/vite/bun-dev-server.js +62 -4
  10. package/dist/cmd/build/vite/bun-dev-server.js.map +1 -1
  11. package/dist/cmd/build/vite/index.d.ts +0 -1
  12. package/dist/cmd/build/vite/index.d.ts.map +1 -1
  13. package/dist/cmd/build/vite/index.js +0 -1
  14. package/dist/cmd/build/vite/index.js.map +1 -1
  15. package/dist/cmd/build/vite/static-renderer.d.ts +17 -0
  16. package/dist/cmd/build/vite/static-renderer.d.ts.map +1 -1
  17. package/dist/cmd/build/vite/static-renderer.js +18 -6
  18. package/dist/cmd/build/vite/static-renderer.js.map +1 -1
  19. package/dist/cmd/build/vite/vite-asset-server-config.d.ts.map +1 -1
  20. package/dist/cmd/build/vite/vite-asset-server-config.js +34 -27
  21. package/dist/cmd/build/vite/vite-asset-server-config.js.map +1 -1
  22. package/dist/cmd/build/vite/vite-asset-server.d.ts +9 -0
  23. package/dist/cmd/build/vite/vite-asset-server.d.ts.map +1 -1
  24. package/dist/cmd/build/vite/vite-asset-server.js +5 -1
  25. package/dist/cmd/build/vite/vite-asset-server.js.map +1 -1
  26. package/dist/cmd/build/vite/vite-builder.d.ts.map +1 -1
  27. package/dist/cmd/build/vite/vite-builder.js +12 -1
  28. package/dist/cmd/build/vite/vite-builder.js.map +1 -1
  29. package/dist/cmd/build/vite/ws-proxy.d.ts +15 -1
  30. package/dist/cmd/build/vite/ws-proxy.d.ts.map +1 -1
  31. package/dist/cmd/build/vite/ws-proxy.js +33 -0
  32. package/dist/cmd/build/vite/ws-proxy.js.map +1 -1
  33. package/dist/cmd/cloud/deploy.d.ts.map +1 -1
  34. package/dist/cmd/cloud/deploy.js +98 -39
  35. package/dist/cmd/cloud/deploy.js.map +1 -1
  36. package/dist/cmd/cloud/sandbox/checkpoint/create.d.ts.map +1 -1
  37. package/dist/cmd/cloud/sandbox/checkpoint/create.js +3 -4
  38. package/dist/cmd/cloud/sandbox/checkpoint/create.js.map +1 -1
  39. package/dist/cmd/cloud/sandbox/checkpoint/delete.d.ts.map +1 -1
  40. package/dist/cmd/cloud/sandbox/checkpoint/delete.js +3 -4
  41. package/dist/cmd/cloud/sandbox/checkpoint/delete.js.map +1 -1
  42. package/dist/cmd/cloud/sandbox/checkpoint/list.d.ts.map +1 -1
  43. package/dist/cmd/cloud/sandbox/checkpoint/list.js +3 -4
  44. package/dist/cmd/cloud/sandbox/checkpoint/list.js.map +1 -1
  45. package/dist/cmd/cloud/sandbox/checkpoint/restore.d.ts.map +1 -1
  46. package/dist/cmd/cloud/sandbox/checkpoint/restore.js +3 -4
  47. package/dist/cmd/cloud/sandbox/checkpoint/restore.js.map +1 -1
  48. package/dist/cmd/cloud/sandbox/create.d.ts.map +1 -1
  49. package/dist/cmd/cloud/sandbox/create.js +13 -4
  50. package/dist/cmd/cloud/sandbox/create.js.map +1 -1
  51. package/dist/cmd/cloud/sandbox/delete.d.ts.map +1 -1
  52. package/dist/cmd/cloud/sandbox/delete.js +3 -4
  53. package/dist/cmd/cloud/sandbox/delete.js.map +1 -1
  54. package/dist/cmd/cloud/sandbox/env.d.ts.map +1 -1
  55. package/dist/cmd/cloud/sandbox/env.js +3 -5
  56. package/dist/cmd/cloud/sandbox/env.js.map +1 -1
  57. package/dist/cmd/cloud/sandbox/exec.d.ts.map +1 -1
  58. package/dist/cmd/cloud/sandbox/exec.js +114 -41
  59. package/dist/cmd/cloud/sandbox/exec.js.map +1 -1
  60. package/dist/cmd/cloud/sandbox/execution/list.d.ts.map +1 -1
  61. package/dist/cmd/cloud/sandbox/execution/list.js +3 -5
  62. package/dist/cmd/cloud/sandbox/execution/list.js.map +1 -1
  63. package/dist/cmd/cloud/sandbox/fs/cp.d.ts.map +1 -1
  64. package/dist/cmd/cloud/sandbox/fs/cp.js +61 -113
  65. package/dist/cmd/cloud/sandbox/fs/cp.js.map +1 -1
  66. package/dist/cmd/cloud/sandbox/fs/download.d.ts.map +1 -1
  67. package/dist/cmd/cloud/sandbox/fs/download.js +11 -22
  68. package/dist/cmd/cloud/sandbox/fs/download.js.map +1 -1
  69. package/dist/cmd/cloud/sandbox/fs/ls.d.ts.map +1 -1
  70. package/dist/cmd/cloud/sandbox/fs/ls.js +3 -5
  71. package/dist/cmd/cloud/sandbox/fs/ls.js.map +1 -1
  72. package/dist/cmd/cloud/sandbox/fs/mkdir.d.ts.map +1 -1
  73. package/dist/cmd/cloud/sandbox/fs/mkdir.js +3 -5
  74. package/dist/cmd/cloud/sandbox/fs/mkdir.js.map +1 -1
  75. package/dist/cmd/cloud/sandbox/fs/rm.d.ts.map +1 -1
  76. package/dist/cmd/cloud/sandbox/fs/rm.js +3 -5
  77. package/dist/cmd/cloud/sandbox/fs/rm.js.map +1 -1
  78. package/dist/cmd/cloud/sandbox/fs/rmdir.d.ts.map +1 -1
  79. package/dist/cmd/cloud/sandbox/fs/rmdir.js +3 -5
  80. package/dist/cmd/cloud/sandbox/fs/rmdir.js.map +1 -1
  81. package/dist/cmd/cloud/sandbox/fs/upload.d.ts.map +1 -1
  82. package/dist/cmd/cloud/sandbox/fs/upload.js +7 -8
  83. package/dist/cmd/cloud/sandbox/fs/upload.js.map +1 -1
  84. package/dist/cmd/cloud/sandbox/get.d.ts.map +1 -1
  85. package/dist/cmd/cloud/sandbox/get.js +21 -7
  86. package/dist/cmd/cloud/sandbox/get.js.map +1 -1
  87. package/dist/cmd/cloud/sandbox/job/create.d.ts.map +1 -1
  88. package/dist/cmd/cloud/sandbox/job/create.js +3 -4
  89. package/dist/cmd/cloud/sandbox/job/create.js.map +1 -1
  90. package/dist/cmd/cloud/sandbox/job/destroy.d.ts.map +1 -1
  91. package/dist/cmd/cloud/sandbox/job/destroy.js +3 -4
  92. package/dist/cmd/cloud/sandbox/job/destroy.js.map +1 -1
  93. package/dist/cmd/cloud/sandbox/job/get.d.ts.map +1 -1
  94. package/dist/cmd/cloud/sandbox/job/get.js +3 -4
  95. package/dist/cmd/cloud/sandbox/job/get.js.map +1 -1
  96. package/dist/cmd/cloud/sandbox/job/list.d.ts.map +1 -1
  97. package/dist/cmd/cloud/sandbox/job/list.js +3 -4
  98. package/dist/cmd/cloud/sandbox/job/list.js.map +1 -1
  99. package/dist/cmd/cloud/sandbox/job/logs.d.ts.map +1 -1
  100. package/dist/cmd/cloud/sandbox/job/logs.js +4 -4
  101. package/dist/cmd/cloud/sandbox/job/logs.js.map +1 -1
  102. package/dist/cmd/cloud/sandbox/pause.d.ts.map +1 -1
  103. package/dist/cmd/cloud/sandbox/pause.js +21 -5
  104. package/dist/cmd/cloud/sandbox/pause.js.map +1 -1
  105. package/dist/cmd/cloud/sandbox/resume.d.ts.map +1 -1
  106. package/dist/cmd/cloud/sandbox/resume.js +3 -4
  107. package/dist/cmd/cloud/sandbox/resume.js.map +1 -1
  108. package/dist/cmd/cloud/sandbox/run.d.ts.map +1 -1
  109. package/dist/cmd/cloud/sandbox/run.js +36 -7
  110. package/dist/cmd/cloud/sandbox/run.js.map +1 -1
  111. package/dist/cmd/cloud/sandbox/snapshot/create.js +4 -4
  112. package/dist/cmd/cloud/sandbox/snapshot/create.js.map +1 -1
  113. package/dist/cmd/cloud/sandbox/util.d.ts +19 -0
  114. package/dist/cmd/cloud/sandbox/util.d.ts.map +1 -1
  115. package/dist/cmd/cloud/sandbox/util.js +40 -2
  116. package/dist/cmd/cloud/sandbox/util.js.map +1 -1
  117. package/dist/cmd/coder/create.js +7 -7
  118. package/dist/cmd/coder/create.js.map +1 -1
  119. package/dist/cmd/coder/start.d.ts.map +1 -1
  120. package/dist/cmd/coder/start.js +3 -0
  121. package/dist/cmd/coder/start.js.map +1 -1
  122. package/dist/cmd/coder/tui-init.js +1 -1
  123. package/dist/cmd/coder/tui-init.js.map +1 -1
  124. package/dist/cmd/coder/update.js +8 -8
  125. package/dist/cmd/coder/update.js.map +1 -1
  126. package/dist/cmd/coder/workspace/common.d.ts +29 -0
  127. package/dist/cmd/coder/workspace/common.d.ts.map +1 -0
  128. package/dist/cmd/coder/workspace/common.js +83 -0
  129. package/dist/cmd/coder/workspace/common.js.map +1 -0
  130. package/dist/cmd/coder/workspace/create.d.ts.map +1 -1
  131. package/dist/cmd/coder/workspace/create.js +57 -32
  132. package/dist/cmd/coder/workspace/create.js.map +1 -1
  133. package/dist/cmd/coder/workspace/get.d.ts.map +1 -1
  134. package/dist/cmd/coder/workspace/get.js +2 -5
  135. package/dist/cmd/coder/workspace/get.js.map +1 -1
  136. package/dist/cmd/coder/workspace/index.d.ts.map +1 -1
  137. package/dist/cmd/coder/workspace/index.js +11 -1
  138. package/dist/cmd/coder/workspace/index.js.map +1 -1
  139. package/dist/cmd/coder/workspace/list.d.ts.map +1 -1
  140. package/dist/cmd/coder/workspace/list.js +4 -0
  141. package/dist/cmd/coder/workspace/list.js.map +1 -1
  142. package/dist/cmd/coder/workspace/refresh.d.ts +2 -0
  143. package/dist/cmd/coder/workspace/refresh.d.ts.map +1 -0
  144. package/dist/cmd/coder/workspace/refresh.js +59 -0
  145. package/dist/cmd/coder/workspace/refresh.js.map +1 -0
  146. package/dist/cmd/coder/workspace/update.d.ts +2 -0
  147. package/dist/cmd/coder/workspace/update.d.ts.map +1 -0
  148. package/dist/cmd/coder/workspace/update.js +131 -0
  149. package/dist/cmd/coder/workspace/update.js.map +1 -0
  150. package/dist/cmd/coder/workspace/validate-dependencies.d.ts +2 -0
  151. package/dist/cmd/coder/workspace/validate-dependencies.d.ts.map +1 -0
  152. package/dist/cmd/coder/workspace/validate-dependencies.js +70 -0
  153. package/dist/cmd/coder/workspace/validate-dependencies.js.map +1 -0
  154. package/dist/cmd/dev/dev-lock.d.ts.map +1 -1
  155. package/dist/cmd/dev/dev-lock.js +43 -17
  156. package/dist/cmd/dev/dev-lock.js.map +1 -1
  157. package/dist/cmd/dev/index.d.ts.map +1 -1
  158. package/dist/cmd/dev/index.js +211 -125
  159. package/dist/cmd/dev/index.js.map +1 -1
  160. package/dist/cmd/dev/process-manager.d.ts +41 -1
  161. package/dist/cmd/dev/process-manager.d.ts.map +1 -1
  162. package/dist/cmd/dev/process-manager.js +160 -31
  163. package/dist/cmd/dev/process-manager.js.map +1 -1
  164. package/dist/cmd/project/create.d.ts.map +1 -1
  165. package/dist/cmd/project/create.js +0 -2
  166. package/dist/cmd/project/create.js.map +1 -1
  167. package/dist/cmd/project/index.d.ts.map +1 -1
  168. package/dist/cmd/project/index.js +0 -3
  169. package/dist/cmd/project/index.js.map +1 -1
  170. package/dist/cmd/project/random-name.d.ts +17 -0
  171. package/dist/cmd/project/random-name.d.ts.map +1 -0
  172. package/dist/cmd/project/random-name.js +144 -0
  173. package/dist/cmd/project/random-name.js.map +1 -0
  174. package/dist/cmd/project/template-flow.d.ts +0 -1
  175. package/dist/cmd/project/template-flow.d.ts.map +1 -1
  176. package/dist/cmd/project/template-flow.js +180 -275
  177. package/dist/cmd/project/template-flow.js.map +1 -1
  178. package/dist/composite-logger.d.ts.map +1 -1
  179. package/dist/composite-logger.js +19 -0
  180. package/dist/composite-logger.js.map +1 -1
  181. package/dist/config.d.ts +18 -16
  182. package/dist/config.d.ts.map +1 -1
  183. package/dist/config.js +46 -16
  184. package/dist/config.js.map +1 -1
  185. package/dist/tui/prompt.d.ts +29 -0
  186. package/dist/tui/prompt.d.ts.map +1 -1
  187. package/dist/tui/prompt.js +180 -8
  188. package/dist/tui/prompt.js.map +1 -1
  189. package/package.json +7 -7
  190. package/src/cache/resource-region.ts +68 -44
  191. package/src/cli.ts +30 -8
  192. package/src/cmd/ai/prompt/web.md +43 -17
  193. package/src/cmd/build/vite/bun-dev-server.ts +92 -6
  194. package/src/cmd/build/vite/index.ts +0 -1
  195. package/src/cmd/build/vite/static-renderer.ts +18 -7
  196. package/src/cmd/build/vite/vite-asset-server-config.ts +37 -27
  197. package/src/cmd/build/vite/vite-asset-server.ts +5 -1
  198. package/src/cmd/build/vite/vite-builder.ts +12 -1
  199. package/src/cmd/build/vite/ws-proxy.ts +52 -3
  200. package/src/cmd/cloud/deploy.ts +117 -49
  201. package/src/cmd/cloud/sandbox/checkpoint/create.ts +10 -4
  202. package/src/cmd/cloud/sandbox/checkpoint/delete.ts +10 -4
  203. package/src/cmd/cloud/sandbox/checkpoint/list.ts +10 -4
  204. package/src/cmd/cloud/sandbox/checkpoint/restore.ts +10 -4
  205. package/src/cmd/cloud/sandbox/create.ts +14 -4
  206. package/src/cmd/cloud/sandbox/delete.ts +10 -4
  207. package/src/cmd/cloud/sandbox/env.ts +10 -5
  208. package/src/cmd/cloud/sandbox/exec.ts +157 -42
  209. package/src/cmd/cloud/sandbox/execution/list.ts +10 -5
  210. package/src/cmd/cloud/sandbox/fs/cp.ts +94 -126
  211. package/src/cmd/cloud/sandbox/fs/download.ts +18 -25
  212. package/src/cmd/cloud/sandbox/fs/ls.ts +10 -5
  213. package/src/cmd/cloud/sandbox/fs/mkdir.ts +10 -5
  214. package/src/cmd/cloud/sandbox/fs/rm.ts +10 -5
  215. package/src/cmd/cloud/sandbox/fs/rmdir.ts +10 -5
  216. package/src/cmd/cloud/sandbox/fs/upload.ts +14 -8
  217. package/src/cmd/cloud/sandbox/get.ts +28 -7
  218. package/src/cmd/cloud/sandbox/job/create.ts +10 -4
  219. package/src/cmd/cloud/sandbox/job/destroy.ts +10 -4
  220. package/src/cmd/cloud/sandbox/job/get.ts +10 -4
  221. package/src/cmd/cloud/sandbox/job/list.ts +10 -4
  222. package/src/cmd/cloud/sandbox/job/logs.ts +11 -4
  223. package/src/cmd/cloud/sandbox/pause.ts +31 -5
  224. package/src/cmd/cloud/sandbox/resume.ts +10 -4
  225. package/src/cmd/cloud/sandbox/run.ts +49 -11
  226. package/src/cmd/cloud/sandbox/snapshot/create.ts +6 -6
  227. package/src/cmd/cloud/sandbox/util.ts +63 -2
  228. package/src/cmd/coder/create.ts +8 -8
  229. package/src/cmd/coder/start.ts +3 -0
  230. package/src/cmd/coder/tui-init.ts +1 -1
  231. package/src/cmd/coder/update.ts +7 -7
  232. package/src/cmd/coder/workspace/common.ts +103 -0
  233. package/src/cmd/coder/workspace/create.ts +84 -37
  234. package/src/cmd/coder/workspace/get.ts +2 -5
  235. package/src/cmd/coder/workspace/index.ts +13 -1
  236. package/src/cmd/coder/workspace/list.ts +4 -0
  237. package/src/cmd/coder/workspace/refresh.ts +63 -0
  238. package/src/cmd/coder/workspace/update.ts +154 -0
  239. package/src/cmd/coder/workspace/validate-dependencies.ts +75 -0
  240. package/src/cmd/dev/dev-lock.ts +50 -16
  241. package/src/cmd/dev/index.ts +249 -134
  242. package/src/cmd/dev/process-manager.ts +173 -33
  243. package/src/cmd/project/create.ts +0 -2
  244. package/src/cmd/project/index.ts +0 -3
  245. package/src/cmd/project/random-name.ts +152 -0
  246. package/src/cmd/project/template-flow.ts +196 -305
  247. package/src/composite-logger.ts +20 -0
  248. package/src/config.ts +69 -19
  249. package/src/tui/prompt.ts +214 -8
  250. package/dist/cmd/build/vite/public-asset-path-plugin.d.ts +0 -45
  251. package/dist/cmd/build/vite/public-asset-path-plugin.d.ts.map +0 -1
  252. package/dist/cmd/build/vite/public-asset-path-plugin.js +0 -166
  253. package/dist/cmd/build/vite/public-asset-path-plugin.js.map +0 -1
  254. package/dist/cmd/project/auth/generate.d.ts +0 -5
  255. package/dist/cmd/project/auth/generate.d.ts.map +0 -1
  256. package/dist/cmd/project/auth/generate.js +0 -102
  257. package/dist/cmd/project/auth/generate.js.map +0 -1
  258. package/dist/cmd/project/auth/index.d.ts +0 -2
  259. package/dist/cmd/project/auth/index.d.ts.map +0 -1
  260. package/dist/cmd/project/auth/index.js +0 -21
  261. package/dist/cmd/project/auth/index.js.map +0 -1
  262. package/dist/cmd/project/auth/init.d.ts +0 -2
  263. package/dist/cmd/project/auth/init.d.ts.map +0 -1
  264. package/dist/cmd/project/auth/init.js +0 -213
  265. package/dist/cmd/project/auth/init.js.map +0 -1
  266. package/dist/cmd/project/auth/shared.d.ts +0 -93
  267. package/dist/cmd/project/auth/shared.d.ts.map +0 -1
  268. package/dist/cmd/project/auth/shared.js +0 -475
  269. package/dist/cmd/project/auth/shared.js.map +0 -1
  270. package/src/cmd/build/vite/public-asset-path-plugin.ts +0 -209
  271. package/src/cmd/project/auth/generate.ts +0 -116
  272. package/src/cmd/project/auth/index.ts +0 -21
  273. package/src/cmd/project/auth/init.ts +0 -256
  274. package/src/cmd/project/auth/shared.ts +0 -591
package/src/config.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { existsSync, mkdirSync } from 'node:fs';
2
- import { chmod, mkdir, readdir, readFile, writeFile } from 'node:fs/promises';
2
+ import { chmod, mkdir, readdir, readFile, stat, writeFile } from 'node:fs/promises';
3
3
  import { homedir } from 'node:os';
4
- import { basename, extname, join, normalize, resolve } from 'node:path';
4
+ import { basename, dirname, extname, join, normalize, resolve } from 'node:path';
5
5
  import { type Logger, StructuredError } from '@agentuity/core';
6
6
  import {
7
7
  type BuildMetadata,
@@ -15,6 +15,7 @@ import { z } from 'zod';
15
15
  import { clearProfileCache } from './cache';
16
16
  import { getCatalystUrl } from './catalyst';
17
17
  import { readEnvFile, writeEnvFile } from './env-util';
18
+ import { ErrorCode } from './errors';
18
19
  import {
19
20
  deleteAuthFromKeychain,
20
21
  getAuthFromKeychain,
@@ -151,10 +152,12 @@ function expandTilde(path: string): string {
151
152
  let cachedConfig: Config | null | undefined;
152
153
  // Track the resolved config path so saveConfig writes back to the same file
153
154
  let cachedConfigPath: string | undefined;
155
+ const loadedProjectConfigPaths = new Map<string, string>();
154
156
 
155
157
  export function resetConfigCache(): void {
156
158
  cachedConfig = undefined;
157
159
  cachedConfigPath = undefined;
160
+ loadedProjectConfigPaths.clear();
158
161
  }
159
162
 
160
163
  export async function loadConfig(
@@ -600,31 +603,76 @@ export function generateYAMLTemplate(name: string): string {
600
603
  return lines.join('\n');
601
604
  }
602
605
 
603
- export const ProjectConfigNotFoundException = StructuredError('ProjectConfigNotFoundException');
606
+ export const ProjectConfigNotFoundException = StructuredError('ProjectConfigNotFoundException')<{
607
+ code?: ErrorCode;
608
+ configPath?: string;
609
+ explicit?: boolean;
610
+ }>();
604
611
 
605
612
  type ProjectConfig = z.infer<typeof ProjectSchema>;
606
613
 
607
- export async function loadProjectConfig(
608
- dir: string,
614
+ export type ResolvedProjectConfigPaths = {
615
+ projectDir: string;
616
+ configPath: string;
617
+ explicitConfigFile: boolean;
618
+ };
619
+
620
+ export async function resolveProjectConfigPaths(
621
+ path: string,
609
622
  config?: Config | null
610
- ): Promise<ProjectConfig> {
611
- let configPath = join(dir, 'agentuity.json');
623
+ ): Promise<ResolvedProjectConfigPaths> {
624
+ const resolvedPath = resolve(expandTilde(path));
625
+ const pathStats = await stat(resolvedPath).catch(() => null);
626
+ const isExplicitJsonFile =
627
+ (pathStats?.isFile() || pathStats === null) && extname(resolvedPath) === '.json';
628
+
629
+ if (isExplicitJsonFile) {
630
+ return {
631
+ projectDir: dirname(resolvedPath),
632
+ configPath: resolvedPath,
633
+ explicitConfigFile: true,
634
+ };
635
+ }
636
+
637
+ const projectDir = resolvedPath;
638
+ let configPath = join(projectDir, 'agentuity.json');
612
639
 
613
- // Check for profile-specific override if config is provided
614
640
  if (config?.name) {
615
- const profileConfigPath = join(dir, `agentuity.${config.name}.json`);
641
+ const profileConfigPath = join(projectDir, `agentuity.${config.name}.json`);
616
642
  if (await Bun.file(profileConfigPath).exists()) {
617
643
  configPath = profileConfigPath;
618
644
  }
619
645
  }
620
646
 
647
+ return {
648
+ projectDir,
649
+ configPath,
650
+ explicitConfigFile: false,
651
+ };
652
+ }
653
+
654
+ export async function loadProjectConfig(
655
+ dir: string,
656
+ config?: Config | null
657
+ ): Promise<ProjectConfig> {
658
+ const { projectDir, configPath, explicitConfigFile } = await resolveProjectConfigPaths(
659
+ dir,
660
+ config
661
+ );
662
+
621
663
  const file = Bun.file(configPath);
622
664
  if (!(await file.exists())) {
623
665
  // TODO: check to see if a valid project that was created unauthenticated
624
666
  // and then if so:
625
667
  // 1. if authentication, offer to import the project
626
668
  // 2. tell them that they need to login to use the command and import the project
627
- throw new ProjectConfigNotFoundException({ message: 'project config not found' });
669
+ throw new ProjectConfigNotFoundException({
670
+ message: explicitConfigFile
671
+ ? `Project config not found at ${configPath}`
672
+ : 'project config not found',
673
+ configPath,
674
+ explicit: explicitConfigFile,
675
+ });
628
676
  }
629
677
  const text = await file.text();
630
678
  const parsedConfig = parseJSONC(text);
@@ -637,6 +685,7 @@ export async function loadProjectConfig(
637
685
  }
638
686
  process.exit(1);
639
687
  }
688
+ loadedProjectConfigPaths.set(projectDir, configPath);
640
689
  return result.data;
641
690
  }
642
691
 
@@ -717,18 +766,19 @@ export async function updateProjectConfig(
717
766
  updates: Partial<z.infer<typeof ProjectSchema>>,
718
767
  config?: Config | null
719
768
  ): Promise<void> {
720
- let configPath = join(dir, 'agentuity.json');
721
-
722
- if (config?.name) {
723
- const profileConfigPath = join(dir, `agentuity.${config.name}.json`);
724
- if (await Bun.file(profileConfigPath).exists()) {
725
- configPath = profileConfigPath;
726
- }
727
- }
769
+ const resolved = await resolveProjectConfigPaths(dir, config);
770
+ const configPath = resolved.explicitConfigFile
771
+ ? resolved.configPath
772
+ : (loadedProjectConfigPaths.get(resolved.projectDir) ?? resolved.configPath);
728
773
 
729
774
  const file = Bun.file(configPath);
730
775
  if (!(await file.exists())) {
731
- throw new Error(`Project config not found at ${configPath}`);
776
+ throw new ProjectConfigNotFoundException({
777
+ code: ErrorCode.PROJECT_NOT_FOUND,
778
+ message: `Project config not found at ${configPath}`,
779
+ configPath: resolved.configPath,
780
+ explicit: resolved.explicitConfigFile,
781
+ });
732
782
  }
733
783
 
734
784
  const text = await file.text();
package/src/tui/prompt.ts CHANGED
@@ -14,6 +14,12 @@ export interface TextOptions {
14
14
  message: string;
15
15
  initial?: string;
16
16
  hint?: string;
17
+ /**
18
+ * Pre-generated suggestion shown dim in the hint line.
19
+ * Submitting empty input accepts the placeholder.
20
+ * Unlike `initial`, this is rendered visibly so the user knows what they'll get.
21
+ */
22
+ placeholder?: string;
17
23
  validate?: (value: string) => boolean | string | Promise<boolean | string>;
18
24
  }
19
25
 
@@ -92,27 +98,39 @@ export class PromptFlow {
92
98
 
93
99
  /**
94
100
  * Text input prompt
101
+ *
102
+ * Two render paths:
103
+ * - With `placeholder`: custom raw-keypress renderer that paints the placeholder
104
+ * inline as dim ghost text at the cursor (autofill style). Vanishes on the first
105
+ * keystroke; Enter on an empty buffer accepts the placeholder.
106
+ * - Without `placeholder`: original readline-based renderer (untouched).
95
107
  */
96
108
  async text(options: TextOptions): Promise<string> {
97
- const { message, validate } = options;
98
- const initial = options.initial ?? '';
99
- const hasDefault = options.initial !== undefined;
109
+ const { message, validate, placeholder } = options;
110
+ // `placeholder` acts as a visible default: empty submit resolves to it.
111
+ // `initial` (legacy, invisible) still works but `placeholder` takes precedence.
112
+ const fallback = placeholder ?? options.initial ?? '';
113
+ const hasDefault = placeholder !== undefined || options.initial !== undefined;
100
114
 
101
115
  if (!this.isInteractive()) {
102
116
  if (hasDefault) {
103
- const validationResult = validate ? await validate(initial) : true;
117
+ const validationResult = validate ? await validate(fallback) : true;
104
118
  if (validationResult === true) {
105
- return initial;
119
+ return fallback;
106
120
  }
107
121
  // Validation failed - include the error message if it's a string
108
122
  const errorDetail = typeof validationResult === 'string' ? `: ${validationResult}` : '';
109
123
  throw this.nonInteractiveError(
110
- `Cannot prompt for "${message}" in non-interactive mode. Validation failed for default value "${initial}"${errorDetail}.`
124
+ `Cannot prompt for "${message}" in non-interactive mode. Validation failed for default value "${fallback}"${errorDetail}.`
111
125
  );
112
126
  }
113
127
  throw this.nonInteractiveError(`Cannot prompt for "${message}" in non-interactive mode.`);
114
128
  }
115
129
 
130
+ if (placeholder) {
131
+ return this.textWithGhost(options, placeholder);
132
+ }
133
+
116
134
  return new Promise((resolve, reject) => {
117
135
  const rl = readline.createInterface({
118
136
  input: process.stdin,
@@ -139,8 +157,8 @@ export class PromptFlow {
139
157
 
140
158
  rl.on('line', async (input) => {
141
159
  const trimmed = input.trim();
142
- // After a validation error, require explicit input - don't fall back to initial
143
- const value = trimmed.length > 0 ? trimmed : hadValidationError ? '' : initial;
160
+ // After a validation error, require explicit input - don't fall back to default.
161
+ const value = trimmed.length > 0 ? trimmed : hadValidationError ? '' : fallback;
144
162
 
145
163
  // Validate
146
164
  if (validate) {
@@ -229,6 +247,194 @@ export class PromptFlow {
229
247
  });
230
248
  }
231
249
 
250
+ /**
251
+ * Text input with inline ghost-text placeholder (autofill style).
252
+ *
253
+ * Layout:
254
+ * ◆ <message>
255
+ * │ <hint> (optional)
256
+ * │ <typed>│<ghost> ghost is dim, vanishes on first keystroke
257
+ *
258
+ * Behavior:
259
+ * - Typing any char hides the ghost permanently for this prompt instance.
260
+ * - Backspacing back to empty does NOT bring the ghost back.
261
+ * - Enter on empty buffer → resolves to placeholder.
262
+ * - Enter with typed text → resolves to typed text.
263
+ * - Validation error: shows inline error, ghost stays gone, user must type.
264
+ * - Ctrl+C: cancels.
265
+ */
266
+ private async textWithGhost(options: TextOptions, placeholder: string): Promise<string> {
267
+ const { message, validate, hint } = options;
268
+
269
+ return new Promise((resolve, reject) => {
270
+ let buffer = '';
271
+ // Tracks whether the ghost should still be visible. Once any printable key is
272
+ // pressed it goes false and stays false for the rest of this prompt.
273
+ let ghostVisible = true;
274
+ let hasError = false;
275
+ let errorMsg = '';
276
+
277
+ const inputPrefix = `${colors.secondary(symbols.bar)} `;
278
+ // Visible-character length of the input-line prefix ("│ " = 3 cells).
279
+ const PREFIX_VISIBLE = 3;
280
+
281
+ /**
282
+ * Repaint everything from the message line down. Cursor must be on the
283
+ * message line (column 0) when this is called for the first time, or we
284
+ * just moved up to it after a clear.
285
+ */
286
+ const paint = () => {
287
+ const symbol = hasError ? colors.error(symbols.error) : colors.active(symbols.active);
288
+ process.stdout.write(`${symbol} ${message}\n`);
289
+
290
+ if (hasError) {
291
+ process.stdout.write(
292
+ `${colors.secondary(symbols.bar)} ${colors.error(errorMsg)}\n`
293
+ );
294
+ } else if (hint) {
295
+ process.stdout.write(`${colors.secondary(symbols.bar)} ${colors.muted(hint)}\n`);
296
+ }
297
+
298
+ // Input line.
299
+ process.stdout.write(inputPrefix);
300
+ process.stdout.write(buffer);
301
+
302
+ if (ghostVisible && buffer.length === 0) {
303
+ // Paint the ghost, then move the cursor back to the start of it so the
304
+ // caret sits where the user would start typing.
305
+ process.stdout.write(colors.muted(placeholder));
306
+ readline.moveCursor(process.stdout, -placeholder.length, 0);
307
+ }
308
+ };
309
+
310
+ /**
311
+ * Number of terminal lines currently occupied by our render, so we know
312
+ * how many to clear on the next repaint.
313
+ * Always: message (1) + hint-or-error (0/1) + input (1).
314
+ */
315
+ const renderedLines = (): number => {
316
+ let n = 1; // message
317
+ if (hasError || hint) n += 1;
318
+ n += 1; // input
319
+ return n;
320
+ };
321
+
322
+ const repaint = () => {
323
+ // Move cursor to column 0, then up to the start of our render block, then clear.
324
+ readline.cursorTo(process.stdout, 0);
325
+ readline.moveCursor(process.stdout, 0, -(renderedLines() - 1));
326
+ readline.clearScreenDown(process.stdout);
327
+ paint();
328
+ };
329
+
330
+ // Resume stdin if it was paused by a prior prompt.
331
+ if (process.stdin.isTTY && process.stdin.isPaused()) {
332
+ process.stdin.resume();
333
+ }
334
+
335
+ readline.emitKeypressEvents(process.stdin);
336
+ if (process.stdin.isTTY) {
337
+ process.stdin.setRawMode(true);
338
+ }
339
+
340
+ // Initial paint.
341
+ paint();
342
+
343
+ const cleanup = () => {
344
+ process.stdin.removeListener('keypress', onKeypress);
345
+ if (process.stdin.isTTY) {
346
+ process.stdin.setRawMode(false);
347
+ process.stdin.pause();
348
+ }
349
+ };
350
+
351
+ const finalize = (value: string) => {
352
+ // Repaint as completed: replace whole render block with the completed lines.
353
+ readline.cursorTo(process.stdout, 0);
354
+ readline.moveCursor(process.stdout, 0, -(renderedLines() - 1));
355
+ readline.clearScreenDown(process.stdout);
356
+
357
+ if (value === '') {
358
+ process.stdout.write(
359
+ `${colors.completed(symbols.completed)} ${message}\n${colors.secondary(symbols.bar)}\n`
360
+ );
361
+ } else {
362
+ process.stdout.write(
363
+ `${colors.completed(symbols.completed)} ${message}\n${colors.secondary(symbols.bar)} ${colors.muted(value)}\n${colors.secondary(symbols.bar)}\n`
364
+ );
365
+ }
366
+
367
+ this.states.push({ type: 'completed', message, value });
368
+ cleanup();
369
+ resolve(value);
370
+ };
371
+
372
+ const onKeypress = async (str: string, key: KeypressEvent) => {
373
+ if (key.ctrl && key.name === 'c') {
374
+ cleanup();
375
+ console.log('\n');
376
+ this.cancel('Operation cancelled');
377
+ reject(new Error('User cancelled'));
378
+ return;
379
+ }
380
+
381
+ if (key.name === 'return') {
382
+ const trimmed = buffer.trim();
383
+ // Empty submit accepts the placeholder, but only if no error has occurred
384
+ // (after an error the user must type explicitly — same rule the readline
385
+ // path uses).
386
+ const value = trimmed.length > 0 ? trimmed : hasError ? '' : placeholder;
387
+
388
+ if (validate) {
389
+ try {
390
+ const result = await validate(value);
391
+ if (result !== true) {
392
+ errorMsg = typeof result === 'string' ? result : 'Invalid input';
393
+ hasError = true;
394
+ ghostVisible = false;
395
+ repaint();
396
+ return;
397
+ }
398
+ } catch (err) {
399
+ errorMsg = err instanceof Error ? err.message : 'Validation failed';
400
+ hasError = true;
401
+ ghostVisible = false;
402
+ repaint();
403
+ return;
404
+ }
405
+ }
406
+
407
+ finalize(value);
408
+ return;
409
+ }
410
+
411
+ if (key.name === 'backspace') {
412
+ if (buffer.length > 0) {
413
+ buffer = buffer.slice(0, -1);
414
+ repaint();
415
+ }
416
+ return;
417
+ }
418
+
419
+ // Printable single character (ignore arrow keys, function keys, etc.).
420
+ if (str && str.length === 1 && !key.ctrl && str >= ' ' && str !== '\x7f') {
421
+ buffer += str;
422
+ ghostVisible = false;
423
+ repaint();
424
+ return;
425
+ }
426
+
427
+ // Everything else (arrows, tab, etc.) is ignored.
428
+ };
429
+
430
+ // Mark the prefix length as used so the unused-var rule doesn't trip when we
431
+ // extend this in future. (Keeping it documented for cursor-math sanity.)
432
+ void PREFIX_VISIBLE;
433
+
434
+ process.stdin.on('keypress', onKeypress);
435
+ });
436
+ }
437
+
232
438
  /**
233
439
  * Confirm (yes/no) prompt
234
440
  */
@@ -1,45 +0,0 @@
1
- /**
2
- * Vite plugin to fix incorrect public asset paths
3
- *
4
- * Developers should use /public/ paths for static assets from src/web/public/.
5
- * In production, these paths are transformed to CDN URLs.
6
- *
7
- * This plugin:
8
- * 1. During build: Rewrites /public/* paths to CDN URLs
9
- * 2. During dev: Warns only about incorrect source paths (src/web/public/)
10
- *
11
- * Supported patterns (work in dev, rewritten to CDN in production):
12
- * - '/public/foo.svg' → CDN URL (recommended)
13
- * - './public/foo.svg' → CDN URL
14
- * - 'url(/public/foo.svg)' → CDN URL (CSS unquoted)
15
- * - 'url(./public/foo.svg)' → CDN URL (CSS unquoted)
16
- *
17
- * Incorrect patterns (warned in dev, rewritten in production):
18
- * - '/src/web/public/foo.svg' → CDN URL
19
- * - './src/web/public/foo.svg' → CDN URL
20
- * - 'src/web/public/foo.svg' → CDN URL
21
- */
22
- import type { Plugin } from 'vite';
23
- export interface PublicAssetPathPluginOptions {
24
- /** Whether to show warnings in dev mode (default: true) */
25
- warnInDev?: boolean;
26
- /** CDN base URL for production builds (e.g., 'https://cdn.agentuity.com/{deploymentId}/client/') */
27
- cdnBaseUrl?: string;
28
- }
29
- /**
30
- * Vite plugin that fixes public asset paths and rewrites to CDN URLs
31
- *
32
- * Rewrites all public asset paths to CDN URLs in production.
33
- *
34
- * @example
35
- * // In vite config:
36
- * plugins: [publicAssetPathPlugin({ cdnBaseUrl: 'https://cdn.example.com/deploy/client/' })]
37
- *
38
- * // In code, use /public/ paths:
39
- * <img src="/public/logo.svg" />
40
- *
41
- * // Transforms in production:
42
- * // '/public/logo.svg' → 'https://cdn.example.com/deploy/client/logo.svg'
43
- */
44
- export declare function publicAssetPathPlugin(options?: PublicAssetPathPluginOptions): Plugin;
45
- //# sourceMappingURL=public-asset-path-plugin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public-asset-path-plugin.d.ts","sourceRoot":"","sources":["../../../../src/cmd/build/vite/public-asset-path-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,MAAM,WAAW,4BAA4B;IAC5C,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oGAAoG;IACpG,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AAwDD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,GAAE,4BAAiC,GAAG,MAAM,CA4GxF"}
@@ -1,166 +0,0 @@
1
- /**
2
- * Vite plugin to fix incorrect public asset paths
3
- *
4
- * Developers should use /public/ paths for static assets from src/web/public/.
5
- * In production, these paths are transformed to CDN URLs.
6
- *
7
- * This plugin:
8
- * 1. During build: Rewrites /public/* paths to CDN URLs
9
- * 2. During dev: Warns only about incorrect source paths (src/web/public/)
10
- *
11
- * Supported patterns (work in dev, rewritten to CDN in production):
12
- * - '/public/foo.svg' → CDN URL (recommended)
13
- * - './public/foo.svg' → CDN URL
14
- * - 'url(/public/foo.svg)' → CDN URL (CSS unquoted)
15
- * - 'url(./public/foo.svg)' → CDN URL (CSS unquoted)
16
- *
17
- * Incorrect patterns (warned in dev, rewritten in production):
18
- * - '/src/web/public/foo.svg' → CDN URL
19
- * - './src/web/public/foo.svg' → CDN URL
20
- * - 'src/web/public/foo.svg' → CDN URL
21
- */
22
- /**
23
- * Patterns that are incorrect - reference source paths directly
24
- */
25
- function createIncorrectPatterns() {
26
- return [
27
- // '/src/web/public/...' or './src/web/public/...' or 'src/web/public/...'
28
- {
29
- regex: /(['"`])(?:\.?\/)?src\/web\/public\//g,
30
- description: 'src/web/public/',
31
- replacement: '$1{base}',
32
- },
33
- ];
34
- }
35
- /**
36
- * Patterns that need rewriting for production CDN
37
- * Both patterns simply replace the prefix while preserving the rest of the path naturally.
38
- */
39
- function createPublicPatterns() {
40
- return [
41
- // './public/...' (relative public path) - replace prefix, keep rest
42
- {
43
- regex: /(['"`])\.\/public\//g,
44
- description: './public/',
45
- replacement: '$1{base}',
46
- },
47
- // '/public/...' (absolute public path) - replace prefix, keep rest
48
- {
49
- regex: /(['"`])\/public\//g,
50
- description: '/public/',
51
- replacement: '$1{base}',
52
- },
53
- // CSS url(/public/...) — unquoted path inside url()
54
- {
55
- regex: /url\(\/public\//g,
56
- description: 'url(/public/)',
57
- replacement: 'url({base}',
58
- },
59
- // CSS url(./public/...) — unquoted relative path inside url()
60
- {
61
- regex: /url\(\.\/public\//g,
62
- description: 'url(./public/)',
63
- replacement: 'url({base}',
64
- },
65
- ];
66
- }
67
- /**
68
- * Vite plugin that fixes public asset paths and rewrites to CDN URLs
69
- *
70
- * Rewrites all public asset paths to CDN URLs in production.
71
- *
72
- * @example
73
- * // In vite config:
74
- * plugins: [publicAssetPathPlugin({ cdnBaseUrl: 'https://cdn.example.com/deploy/client/' })]
75
- *
76
- * // In code, use /public/ paths:
77
- * <img src="/public/logo.svg" />
78
- *
79
- * // Transforms in production:
80
- * // '/public/logo.svg' → 'https://cdn.example.com/deploy/client/logo.svg'
81
- */
82
- export function publicAssetPathPlugin(options = {}) {
83
- const { warnInDev = true, cdnBaseUrl } = options;
84
- let isDev = false;
85
- const warnedFiles = new Map(); // file -> set of patterns warned
86
- return {
87
- name: 'agentuity:public-asset-path',
88
- configResolved(config) {
89
- isDev = config.command === 'serve';
90
- },
91
- transform(code, id) {
92
- // Only transform files in src/web (browser code)
93
- if (!id.includes('/src/web/') && !id.includes('\\src\\web\\')) {
94
- return null;
95
- }
96
- // Quick check: does the code contain any patterns we care about?
97
- const hasIncorrectSourcePaths = code.includes('src/web/public/');
98
- const hasPublicPaths = code.includes('/public/') || code.includes('./public/');
99
- if (!hasIncorrectSourcePaths && !hasPublicPaths) {
100
- return null;
101
- }
102
- // In dev mode, only warn about incorrect source paths (src/web/public/)
103
- // /public/ and ./public/ paths work correctly in dev mode
104
- if (isDev) {
105
- if (warnInDev && hasIncorrectSourcePaths) {
106
- const patterns = createIncorrectPatterns();
107
- const foundPatterns = [];
108
- for (const { regex, description } of patterns) {
109
- if (regex.test(code)) {
110
- foundPatterns.push(description);
111
- }
112
- }
113
- if (foundPatterns.length > 0) {
114
- const fileWarnings = warnedFiles.get(id) || new Set();
115
- const newWarnings = foundPatterns.filter((p) => !fileWarnings.has(p));
116
- if (newWarnings.length > 0) {
117
- for (const p of newWarnings) {
118
- fileWarnings.add(p);
119
- }
120
- warnedFiles.set(id, fileWarnings);
121
- this.warn(`Found incorrect asset path(s) in ${id}:\n` +
122
- newWarnings.map((p) => ` - '${p}' should be '/public/'`).join('\n') +
123
- `\nUse '/public/...' paths for static assets.`);
124
- }
125
- }
126
- }
127
- // In dev mode, never transform - Vite serves from source paths
128
- // and the Bun server proxies /public/* to Vite
129
- return null;
130
- }
131
- // Build mode: transform paths to CDN URLs
132
- let transformed = code;
133
- // Determine target URL: CDN base if provided, otherwise /public/
134
- const targetBase = cdnBaseUrl
135
- ? cdnBaseUrl.endsWith('/')
136
- ? cdnBaseUrl
137
- : `${cdnBaseUrl}/`
138
- : '/public/';
139
- // Transform incorrect source paths (src/web/public/) → CDN
140
- if (hasIncorrectSourcePaths) {
141
- const patterns = createIncorrectPatterns();
142
- for (const { regex, replacement } of patterns) {
143
- const replaceRegex = new RegExp(regex.source, regex.flags);
144
- transformed = transformed.replace(replaceRegex, replacement.replace('{base}', targetBase));
145
- }
146
- }
147
- // Transform public paths → CDN
148
- if (hasPublicPaths) {
149
- const publicPatterns = createPublicPatterns();
150
- for (const { regex, replacement } of publicPatterns) {
151
- const replaceRegex = new RegExp(regex.source, regex.flags);
152
- transformed = transformed.replace(replaceRegex, replacement.replace('{base}', targetBase));
153
- }
154
- }
155
- // Return transformed code if changed
156
- if (transformed !== code) {
157
- return {
158
- code: transformed,
159
- map: null,
160
- };
161
- }
162
- return null;
163
- },
164
- };
165
- }
166
- //# sourceMappingURL=public-asset-path-plugin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"public-asset-path-plugin.js","sourceRoot":"","sources":["../../../../src/cmd/build/vite/public-asset-path-plugin.ts"],"names":[],"mappings":"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"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generate auth schema SQL using drizzle-kit export
3
- */
4
- export declare const generateSubcommand: import("../../..").SubcommandDefinition;
5
- //# sourceMappingURL=generate.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../../src/cmd/project/auth/generate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,eAAO,MAAM,kBAAkB,yCAuG7B,CAAC"}