@vm0/cli 4.21.2 → 4.23.0

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 +74 -162
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2759,7 +2759,7 @@ var $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
2759
2759
  function isValidBase64URL(data) {
2760
2760
  if (!base64url.test(data))
2761
2761
  return false;
2762
- const base643 = data.replace(/[-_]/g, (c12) => c12 === "-" ? "+" : "/");
2762
+ const base643 = data.replace(/[-_]/g, (c11) => c11 === "-" ? "+" : "/");
2763
2763
  const padded = base643.padEnd(Math.ceil(base643.length / 4) * 4, "=");
2764
2764
  return isValidBase64(padded);
2765
2765
  }
@@ -11671,9 +11671,9 @@ var ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
11671
11671
  ZodType.init(inst, def);
11672
11672
  inst.min = (value, params) => inst.check(_gte(value, params));
11673
11673
  inst.max = (value, params) => inst.check(_lte(value, params));
11674
- const c12 = inst._zod.bag;
11675
- inst.minDate = c12.minimum ? new Date(c12.minimum) : null;
11676
- inst.maxDate = c12.maximum ? new Date(c12.maximum) : null;
11674
+ const c11 = inst._zod.bag;
11675
+ inst.minDate = c11.minimum ? new Date(c11.minimum) : null;
11676
+ inst.maxDate = c11.maximum ? new Date(c11.maximum) : null;
11677
11677
  });
11678
11678
  function date3(params) {
11679
11679
  return _date(ZodDate, params);
@@ -12773,91 +12773,8 @@ var runNetworkLogsContract = c3.router({
12773
12773
  }
12774
12774
  });
12775
12775
 
12776
- // ../../packages/core/src/contracts/sessions.ts
12777
- var c4 = initContract();
12778
- var agentSessionSchema = external_exports.object({
12779
- id: external_exports.string(),
12780
- userId: external_exports.string(),
12781
- agentComposeId: external_exports.string(),
12782
- conversationId: external_exports.string().nullable(),
12783
- artifactName: external_exports.string().nullable(),
12784
- // nullable when session has no artifact
12785
- vars: external_exports.record(external_exports.string(), external_exports.string()).nullable(),
12786
- createdAt: external_exports.string(),
12787
- updatedAt: external_exports.string()
12788
- });
12789
- var conversationSchema = external_exports.object({
12790
- id: external_exports.string(),
12791
- cliAgentType: external_exports.string(),
12792
- cliAgentSessionId: external_exports.string(),
12793
- cliAgentSessionHistory: external_exports.string()
12794
- });
12795
- var agentSessionWithConversationSchema = agentSessionSchema.extend({
12796
- conversation: conversationSchema.nullable()
12797
- });
12798
- var sessionsMainContract = c4.router({
12799
- /**
12800
- * GET /api/agent/sessions
12801
- * List all agent sessions for the authenticated user
12802
- */
12803
- list: {
12804
- method: "GET",
12805
- path: "/api/agent/sessions",
12806
- responses: {
12807
- 200: external_exports.object({
12808
- sessions: external_exports.array(agentSessionSchema)
12809
- }),
12810
- 401: apiErrorSchema
12811
- },
12812
- summary: "List agent sessions"
12813
- }
12814
- });
12815
- var sessionsByIdContract = c4.router({
12816
- /**
12817
- * GET /api/agent/sessions/:id
12818
- * Get a specific agent session with conversation data
12819
- */
12820
- getById: {
12821
- method: "GET",
12822
- path: "/api/agent/sessions/:id",
12823
- pathParams: external_exports.object({
12824
- id: external_exports.string().min(1, "Session ID is required")
12825
- }),
12826
- responses: {
12827
- 200: external_exports.object({
12828
- session: agentSessionWithConversationSchema
12829
- }),
12830
- 400: apiErrorSchema,
12831
- 401: apiErrorSchema,
12832
- 404: apiErrorSchema
12833
- },
12834
- summary: "Get agent session by ID"
12835
- },
12836
- /**
12837
- * DELETE /api/agent/sessions/:id
12838
- * Delete an agent session
12839
- */
12840
- delete: {
12841
- method: "DELETE",
12842
- path: "/api/agent/sessions/:id",
12843
- pathParams: external_exports.object({
12844
- id: external_exports.string().min(1, "Session ID is required")
12845
- }),
12846
- body: external_exports.undefined(),
12847
- responses: {
12848
- 200: external_exports.object({
12849
- deleted: external_exports.literal(true)
12850
- }),
12851
- 400: apiErrorSchema,
12852
- 401: apiErrorSchema,
12853
- 404: apiErrorSchema
12854
- },
12855
- summary: "Delete agent session"
12856
- }
12857
- });
12858
-
12859
12776
  // ../../packages/core/src/contracts/storages.ts
12860
- var c5 = initContract();
12777
+ var c4 = initContract();
12861
12778
  var storageTypeSchema = external_exports.enum(["volume", "artifact"]);
12862
12779
  var uploadStorageResponseSchema = external_exports.object({
12863
12780
  name: external_exports.string(),
@@ -12867,7 +12784,7 @@ var uploadStorageResponseSchema = external_exports.object({
12867
12784
  type: storageTypeSchema,
12868
12785
  deduplicated: external_exports.boolean()
12869
12786
  });
12870
- var storagesContract = c5.router({
12787
+ var storagesContract = c4.router({
12871
12788
  /**
12872
12789
  * POST /api/storages
12873
12790
  * Upload a storage (tar.gz file)
@@ -12883,7 +12800,7 @@ var storagesContract = c5.router({
12883
12800
  method: "POST",
12884
12801
  path: "/api/storages",
12885
12802
  contentType: "multipart/form-data",
12886
- body: c5.type(),
12803
+ body: c4.type(),
12887
12804
  responses: {
12888
12805
  200: uploadStorageResponseSchema,
12889
12806
  400: apiErrorSchema,
@@ -12911,9 +12828,9 @@ var storagesContract = c5.router({
12911
12828
  }),
12912
12829
  responses: {
12913
12830
  // Binary response - actual handling done at route level
12914
- 200: c5.otherResponse({
12831
+ 200: c4.otherResponse({
12915
12832
  contentType: "application/gzip",
12916
- body: c5.type()
12833
+ body: c4.type()
12917
12834
  }),
12918
12835
  400: apiErrorSchema,
12919
12836
  401: apiErrorSchema,
@@ -12925,7 +12842,7 @@ var storagesContract = c5.router({
12925
12842
  });
12926
12843
 
12927
12844
  // ../../packages/core/src/contracts/webhooks.ts
12928
- var c6 = initContract();
12845
+ var c5 = initContract();
12929
12846
  var agentEventSchema = external_exports.object({
12930
12847
  type: external_exports.string(),
12931
12848
  sequenceNumber: external_exports.number().int().positive()
@@ -12937,7 +12854,7 @@ var artifactSnapshotSchema = external_exports.object({
12937
12854
  var volumeVersionsSnapshotSchema = external_exports.object({
12938
12855
  versions: external_exports.record(external_exports.string(), external_exports.string())
12939
12856
  });
12940
- var webhookEventsContract = c6.router({
12857
+ var webhookEventsContract = c5.router({
12941
12858
  /**
12942
12859
  * POST /api/webhooks/agent/events
12943
12860
  * Receive agent events from E2B sandbox
@@ -12963,7 +12880,7 @@ var webhookEventsContract = c6.router({
12963
12880
  summary: "Receive agent events from sandbox"
12964
12881
  }
12965
12882
  });
12966
- var webhookCompleteContract = c6.router({
12883
+ var webhookCompleteContract = c5.router({
12967
12884
  /**
12968
12885
  * POST /api/webhooks/agent/complete
12969
12886
  * Handle agent run completion (success or failure)
@@ -12989,7 +12906,7 @@ var webhookCompleteContract = c6.router({
12989
12906
  summary: "Handle agent run completion"
12990
12907
  }
12991
12908
  });
12992
- var webhookCheckpointsContract = c6.router({
12909
+ var webhookCheckpointsContract = c5.router({
12993
12910
  /**
12994
12911
  * POST /api/webhooks/agent/checkpoints
12995
12912
  * Create checkpoint for completed agent run
@@ -13021,7 +12938,7 @@ var webhookCheckpointsContract = c6.router({
13021
12938
  summary: "Create checkpoint for agent run"
13022
12939
  }
13023
12940
  });
13024
- var webhookHeartbeatContract = c6.router({
12941
+ var webhookHeartbeatContract = c5.router({
13025
12942
  /**
13026
12943
  * POST /api/webhooks/agent/heartbeat
13027
12944
  * Receive heartbeat signals from E2B sandbox
@@ -13044,7 +12961,7 @@ var webhookHeartbeatContract = c6.router({
13044
12961
  summary: "Receive heartbeat from sandbox"
13045
12962
  }
13046
12963
  });
13047
- var webhookStoragesContract = c6.router({
12964
+ var webhookStoragesContract = c5.router({
13048
12965
  /**
13049
12966
  * POST /api/webhooks/agent/storages
13050
12967
  * Create a new version of a storage from sandbox
@@ -13059,7 +12976,7 @@ var webhookStoragesContract = c6.router({
13059
12976
  method: "POST",
13060
12977
  path: "/api/webhooks/agent/storages",
13061
12978
  contentType: "multipart/form-data",
13062
- body: c6.type(),
12979
+ body: c5.type(),
13063
12980
  responses: {
13064
12981
  200: external_exports.object({
13065
12982
  versionId: external_exports.string(),
@@ -13075,7 +12992,7 @@ var webhookStoragesContract = c6.router({
13075
12992
  summary: "Upload storage version from sandbox"
13076
12993
  }
13077
12994
  });
13078
- var webhookStoragesIncrementalContract = c6.router({
12995
+ var webhookStoragesIncrementalContract = c5.router({
13079
12996
  /**
13080
12997
  * POST /api/webhooks/agent/storages/incremental
13081
12998
  * Create a new version using incremental upload
@@ -13092,7 +13009,7 @@ var webhookStoragesIncrementalContract = c6.router({
13092
13009
  method: "POST",
13093
13010
  path: "/api/webhooks/agent/storages/incremental",
13094
13011
  contentType: "multipart/form-data",
13095
- body: c6.type(),
13012
+ body: c5.type(),
13096
13013
  responses: {
13097
13014
  200: external_exports.object({
13098
13015
  versionId: external_exports.string(),
@@ -13132,7 +13049,7 @@ var networkLogSchema = external_exports.object({
13132
13049
  request_size: external_exports.number(),
13133
13050
  response_size: external_exports.number()
13134
13051
  });
13135
- var webhookTelemetryContract = c6.router({
13052
+ var webhookTelemetryContract = c5.router({
13136
13053
  /**
13137
13054
  * POST /api/webhooks/agent/telemetry
13138
13055
  * Receive telemetry data (system log, metrics, and network logs) from sandbox
@@ -13161,12 +13078,12 @@ var webhookTelemetryContract = c6.router({
13161
13078
  });
13162
13079
 
13163
13080
  // ../../packages/core/src/contracts/cli-auth.ts
13164
- var c7 = initContract();
13081
+ var c6 = initContract();
13165
13082
  var oauthErrorSchema = external_exports.object({
13166
13083
  error: external_exports.string(),
13167
13084
  error_description: external_exports.string()
13168
13085
  });
13169
- var cliAuthDeviceContract = c7.router({
13086
+ var cliAuthDeviceContract = c6.router({
13170
13087
  /**
13171
13088
  * POST /api/cli/auth/device
13172
13089
  * Initiate device authorization flow
@@ -13188,7 +13105,7 @@ var cliAuthDeviceContract = c7.router({
13188
13105
  summary: "Initiate device authorization flow"
13189
13106
  }
13190
13107
  });
13191
- var cliAuthTokenContract = c7.router({
13108
+ var cliAuthTokenContract = c6.router({
13192
13109
  /**
13193
13110
  * POST /api/cli/auth/token
13194
13111
  * Exchange device code for access token
@@ -13218,8 +13135,8 @@ var cliAuthTokenContract = c7.router({
13218
13135
  });
13219
13136
 
13220
13137
  // ../../packages/core/src/contracts/auth.ts
13221
- var c8 = initContract();
13222
- var authContract = c8.router({
13138
+ var c7 = initContract();
13139
+ var authContract = c7.router({
13223
13140
  /**
13224
13141
  * GET /api/auth/me
13225
13142
  * Get current user information
@@ -13241,7 +13158,7 @@ var authContract = c8.router({
13241
13158
  });
13242
13159
 
13243
13160
  // ../../packages/core/src/contracts/images.ts
13244
- var c9 = initContract();
13161
+ var c8 = initContract();
13245
13162
  var buildStatusSchema = external_exports.enum(["building", "ready", "error"]);
13246
13163
  var imageInfoSchema = external_exports.object({
13247
13164
  id: external_exports.string(),
@@ -13277,7 +13194,7 @@ var buildStatusResponseSchema = external_exports.object({
13277
13194
  logsOffset: external_exports.number(),
13278
13195
  error: external_exports.string().optional()
13279
13196
  });
13280
- var imagesMainContract = c9.router({
13197
+ var imagesMainContract = c8.router({
13281
13198
  /**
13282
13199
  * GET /api/images
13283
13200
  * List all images for authenticated user
@@ -13311,7 +13228,7 @@ var imagesMainContract = c9.router({
13311
13228
  summary: "Create image build"
13312
13229
  }
13313
13230
  });
13314
- var imagesByIdContract = c9.router({
13231
+ var imagesByIdContract = c8.router({
13315
13232
  /**
13316
13233
  * DELETE /api/images/:imageId
13317
13234
  * Delete an image by ID
@@ -13335,7 +13252,7 @@ var imagesByIdContract = c9.router({
13335
13252
  summary: "Delete image"
13336
13253
  }
13337
13254
  });
13338
- var imageBuildsContract = c9.router({
13255
+ var imageBuildsContract = c8.router({
13339
13256
  /**
13340
13257
  * GET /api/images/:imageId/builds/:buildId
13341
13258
  * Query build status with incremental logs
@@ -13362,7 +13279,7 @@ var imageBuildsContract = c9.router({
13362
13279
  });
13363
13280
 
13364
13281
  // ../../packages/core/src/contracts/cron.ts
13365
- var c10 = initContract();
13282
+ var c9 = initContract();
13366
13283
  var cleanupResultSchema = external_exports.object({
13367
13284
  runId: external_exports.string(),
13368
13285
  sandboxId: external_exports.string().nullable(),
@@ -13374,7 +13291,7 @@ var cleanupResponseSchema = external_exports.object({
13374
13291
  errors: external_exports.number(),
13375
13292
  results: external_exports.array(cleanupResultSchema)
13376
13293
  });
13377
- var cronCleanupSandboxesContract = c10.router({
13294
+ var cronCleanupSandboxesContract = c9.router({
13378
13295
  /**
13379
13296
  * GET /api/cron/cleanup-sandboxes
13380
13297
  * Cron job to cleanup sandboxes that have stopped sending heartbeats
@@ -13406,7 +13323,7 @@ var proxyErrorSchema = external_exports.object({
13406
13323
  });
13407
13324
 
13408
13325
  // ../../packages/core/src/contracts/scopes.ts
13409
- var c11 = initContract();
13326
+ var c10 = initContract();
13410
13327
  var scopeTypeSchema = external_exports.enum(["personal", "organization", "system"]);
13411
13328
  var scopeSlugSchema = external_exports.string().min(3, "Scope slug must be at least 3 characters").max(64, "Scope slug must be at most 64 characters").regex(
13412
13329
  /^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]{1,2}$/,
@@ -13431,7 +13348,7 @@ var updateScopeRequestSchema = external_exports.object({
13431
13348
  slug: scopeSlugSchema,
13432
13349
  force: external_exports.boolean().optional().default(false)
13433
13350
  });
13434
- var scopeContract = c11.router({
13351
+ var scopeContract = c10.router({
13435
13352
  /**
13436
13353
  * GET /api/scope
13437
13354
  * Get current user's scope
@@ -13705,19 +13622,6 @@ var ApiClient = class {
13705
13622
  }
13706
13623
  return await response.json();
13707
13624
  }
13708
- async getAgentSession(id) {
13709
- const baseUrl = await this.getBaseUrl();
13710
- const headers = await this.getHeaders();
13711
- const response = await fetch(`${baseUrl}/api/agent/sessions/${id}`, {
13712
- method: "GET",
13713
- headers
13714
- });
13715
- if (!response.ok) {
13716
- const error43 = await response.json();
13717
- throw new Error(error43.error?.message || "Failed to get agent session");
13718
- }
13719
- return await response.json();
13720
- }
13721
13625
  async getTelemetry(runId) {
13722
13626
  const baseUrl = await this.getBaseUrl();
13723
13627
  const headers = await this.getHeaders();
@@ -14984,9 +14888,9 @@ var CodexEventParser = class {
14984
14888
  }
14985
14889
  }
14986
14890
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
14987
- const changes = item.changes.map((c12) => {
14988
- const action = c12.kind === "add" ? "Created" : c12.kind === "modify" ? "Modified" : "Deleted";
14989
- return `${action}: ${c12.path}`;
14891
+ const changes = item.changes.map((c11) => {
14892
+ const action = c11.kind === "add" ? "Created" : c11.kind === "modify" ? "Modified" : "Deleted";
14893
+ return `${action}: ${c11.path}`;
14990
14894
  }).join("\n");
14991
14895
  return {
14992
14896
  type: "text",
@@ -15333,9 +15237,9 @@ var CodexEventRenderer = class {
15333
15237
  return;
15334
15238
  }
15335
15239
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
15336
- const summary = item.changes.map((c12) => {
15337
- const icon = c12.kind === "add" ? "+" : c12.kind === "delete" ? "-" : "~";
15338
- return `${icon}${c12.path}`;
15240
+ const summary = item.changes.map((c11) => {
15241
+ const icon = c11.kind === "add" ? "+" : c11.kind === "delete" ? "-" : "~";
15242
+ return `${icon}${c11.path}`;
15339
15243
  }).join(", ");
15340
15244
  console.log(chalk4.green("[files]") + ` ${summary}`);
15341
15245
  return;
@@ -15394,7 +15298,7 @@ function loadValues(cliValues, configNames) {
15394
15298
  const envFilePath = path5.resolve(process.cwd(), ".env");
15395
15299
  let dotenvValues = {};
15396
15300
  if (fs5.existsSync(envFilePath)) {
15397
- const dotenvResult = dotenvConfig({ path: envFilePath });
15301
+ const dotenvResult = dotenvConfig({ path: envFilePath, quiet: true });
15398
15302
  if (dotenvResult.parsed) {
15399
15303
  dotenvValues = Object.fromEntries(
15400
15304
  Object.entries(dotenvResult.parsed).filter(
@@ -16611,6 +16515,9 @@ async function checkAndUpgrade(currentVersion, prompt) {
16611
16515
  // src/commands/cook.ts
16612
16516
  var CONFIG_FILE3 = "vm0.yaml";
16613
16517
  var ARTIFACT_DIR = "artifact";
16518
+ function printCommand(cmd) {
16519
+ console.log(chalk16.dim(`> ${cmd}`));
16520
+ }
16614
16521
  function execVm0Command(args, options = {}) {
16615
16522
  return new Promise((resolve2, reject) => {
16616
16523
  const proc = spawn2("vm0", args, {
@@ -16696,7 +16603,7 @@ function extractRequiredVarNames(config2) {
16696
16603
  function checkMissingVariables(varNames, envFilePath) {
16697
16604
  let dotenvValues = {};
16698
16605
  if (existsSync6(envFilePath)) {
16699
- const result = dotenvConfig2({ path: envFilePath });
16606
+ const result = dotenvConfig2({ path: envFilePath, quiet: true });
16700
16607
  if (result.parsed) {
16701
16608
  dotenvValues = result.parsed;
16702
16609
  }
@@ -16725,7 +16632,7 @@ async function generateEnvPlaceholders(missingVars, envFilePath) {
16725
16632
  }
16726
16633
  }
16727
16634
  var cookCommand = new Command13().name("cook").description("One-click agent preparation and execution from vm0.yaml").argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
16728
- const shouldExit = await checkAndUpgrade("4.21.2", prompt);
16635
+ const shouldExit = await checkAndUpgrade("4.23.0", prompt);
16729
16636
  if (shouldExit) {
16730
16637
  process.exit(0);
16731
16638
  }
@@ -16777,78 +16684,80 @@ var cookCommand = new Command13().name("cook").description("One-click agent prep
16777
16684
  }
16778
16685
  if (config2.volumes && Object.keys(config2.volumes).length > 0) {
16779
16686
  console.log();
16780
- console.log(chalk16.blue("Processing volumes..."));
16687
+ console.log(chalk16.blue("Processing volumes:"));
16781
16688
  for (const volumeConfig of Object.values(config2.volumes)) {
16782
16689
  const volumeDir = path11.join(cwd, volumeConfig.name);
16783
- console.log(chalk16.gray(` ${volumeConfig.name}/`));
16784
16690
  if (!existsSync6(volumeDir)) {
16785
16691
  console.error(
16786
16692
  chalk16.red(
16787
- ` \u2717 Directory not found. Create the directory and add files first.`
16693
+ `\u2717 Directory not found: ${volumeConfig.name}. Create the directory and add files first.`
16788
16694
  )
16789
16695
  );
16790
16696
  process.exit(1);
16791
16697
  }
16792
16698
  try {
16699
+ printCommand(`cd ${volumeConfig.name}`);
16793
16700
  const existingConfig = await readStorageConfig(volumeDir);
16794
16701
  if (!existingConfig) {
16702
+ printCommand("vm0 volume init");
16795
16703
  await execVm0Command(["volume", "init"], {
16796
16704
  cwd: volumeDir,
16797
16705
  silent: true
16798
16706
  });
16799
- console.log(chalk16.green(` \u2713 Initialized`));
16800
16707
  }
16708
+ printCommand("vm0 volume push");
16801
16709
  await execVm0Command(["volume", "push"], {
16802
16710
  cwd: volumeDir,
16803
16711
  silent: true
16804
16712
  });
16805
- console.log(chalk16.green(` \u2713 Pushed`));
16713
+ printCommand("cd ..");
16806
16714
  } catch (error43) {
16807
- console.error(chalk16.red(` \u2717 Failed`));
16715
+ console.error(chalk16.red(`\u2717 Failed`));
16808
16716
  if (error43 instanceof Error) {
16809
- console.error(chalk16.gray(` ${error43.message}`));
16717
+ console.error(chalk16.gray(` ${error43.message}`));
16810
16718
  }
16811
16719
  process.exit(1);
16812
16720
  }
16813
16721
  }
16814
16722
  }
16815
16723
  console.log();
16816
- console.log(chalk16.blue("Processing artifact..."));
16724
+ console.log(chalk16.blue("Processing artifact:"));
16817
16725
  const artifactDir = path11.join(cwd, ARTIFACT_DIR);
16818
- console.log(chalk16.gray(` ${ARTIFACT_DIR}/`));
16819
16726
  try {
16820
16727
  if (!existsSync6(artifactDir)) {
16728
+ printCommand(`mkdir ${ARTIFACT_DIR}`);
16821
16729
  await mkdir5(artifactDir, { recursive: true });
16822
- console.log(chalk16.green(` \u2713 Created directory`));
16823
16730
  }
16731
+ printCommand(`cd ${ARTIFACT_DIR}`);
16824
16732
  const existingConfig = await readStorageConfig(artifactDir);
16825
16733
  if (!existingConfig) {
16734
+ printCommand("vm0 artifact init");
16826
16735
  await execVm0Command(["artifact", "init"], {
16827
16736
  cwd: artifactDir,
16828
16737
  silent: true
16829
16738
  });
16830
- console.log(chalk16.green(` \u2713 Initialized`));
16831
16739
  }
16740
+ printCommand("vm0 artifact push");
16832
16741
  await execVm0Command(["artifact", "push"], {
16833
16742
  cwd: artifactDir,
16834
16743
  silent: true
16835
16744
  });
16836
- console.log(chalk16.green(` \u2713 Pushed`));
16745
+ printCommand("cd ..");
16837
16746
  } catch (error43) {
16838
- console.error(chalk16.red(` \u2717 Failed`));
16747
+ console.error(chalk16.red(`\u2717 Failed`));
16839
16748
  if (error43 instanceof Error) {
16840
- console.error(chalk16.gray(` ${error43.message}`));
16749
+ console.error(chalk16.gray(` ${error43.message}`));
16841
16750
  }
16842
16751
  process.exit(1);
16843
16752
  }
16844
16753
  console.log();
16845
- console.log(chalk16.blue("Uploading compose..."));
16754
+ console.log(chalk16.blue("Composing agent:"));
16755
+ printCommand(`vm0 compose ${CONFIG_FILE3}`);
16846
16756
  try {
16847
16757
  await execVm0Command(["compose", CONFIG_FILE3], {
16848
16758
  cwd,
16849
16759
  silent: true
16850
16760
  });
16851
- console.log(chalk16.green(`\u2713 Compose uploaded: ${agentName}`));
16852
16761
  } catch (error43) {
16853
16762
  console.error(chalk16.red(`\u2717 Compose failed`));
16854
16763
  if (error43 instanceof Error) {
@@ -16858,7 +16767,10 @@ var cookCommand = new Command13().name("cook").description("One-click agent prep
16858
16767
  }
16859
16768
  if (prompt) {
16860
16769
  console.log();
16861
- console.log(chalk16.blue(`Running agent: ${agentName}`));
16770
+ console.log(chalk16.blue("Running agent:"));
16771
+ printCommand(
16772
+ `vm0 run ${agentName} --artifact-name ${ARTIFACT_DIR} "${prompt}"`
16773
+ );
16862
16774
  console.log();
16863
16775
  let runOutput;
16864
16776
  try {
@@ -16879,13 +16791,15 @@ var cookCommand = new Command13().name("cook").description("One-click agent prep
16879
16791
  );
16880
16792
  if (serverVersion) {
16881
16793
  console.log();
16882
- console.log(chalk16.blue("Pulling updated artifact..."));
16794
+ console.log(chalk16.blue("Pulling updated artifact:"));
16795
+ printCommand(`cd ${ARTIFACT_DIR}`);
16796
+ printCommand(`vm0 artifact pull ${serverVersion}`);
16883
16797
  try {
16884
16798
  await execVm0Command(["artifact", "pull", serverVersion], {
16885
16799
  cwd: artifactDir,
16886
16800
  silent: true
16887
16801
  });
16888
- console.log(chalk16.green(`\u2713 Artifact pulled (${serverVersion})`));
16802
+ printCommand("cd ..");
16889
16803
  } catch (error43) {
16890
16804
  console.error(chalk16.red(`\u2717 Artifact pull failed`));
16891
16805
  if (error43 instanceof Error) {
@@ -16895,11 +16809,9 @@ var cookCommand = new Command13().name("cook").description("One-click agent prep
16895
16809
  }
16896
16810
  } else {
16897
16811
  console.log();
16898
- console.log(" Run your agent:");
16899
- console.log(
16900
- chalk16.cyan(
16901
- ` vm0 run ${agentName} --artifact-name ${ARTIFACT_DIR} "your prompt"`
16902
- )
16812
+ console.log("To run your agent:");
16813
+ printCommand(
16814
+ `vm0 run ${agentName} --artifact-name ${ARTIFACT_DIR} "your prompt"`
16903
16815
  );
16904
16816
  }
16905
16817
  });
@@ -17663,7 +17575,7 @@ var scopeCommand = new Command22().name("scope").description("Manage your scope
17663
17575
 
17664
17576
  // src/index.ts
17665
17577
  var program = new Command23();
17666
- program.name("vm0").description("VM0 CLI - A modern build tool").version("4.21.2");
17578
+ program.name("vm0").description("VM0 CLI - A modern build tool").version("4.23.0");
17667
17579
  program.command("info").description("Display environment information").action(async () => {
17668
17580
  console.log(chalk24.cyan("System Information:"));
17669
17581
  console.log(`Node Version: ${process.version}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "4.21.2",
3
+ "version": "4.23.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",