@agentuity/cli 0.1.8 → 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 (65) hide show
  1. package/dist/cli.d.ts.map +1 -1
  2. package/dist/cli.js +22 -8
  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/metadata-generator.js +1 -1
  8. package/dist/cmd/build/vite/metadata-generator.js.map +1 -1
  9. package/dist/cmd/cloud/deploy.d.ts.map +1 -1
  10. package/dist/cmd/cloud/deploy.js +12 -1
  11. package/dist/cmd/cloud/deploy.js.map +1 -1
  12. package/dist/cmd/cloud/sandbox/create.d.ts.map +1 -1
  13. package/dist/cmd/cloud/sandbox/create.js +15 -0
  14. package/dist/cmd/cloud/sandbox/create.js.map +1 -1
  15. package/dist/cmd/cloud/sandbox/get.d.ts.map +1 -1
  16. package/dist/cmd/cloud/sandbox/get.js +17 -0
  17. package/dist/cmd/cloud/sandbox/get.js.map +1 -1
  18. package/dist/cmd/cloud/sandbox/index.d.ts.map +1 -1
  19. package/dist/cmd/cloud/sandbox/index.js +2 -0
  20. package/dist/cmd/cloud/sandbox/index.js.map +1 -1
  21. package/dist/cmd/cloud/sandbox/list.d.ts.map +1 -1
  22. package/dist/cmd/cloud/sandbox/list.js +12 -5
  23. package/dist/cmd/cloud/sandbox/list.js.map +1 -1
  24. package/dist/cmd/cloud/sandbox/run.d.ts.map +1 -1
  25. package/dist/cmd/cloud/sandbox/run.js +11 -0
  26. package/dist/cmd/cloud/sandbox/run.js.map +1 -1
  27. package/dist/cmd/cloud/sandbox/runtime/index.d.ts +3 -0
  28. package/dist/cmd/cloud/sandbox/runtime/index.d.ts.map +1 -0
  29. package/dist/cmd/cloud/sandbox/runtime/index.js +19 -0
  30. package/dist/cmd/cloud/sandbox/runtime/index.js.map +1 -0
  31. package/dist/cmd/cloud/sandbox/runtime/list.d.ts +3 -0
  32. package/dist/cmd/cloud/sandbox/runtime/list.d.ts.map +1 -0
  33. package/dist/cmd/cloud/sandbox/runtime/list.js +68 -0
  34. package/dist/cmd/cloud/sandbox/runtime/list.js.map +1 -0
  35. package/dist/cmd/cloud/sandbox/snapshot/create.d.ts.map +1 -1
  36. package/dist/cmd/cloud/sandbox/snapshot/create.js +36 -5
  37. package/dist/cmd/cloud/sandbox/snapshot/create.js.map +1 -1
  38. package/dist/cmd/cloud/sandbox/snapshot/get.js +1 -1
  39. package/dist/cmd/cloud/sandbox/snapshot/get.js.map +1 -1
  40. package/dist/cmd/cloud/sandbox/snapshot/list.d.ts.map +1 -1
  41. package/dist/cmd/cloud/sandbox/snapshot/list.js +4 -0
  42. package/dist/cmd/cloud/sandbox/snapshot/list.js.map +1 -1
  43. package/dist/cmd/cloud/sandbox/snapshot/tag.d.ts.map +1 -1
  44. package/dist/cmd/cloud/sandbox/snapshot/tag.js +10 -0
  45. package/dist/cmd/cloud/sandbox/snapshot/tag.js.map +1 -1
  46. package/dist/config.d.ts.map +1 -1
  47. package/dist/config.js +10 -0
  48. package/dist/config.js.map +1 -1
  49. package/package.json +6 -6
  50. package/src/cli.ts +32 -7
  51. package/src/cmd/ai/skills/generator.ts +9 -1
  52. package/src/cmd/build/vite/metadata-generator.ts +1 -1
  53. package/src/cmd/cloud/deploy.ts +14 -0
  54. package/src/cmd/cloud/sandbox/create.ts +15 -0
  55. package/src/cmd/cloud/sandbox/get.ts +17 -0
  56. package/src/cmd/cloud/sandbox/index.ts +2 -0
  57. package/src/cmd/cloud/sandbox/list.ts +12 -5
  58. package/src/cmd/cloud/sandbox/run.ts +11 -0
  59. package/src/cmd/cloud/sandbox/runtime/index.ts +20 -0
  60. package/src/cmd/cloud/sandbox/runtime/list.ts +75 -0
  61. package/src/cmd/cloud/sandbox/snapshot/create.ts +44 -5
  62. package/src/cmd/cloud/sandbox/snapshot/get.ts +1 -1
  63. package/src/cmd/cloud/sandbox/snapshot/list.ts +4 -0
  64. package/src/cmd/cloud/sandbox/snapshot/tag.ts +14 -0
  65. package/src/config.ts +10 -0
@@ -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, {
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