@vm0/cli 5.0.2 → 5.1.1

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 (2) hide show
  1. package/index.js +26 -320
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2760,7 +2760,7 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
2760
2760
  function isValidBase64URL(data) {
2761
2761
  if (!base64url.test(data))
2762
2762
  return false;
2763
- const base643 = data.replace(/[-_]/g, (c16) => c16 === "-" ? "+" : "/");
2763
+ const base643 = data.replace(/[-_]/g, (c15) => c15 === "-" ? "+" : "/");
2764
2764
  const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
2765
2765
  return isValidBase64(padded);
2766
2766
  }
@@ -11672,9 +11672,9 @@ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
11672
11672
  ZodType.init(inst, def);
11673
11673
  inst.min = (value, params) => inst.check(_gte(value, params));
11674
11674
  inst.max = (value, params) => inst.check(_lte(value, params));
11675
- const c16 = inst._zod.bag;
11676
- inst.minDate = c16.minimum ? new Date(c16.minimum) : null;
11677
- inst.maxDate = c16.maximum ? new Date(c16.maximum) : null;
11675
+ const c15 = inst._zod.bag;
11676
+ inst.minDate = c15.minimum ? new Date(c15.minimum) : null;
11677
+ inst.maxDate = c15.maximum ? new Date(c15.maximum) : null;
11678
11678
  });
11679
11679
  function date3(params) {
11680
11680
  return _date(ZodDate, params);
@@ -13731,19 +13731,11 @@ var agentVersionSchema = external_exports.object({
13731
13731
  id: external_exports.string(),
13732
13732
  agent_id: external_exports.string(),
13733
13733
  version_number: external_exports.number(),
13734
- config: external_exports.unknown(),
13735
- // Agent YAML configuration
13736
13734
  created_at: timestampSchema
13737
13735
  });
13738
- var publicAgentDetailSchema = publicAgentSchema.extend({
13739
- config: external_exports.unknown().optional()
13740
- });
13736
+ var publicAgentDetailSchema = publicAgentSchema;
13741
13737
  var paginatedAgentsSchema = createPaginatedResponseSchema(publicAgentSchema);
13742
13738
  var paginatedAgentVersionsSchema = createPaginatedResponseSchema(agentVersionSchema);
13743
- var updateAgentRequestSchema = external_exports.object({
13744
- config: external_exports.unknown()
13745
- // New agent configuration (creates new version)
13746
- });
13747
13739
  var agentListQuerySchema = listQuerySchema.extend({
13748
13740
  name: external_exports.string().optional()
13749
13741
  });
@@ -13776,23 +13768,6 @@ var publicAgentByIdContract = c11.router({
13776
13768
  },
13777
13769
  summary: "Get agent",
13778
13770
  description: "Get agent details by ID"
13779
- },
13780
- update: {
13781
- method: "PUT",
13782
- path: "/v1/agents/:id",
13783
- pathParams: external_exports.object({
13784
- id: external_exports.string().min(1, "Agent ID is required")
13785
- }),
13786
- body: updateAgentRequestSchema,
13787
- responses: {
13788
- 200: publicAgentDetailSchema,
13789
- 400: publicApiErrorSchema,
13790
- 401: publicApiErrorSchema,
13791
- 404: publicApiErrorSchema,
13792
- 500: publicApiErrorSchema
13793
- },
13794
- summary: "Update agent",
13795
- description: "Update agent configuration. Creates a new version if config changes."
13796
13771
  }
13797
13772
  });
13798
13773
  var publicAgentVersionsContract = c11.router({
@@ -13835,12 +13810,12 @@ var publicRunSchema = external_exports.object({
13835
13810
  completed_at: timestampSchema.nullable()
13836
13811
  });
13837
13812
  var publicRunDetailSchema = publicRunSchema.extend({
13838
- output: external_exports.string().nullable(),
13839
13813
  error: external_exports.string().nullable(),
13840
13814
  execution_time_ms: external_exports.number().nullable(),
13841
13815
  checkpoint_id: external_exports.string().nullable(),
13842
13816
  session_id: external_exports.string().nullable(),
13843
- artifacts: external_exports.record(external_exports.string(), external_exports.string()).optional(),
13817
+ artifact_name: external_exports.string().nullable(),
13818
+ artifact_version: external_exports.string().nullable(),
13844
13819
  volumes: external_exports.record(external_exports.string(), external_exports.string()).optional()
13845
13820
  });
13846
13821
  var paginatedRunsSchema = createPaginatedResponseSchema(publicRunSchema);
@@ -13861,8 +13836,10 @@ var createRunRequestSchema = external_exports.object({
13861
13836
  // Optional configuration
13862
13837
  variables: external_exports.record(external_exports.string(), external_exports.string()).optional(),
13863
13838
  secrets: external_exports.record(external_exports.string(), external_exports.string()).optional(),
13864
- artifacts: external_exports.record(external_exports.string(), external_exports.string()).optional(),
13865
- // artifact_name -> version
13839
+ artifact_name: external_exports.string().optional(),
13840
+ // Artifact name to mount
13841
+ artifact_version: external_exports.string().optional(),
13842
+ // Artifact version (defaults to latest)
13866
13843
  volumes: external_exports.record(external_exports.string(), external_exports.string()).optional()
13867
13844
  // volume_name -> version
13868
13845
  });
@@ -14075,51 +14052,6 @@ var paginatedArtifactsSchema = createPaginatedResponseSchema(publicArtifactSchem
14075
14052
  var paginatedArtifactVersionsSchema = createPaginatedResponseSchema(
14076
14053
  artifactVersionSchema
14077
14054
  );
14078
- var createArtifactRequestSchema = external_exports.object({
14079
- name: external_exports.string().min(1).max(100).regex(
14080
- /^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$/,
14081
- "Name must be lowercase alphanumeric with hyphens, not starting or ending with hyphen"
14082
- )
14083
- });
14084
- var fileEntrySchema = external_exports.object({
14085
- path: external_exports.string(),
14086
- size: external_exports.number(),
14087
- hash: external_exports.string().optional()
14088
- // SHA-256 hash of file content
14089
- });
14090
- var prepareUploadRequestSchema = external_exports.object({
14091
- files: external_exports.array(fileEntrySchema),
14092
- message: external_exports.string().optional()
14093
- // Optional commit message
14094
- });
14095
- var presignedUploadSchema2 = external_exports.object({
14096
- path: external_exports.string(),
14097
- upload_url: external_exports.string(),
14098
- // Presigned S3 URL
14099
- upload_id: external_exports.string()
14100
- // For multi-part uploads
14101
- });
14102
- var prepareUploadResponseSchema = external_exports.object({
14103
- upload_session_id: external_exports.string(),
14104
- files: external_exports.array(presignedUploadSchema2),
14105
- expires_at: timestampSchema
14106
- });
14107
- var commitUploadRequestSchema = external_exports.object({
14108
- upload_session_id: external_exports.string(),
14109
- message: external_exports.string().optional()
14110
- });
14111
- var downloadResponseSchema = external_exports.object({
14112
- version_id: external_exports.string(),
14113
- files: external_exports.array(
14114
- external_exports.object({
14115
- path: external_exports.string(),
14116
- size: external_exports.number(),
14117
- download_url: external_exports.string()
14118
- // Presigned S3 URL
14119
- })
14120
- ),
14121
- expires_at: timestampSchema
14122
- });
14123
14055
  var publicArtifactsListContract = c13.router({
14124
14056
  list: {
14125
14057
  method: "GET",
@@ -14132,20 +14064,6 @@ var publicArtifactsListContract = c13.router({
14132
14064
  },
14133
14065
  summary: "List artifacts",
14134
14066
  description: "List all artifacts in the current scope with pagination"
14135
- },
14136
- create: {
14137
- method: "POST",
14138
- path: "/v1/artifacts",
14139
- body: createArtifactRequestSchema,
14140
- responses: {
14141
- 201: publicArtifactDetailSchema,
14142
- 400: publicApiErrorSchema,
14143
- 401: publicApiErrorSchema,
14144
- 409: publicApiErrorSchema,
14145
- 500: publicApiErrorSchema
14146
- },
14147
- summary: "Create artifact",
14148
- description: "Create a new empty artifact container"
14149
14067
  }
14150
14068
  });
14151
14069
  var publicArtifactByIdContract = c13.router({
@@ -14183,44 +14101,6 @@ var publicArtifactVersionsContract = c13.router({
14183
14101
  description: "List all versions of an artifact with pagination"
14184
14102
  }
14185
14103
  });
14186
- var publicArtifactUploadContract = c13.router({
14187
- prepareUpload: {
14188
- method: "POST",
14189
- path: "/v1/artifacts/:id/upload",
14190
- pathParams: external_exports.object({
14191
- id: external_exports.string().min(1, "Artifact ID is required")
14192
- }),
14193
- body: prepareUploadRequestSchema,
14194
- responses: {
14195
- 200: prepareUploadResponseSchema,
14196
- 400: publicApiErrorSchema,
14197
- 401: publicApiErrorSchema,
14198
- 404: publicApiErrorSchema,
14199
- 500: publicApiErrorSchema
14200
- },
14201
- summary: "Prepare artifact upload",
14202
- description: "Get presigned URLs for direct S3 upload. Returns upload URLs for each file."
14203
- }
14204
- });
14205
- var publicArtifactCommitContract = c13.router({
14206
- commitUpload: {
14207
- method: "POST",
14208
- path: "/v1/artifacts/:id/commit",
14209
- pathParams: external_exports.object({
14210
- id: external_exports.string().min(1, "Artifact ID is required")
14211
- }),
14212
- body: commitUploadRequestSchema,
14213
- responses: {
14214
- 200: artifactVersionSchema,
14215
- 400: publicApiErrorSchema,
14216
- 401: publicApiErrorSchema,
14217
- 404: publicApiErrorSchema,
14218
- 500: publicApiErrorSchema
14219
- },
14220
- summary: "Commit artifact upload",
14221
- description: "Finalize an upload session and create a new artifact version."
14222
- }
14223
- });
14224
14104
  var publicArtifactDownloadContract = c13.router({
14225
14105
  download: {
14226
14106
  method: "GET",
@@ -14233,13 +14113,14 @@ var publicArtifactDownloadContract = c13.router({
14233
14113
  // Defaults to current version
14234
14114
  }),
14235
14115
  responses: {
14236
- 200: downloadResponseSchema,
14116
+ 302: external_exports.undefined(),
14117
+ // Redirect to presigned URL
14237
14118
  401: publicApiErrorSchema,
14238
14119
  404: publicApiErrorSchema,
14239
14120
  500: publicApiErrorSchema
14240
14121
  },
14241
14122
  summary: "Download artifact",
14242
- description: "Get presigned URLs for downloading artifact files. Defaults to current version."
14123
+ description: "Redirect to presigned URL for downloading artifact as tar.gz archive. Defaults to current version."
14243
14124
  }
14244
14125
  });
14245
14126
 
@@ -14272,51 +14153,6 @@ var publicVolumeDetailSchema = publicVolumeSchema.extend({
14272
14153
  });
14273
14154
  var paginatedVolumesSchema = createPaginatedResponseSchema(publicVolumeSchema);
14274
14155
  var paginatedVolumeVersionsSchema = createPaginatedResponseSchema(volumeVersionSchema);
14275
- var createVolumeRequestSchema = external_exports.object({
14276
- name: external_exports.string().min(1).max(100).regex(
14277
- /^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]$/,
14278
- "Name must be lowercase alphanumeric with hyphens, not starting or ending with hyphen"
14279
- )
14280
- });
14281
- var fileEntrySchema2 = external_exports.object({
14282
- path: external_exports.string(),
14283
- size: external_exports.number(),
14284
- hash: external_exports.string().optional()
14285
- // SHA-256 hash of file content
14286
- });
14287
- var prepareUploadRequestSchema2 = external_exports.object({
14288
- files: external_exports.array(fileEntrySchema2),
14289
- message: external_exports.string().optional()
14290
- // Optional commit message
14291
- });
14292
- var presignedUploadSchema3 = external_exports.object({
14293
- path: external_exports.string(),
14294
- upload_url: external_exports.string(),
14295
- // Presigned S3 URL
14296
- upload_id: external_exports.string()
14297
- // For multi-part uploads
14298
- });
14299
- var prepareUploadResponseSchema2 = external_exports.object({
14300
- upload_session_id: external_exports.string(),
14301
- files: external_exports.array(presignedUploadSchema3),
14302
- expires_at: timestampSchema
14303
- });
14304
- var commitUploadRequestSchema2 = external_exports.object({
14305
- upload_session_id: external_exports.string(),
14306
- message: external_exports.string().optional()
14307
- });
14308
- var downloadResponseSchema2 = external_exports.object({
14309
- version_id: external_exports.string(),
14310
- files: external_exports.array(
14311
- external_exports.object({
14312
- path: external_exports.string(),
14313
- size: external_exports.number(),
14314
- download_url: external_exports.string()
14315
- // Presigned S3 URL
14316
- })
14317
- ),
14318
- expires_at: timestampSchema
14319
- });
14320
14156
  var publicVolumesListContract = c14.router({
14321
14157
  list: {
14322
14158
  method: "GET",
@@ -14329,20 +14165,6 @@ var publicVolumesListContract = c14.router({
14329
14165
  },
14330
14166
  summary: "List volumes",
14331
14167
  description: "List all volumes in the current scope with pagination"
14332
- },
14333
- create: {
14334
- method: "POST",
14335
- path: "/v1/volumes",
14336
- body: createVolumeRequestSchema,
14337
- responses: {
14338
- 201: publicVolumeDetailSchema,
14339
- 400: publicApiErrorSchema,
14340
- 401: publicApiErrorSchema,
14341
- 409: publicApiErrorSchema,
14342
- 500: publicApiErrorSchema
14343
- },
14344
- summary: "Create volume",
14345
- description: "Create a new empty volume container"
14346
14168
  }
14347
14169
  });
14348
14170
  var publicVolumeByIdContract = c14.router({
@@ -14380,44 +14202,6 @@ var publicVolumeVersionsContract = c14.router({
14380
14202
  description: "List all versions of a volume with pagination"
14381
14203
  }
14382
14204
  });
14383
- var publicVolumeUploadContract = c14.router({
14384
- prepareUpload: {
14385
- method: "POST",
14386
- path: "/v1/volumes/:id/upload",
14387
- pathParams: external_exports.object({
14388
- id: external_exports.string().min(1, "Volume ID is required")
14389
- }),
14390
- body: prepareUploadRequestSchema2,
14391
- responses: {
14392
- 200: prepareUploadResponseSchema2,
14393
- 400: publicApiErrorSchema,
14394
- 401: publicApiErrorSchema,
14395
- 404: publicApiErrorSchema,
14396
- 500: publicApiErrorSchema
14397
- },
14398
- summary: "Prepare volume upload",
14399
- description: "Get presigned URLs for direct S3 upload. Returns upload URLs for each file."
14400
- }
14401
- });
14402
- var publicVolumeCommitContract = c14.router({
14403
- commitUpload: {
14404
- method: "POST",
14405
- path: "/v1/volumes/:id/commit",
14406
- pathParams: external_exports.object({
14407
- id: external_exports.string().min(1, "Volume ID is required")
14408
- }),
14409
- body: commitUploadRequestSchema2,
14410
- responses: {
14411
- 200: volumeVersionSchema,
14412
- 400: publicApiErrorSchema,
14413
- 401: publicApiErrorSchema,
14414
- 404: publicApiErrorSchema,
14415
- 500: publicApiErrorSchema
14416
- },
14417
- summary: "Commit volume upload",
14418
- description: "Finalize an upload session and create a new volume version."
14419
- }
14420
- });
14421
14205
  var publicVolumeDownloadContract = c14.router({
14422
14206
  download: {
14423
14207
  method: "GET",
@@ -14430,92 +14214,14 @@ var publicVolumeDownloadContract = c14.router({
14430
14214
  // Defaults to current version
14431
14215
  }),
14432
14216
  responses: {
14433
- 200: downloadResponseSchema2,
14217
+ 302: external_exports.undefined(),
14218
+ // Redirect to presigned URL
14434
14219
  401: publicApiErrorSchema,
14435
14220
  404: publicApiErrorSchema,
14436
14221
  500: publicApiErrorSchema
14437
14222
  },
14438
14223
  summary: "Download volume",
14439
- description: "Get presigned URLs for downloading volume files. Defaults to current version."
14440
- }
14441
- });
14442
-
14443
- // ../../packages/core/src/contracts/public/tokens.ts
14444
- var c15 = initContract();
14445
- var publicTokenSchema = external_exports.object({
14446
- id: external_exports.string(),
14447
- name: external_exports.string(),
14448
- token_prefix: external_exports.string(),
14449
- // First 12 chars for identification (e.g., "vm0_live_abc")
14450
- last_used_at: timestampSchema.nullable(),
14451
- expires_at: timestampSchema,
14452
- created_at: timestampSchema
14453
- });
14454
- var publicTokenDetailSchema = publicTokenSchema.extend({
14455
- token: external_exports.string().optional()
14456
- // Full token value, only returned on creation
14457
- });
14458
- var paginatedTokensSchema = createPaginatedResponseSchema(publicTokenSchema);
14459
- var createTokenRequestSchema = external_exports.object({
14460
- name: external_exports.string().min(1, "Name is required").max(100, "Name too long"),
14461
- expires_in_days: external_exports.number().min(1).max(365).optional()
14462
- // null for no expiry (default 90 days)
14463
- });
14464
- var publicTokensListContract = c15.router({
14465
- list: {
14466
- method: "GET",
14467
- path: "/v1/tokens",
14468
- query: listQuerySchema,
14469
- responses: {
14470
- 200: paginatedTokensSchema,
14471
- 401: publicApiErrorSchema
14472
- },
14473
- summary: "List API tokens",
14474
- description: "List all API tokens for the authenticated user"
14475
- },
14476
- create: {
14477
- method: "POST",
14478
- path: "/v1/tokens",
14479
- body: createTokenRequestSchema,
14480
- responses: {
14481
- 201: publicTokenDetailSchema,
14482
- // Includes full token value
14483
- 400: publicApiErrorSchema,
14484
- 401: publicApiErrorSchema
14485
- },
14486
- summary: "Create API token",
14487
- description: "Create a new API token. The token value is only returned once on creation."
14488
- }
14489
- });
14490
- var publicTokenByIdContract = c15.router({
14491
- get: {
14492
- method: "GET",
14493
- path: "/v1/tokens/:id",
14494
- pathParams: external_exports.object({
14495
- id: external_exports.string()
14496
- }),
14497
- responses: {
14498
- 200: publicTokenSchema,
14499
- // Does NOT include token value
14500
- 401: publicApiErrorSchema,
14501
- 404: publicApiErrorSchema
14502
- },
14503
- summary: "Get API token",
14504
- description: "Get details of an API token (does not include the token value)"
14505
- },
14506
- delete: {
14507
- method: "DELETE",
14508
- path: "/v1/tokens/:id",
14509
- pathParams: external_exports.object({
14510
- id: external_exports.string()
14511
- }),
14512
- responses: {
14513
- 204: external_exports.undefined(),
14514
- 401: publicApiErrorSchema,
14515
- 404: publicApiErrorSchema
14516
- },
14517
- summary: "Revoke API token",
14518
- description: "Permanently revoke an API token. This action cannot be undone."
14224
+ description: "Redirect to presigned URL for downloading volume as tar.gz archive. Defaults to current version."
14519
14225
  }
14520
14226
  });
14521
14227
 
@@ -16354,9 +16060,9 @@ var CodexEventParser = class {
16354
16060
  }
16355
16061
  }
16356
16062
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
16357
- const changes = item.changes.map((c16) => {
16358
- const action = c16.kind === "add" ? "Created" : c16.kind === "modify" ? "Modified" : "Deleted";
16359
- return `${action}: ${c16.path}`;
16063
+ const changes = item.changes.map((c15) => {
16064
+ const action = c15.kind === "add" ? "Created" : c15.kind === "modify" ? "Modified" : "Deleted";
16065
+ return `${action}: ${c15.path}`;
16360
16066
  }).join("\n");
16361
16067
  return {
16362
16068
  type: "text",
@@ -16697,9 +16403,9 @@ var CodexEventRenderer = class {
16697
16403
  return;
16698
16404
  }
16699
16405
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
16700
- const summary = item.changes.map((c16) => {
16701
- const icon = c16.kind === "add" ? "+" : c16.kind === "delete" ? "-" : "~";
16702
- return `${icon}${c16.path}`;
16406
+ const summary = item.changes.map((c15) => {
16407
+ const icon = c15.kind === "add" ? "+" : c15.kind === "delete" ? "-" : "~";
16408
+ return `${icon}${c15.path}`;
16703
16409
  }).join(", ");
16704
16410
  console.log(chalk4.green("[files]") + ` ${summary}`);
16705
16411
  return;
@@ -18588,7 +18294,7 @@ async function autoPullArtifact(runOutput, artifactDir) {
18588
18294
  }
18589
18295
  var cookCmd = new Command17().name("cook").description("One-click agent preparation and execution from vm0.yaml");
18590
18296
  cookCmd.argument("[prompt]", "Prompt for the agent").option("-y, --yes", "Skip confirmation prompts").action(async (prompt, options) => {
18591
- const shouldExit = await checkAndUpgrade("5.0.2", prompt);
18297
+ const shouldExit = await checkAndUpgrade("5.1.1", prompt);
18592
18298
  if (shouldExit) {
18593
18299
  process.exit(0);
18594
18300
  }
@@ -19272,7 +18978,7 @@ var listCommand3 = new Command22().name("list").alias("ls").description("List al
19272
18978
  );
19273
18979
  return;
19274
18980
  }
19275
- const nameWidth = Math.max(4, ...data.composes.map((c16) => c16.name.length));
18981
+ const nameWidth = Math.max(4, ...data.composes.map((c15) => c15.name.length));
19276
18982
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
19277
18983
  " "
19278
18984
  );
@@ -20151,7 +19857,7 @@ var setupGithubCommand = new Command26().name("setup-github").description("Initi
20151
19857
 
20152
19858
  // src/index.ts
20153
19859
  var program = new Command27();
20154
- program.name("vm0").description("VM0 CLI - A modern build tool").version("5.0.2");
19860
+ program.name("vm0").description("VM0 CLI - A modern build tool").version("5.1.1");
20155
19861
  program.command("info").description("Display environment information").action(async () => {
20156
19862
  console.log(chalk29.bold("System Information:"));
20157
19863
  console.log(`Node Version: ${process.version}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "5.0.2",
3
+ "version": "5.1.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",