@agentuity/cli 0.1.7 → 0.1.9

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 (149) hide show
  1. package/dist/cli.d.ts.map +1 -1
  2. package/dist/cli.js +68 -4
  3. package/dist/cli.js.map +1 -1
  4. package/dist/cmd/ai/skills/generator.d.ts.map +1 -1
  5. package/dist/cmd/ai/skills/generator.js +9 -1
  6. package/dist/cmd/ai/skills/generator.js.map +1 -1
  7. package/dist/cmd/build/vite/agent-discovery.d.ts.map +1 -1
  8. package/dist/cmd/build/vite/agent-discovery.js +159 -16
  9. package/dist/cmd/build/vite/agent-discovery.js.map +1 -1
  10. package/dist/cmd/build/vite/docs-generator.d.ts.map +1 -1
  11. package/dist/cmd/build/vite/docs-generator.js +8 -4
  12. package/dist/cmd/build/vite/docs-generator.js.map +1 -1
  13. package/dist/cmd/build/vite/metadata-generator.js +1 -1
  14. package/dist/cmd/build/vite/metadata-generator.js.map +1 -1
  15. package/dist/cmd/build/vite/registry-generator.d.ts.map +1 -1
  16. package/dist/cmd/build/vite/registry-generator.js +27 -4
  17. package/dist/cmd/build/vite/registry-generator.js.map +1 -1
  18. package/dist/cmd/build/vite/server-bundler.d.ts.map +1 -1
  19. package/dist/cmd/build/vite/server-bundler.js.map +1 -1
  20. package/dist/cmd/build/vite/vite-asset-server-config.d.ts.map +1 -1
  21. package/dist/cmd/build/vite/vite-asset-server-config.js +5 -2
  22. package/dist/cmd/build/vite/vite-asset-server-config.js.map +1 -1
  23. package/dist/cmd/canary/index.d.ts.map +1 -1
  24. package/dist/cmd/canary/index.js.map +1 -1
  25. package/dist/cmd/cloud/deploy.d.ts.map +1 -1
  26. package/dist/cmd/cloud/deploy.js +13 -2
  27. package/dist/cmd/cloud/deploy.js.map +1 -1
  28. package/dist/cmd/cloud/sandbox/create.d.ts.map +1 -1
  29. package/dist/cmd/cloud/sandbox/create.js +15 -0
  30. package/dist/cmd/cloud/sandbox/create.js.map +1 -1
  31. package/dist/cmd/cloud/sandbox/get.d.ts.map +1 -1
  32. package/dist/cmd/cloud/sandbox/get.js +17 -0
  33. package/dist/cmd/cloud/sandbox/get.js.map +1 -1
  34. package/dist/cmd/cloud/sandbox/index.d.ts.map +1 -1
  35. package/dist/cmd/cloud/sandbox/index.js +2 -0
  36. package/dist/cmd/cloud/sandbox/index.js.map +1 -1
  37. package/dist/cmd/cloud/sandbox/list.d.ts.map +1 -1
  38. package/dist/cmd/cloud/sandbox/list.js +12 -5
  39. package/dist/cmd/cloud/sandbox/list.js.map +1 -1
  40. package/dist/cmd/cloud/sandbox/run.d.ts.map +1 -1
  41. package/dist/cmd/cloud/sandbox/run.js +11 -0
  42. package/dist/cmd/cloud/sandbox/run.js.map +1 -1
  43. package/dist/cmd/cloud/sandbox/runtime/index.d.ts +3 -0
  44. package/dist/cmd/cloud/sandbox/runtime/index.d.ts.map +1 -0
  45. package/dist/cmd/cloud/sandbox/runtime/index.js +19 -0
  46. package/dist/cmd/cloud/sandbox/runtime/index.js.map +1 -0
  47. package/dist/cmd/cloud/sandbox/runtime/list.d.ts +3 -0
  48. package/dist/cmd/cloud/sandbox/runtime/list.d.ts.map +1 -0
  49. package/dist/cmd/cloud/sandbox/runtime/list.js +68 -0
  50. package/dist/cmd/cloud/sandbox/runtime/list.js.map +1 -0
  51. package/dist/cmd/cloud/sandbox/snapshot/create.d.ts.map +1 -1
  52. package/dist/cmd/cloud/sandbox/snapshot/create.js +36 -5
  53. package/dist/cmd/cloud/sandbox/snapshot/create.js.map +1 -1
  54. package/dist/cmd/cloud/sandbox/snapshot/get.js +1 -1
  55. package/dist/cmd/cloud/sandbox/snapshot/get.js.map +1 -1
  56. package/dist/cmd/cloud/sandbox/snapshot/list.d.ts.map +1 -1
  57. package/dist/cmd/cloud/sandbox/snapshot/list.js +4 -0
  58. package/dist/cmd/cloud/sandbox/snapshot/list.js.map +1 -1
  59. package/dist/cmd/cloud/sandbox/snapshot/tag.d.ts.map +1 -1
  60. package/dist/cmd/cloud/sandbox/snapshot/tag.js +10 -0
  61. package/dist/cmd/cloud/sandbox/snapshot/tag.js.map +1 -1
  62. package/dist/cmd/git/account/add.js +1 -1
  63. package/dist/cmd/git/account/add.js.map +1 -1
  64. package/dist/cmd/git/account/list.js +1 -1
  65. package/dist/cmd/git/account/list.js.map +1 -1
  66. package/dist/cmd/git/account/remove.js +1 -1
  67. package/dist/cmd/git/account/remove.js.map +1 -1
  68. package/dist/cmd/git/api.d.ts.map +1 -0
  69. package/dist/cmd/git/api.js.map +1 -0
  70. package/dist/cmd/git/link.js +1 -1
  71. package/dist/cmd/git/link.js.map +1 -1
  72. package/dist/cmd/git/list.js +1 -1
  73. package/dist/cmd/git/list.js.map +1 -1
  74. package/dist/cmd/git/status.js +1 -1
  75. package/dist/cmd/git/status.js.map +1 -1
  76. package/dist/cmd/git/unlink.js +1 -1
  77. package/dist/cmd/git/unlink.js.map +1 -1
  78. package/dist/cmd/index.d.ts.map +1 -1
  79. package/dist/cmd/index.js +0 -1
  80. package/dist/cmd/index.js.map +1 -1
  81. package/dist/cmd/project/auth/generate.js.map +1 -1
  82. package/dist/cmd/project/auth/init.js.map +1 -1
  83. package/dist/cmd/project/template-flow.js.map +1 -1
  84. package/dist/config.d.ts.map +1 -1
  85. package/dist/config.js +10 -0
  86. package/dist/config.js.map +1 -1
  87. package/dist/utils/dependency-checker.d.ts.map +1 -1
  88. package/dist/utils/dependency-checker.js +5 -1
  89. package/dist/utils/dependency-checker.js.map +1 -1
  90. package/package.json +6 -6
  91. package/src/cli.ts +89 -4
  92. package/src/cmd/ai/skills/generator.ts +9 -1
  93. package/src/cmd/build/vite/agent-discovery.ts +209 -16
  94. package/src/cmd/build/vite/docs-generator.ts +8 -4
  95. package/src/cmd/build/vite/metadata-generator.ts +1 -1
  96. package/src/cmd/build/vite/registry-generator.ts +29 -4
  97. package/src/cmd/build/vite/server-bundler.ts +1 -4
  98. package/src/cmd/build/vite/vite-asset-server-config.ts +5 -2
  99. package/src/cmd/canary/index.ts +3 -1
  100. package/src/cmd/cloud/deploy.ts +15 -1
  101. package/src/cmd/cloud/sandbox/create.ts +15 -0
  102. package/src/cmd/cloud/sandbox/get.ts +17 -0
  103. package/src/cmd/cloud/sandbox/index.ts +2 -0
  104. package/src/cmd/cloud/sandbox/list.ts +12 -5
  105. package/src/cmd/cloud/sandbox/run.ts +11 -0
  106. package/src/cmd/cloud/sandbox/runtime/index.ts +20 -0
  107. package/src/cmd/cloud/sandbox/runtime/list.ts +75 -0
  108. package/src/cmd/cloud/sandbox/snapshot/create.ts +44 -5
  109. package/src/cmd/cloud/sandbox/snapshot/get.ts +1 -1
  110. package/src/cmd/cloud/sandbox/snapshot/list.ts +4 -0
  111. package/src/cmd/cloud/sandbox/snapshot/tag.ts +14 -0
  112. package/src/cmd/git/account/add.ts +1 -1
  113. package/src/cmd/git/account/list.ts +1 -1
  114. package/src/cmd/git/account/remove.ts +1 -1
  115. package/src/cmd/git/link.ts +1 -1
  116. package/src/cmd/git/list.ts +1 -1
  117. package/src/cmd/git/status.ts +1 -1
  118. package/src/cmd/git/unlink.ts +1 -1
  119. package/src/cmd/index.ts +0 -1
  120. package/src/cmd/project/auth/generate.ts +4 -4
  121. package/src/cmd/project/auth/init.ts +2 -2
  122. package/src/cmd/project/template-flow.ts +3 -3
  123. package/src/config.ts +10 -0
  124. package/src/utils/dependency-checker.ts +6 -2
  125. package/dist/cmd/integration/api.d.ts.map +0 -1
  126. package/dist/cmd/integration/api.js.map +0 -1
  127. package/dist/cmd/integration/github/connect.d.ts +0 -2
  128. package/dist/cmd/integration/github/connect.d.ts.map +0 -1
  129. package/dist/cmd/integration/github/connect.js +0 -197
  130. package/dist/cmd/integration/github/connect.js.map +0 -1
  131. package/dist/cmd/integration/github/disconnect.d.ts +0 -2
  132. package/dist/cmd/integration/github/disconnect.d.ts.map +0 -1
  133. package/dist/cmd/integration/github/disconnect.js +0 -121
  134. package/dist/cmd/integration/github/disconnect.js.map +0 -1
  135. package/dist/cmd/integration/github/index.d.ts +0 -2
  136. package/dist/cmd/integration/github/index.d.ts.map +0 -1
  137. package/dist/cmd/integration/github/index.js +0 -21
  138. package/dist/cmd/integration/github/index.js.map +0 -1
  139. package/dist/cmd/integration/index.d.ts +0 -2
  140. package/dist/cmd/integration/index.d.ts.map +0 -1
  141. package/dist/cmd/integration/index.js +0 -16
  142. package/dist/cmd/integration/index.js.map +0 -1
  143. package/src/cmd/integration/github/connect.ts +0 -242
  144. package/src/cmd/integration/github/disconnect.ts +0 -149
  145. package/src/cmd/integration/github/index.ts +0 -21
  146. package/src/cmd/integration/index.ts +0 -16
  147. /package/dist/cmd/{integration → git}/api.d.ts +0 -0
  148. /package/dist/cmd/{integration → git}/api.js +0 -0
  149. /package/src/cmd/{integration → git}/api.ts +0 -0
@@ -174,7 +174,9 @@ export const command = createCommand({
174
174
  await downloadCanary(downloadUrl, cachePath);
175
175
  tui.success(`Downloaded canary ${version}`);
176
176
  } catch (error) {
177
- tui.error(`Failed to download canary: ${error instanceof Error ? error.message : 'Unknown error'}`);
177
+ tui.error(
178
+ `Failed to download canary: ${error instanceof Error ? error.message : 'Unknown error'}`
179
+ );
178
180
  return {
179
181
  executed: false,
180
182
  version,
@@ -14,7 +14,7 @@ import {
14
14
  loadProjectSDKKey,
15
15
  updateProjectConfig,
16
16
  } from '../../config';
17
- import { getProjectGithubStatus } from '../integration/api';
17
+ import { getProjectGithubStatus } from '../git/api';
18
18
  import { runGitLink } from '../git/link';
19
19
  import {
20
20
  runSteps,
@@ -33,6 +33,7 @@ import {
33
33
  projectDeploymentUpdate,
34
34
  projectDeploymentComplete,
35
35
  projectDeploymentStatus,
36
+ validateResources,
36
37
  type Deployment,
37
38
  type BuildMetadata,
38
39
  type DeploymentInstructions,
@@ -157,6 +158,19 @@ export const deploySubcommand = createSubcommand({
157
158
 
158
159
  // First, create the deployment to get the ID, publicKey, and stream URL
159
160
  const deploymentConfig = project.deployment ?? {};
161
+
162
+ // Validate resource configuration before creating deployment
163
+ if (deploymentConfig.resources) {
164
+ const validation = validateResources(deploymentConfig.resources);
165
+ if (!validation.valid) {
166
+ tui.error('Invalid resource configuration in agentuity.json:');
167
+ for (const error of validation.errors) {
168
+ tui.error(` ${error}`);
169
+ }
170
+ tui.fatal('Fix the resource configuration and try again.', ErrorCode.CONFIG_INVALID);
171
+ }
172
+ }
173
+
160
174
  const initialDeployment = await projectDeploymentCreate(
161
175
  apiClient,
162
176
  project.projectId,
@@ -28,6 +28,10 @@ export const createSubcommand = createCommand({
28
28
  command: getCommand('cloud sandbox create'),
29
29
  description: 'Create a sandbox with default settings',
30
30
  },
31
+ {
32
+ command: getCommand('cloud sandbox create --runtime python:3.14'),
33
+ description: 'Create a sandbox with Python runtime',
34
+ },
31
35
  {
32
36
  command: getCommand('cloud sandbox create --memory 1Gi --cpu 1000m'),
33
37
  description: 'Create a sandbox with resource limits',
@@ -43,6 +47,13 @@ export const createSubcommand = createCommand({
43
47
  ],
44
48
  schema: {
45
49
  options: z.object({
50
+ runtime: z
51
+ .string()
52
+ .optional()
53
+ .describe('Runtime name (e.g., "bun:1", "python:3.14")'),
54
+ runtimeId: z.string().optional().describe('Runtime ID (e.g., "srt_xxx")'),
55
+ name: z.string().optional().describe('Sandbox name'),
56
+ description: z.string().optional().describe('Sandbox description'),
46
57
  memory: z.string().optional().describe('Memory limit (e.g., "500Mi", "1Gi")'),
47
58
  cpu: z.string().optional().describe('CPU limit in millicores (e.g., "500m", "1000m")'),
48
59
  disk: z.string().optional().describe('Disk limit (e.g., "500Mi", "1Gi")'),
@@ -100,6 +111,10 @@ export const createSubcommand = createCommand({
100
111
 
101
112
  const result = await sandboxCreate(client, {
102
113
  options: {
114
+ runtime: opts.runtime,
115
+ runtimeId: opts.runtimeId,
116
+ name: opts.name,
117
+ description: opts.description,
103
118
  resources:
104
119
  opts.memory || opts.cpu || opts.disk
105
120
  ? {
@@ -13,9 +13,13 @@ const SandboxResourcesSchema = z.object({
13
13
 
14
14
  const SandboxGetResponseSchema = z.object({
15
15
  sandboxId: z.string().describe('Sandbox ID'),
16
+ name: z.string().optional().describe('Sandbox name'),
17
+ description: z.string().optional().describe('Sandbox description'),
16
18
  status: z.string().describe('Current status'),
17
19
  createdAt: z.string().describe('Creation timestamp'),
18
20
  region: z.string().optional().describe('Region where sandbox is running'),
21
+ runtimeId: z.string().optional().describe('Runtime ID'),
22
+ runtimeName: z.string().optional().describe('Runtime name'),
19
23
  snapshotId: z.string().optional().describe('Snapshot ID sandbox was created from'),
20
24
  snapshotTag: z.string().optional().describe('Snapshot tag sandbox was created from'),
21
25
  executions: z.number().describe('Number of executions'),
@@ -63,8 +67,17 @@ export const getSubcommand = createCommand({
63
67
  : tui.colorMuted;
64
68
 
65
69
  console.log(`${tui.muted('Sandbox:')} ${tui.bold(result.sandboxId)}`);
70
+ if (result.name) {
71
+ console.log(`${tui.muted('Name:')} ${result.name}`);
72
+ }
73
+ if (result.description) {
74
+ console.log(`${tui.muted('Description:')} ${result.description}`);
75
+ }
66
76
  console.log(`${tui.muted('Status:')} ${statusColor(result.status)}`);
67
77
  console.log(`${tui.muted('Created:')} ${result.createdAt}`);
78
+ if (result.runtimeName) {
79
+ console.log(`${tui.muted('Runtime:')} ${result.runtimeName}`);
80
+ }
68
81
  if (result.region) {
69
82
  console.log(`${tui.muted('Region:')} ${result.region}`);
70
83
  }
@@ -108,9 +121,13 @@ export const getSubcommand = createCommand({
108
121
 
109
122
  return {
110
123
  sandboxId: result.sandboxId,
124
+ name: result.name,
125
+ description: result.description,
111
126
  status: result.status,
112
127
  createdAt: result.createdAt,
113
128
  region: result.region,
129
+ runtimeId: result.runtimeId,
130
+ runtimeName: result.runtimeName,
114
131
  snapshotId: result.snapshotId,
115
132
  snapshotTag: result.snapshotTag,
116
133
  executions: result.executions,
@@ -6,6 +6,7 @@ import { listSubcommand } from './list';
6
6
  import { getSubcommand } from './get';
7
7
  import { deleteSubcommand } from './delete';
8
8
  import { snapshotCommand } from './snapshot';
9
+ import { runtimeCommand } from './runtime';
9
10
  import { cpSubcommand } from './cp';
10
11
  import { command as executionCommand } from './execution';
11
12
  import { mkdirSubcommand } from './mkdir';
@@ -44,6 +45,7 @@ export const command = createCommand({
44
45
  getSubcommand,
45
46
  deleteSubcommand,
46
47
  snapshotCommand,
48
+ runtimeCommand,
47
49
  cpSubcommand,
48
50
  executionCommand,
49
51
  mkdirSubcommand,
@@ -8,9 +8,13 @@ import type { SandboxStatus } from '@agentuity/core';
8
8
 
9
9
  const SandboxInfoSchema = z.object({
10
10
  sandboxId: z.string().describe('Sandbox ID'),
11
+ name: z.string().optional().describe('Sandbox name'),
12
+ description: z.string().optional().describe('Sandbox description'),
11
13
  status: z.string().describe('Current status'),
12
14
  createdAt: z.string().describe('Creation timestamp'),
13
15
  region: z.string().optional().describe('Region where sandbox is running'),
16
+ runtimeId: z.string().optional().describe('Runtime ID'),
17
+ runtimeName: z.string().optional().describe('Runtime name'),
14
18
  snapshotId: z.string().optional().describe('Snapshot ID sandbox was created from'),
15
19
  snapshotTag: z.string().optional().describe('Snapshot tag sandbox was created from'),
16
20
  executions: z.number().describe('Number of executions'),
@@ -88,22 +92,21 @@ export const listSubcommand = createCommand({
88
92
  tui.info('No sandboxes found');
89
93
  } else {
90
94
  const tableData = result.sandboxes.map((sandbox) => {
91
- const snapshotDisplay = sandbox.snapshotTag
92
- ? `${sandbox.snapshotTag} (${sandbox.snapshotId})`
93
- : sandbox.snapshotId || '-';
94
95
  return {
95
96
  ID: sandbox.sandboxId,
97
+ Name: sandbox.name || '-',
98
+ Runtime: sandbox.runtimeName || '-',
96
99
  Status: sandbox.status,
97
100
  'Created At': sandbox.createdAt,
98
- Snapshot: snapshotDisplay,
99
101
  Executions: sandbox.executions,
100
102
  };
101
103
  });
102
104
  tui.table(tableData, [
103
105
  { name: 'ID', alignment: 'left' },
106
+ { name: 'Name', alignment: 'left' },
107
+ { name: 'Runtime', alignment: 'left' },
104
108
  { name: 'Status', alignment: 'left' },
105
109
  { name: 'Created At', alignment: 'left' },
106
- { name: 'Snapshot', alignment: 'left' },
107
110
  { name: 'Executions', alignment: 'right' },
108
111
  ]);
109
112
 
@@ -114,9 +117,13 @@ export const listSubcommand = createCommand({
114
117
  return {
115
118
  sandboxes: result.sandboxes.map((s) => ({
116
119
  sandboxId: s.sandboxId,
120
+ name: s.name,
121
+ description: s.description,
117
122
  status: s.status,
118
123
  createdAt: s.createdAt,
119
124
  region: s.region,
125
+ runtimeId: s.runtimeId,
126
+ runtimeName: s.runtimeName,
120
127
  snapshotId: s.snapshotId,
121
128
  snapshotTag: s.snapshotTag,
122
129
  executions: s.executions,
@@ -37,6 +37,13 @@ export const runSubcommand = createCommand({
37
37
  command: z.array(z.string()).describe('Command and arguments to execute'),
38
38
  }),
39
39
  options: z.object({
40
+ runtime: z
41
+ .string()
42
+ .optional()
43
+ .describe('Runtime name (e.g., "bun:1", "python:3.14")'),
44
+ runtimeId: z.string().optional().describe('Runtime ID (e.g., "srt_xxx")'),
45
+ name: z.string().optional().describe('Sandbox name'),
46
+ description: z.string().optional().describe('Sandbox description'),
40
47
  memory: z.string().optional().describe('Memory limit (e.g., "500Mi", "1Gi")'),
41
48
  cpu: z.string().optional().describe('CPU limit in millicores (e.g., "500m", "1000m")'),
42
49
  disk: z.string().optional().describe('Disk limit (e.g., "500Mi", "1Gi")'),
@@ -102,6 +109,10 @@ export const runSubcommand = createCommand({
102
109
  try {
103
110
  const result = await sandboxRun(client, {
104
111
  options: {
112
+ runtime: opts.runtime,
113
+ runtimeId: opts.runtimeId,
114
+ name: opts.name,
115
+ description: opts.description,
105
116
  command: {
106
117
  exec: args.command,
107
118
  files: hasFiles ? files : undefined,
@@ -0,0 +1,20 @@
1
+ import { createCommand } from '../../../../types';
2
+ import { listSubcommand } from './list';
3
+ import { getCommand } from '../../../../command-prefix';
4
+
5
+ export const runtimeCommand = createCommand({
6
+ name: 'runtime',
7
+ aliases: ['rt'],
8
+ description: 'Manage sandbox runtimes',
9
+ tags: ['slow', 'requires-auth'],
10
+ examples: [
11
+ {
12
+ command: getCommand('cloud sandbox runtime list'),
13
+ description: 'List all available runtimes',
14
+ },
15
+ ],
16
+ subcommands: [listSubcommand],
17
+ requires: { auth: true, region: true, org: true },
18
+ });
19
+
20
+ export default runtimeCommand;
@@ -0,0 +1,75 @@
1
+ import { z } from 'zod';
2
+ import { createCommand } from '../../../../types';
3
+ import * as tui from '../../../../tui';
4
+ import { createSandboxClient } from '../util';
5
+ import { getCommand } from '../../../../command-prefix';
6
+ import { runtimeList } from '@agentuity/server';
7
+
8
+ const RuntimeInfoSchema = z.object({
9
+ id: z.string().describe('Runtime ID'),
10
+ name: z.string().describe('Runtime name'),
11
+ description: z.string().optional().describe('Runtime description'),
12
+ });
13
+
14
+ const RuntimeListResponseSchema = z.object({
15
+ runtimes: z.array(RuntimeInfoSchema).describe('List of runtimes'),
16
+ total: z.number().describe('Total number of runtimes'),
17
+ });
18
+
19
+ export const listSubcommand = createCommand({
20
+ name: 'list',
21
+ aliases: ['ls'],
22
+ description: 'List available sandbox runtimes',
23
+ tags: ['read-only', 'slow', 'requires-auth'],
24
+ requires: { auth: true, region: true, org: true },
25
+ idempotent: true,
26
+ examples: [
27
+ {
28
+ command: getCommand('cloud sandbox runtime list'),
29
+ description: 'List all available runtimes',
30
+ },
31
+ ],
32
+ schema: {
33
+ options: z.object({
34
+ limit: z.number().optional().describe('Maximum number of results'),
35
+ offset: z.number().optional().describe('Offset for pagination'),
36
+ }),
37
+ response: RuntimeListResponseSchema,
38
+ },
39
+
40
+ async handler(ctx) {
41
+ const { opts, options, auth, region, logger, orgId } = ctx;
42
+ const client = createSandboxClient(logger, auth, region);
43
+
44
+ const result = await runtimeList(client, {
45
+ orgId,
46
+ limit: opts.limit,
47
+ offset: opts.offset,
48
+ });
49
+
50
+ if (!options.json) {
51
+ if (result.runtimes.length === 0) {
52
+ tui.info('No runtimes available');
53
+ } else {
54
+ const tableData = result.runtimes.map((runtime) => {
55
+ return {
56
+ ID: runtime.id,
57
+ Name: runtime.name,
58
+ Description: runtime.description ?? '-',
59
+ };
60
+ });
61
+ tui.table(tableData, [
62
+ { name: 'ID', alignment: 'left' },
63
+ { name: 'Name', alignment: 'left' },
64
+ { name: 'Description', alignment: 'left' },
65
+ ]);
66
+
67
+ tui.info(`Total: ${result.total} ${tui.plural(result.total, 'runtime', 'runtimes')}`);
68
+ }
69
+ }
70
+
71
+ return result;
72
+ },
73
+ });
74
+
75
+ export default listSubcommand;
@@ -5,9 +5,15 @@ import { createSandboxClient } from '../util';
5
5
  import { getCommand } from '../../../../command-prefix';
6
6
  import { snapshotCreate } from '@agentuity/server';
7
7
 
8
+ const SNAPSHOT_NAME_REGEX = /^[a-zA-Z0-9_-]+$/;
9
+ const SNAPSHOT_TAG_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/;
10
+ const MAX_SNAPSHOT_TAG_LENGTH = 128;
11
+
8
12
  const SnapshotCreateResponseSchema = z.object({
9
13
  snapshotId: z.string().describe('Snapshot ID'),
10
- tag: z.string().optional().nullable().describe('Snapshot tag'),
14
+ name: z.string().describe('Snapshot display name'),
15
+ description: z.string().optional().nullable().describe('Snapshot description'),
16
+ tag: z.string().optional().nullable().describe('Snapshot tag (defaults to "latest")'),
11
17
  sizeBytes: z.number().describe('Snapshot size in bytes'),
12
18
  fileCount: z.number().describe('Number of files in snapshot'),
13
19
  createdAt: z.string().describe('Snapshot creation timestamp'),
@@ -27,37 +33,70 @@ export const createSubcommand = createCommand({
27
33
  command: getCommand('cloud sandbox snapshot create sbx_abc123 --tag latest'),
28
34
  description: 'Create a tagged snapshot',
29
35
  },
36
+ {
37
+ command: getCommand('cloud sandbox snapshot create sbx_abc123 --name "My Snapshot" --description "Initial setup"'),
38
+ description: 'Create a named snapshot with description',
39
+ },
30
40
  ],
31
41
  schema: {
32
42
  args: z.object({
33
43
  sandboxId: z.string().describe('Sandbox ID to snapshot'),
34
44
  }),
35
45
  options: z.object({
36
- tag: z.string().optional().describe('Tag for the snapshot'),
46
+ name: z
47
+ .string()
48
+ .optional()
49
+ .describe('Display name for the snapshot (letters, numbers, underscores, dashes only)'),
50
+ description: z.string().optional().describe('Description of the snapshot'),
51
+ tag: z.string().optional().describe('Tag for the snapshot (defaults to "latest")'),
37
52
  }),
38
53
  response: SnapshotCreateResponseSchema,
39
54
  },
40
55
 
41
56
  async handler(ctx) {
42
57
  const { args, opts, options, auth, region, logger, orgId } = ctx;
58
+
59
+ if (opts.name && !SNAPSHOT_NAME_REGEX.test(opts.name)) {
60
+ logger.fatal(
61
+ 'Invalid snapshot name: must only contain letters, numbers, underscores, and dashes'
62
+ );
63
+ }
64
+
65
+ if (opts.tag) {
66
+ if (opts.tag.length > MAX_SNAPSHOT_TAG_LENGTH) {
67
+ logger.fatal(`Invalid snapshot tag: must be at most ${MAX_SNAPSHOT_TAG_LENGTH} characters`);
68
+ }
69
+ if (!SNAPSHOT_TAG_REGEX.test(opts.tag)) {
70
+ logger.fatal(
71
+ 'Invalid snapshot tag: must only contain letters, numbers, dashes, underscores, and dots, and cannot start with a period or dash'
72
+ );
73
+ }
74
+ }
75
+
43
76
  const client = createSandboxClient(logger, auth, region);
44
77
 
45
78
  const snapshot = await snapshotCreate(client, {
46
79
  sandboxId: args.sandboxId,
80
+ name: opts.name,
81
+ description: opts.description,
47
82
  tag: opts.tag,
48
83
  orgId,
49
84
  });
50
85
 
51
86
  if (!options.json) {
52
87
  tui.success(`created snapshot ${tui.bold(snapshot.snapshotId)}`);
53
- tui.info(`Size: ${tui.formatBytes(snapshot.sizeBytes)}, Files: ${snapshot.fileCount}`);
54
- if (snapshot.tag) {
55
- tui.info(`Tag: ${snapshot.tag}`);
88
+ tui.info(`Name: ${snapshot.name}`);
89
+ if (snapshot.description) {
90
+ tui.info(`Description: ${snapshot.description}`);
56
91
  }
92
+ tui.info(`Size: ${tui.formatBytes(snapshot.sizeBytes)}, Files: ${snapshot.fileCount}`);
93
+ tui.info(`Tag: ${snapshot.tag ?? 'latest'}`);
57
94
  }
58
95
 
59
96
  return {
60
97
  snapshotId: snapshot.snapshotId,
98
+ name: snapshot.name,
99
+ description: snapshot.description ?? undefined,
61
100
  tag: snapshot.tag ?? undefined,
62
101
  sizeBytes: snapshot.sizeBytes,
63
102
  fileCount: snapshot.fileCount,
@@ -27,7 +27,7 @@ const SnapshotGetResponseSchema = z.object({
27
27
  parentSnapshotId: z.string().nullable().optional().describe('Parent snapshot ID'),
28
28
  createdAt: z.string().describe('Creation timestamp'),
29
29
  downloadUrl: z.string().optional().describe('Presigned download URL'),
30
- files: z.array(SnapshotFileSchema).optional().describe('Files in snapshot'),
30
+ files: z.array(SnapshotFileSchema).nullable().optional().describe('Files in snapshot'),
31
31
  sandboxes: z
32
32
  .array(SandboxInfoSchema)
33
33
  .optional()
@@ -7,6 +7,8 @@ import { snapshotList } from '@agentuity/server';
7
7
 
8
8
  const SnapshotInfoSchema = z.object({
9
9
  snapshotId: z.string(),
10
+ name: z.string().nullable().optional(),
11
+ description: z.string().nullable().optional(),
10
12
  tag: z.string().nullable().optional(),
11
13
  sizeBytes: z.number(),
12
14
  fileCount: z.number(),
@@ -62,6 +64,7 @@ export const listSubcommand = createCommand({
62
64
  const tableData = result.snapshots.map((snap) => {
63
65
  return {
64
66
  ID: snap.snapshotId,
67
+ Name: snap.name ?? '-',
65
68
  Tag: snap.tag ?? '-',
66
69
  Size: tui.formatBytes(snap.sizeBytes),
67
70
  Files: snap.fileCount,
@@ -70,6 +73,7 @@ export const listSubcommand = createCommand({
70
73
  });
71
74
  tui.table(tableData, [
72
75
  { name: 'ID', alignment: 'left' },
76
+ { name: 'Name', alignment: 'left' },
73
77
  { name: 'Tag', alignment: 'left' },
74
78
  { name: 'Size', alignment: 'right' },
75
79
  { name: 'Files', alignment: 'right' },
@@ -5,6 +5,9 @@ import { createSandboxClient } from '../util';
5
5
  import { getCommand } from '../../../../command-prefix';
6
6
  import { snapshotTag } from '@agentuity/server';
7
7
 
8
+ const SNAPSHOT_TAG_REGEX = /^[a-zA-Z0-9_][a-zA-Z0-9._-]*$/;
9
+ const MAX_SNAPSHOT_TAG_LENGTH = 128;
10
+
8
11
  const SnapshotTagResponseSchema = z.object({
9
12
  snapshotId: z.string().describe('Snapshot ID'),
10
13
  tag: z.string().nullable().optional().describe('New tag'),
@@ -44,6 +47,17 @@ export const tagSubcommand = createCommand({
44
47
  throw new Error('Either provide a tag name or use --clear to remove the tag');
45
48
  }
46
49
 
50
+ if (args.tag) {
51
+ if (args.tag.length > MAX_SNAPSHOT_TAG_LENGTH) {
52
+ logger.fatal(`Invalid snapshot tag: must be at most ${MAX_SNAPSHOT_TAG_LENGTH} characters`);
53
+ }
54
+ if (!SNAPSHOT_TAG_REGEX.test(args.tag)) {
55
+ logger.fatal(
56
+ 'Invalid snapshot tag: must only contain letters, numbers, dashes, underscores, and dots, and cannot start with a period or dash'
57
+ );
58
+ }
59
+ }
60
+
47
61
  const tag = opts.clear ? null : (args.tag ?? null);
48
62
 
49
63
  const snapshot = await snapshotTag(client, {
@@ -15,7 +15,7 @@ import {
15
15
  getGithubIntegrationStatus,
16
16
  getExistingGithubIntegrations,
17
17
  copyGithubIntegration,
18
- } from '../../integration/api';
18
+ } from '../api';
19
19
 
20
20
  export interface RunGitAccountConnectOptions {
21
21
  apiClient: APIClient;
@@ -3,7 +3,7 @@ import * as tui from '../../../tui';
3
3
  import { getCommand } from '../../../command-prefix';
4
4
  import { ErrorCode } from '../../../errors';
5
5
  import { listOrganizations } from '@agentuity/server';
6
- import { getGithubIntegrationStatus } from '../../integration/api';
6
+ import { getGithubIntegrationStatus } from '../api';
7
7
  import { z } from 'zod';
8
8
 
9
9
  const ListResponseSchema = z.array(
@@ -9,7 +9,7 @@ import {
9
9
  getGithubIntegrationStatus,
10
10
  disconnectGithubIntegration,
11
11
  type GithubIntegration,
12
- } from '../../integration/api';
12
+ } from '../api';
13
13
 
14
14
  const RemoveOptionsSchema = z.object({
15
15
  org: z.string().optional().describe('Organization ID'),
@@ -10,7 +10,7 @@ import {
10
10
  linkProjectToRepo,
11
11
  getProjectGithubStatus,
12
12
  type GithubRepo,
13
- } from '../integration/api';
13
+ } from './api';
14
14
  import type { APIClient } from '../../api';
15
15
  import type { Logger } from '@agentuity/core';
16
16
  import { runGitAccountConnect } from './account/add';
@@ -3,7 +3,7 @@ import * as tui from '../../tui';
3
3
  import { getCommand } from '../../command-prefix';
4
4
  import enquirer from 'enquirer';
5
5
  import { z } from 'zod';
6
- import { getGithubIntegrationStatus, listGithubRepos } from '../integration/api';
6
+ import { getGithubIntegrationStatus, listGithubRepos } from './api';
7
7
  import { ErrorCode } from '../../errors';
8
8
  import { listOrganizations } from '@agentuity/server';
9
9
 
@@ -2,7 +2,7 @@ import { createSubcommand } from '../../types';
2
2
  import * as tui from '../../tui';
3
3
  import { getCommand } from '../../command-prefix';
4
4
  import { ErrorCode } from '../../errors';
5
- import { getProjectGithubStatus, getGithubIntegrationStatus } from '../integration/api';
5
+ import { getProjectGithubStatus, getGithubIntegrationStatus } from './api';
6
6
  import { z } from 'zod';
7
7
 
8
8
  const StatusResponseSchema = z.object({
@@ -2,7 +2,7 @@ import { createSubcommand } from '../../types';
2
2
  import * as tui from '../../tui';
3
3
  import { getCommand } from '../../command-prefix';
4
4
  import { ErrorCode } from '../../errors';
5
- import { getProjectGithubStatus, unlinkProjectFromRepo } from '../integration/api';
5
+ import { getProjectGithubStatus, unlinkProjectFromRepo } from './api';
6
6
  import { z } from 'zod';
7
7
 
8
8
  const UnlinkOptionsSchema = z.object({
package/src/cmd/index.ts CHANGED
@@ -12,7 +12,6 @@ export async function discoverCommands(): Promise<CommandDefinition[]> {
12
12
  import('./dev').then((m) => m.command),
13
13
  import('./git').then((m) => m.gitCommand),
14
14
  import('./help').then((m) => m.command),
15
- import('./integration').then((m) => m.command),
16
15
  import('./profile').then((m) => m.command),
17
16
  import('./project').then((m) => m.command),
18
17
  import('./repl').then((m) => m.command),
@@ -60,10 +60,10 @@ export const generateSubcommand = createSubcommand({
60
60
  const sql = isJson
61
61
  ? await generateAuthSchemaSql(logger, projectDir)
62
62
  : await tui.spinner({
63
- message: 'Generating auth schema SQL from Drizzle schema',
64
- clearOnSuccess: true,
65
- callback: () => generateAuthSchemaSql(logger, projectDir),
66
- });
63
+ message: 'Generating auth schema SQL from Drizzle schema',
64
+ clearOnSuccess: true,
65
+ callback: () => generateAuthSchemaSql(logger, projectDir),
66
+ });
67
67
 
68
68
  if (toStdout) {
69
69
  console.log(sql);
@@ -155,7 +155,7 @@ export const initSubcommand = createSubcommand({
155
155
  if (fs.existsSync(authFilePath)) {
156
156
  tui.info('src/auth.ts already exists, skipping generation');
157
157
  } else {
158
- const { createFile } = await enquirer.prompt<{ createFile: boolean; }>({
158
+ const { createFile } = await enquirer.prompt<{ createFile: boolean }>({
159
159
  type: 'confirm',
160
160
  name: 'createFile',
161
161
  message: 'Create src/auth.ts with default configuration?',
@@ -219,7 +219,7 @@ export const initSubcommand = createSubcommand({
219
219
  console.log(' Run this SQL against your database to create auth tables.');
220
220
  tui.newline();
221
221
  } else {
222
- const { runMigrations } = await enquirer.prompt<{ runMigrations: boolean; }>({
222
+ const { runMigrations } = await enquirer.prompt<{ runMigrations: boolean }>({
223
223
  type: 'confirm',
224
224
  name: 'runMigrations',
225
225
  message: 'Run database migrations now? (idempotent, safe to re-run)',
@@ -304,8 +304,8 @@ export async function runCreateFlow(options: CreateFlowOptions): Promise<void> {
304
304
  val === ''
305
305
  ? true
306
306
  : /^(?=.{1,253}$)(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[A-Za-z]{2,63}$/.test(
307
- val
308
- ),
307
+ val
308
+ ),
309
309
  });
310
310
  if (customDns) {
311
311
  _domains = [customDns];
@@ -469,7 +469,7 @@ export async function runCreateFlow(options: CreateFlowOptions): Promise<void> {
469
469
  const cloudRegion = region ?? process.env.AGENTUITY_REGION ?? 'usc';
470
470
 
471
471
  const pkgJsonPath = resolve(dest, 'package.json');
472
- let pkgJson: { description?: string; keywords?: string[]; } = {};
472
+ let pkgJson: { description?: string; keywords?: string[] } = {};
473
473
  if (existsSync(pkgJsonPath)) {
474
474
  pkgJson = await Bun.file(pkgJsonPath).json();
475
475
  }
package/src/config.ts CHANGED
@@ -563,6 +563,16 @@ export async function createProjectConfig(dir: string, config: InitialProjectCon
563
563
  const configData = {
564
564
  $schema: 'https://agentuity.dev/schema/cli/v1/agentuity.json',
565
565
  ...sanitizedConfig,
566
+ deployment: {
567
+ ...sanitizedConfig.deployment,
568
+ resources: {
569
+ memory: '500Mi',
570
+ cpu: '500m',
571
+ disk: '500Mi',
572
+ ...sanitizedConfig.deployment?.resources,
573
+ },
574
+ domains: sanitizedConfig.deployment?.domains ?? [],
575
+ },
566
576
  };
567
577
  await Bun.write(configPath, JSON.stringify(configData, null, 2) + '\n');
568
578
 
@@ -57,11 +57,15 @@ export async function checkAndUpgradeDependencies(
57
57
  failed: [],
58
58
  };
59
59
 
60
- const packageJsonPath = join(projectDir, 'package.json');
61
60
  const cliVersion = getVersion();
62
-
63
61
  logger.debug('CLI version: %s', cliVersion);
64
62
 
63
+ // check if this is a canary and if so, skip this check
64
+ if (cliVersion.includes('-')) {
65
+ return result;
66
+ }
67
+
68
+ const packageJsonPath = join(projectDir, 'package.json');
65
69
  // Read package.json
66
70
  let packageJson: PackageJson;
67
71
  try {
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/cmd/integration/api.ts"],"names":[],"mappings":"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"}