@agentuity/cli 1.0.32 → 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 (257) hide show
  1. package/dist/catalyst.d.ts +3 -1
  2. package/dist/catalyst.d.ts.map +1 -1
  3. package/dist/catalyst.js +5 -1
  4. package/dist/catalyst.js.map +1 -1
  5. package/dist/cmd/cloud/db/create.d.ts.map +1 -1
  6. package/dist/cmd/cloud/db/create.js +8 -10
  7. package/dist/cmd/cloud/db/create.js.map +1 -1
  8. package/dist/cmd/cloud/db/delete.d.ts.map +1 -1
  9. package/dist/cmd/cloud/db/delete.js +12 -14
  10. package/dist/cmd/cloud/db/delete.js.map +1 -1
  11. package/dist/cmd/cloud/db/get.d.ts.map +1 -1
  12. package/dist/cmd/cloud/db/get.js +7 -7
  13. package/dist/cmd/cloud/db/get.js.map +1 -1
  14. package/dist/cmd/cloud/db/list.d.ts.map +1 -1
  15. package/dist/cmd/cloud/db/list.js +5 -5
  16. package/dist/cmd/cloud/db/list.js.map +1 -1
  17. package/dist/cmd/cloud/db/logs.d.ts.map +1 -1
  18. package/dist/cmd/cloud/db/logs.js +7 -7
  19. package/dist/cmd/cloud/db/logs.js.map +1 -1
  20. package/dist/cmd/cloud/db/sql.js +5 -5
  21. package/dist/cmd/cloud/db/sql.js.map +1 -1
  22. package/dist/cmd/cloud/db/stats.d.ts.map +1 -1
  23. package/dist/cmd/cloud/db/stats.js +5 -5
  24. package/dist/cmd/cloud/db/stats.js.map +1 -1
  25. package/dist/cmd/cloud/deploy.d.ts.map +1 -1
  26. package/dist/cmd/cloud/deploy.js +1 -1
  27. package/dist/cmd/cloud/deploy.js.map +1 -1
  28. package/dist/cmd/cloud/email/stats.d.ts.map +1 -1
  29. package/dist/cmd/cloud/email/stats.js +5 -5
  30. package/dist/cmd/cloud/email/stats.js.map +1 -1
  31. package/dist/cmd/cloud/email/util.d.ts +2 -2
  32. package/dist/cmd/cloud/email/util.d.ts.map +1 -1
  33. package/dist/cmd/cloud/email/util.js +2 -2
  34. package/dist/cmd/cloud/email/util.js.map +1 -1
  35. package/dist/cmd/cloud/keyvalue/util.d.ts.map +1 -1
  36. package/dist/cmd/cloud/keyvalue/util.js +1 -1
  37. package/dist/cmd/cloud/keyvalue/util.js.map +1 -1
  38. package/dist/cmd/cloud/machine/delete.d.ts.map +1 -1
  39. package/dist/cmd/cloud/machine/delete.js +6 -6
  40. package/dist/cmd/cloud/machine/delete.js.map +1 -1
  41. package/dist/cmd/cloud/machine/deployments.d.ts.map +1 -1
  42. package/dist/cmd/cloud/machine/deployments.js +5 -5
  43. package/dist/cmd/cloud/machine/deployments.js.map +1 -1
  44. package/dist/cmd/cloud/machine/get.d.ts.map +1 -1
  45. package/dist/cmd/cloud/machine/get.js +5 -5
  46. package/dist/cmd/cloud/machine/get.js.map +1 -1
  47. package/dist/cmd/cloud/machine/list.d.ts.map +1 -1
  48. package/dist/cmd/cloud/machine/list.js +5 -5
  49. package/dist/cmd/cloud/machine/list.js.map +1 -1
  50. package/dist/cmd/cloud/queue/util.d.ts +1 -1
  51. package/dist/cmd/cloud/queue/util.d.ts.map +1 -1
  52. package/dist/cmd/cloud/queue/util.js +1 -1
  53. package/dist/cmd/cloud/queue/util.js.map +1 -1
  54. package/dist/cmd/cloud/redis/get.js +5 -5
  55. package/dist/cmd/cloud/redis/get.js.map +1 -1
  56. package/dist/cmd/cloud/sandbox/execution/get.d.ts.map +1 -1
  57. package/dist/cmd/cloud/sandbox/execution/get.js +4 -4
  58. package/dist/cmd/cloud/sandbox/execution/get.js.map +1 -1
  59. package/dist/cmd/cloud/sandbox/execution/list.d.ts.map +1 -1
  60. package/dist/cmd/cloud/sandbox/execution/list.js +5 -5
  61. package/dist/cmd/cloud/sandbox/execution/list.js.map +1 -1
  62. package/dist/cmd/cloud/sandbox/runtime/list.d.ts.map +1 -1
  63. package/dist/cmd/cloud/sandbox/runtime/list.js +4 -4
  64. package/dist/cmd/cloud/sandbox/runtime/list.js.map +1 -1
  65. package/dist/cmd/cloud/sandbox/snapshot/build.js +1 -1
  66. package/dist/cmd/cloud/sandbox/snapshot/build.js.map +1 -1
  67. package/dist/cmd/cloud/sandbox/snapshot/create.d.ts.map +1 -1
  68. package/dist/cmd/cloud/sandbox/snapshot/create.js +5 -5
  69. package/dist/cmd/cloud/sandbox/snapshot/create.js.map +1 -1
  70. package/dist/cmd/cloud/sandbox/snapshot/delete.d.ts.map +1 -1
  71. package/dist/cmd/cloud/sandbox/snapshot/delete.js +4 -4
  72. package/dist/cmd/cloud/sandbox/snapshot/delete.js.map +1 -1
  73. package/dist/cmd/cloud/sandbox/snapshot/get.d.ts.map +1 -1
  74. package/dist/cmd/cloud/sandbox/snapshot/get.js +4 -4
  75. package/dist/cmd/cloud/sandbox/snapshot/get.js.map +1 -1
  76. package/dist/cmd/cloud/sandbox/snapshot/list.d.ts.map +1 -1
  77. package/dist/cmd/cloud/sandbox/snapshot/list.js +4 -4
  78. package/dist/cmd/cloud/sandbox/snapshot/list.js.map +1 -1
  79. package/dist/cmd/cloud/sandbox/snapshot/tag.d.ts.map +1 -1
  80. package/dist/cmd/cloud/sandbox/snapshot/tag.js +4 -4
  81. package/dist/cmd/cloud/sandbox/snapshot/tag.js.map +1 -1
  82. package/dist/cmd/cloud/sandbox/stats.d.ts.map +1 -1
  83. package/dist/cmd/cloud/sandbox/stats.js +5 -5
  84. package/dist/cmd/cloud/sandbox/stats.js.map +1 -1
  85. package/dist/cmd/cloud/sandbox/util.d.ts +3 -3
  86. package/dist/cmd/cloud/sandbox/util.d.ts.map +1 -1
  87. package/dist/cmd/cloud/sandbox/util.js +5 -5
  88. package/dist/cmd/cloud/sandbox/util.js.map +1 -1
  89. package/dist/cmd/cloud/schedule/stats.d.ts.map +1 -1
  90. package/dist/cmd/cloud/schedule/stats.js +5 -5
  91. package/dist/cmd/cloud/schedule/stats.js.map +1 -1
  92. package/dist/cmd/cloud/schedule/util.d.ts +1 -1
  93. package/dist/cmd/cloud/schedule/util.d.ts.map +1 -1
  94. package/dist/cmd/cloud/schedule/util.js +1 -1
  95. package/dist/cmd/cloud/schedule/util.js.map +1 -1
  96. package/dist/cmd/cloud/services/stats.d.ts.map +1 -1
  97. package/dist/cmd/cloud/services/stats.js +5 -5
  98. package/dist/cmd/cloud/services/stats.js.map +1 -1
  99. package/dist/cmd/cloud/session/get.d.ts.map +1 -1
  100. package/dist/cmd/cloud/session/get.js +5 -5
  101. package/dist/cmd/cloud/session/get.js.map +1 -1
  102. package/dist/cmd/cloud/session/list.d.ts.map +1 -1
  103. package/dist/cmd/cloud/session/list.js +5 -5
  104. package/dist/cmd/cloud/session/list.js.map +1 -1
  105. package/dist/cmd/cloud/storage/config.d.ts.map +1 -1
  106. package/dist/cmd/cloud/storage/config.js +7 -7
  107. package/dist/cmd/cloud/storage/config.js.map +1 -1
  108. package/dist/cmd/cloud/storage/create.d.ts.map +1 -1
  109. package/dist/cmd/cloud/storage/create.js +8 -10
  110. package/dist/cmd/cloud/storage/create.js.map +1 -1
  111. package/dist/cmd/cloud/storage/delete.d.ts.map +1 -1
  112. package/dist/cmd/cloud/storage/delete.js +12 -14
  113. package/dist/cmd/cloud/storage/delete.js.map +1 -1
  114. package/dist/cmd/cloud/storage/download.d.ts.map +1 -1
  115. package/dist/cmd/cloud/storage/download.js +6 -6
  116. package/dist/cmd/cloud/storage/download.js.map +1 -1
  117. package/dist/cmd/cloud/storage/get.d.ts.map +1 -1
  118. package/dist/cmd/cloud/storage/get.js +6 -6
  119. package/dist/cmd/cloud/storage/get.js.map +1 -1
  120. package/dist/cmd/cloud/storage/list.d.ts.map +1 -1
  121. package/dist/cmd/cloud/storage/list.js +6 -6
  122. package/dist/cmd/cloud/storage/list.js.map +1 -1
  123. package/dist/cmd/cloud/storage/upload.d.ts.map +1 -1
  124. package/dist/cmd/cloud/storage/upload.js +7 -7
  125. package/dist/cmd/cloud/storage/upload.js.map +1 -1
  126. package/dist/cmd/cloud/stream/create.js +1 -1
  127. package/dist/cmd/cloud/stream/create.js.map +1 -1
  128. package/dist/cmd/cloud/stream/stats.d.ts.map +1 -1
  129. package/dist/cmd/cloud/stream/stats.js +5 -5
  130. package/dist/cmd/cloud/stream/stats.js.map +1 -1
  131. package/dist/cmd/cloud/task/stats.d.ts.map +1 -1
  132. package/dist/cmd/cloud/task/stats.js +5 -5
  133. package/dist/cmd/cloud/task/stats.js.map +1 -1
  134. package/dist/cmd/cloud/task/util.d.ts +1 -1
  135. package/dist/cmd/cloud/task/util.d.ts.map +1 -1
  136. package/dist/cmd/cloud/task/util.js +2 -2
  137. package/dist/cmd/cloud/task/util.js.map +1 -1
  138. package/dist/cmd/cloud/thread/delete.d.ts.map +1 -1
  139. package/dist/cmd/cloud/thread/delete.js +5 -5
  140. package/dist/cmd/cloud/thread/delete.js.map +1 -1
  141. package/dist/cmd/cloud/thread/get.d.ts.map +1 -1
  142. package/dist/cmd/cloud/thread/get.js +5 -5
  143. package/dist/cmd/cloud/thread/get.js.map +1 -1
  144. package/dist/cmd/cloud/thread/list.d.ts.map +1 -1
  145. package/dist/cmd/cloud/thread/list.js +5 -5
  146. package/dist/cmd/cloud/thread/list.js.map +1 -1
  147. package/dist/cmd/cloud/vector/util.d.ts.map +1 -1
  148. package/dist/cmd/cloud/vector/util.js +1 -1
  149. package/dist/cmd/cloud/vector/util.js.map +1 -1
  150. package/dist/cmd/cloud/webhook/util.d.ts +1 -1
  151. package/dist/cmd/cloud/webhook/util.d.ts.map +1 -1
  152. package/dist/cmd/cloud/webhook/util.js +1 -1
  153. package/dist/cmd/cloud/webhook/util.js.map +1 -1
  154. package/dist/cmd/git/api.d.ts +38 -0
  155. package/dist/cmd/git/api.d.ts.map +1 -1
  156. package/dist/cmd/git/api.js +55 -0
  157. package/dist/cmd/git/api.js.map +1 -1
  158. package/dist/cmd/project/add/database.js +8 -8
  159. package/dist/cmd/project/add/database.js.map +1 -1
  160. package/dist/cmd/project/add/storage.js +8 -8
  161. package/dist/cmd/project/add/storage.js.map +1 -1
  162. package/dist/cmd/project/auth/init.d.ts.map +1 -1
  163. package/dist/cmd/project/auth/init.js +7 -6
  164. package/dist/cmd/project/auth/init.js.map +1 -1
  165. package/dist/cmd/project/auth/shared.d.ts +2 -3
  166. package/dist/cmd/project/auth/shared.d.ts.map +1 -1
  167. package/dist/cmd/project/auth/shared.js +7 -7
  168. package/dist/cmd/project/auth/shared.js.map +1 -1
  169. package/dist/cmd/project/download.d.ts +12 -1
  170. package/dist/cmd/project/download.d.ts.map +1 -1
  171. package/dist/cmd/project/download.js +37 -14
  172. package/dist/cmd/project/download.js.map +1 -1
  173. package/dist/cmd/project/import.d.ts.map +1 -1
  174. package/dist/cmd/project/import.js +67 -9
  175. package/dist/cmd/project/import.js.map +1 -1
  176. package/dist/cmd/project/remote-import.d.ts +41 -0
  177. package/dist/cmd/project/remote-import.d.ts.map +1 -0
  178. package/dist/cmd/project/remote-import.js +1074 -0
  179. package/dist/cmd/project/remote-import.js.map +1 -0
  180. package/dist/cmd/project/template-flow.d.ts +1 -1
  181. package/dist/cmd/project/template-flow.d.ts.map +1 -1
  182. package/dist/cmd/project/template-flow.js +27 -11
  183. package/dist/cmd/project/template-flow.js.map +1 -1
  184. package/dist/config.d.ts +29 -5
  185. package/dist/config.d.ts.map +1 -1
  186. package/dist/config.js +13 -14
  187. package/dist/config.js.map +1 -1
  188. package/dist/schema-parser.d.ts.map +1 -1
  189. package/dist/schema-parser.js +47 -5
  190. package/dist/schema-parser.js.map +1 -1
  191. package/dist/types.d.ts +28 -3
  192. package/dist/types.d.ts.map +1 -1
  193. package/dist/types.js +42 -0
  194. package/dist/types.js.map +1 -1
  195. package/package.json +6 -6
  196. package/src/catalyst.ts +9 -1
  197. package/src/cmd/cloud/db/create.ts +8 -9
  198. package/src/cmd/cloud/db/delete.ts +18 -13
  199. package/src/cmd/cloud/db/get.ts +13 -7
  200. package/src/cmd/cloud/db/list.ts +11 -5
  201. package/src/cmd/cloud/db/logs.ts +13 -7
  202. package/src/cmd/cloud/db/sql.ts +5 -5
  203. package/src/cmd/cloud/db/stats.ts +11 -5
  204. package/src/cmd/cloud/deploy.ts +7 -1
  205. package/src/cmd/cloud/email/stats.ts +11 -5
  206. package/src/cmd/cloud/email/util.ts +4 -4
  207. package/src/cmd/cloud/keyvalue/util.ts +2 -2
  208. package/src/cmd/cloud/machine/delete.ts +12 -6
  209. package/src/cmd/cloud/machine/deployments.ts +11 -5
  210. package/src/cmd/cloud/machine/get.ts +11 -5
  211. package/src/cmd/cloud/machine/list.ts +11 -5
  212. package/src/cmd/cloud/queue/util.ts +2 -2
  213. package/src/cmd/cloud/redis/get.ts +5 -5
  214. package/src/cmd/cloud/sandbox/execution/get.ts +10 -4
  215. package/src/cmd/cloud/sandbox/execution/list.ts +6 -5
  216. package/src/cmd/cloud/sandbox/runtime/list.ts +10 -4
  217. package/src/cmd/cloud/sandbox/snapshot/build.ts +1 -1
  218. package/src/cmd/cloud/sandbox/snapshot/create.ts +12 -5
  219. package/src/cmd/cloud/sandbox/snapshot/delete.ts +10 -4
  220. package/src/cmd/cloud/sandbox/snapshot/get.ts +12 -6
  221. package/src/cmd/cloud/sandbox/snapshot/list.ts +10 -4
  222. package/src/cmd/cloud/sandbox/snapshot/tag.ts +10 -4
  223. package/src/cmd/cloud/sandbox/stats.ts +11 -5
  224. package/src/cmd/cloud/sandbox/util.ts +14 -7
  225. package/src/cmd/cloud/schedule/stats.ts +11 -5
  226. package/src/cmd/cloud/schedule/util.ts +3 -3
  227. package/src/cmd/cloud/services/stats.ts +13 -7
  228. package/src/cmd/cloud/session/get.ts +14 -8
  229. package/src/cmd/cloud/session/list.ts +11 -5
  230. package/src/cmd/cloud/storage/config.ts +24 -12
  231. package/src/cmd/cloud/storage/create.ts +8 -9
  232. package/src/cmd/cloud/storage/delete.ts +18 -13
  233. package/src/cmd/cloud/storage/download.ts +12 -6
  234. package/src/cmd/cloud/storage/get.ts +12 -6
  235. package/src/cmd/cloud/storage/list.ts +12 -6
  236. package/src/cmd/cloud/storage/upload.ts +13 -7
  237. package/src/cmd/cloud/stream/create.ts +1 -1
  238. package/src/cmd/cloud/stream/stats.ts +11 -5
  239. package/src/cmd/cloud/task/stats.ts +11 -5
  240. package/src/cmd/cloud/task/util.ts +4 -4
  241. package/src/cmd/cloud/thread/delete.ts +11 -5
  242. package/src/cmd/cloud/thread/get.ts +11 -5
  243. package/src/cmd/cloud/thread/list.ts +11 -5
  244. package/src/cmd/cloud/vector/util.ts +2 -2
  245. package/src/cmd/cloud/webhook/util.ts +2 -2
  246. package/src/cmd/git/api.ts +127 -0
  247. package/src/cmd/project/add/database.ts +9 -9
  248. package/src/cmd/project/add/storage.ts +9 -9
  249. package/src/cmd/project/auth/init.ts +11 -10
  250. package/src/cmd/project/auth/shared.ts +15 -10
  251. package/src/cmd/project/download.ts +52 -16
  252. package/src/cmd/project/import.ts +71 -9
  253. package/src/cmd/project/remote-import.ts +1347 -0
  254. package/src/cmd/project/template-flow.ts +38 -22
  255. package/src/config.ts +23 -18
  256. package/src/schema-parser.ts +48 -5
  257. package/src/types.ts +45 -0
@@ -1,16 +1,16 @@
1
- import { z } from 'zod';
2
- import { createSubcommand } from '../../../types';
3
- import * as tui from '../../../tui';
4
1
  import {
5
- sessionGet,
6
- type SpanNode,
7
- type EvalRun,
8
2
  type AgentInfo,
9
3
  APIError,
4
+ type EvalRun,
5
+ type SpanNode,
6
+ sessionGet,
10
7
  } from '@agentuity/server';
8
+ import { z } from 'zod';
11
9
  import { getCommand } from '../../../command-prefix';
12
- import { ErrorCode } from '../../../errors';
13
10
  import { getGlobalCatalystAPIClient } from '../../../config';
11
+ import { ErrorCode } from '../../../errors';
12
+ import * as tui from '../../../tui';
13
+ import { createSubcommand } from '../../../types';
14
14
 
15
15
  const SpanNodeSchema: z.ZodType<SpanNode> = z.lazy(() =>
16
16
  z.object({
@@ -126,7 +126,13 @@ export const getSubcommand = createSubcommand({
126
126
  },
127
127
  async handler(ctx) {
128
128
  const { logger, auth, args, options, config } = ctx;
129
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, config?.name);
129
+ const catalystClient = await getGlobalCatalystAPIClient(
130
+ logger,
131
+ auth,
132
+ config?.name,
133
+ undefined,
134
+ config
135
+ );
130
136
 
131
137
  try {
132
138
  const enriched = await sessionGet(catalystClient, { id: args.session_id });
@@ -1,10 +1,10 @@
1
- import { z } from 'zod';
2
- import { createSubcommand } from '../../../types';
3
- import * as tui from '../../../tui';
4
1
  import { sessionList } from '@agentuity/server';
2
+ import { z } from 'zod';
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 SessionListResponseSchema = z.array(
10
10
  z.object({
@@ -105,7 +105,13 @@ export const listSubcommand = createSubcommand({
105
105
  },
106
106
  async handler(ctx) {
107
107
  const { logger, auth, project, opts, options, config } = ctx;
108
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, config?.name);
108
+ const catalystClient = await getGlobalCatalystAPIClient(
109
+ logger,
110
+ auth,
111
+ config?.name,
112
+ undefined,
113
+ config
114
+ );
109
115
 
110
116
  if (opts?.orgId && opts?.projectId) {
111
117
  tui.fatal('--org-id and --project-id are mutually exclusive. Use one or the other.');
@@ -1,19 +1,19 @@
1
- import { z } from 'zod';
2
1
  import {
3
- getBucketConfig,
4
- updateBucketConfig,
5
- deleteBucketConfig,
2
+ type BucketConfig,
6
3
  BucketConfigResponseError,
7
- listOrgResources,
8
4
  type BucketConfigUpdate,
9
- type BucketConfig,
5
+ deleteBucketConfig,
6
+ getBucketConfig,
7
+ listOrgResources,
10
8
  StorageTierSchema,
9
+ updateBucketConfig,
11
10
  } from '@agentuity/server';
12
- import { createSubcommand } from '../../../types';
13
- import * as tui from '../../../tui';
14
- import { getCatalystAPIClient, getGlobalCatalystAPIClient } from '../../../config';
15
- import { getCommand } from '../../../command-prefix';
11
+ import { z } from 'zod';
16
12
  import { getResourceInfo, setResourceInfo } from '../../../cache';
13
+ import { getCommand } from '../../../command-prefix';
14
+ import { getCatalystAPIClient, getGlobalCatalystAPIClient } from '../../../config';
15
+ import * as tui from '../../../tui';
16
+ import { createSubcommand } from '../../../types';
17
17
 
18
18
  function displayConfig(config: BucketConfig) {
19
19
  tui.newline();
@@ -117,7 +117,13 @@ export const configSubcommand = createSubcommand({
117
117
  const { name: bucketName } = args;
118
118
 
119
119
  const profileName = config?.name ?? 'production';
120
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, profileName);
120
+ const catalystClient = await getGlobalCatalystAPIClient(
121
+ logger,
122
+ auth,
123
+ profileName,
124
+ undefined,
125
+ config
126
+ );
121
127
 
122
128
  // Look up bucket to get cloud_region
123
129
  const cachedInfo = await getResourceInfo('bucket', profileName, bucketName);
@@ -152,7 +158,13 @@ export const configSubcommand = createSubcommand({
152
158
  }
153
159
 
154
160
  // Create regional client for bucket config operations (orgId required for CLI auth)
155
- const regionalClient = getCatalystAPIClient(logger, auth, bucket.cloud_region, bucket.org_id);
161
+ const regionalClient = getCatalystAPIClient(
162
+ logger,
163
+ auth,
164
+ bucket.cloud_region,
165
+ bucket.org_id,
166
+ config
167
+ );
156
168
 
157
169
  // Handle --reset flag (DELETE)
158
170
  if (opts.reset) {
@@ -1,12 +1,12 @@
1
+ import { APIError, createResources, validateBucketName } from '@agentuity/server';
1
2
  import { z } from 'zod';
2
- import { createResources, APIError, validateBucketName } from '@agentuity/server';
3
- import { createSubcommand as defineSubcommand } from '../../../types';
4
- import * as tui from '../../../tui';
5
- import { getCatalystAPIClient } from '../../../config';
6
3
  import { getCommand } from '../../../command-prefix';
7
- import { isDryRunMode, outputDryRun } from '../../../explain';
8
- import { ErrorCode } from '../../../errors';
4
+ import { getCatalystAPIClient } from '../../../config';
9
5
  import { addResourceEnvVars } from '../../../env-util';
6
+ import { ErrorCode } from '../../../errors';
7
+ import { isDryRunMode, outputDryRun } from '../../../explain';
8
+ import * as tui from '../../../tui';
9
+ import { createSubcommand as defineSubcommand } from '../../../types';
10
10
 
11
11
  export const createSubcommand = defineSubcommand({
12
12
  name: 'create',
@@ -74,7 +74,7 @@ export const createSubcommand = defineSubcommand({
74
74
  };
75
75
  }
76
76
 
77
- const catalystClient = getCatalystAPIClient(logger, auth, region);
77
+ const catalystClient = getCatalystAPIClient(logger, auth, region, undefined, ctx.config);
78
78
 
79
79
  try {
80
80
  const created = await tui.spinner({
@@ -104,9 +104,8 @@ export const createSubcommand = defineSubcommand({
104
104
  success: true,
105
105
  name: resource.name,
106
106
  };
107
- } else {
108
- tui.fatal('Failed to create storage');
109
107
  }
108
+ tui.fatal('Failed to create storage');
110
109
  } catch (ex) {
111
110
  if (ex instanceof APIError) {
112
111
  if (ex.status === 409) {
@@ -1,15 +1,15 @@
1
- import { z } from 'zod';
2
- import { listOrgResources, deleteResources } from '@agentuity/server';
1
+ import { deleteResources, listOrgResources } from '@agentuity/server';
3
2
  import enquirer from 'enquirer';
4
- import { createSubcommand } from '../../../types';
5
- import * as tui from '../../../tui';
6
- import { getGlobalCatalystAPIClient, getCatalystAPIClient } from '../../../config';
3
+ import { z } from 'zod';
4
+ import { deleteResourceRegion, getResourceInfo, setResourceInfo } from '../../../cache';
7
5
  import { getCommand } from '../../../command-prefix';
8
- import { isDryRunMode, outputDryRun } from '../../../explain';
6
+ import { getCatalystAPIClient, getGlobalCatalystAPIClient } from '../../../config';
7
+ import { removeResourceEnvVars } from '../../../env-util';
9
8
  import { ErrorCode } from '../../../errors';
9
+ import { isDryRunMode, outputDryRun } from '../../../explain';
10
+ import * as tui from '../../../tui';
11
+ import { createSubcommand } from '../../../types';
10
12
  import { createS3Client } from './utils';
11
- import { removeResourceEnvVars } from '../../../env-util';
12
- import { getResourceInfo, setResourceInfo, deleteResourceRegion } from '../../../cache';
13
13
 
14
14
  export const deleteSubcommand = createSubcommand({
15
15
  name: 'delete',
@@ -60,7 +60,13 @@ export const deleteSubcommand = createSubcommand({
60
60
  const { logger, args, opts, auth, options, config } = ctx;
61
61
 
62
62
  const profileName = config?.name ?? 'production';
63
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, profileName);
63
+ const catalystClient = await getGlobalCatalystAPIClient(
64
+ logger,
65
+ auth,
66
+ profileName,
67
+ undefined,
68
+ config
69
+ );
64
70
 
65
71
  let bucketName = args.name;
66
72
 
@@ -350,7 +356,7 @@ export const deleteSubcommand = createSubcommand({
350
356
  }
351
357
 
352
358
  // Use regional client for the delete operation
353
- const regionalClient = getCatalystAPIClient(logger, auth, region);
359
+ const regionalClient = getCatalystAPIClient(logger, auth, region, undefined, config);
354
360
  const deleted = await tui.spinner({
355
361
  message: `Deleting storage bucket ${bucketName}`,
356
362
  clearOnSuccess: true,
@@ -381,9 +387,8 @@ export const deleteSubcommand = createSubcommand({
381
387
  success: true,
382
388
  name: resource.name,
383
389
  };
384
- } else {
385
- tui.error('Failed to delete storage bucket');
386
- return { success: false, name: bucketName };
387
390
  }
391
+ tui.error('Failed to delete storage bucket');
392
+ return { success: false, name: bucketName };
388
393
  },
389
394
  });
@@ -1,12 +1,12 @@
1
- import { z } from 'zod';
2
1
  import { listOrgResources } from '@agentuity/server';
3
- import { createSubcommand } from '../../../types';
4
- import * as tui from '../../../tui';
5
- import { getGlobalCatalystAPIClient } from '../../../config';
2
+ import { z } from 'zod';
3
+ import { getResourceInfo, setResourceInfo } from '../../../cache';
6
4
  import { getCommand } from '../../../command-prefix';
5
+ import { getGlobalCatalystAPIClient } from '../../../config';
7
6
  import { ErrorCode } from '../../../errors';
7
+ import * as tui from '../../../tui';
8
+ import { createSubcommand } from '../../../types';
8
9
  import { createS3Client } from './utils';
9
- import { getResourceInfo, setResourceInfo } from '../../../cache';
10
10
 
11
11
  export const downloadSubcommand = createSubcommand({
12
12
  name: 'download',
@@ -56,7 +56,13 @@ export const downloadSubcommand = createSubcommand({
56
56
  const { logger, args, opts, options, auth, config } = ctx;
57
57
 
58
58
  const profileName = config?.name ?? 'production';
59
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, profileName);
59
+ const catalystClient = await getGlobalCatalystAPIClient(
60
+ logger,
61
+ auth,
62
+ profileName,
63
+ undefined,
64
+ config
65
+ );
60
66
 
61
67
  // Check cache first for orgId
62
68
  const cachedInfo = await getResourceInfo('bucket', profileName, args.name);
@@ -1,11 +1,11 @@
1
- import { z } from 'zod';
2
1
  import { listOrgResources } from '@agentuity/server';
3
- import { createSubcommand } from '../../../types';
4
- import * as tui from '../../../tui';
5
- import { getGlobalCatalystAPIClient } from '../../../config';
2
+ import { z } from 'zod';
3
+ import { setResourceInfo } from '../../../cache';
6
4
  import { getCommand } from '../../../command-prefix';
5
+ import { getGlobalCatalystAPIClient } from '../../../config';
7
6
  import { ErrorCode } from '../../../errors';
8
- import { setResourceInfo } from '../../../cache';
7
+ import * as tui from '../../../tui';
8
+ import { createSubcommand } from '../../../types';
9
9
 
10
10
  const StorageGetResponseSchema = z.object({
11
11
  bucket_name: z.string().describe('Storage bucket name'),
@@ -61,7 +61,13 @@ export const getSubcommand = createSubcommand({
61
61
  const { logger, args, opts, options, auth, config } = ctx;
62
62
 
63
63
  const profileName = config?.name ?? 'production';
64
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, profileName);
64
+ const catalystClient = await getGlobalCatalystAPIClient(
65
+ logger,
66
+ auth,
67
+ profileName,
68
+ undefined,
69
+ config
70
+ );
65
71
 
66
72
  // Search across all orgs the user has access to
67
73
  const resources = await tui.spinner({
@@ -1,12 +1,12 @@
1
- import { z } from 'zod';
2
1
  import { listOrgResources } from '@agentuity/server';
3
- import { createSubcommand } from '../../../types';
4
- import * as tui from '../../../tui';
5
- import { getGlobalCatalystAPIClient } from '../../../config';
2
+ import { z } from 'zod';
3
+ import { setResourceInfo } from '../../../cache';
6
4
  import { getCommand } from '../../../command-prefix';
5
+ import { getGlobalCatalystAPIClient } from '../../../config';
7
6
  import { ErrorCode } from '../../../errors';
7
+ import * as tui from '../../../tui';
8
+ import { createSubcommand } from '../../../types';
8
9
  import { createS3Client } from './utils';
9
- import { setResourceInfo } from '../../../cache';
10
10
 
11
11
  const StorageListResponseSchema = z.object({
12
12
  buckets: z
@@ -99,7 +99,13 @@ export const listSubcommand = createSubcommand({
99
99
  async handler(ctx) {
100
100
  const { logger, args, opts, options, auth, config } = ctx;
101
101
 
102
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, config?.name);
102
+ const catalystClient = await getGlobalCatalystAPIClient(
103
+ logger,
104
+ auth,
105
+ config?.name,
106
+ undefined,
107
+ config
108
+ );
103
109
 
104
110
  const profileName = config?.name ?? 'production';
105
111
  const resources = await tui.spinner({
@@ -1,13 +1,13 @@
1
- import { z } from 'zod';
2
- import { basename } from 'path';
3
1
  import { listOrgResources } from '@agentuity/server';
4
- import { createSubcommand } from '../../../types';
5
- import * as tui from '../../../tui';
6
- import { getGlobalCatalystAPIClient } from '../../../config';
2
+ import { basename } from 'path';
3
+ import { z } from 'zod';
4
+ import { getResourceInfo, setResourceInfo } from '../../../cache';
7
5
  import { getCommand } from '../../../command-prefix';
6
+ import { getGlobalCatalystAPIClient } from '../../../config';
8
7
  import { ErrorCode } from '../../../errors';
8
+ import * as tui from '../../../tui';
9
+ import { createSubcommand } from '../../../types';
9
10
  import { createS3Client } from './utils';
10
- import { getResourceInfo, setResourceInfo } from '../../../cache';
11
11
 
12
12
  export const uploadSubcommand = createSubcommand({
13
13
  name: 'upload',
@@ -66,7 +66,13 @@ export const uploadSubcommand = createSubcommand({
66
66
  const { logger, args, opts, options, auth, config } = ctx;
67
67
 
68
68
  const profileName = config?.name ?? 'production';
69
- const catalystClient = await getGlobalCatalystAPIClient(logger, auth, profileName);
69
+ const catalystClient = await getGlobalCatalystAPIClient(
70
+ logger,
71
+ auth,
72
+ profileName,
73
+ undefined,
74
+ config
75
+ );
70
76
 
71
77
  // Check cache first for orgId
72
78
  const cachedInfo = await getResourceInfo('bucket', profileName, args.name);
@@ -212,7 +212,7 @@ export const createSubcommand = createCommand({
212
212
  let expiresAt: string | undefined;
213
213
  try {
214
214
  const info = await storage.get(stream.id);
215
- expiresAt = info.expiresAt;
215
+ expiresAt = info.expiresAt ?? undefined;
216
216
  } catch {
217
217
  // expiresAt is optional, ignore errors
218
218
  }
@@ -1,9 +1,9 @@
1
+ import { getServiceStats, type ServiceStatsData } from '@agentuity/server';
1
2
  import { z } from 'zod';
2
- import { createCommand } from '../../../types';
3
- import * as tui from '../../../tui';
4
- import { getGlobalCatalystAPIClient } from '../../../config';
5
3
  import { getCommand } from '../../../command-prefix';
6
- import { getServiceStats, type ServiceStatsData } from '@agentuity/server';
4
+ import { getGlobalCatalystAPIClient } from '../../../config';
5
+ import * as tui from '../../../tui';
6
+ import { createCommand } from '../../../types';
7
7
 
8
8
  function formatNumber(n: number): string {
9
9
  if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`;
@@ -44,7 +44,13 @@ export const statsSubcommand = createCommand({
44
44
 
45
45
  async handler(ctx) {
46
46
  const { opts, options } = ctx;
47
- const client = await getGlobalCatalystAPIClient(ctx.logger, ctx.auth, ctx.config?.name);
47
+ const client = await getGlobalCatalystAPIClient(
48
+ ctx.logger,
49
+ ctx.auth,
50
+ ctx.config?.name,
51
+ undefined,
52
+ ctx.config
53
+ );
48
54
  const orgId = ctx.orgId ?? ctx.options.orgId ?? ctx.config?.preferences?.orgId;
49
55
 
50
56
  if (!orgId) {
@@ -1,9 +1,9 @@
1
+ import { getServiceStats, type ServiceStatsData } from '@agentuity/server';
1
2
  import { z } from 'zod';
2
- import { createCommand } from '../../../types';
3
- import * as tui from '../../../tui';
4
- import { getGlobalCatalystAPIClient } from '../../../config';
5
3
  import { getCommand } from '../../../command-prefix';
6
- import { getServiceStats, type ServiceStatsData } from '@agentuity/server';
4
+ import { getGlobalCatalystAPIClient } from '../../../config';
5
+ import * as tui from '../../../tui';
6
+ import { createCommand } from '../../../types';
7
7
 
8
8
  function formatNumber(n: number): string {
9
9
  if (n >= 1_000_000) return `${(n / 1_000_000).toFixed(1)}M`;
@@ -48,7 +48,13 @@ export const statsSubcommand = createCommand({
48
48
 
49
49
  async handler(ctx) {
50
50
  const { opts, options } = ctx;
51
- const client = await getGlobalCatalystAPIClient(ctx.logger, ctx.auth, ctx.config?.name);
51
+ const client = await getGlobalCatalystAPIClient(
52
+ ctx.logger,
53
+ ctx.auth,
54
+ ctx.config?.name,
55
+ undefined,
56
+ ctx.config
57
+ );
52
58
  const orgId = ctx.orgId ?? ctx.options.orgId ?? ctx.config?.preferences?.orgId;
53
59
 
54
60
  if (!orgId) {
@@ -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
  /**