@vm0/cli 4.25.0 → 4.26.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 +273 -216
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -88,7 +88,7 @@ function delay(ms) {
88
88
  }
89
89
  async function authenticate(apiUrl) {
90
90
  const targetApiUrl = apiUrl ?? await getApiUrl();
91
- console.log(chalk.blue("Initiating authentication..."));
91
+ console.log("Initiating authentication...");
92
92
  const deviceAuth = await requestDeviceCode(targetApiUrl);
93
93
  console.log(chalk.green("\nDevice code generated"));
94
94
  const verificationUrl = `${targetApiUrl}/cli-auth`;
@@ -99,7 +99,7 @@ To authenticate, visit: ${verificationUrl}`));
99
99
  `
100
100
  The code expires in ${Math.floor(deviceAuth.expires_in / 60)} minutes.`
101
101
  );
102
- console.log(chalk.blue("\nWaiting for authentication..."));
102
+ console.log("\nWaiting for authentication...");
103
103
  const startTime = Date.now();
104
104
  const maxWaitTime = deviceAuth.expires_in * 1e3;
105
105
  const pollInterval = (deviceAuth.interval || 5) * 1e3;
@@ -123,7 +123,7 @@ The code expires in ${Math.floor(deviceAuth.expires_in / 60)} minutes.`
123
123
  return;
124
124
  }
125
125
  if (tokenResult.error === "authorization_pending") {
126
- process.stdout.write(chalk.gray("."));
126
+ process.stdout.write(chalk.dim("."));
127
127
  continue;
128
128
  }
129
129
  if (tokenResult.error === "expired_token") {
@@ -160,7 +160,7 @@ async function checkAuthStatus() {
160
160
  console.log("Run 'vm0 auth login' to authenticate.");
161
161
  }
162
162
  if (process.env.VM0_TOKEN) {
163
- console.log(chalk.blue("Using token from VM0_TOKEN environment variable"));
163
+ console.log("Using token from VM0_TOKEN environment variable");
164
164
  }
165
165
  }
166
166
  async function setupToken() {
@@ -13886,8 +13886,8 @@ function isProviderSupported(provider) {
13886
13886
  function getDefaultImage(provider) {
13887
13887
  const defaults = PROVIDER_DEFAULTS[provider];
13888
13888
  if (!defaults) return void 0;
13889
- const isProduction = process.env.NODE_ENV === "production";
13890
- return isProduction ? defaults.image.production : defaults.image.development;
13889
+ const isDevelopment = process.env.NODE_ENV === "development" || process.env.NODE_ENV === "test";
13890
+ return isDevelopment ? defaults.image.development : defaults.image.production;
13891
13891
  }
13892
13892
 
13893
13893
  // src/lib/yaml-validator.ts
@@ -14495,7 +14495,7 @@ var composeCommand = new Command().name("compose").description("Create or update
14495
14495
  } catch (error43) {
14496
14496
  console.error(chalk2.red("\u2717 Invalid YAML format"));
14497
14497
  if (error43 instanceof Error) {
14498
- console.error(chalk2.gray(` ${error43.message}`));
14498
+ console.error(chalk2.dim(` ${error43.message}`));
14499
14499
  }
14500
14500
  process.exit(1);
14501
14501
  }
@@ -14527,14 +14527,14 @@ var composeCommand = new Command().name("compose").description("Create or update
14527
14527
  if (defaultImage) {
14528
14528
  agent.image = defaultImage;
14529
14529
  console.log(
14530
- chalk2.gray(` Auto-configured image: ${defaultImage}`)
14530
+ chalk2.dim(` Auto-configured image: ${defaultImage}`)
14531
14531
  );
14532
14532
  }
14533
14533
  }
14534
14534
  if (!agent.working_dir) {
14535
14535
  agent.working_dir = defaults.workingDir;
14536
14536
  console.log(
14537
- chalk2.gray(
14537
+ chalk2.dim(
14538
14538
  ` Auto-configured working_dir: ${defaults.workingDir}`
14539
14539
  )
14540
14540
  );
@@ -14544,7 +14544,7 @@ var composeCommand = new Command().name("compose").description("Create or update
14544
14544
  if (agent.instructions) {
14545
14545
  const instructionsPath = agent.instructions;
14546
14546
  const provider = agent.provider;
14547
- console.log(chalk2.blue(`Uploading instructions: ${instructionsPath}`));
14547
+ console.log(`Uploading instructions: ${instructionsPath}`);
14548
14548
  try {
14549
14549
  const result = await uploadInstructions(
14550
14550
  agentName,
@@ -14560,17 +14560,17 @@ var composeCommand = new Command().name("compose").description("Create or update
14560
14560
  } catch (error43) {
14561
14561
  console.error(chalk2.red(`\u2717 Failed to upload instructions`));
14562
14562
  if (error43 instanceof Error) {
14563
- console.error(chalk2.gray(` ${error43.message}`));
14563
+ console.error(chalk2.dim(` ${error43.message}`));
14564
14564
  }
14565
14565
  process.exit(1);
14566
14566
  }
14567
14567
  }
14568
14568
  if (agent.skills && Array.isArray(agent.skills)) {
14569
14569
  const skillUrls = agent.skills;
14570
- console.log(chalk2.blue(`Uploading ${skillUrls.length} skill(s)...`));
14570
+ console.log(`Uploading ${skillUrls.length} skill(s)...`);
14571
14571
  for (const skillUrl of skillUrls) {
14572
14572
  try {
14573
- console.log(chalk2.gray(` Downloading: ${skillUrl}`));
14573
+ console.log(chalk2.dim(` Downloading: ${skillUrl}`));
14574
14574
  const result = await uploadSkill(skillUrl);
14575
14575
  console.log(
14576
14576
  chalk2.green(
@@ -14580,13 +14580,13 @@ var composeCommand = new Command().name("compose").description("Create or update
14580
14580
  } catch (error43) {
14581
14581
  console.error(chalk2.red(`\u2717 Failed to upload skill: ${skillUrl}`));
14582
14582
  if (error43 instanceof Error) {
14583
- console.error(chalk2.gray(` ${error43.message}`));
14583
+ console.error(chalk2.dim(` ${error43.message}`));
14584
14584
  }
14585
14585
  process.exit(1);
14586
14586
  }
14587
14587
  }
14588
14588
  }
14589
- console.log(chalk2.blue("Uploading compose..."));
14589
+ console.log("Uploading compose...");
14590
14590
  const response = await apiClient.createOrUpdateCompose({
14591
14591
  content: config2
14592
14592
  });
@@ -14596,8 +14596,8 @@ var composeCommand = new Command().name("compose").description("Create or update
14596
14596
  } else {
14597
14597
  console.log(chalk2.green(`\u2713 Compose version exists: ${response.name}`));
14598
14598
  }
14599
- console.log(chalk2.gray(` Compose ID: ${response.composeId}`));
14600
- console.log(chalk2.gray(` Version: ${shortVersionId}`));
14599
+ console.log(chalk2.dim(` Compose ID: ${response.composeId}`));
14600
+ console.log(chalk2.dim(` Version: ${shortVersionId}`));
14601
14601
  console.log();
14602
14602
  console.log(" Run your agent:");
14603
14603
  console.log(
@@ -14611,10 +14611,10 @@ var composeCommand = new Command().name("compose").description("Create or update
14611
14611
  console.error(chalk2.red("\u2717 Not authenticated. Run: vm0 auth login"));
14612
14612
  } else if (error43.message.includes("Failed to create compose")) {
14613
14613
  console.error(chalk2.red("\u2717 Failed to create compose"));
14614
- console.error(chalk2.gray(` ${error43.message}`));
14614
+ console.error(chalk2.dim(` ${error43.message}`));
14615
14615
  } else {
14616
14616
  console.error(chalk2.red("\u2717 Failed to create compose"));
14617
- console.error(chalk2.gray(` ${error43.message}`));
14617
+ console.error(chalk2.dim(` ${error43.message}`));
14618
14618
  }
14619
14619
  } else {
14620
14620
  console.error(chalk2.red("\u2717 An unexpected error occurred"));
@@ -14958,12 +14958,12 @@ var EventRenderer = class {
14958
14958
  * Called immediately after run is created, before polling events
14959
14959
  */
14960
14960
  static renderRunStarted(info) {
14961
- console.log(chalk3.blue("\u25B6 Run started"));
14962
- console.log(` Run ID: ${chalk3.gray(info.runId)}`);
14961
+ console.log(chalk3.bold("\u25B6 Run started"));
14962
+ console.log(` Run ID: ${chalk3.dim(info.runId)}`);
14963
14963
  if (info.sandboxId) {
14964
- console.log(` Sandbox: ${chalk3.gray(info.sandboxId)}`);
14964
+ console.log(` Sandbox: ${chalk3.dim(info.sandboxId)}`);
14965
14965
  }
14966
- console.log(chalk3.gray(` (use "vm0 logs ${info.runId}" to view logs)`));
14966
+ console.log(chalk3.dim(` (use "vm0 logs ${info.runId}" to view logs)`));
14967
14967
  console.log();
14968
14968
  }
14969
14969
  /**
@@ -14996,7 +14996,7 @@ var EventRenderer = class {
14996
14996
  */
14997
14997
  static render(event, options) {
14998
14998
  const timestampPrefix = options?.showTimestamp ? `[${this.formatTimestamp(event.timestamp)}] ` : "";
14999
- const elapsedSuffix = options?.verbose && options?.previousTimestamp ? " " + chalk3.gray(
14999
+ const elapsedSuffix = options?.verbose && options?.previousTimestamp ? " " + chalk3.dim(
15000
15000
  this.formatElapsed(options.previousTimestamp, event.timestamp)
15001
15001
  ) : "";
15002
15002
  switch (event.type) {
@@ -15026,29 +15026,25 @@ var EventRenderer = class {
15026
15026
  console.log("");
15027
15027
  console.log(chalk3.green("\u2713 Run completed successfully"));
15028
15028
  if (result) {
15029
- console.log(` Checkpoint: ${chalk3.gray(result.checkpointId)}`);
15030
- console.log(` Session: ${chalk3.gray(result.agentSessionId)}`);
15031
- console.log(` Conversation: ${chalk3.gray(result.conversationId)}`);
15029
+ console.log(` Checkpoint: ${chalk3.dim(result.checkpointId)}`);
15030
+ console.log(` Session: ${chalk3.dim(result.agentSessionId)}`);
15031
+ console.log(` Conversation: ${chalk3.dim(result.conversationId)}`);
15032
15032
  if (result.artifact && Object.keys(result.artifact).length > 0) {
15033
15033
  console.log(` Artifact:`);
15034
15034
  for (const [name, version2] of Object.entries(result.artifact)) {
15035
- console.log(
15036
- ` ${name}: ${chalk3.gray(this.formatVersion(version2))}`
15037
- );
15035
+ console.log(` ${name}: ${chalk3.dim(this.formatVersion(version2))}`);
15038
15036
  }
15039
15037
  }
15040
15038
  if (result.volumes && Object.keys(result.volumes).length > 0) {
15041
15039
  console.log(` Volumes:`);
15042
15040
  for (const [name, version2] of Object.entries(result.volumes)) {
15043
- console.log(
15044
- ` ${name}: ${chalk3.gray(this.formatVersion(version2))}`
15045
- );
15041
+ console.log(` ${name}: ${chalk3.dim(this.formatVersion(version2))}`);
15046
15042
  }
15047
15043
  }
15048
15044
  }
15049
15045
  if (options?.verbose && options?.startTimestamp) {
15050
15046
  const totalTime = this.formatTotalTime(options.startTimestamp, now);
15051
- console.log(` Total time: ${chalk3.gray(totalTime)}`);
15047
+ console.log(` Total time: ${chalk3.dim(totalTime)}`);
15052
15048
  }
15053
15049
  }
15054
15050
  /**
@@ -15060,38 +15056,36 @@ var EventRenderer = class {
15060
15056
  console.log(chalk3.red("\u2717 Run failed"));
15061
15057
  console.log(` Error: ${chalk3.red(error43 || "Unknown error")}`);
15062
15058
  console.log(
15063
- chalk3.gray(` (use "vm0 logs ${runId} --system" to view system logs)`)
15059
+ chalk3.dim(` (use "vm0 logs ${runId} --system" to view system logs)`)
15064
15060
  );
15065
15061
  }
15066
15062
  static renderInit(event, prefix, suffix) {
15067
15063
  const providerStr = String(event.data.provider || "claude-code");
15068
15064
  const displayName = isSupportedProvider(providerStr) ? getProviderDisplayName(providerStr) : providerStr;
15069
- console.log(
15070
- prefix + chalk3.cyan("[init]") + suffix + ` Starting ${displayName} agent`
15071
- );
15072
- console.log(` Session: ${chalk3.gray(String(event.data.sessionId || ""))}`);
15065
+ console.log(prefix + "[init]" + suffix + ` Starting ${displayName} agent`);
15066
+ console.log(` Session: ${chalk3.dim(String(event.data.sessionId || ""))}`);
15073
15067
  if (event.data.model) {
15074
- console.log(` Model: ${chalk3.gray(String(event.data.model))}`);
15068
+ console.log(` Model: ${chalk3.dim(String(event.data.model))}`);
15075
15069
  }
15076
15070
  console.log(
15077
- ` Tools: ${chalk3.gray(
15071
+ ` Tools: ${chalk3.dim(
15078
15072
  Array.isArray(event.data.tools) ? event.data.tools.join(", ") : String(event.data.tools || "")
15079
15073
  )}`
15080
15074
  );
15081
15075
  }
15082
15076
  static renderText(event, prefix, suffix) {
15083
15077
  const text = String(event.data.text || "");
15084
- console.log(prefix + chalk3.blue("[text]") + suffix + " " + text);
15078
+ console.log(prefix + "[text]" + suffix + " " + text);
15085
15079
  }
15086
15080
  static renderToolUse(event, prefix, suffix) {
15087
15081
  const tool = String(event.data.tool || "");
15088
- console.log(prefix + chalk3.yellow("[tool_use]") + suffix + " " + tool);
15082
+ console.log(prefix + "[tool_use]" + suffix + " " + tool);
15089
15083
  const input = event.data.input;
15090
15084
  if (input && typeof input === "object") {
15091
15085
  for (const [key, value] of Object.entries(input)) {
15092
15086
  if (value !== void 0 && value !== null) {
15093
15087
  const displayValue = typeof value === "object" ? JSON.stringify(value, null, 2) : String(value);
15094
- console.log(` ${key}: ${chalk3.gray(displayValue)}`);
15088
+ console.log(` ${key}: ${chalk3.dim(displayValue)}`);
15095
15089
  }
15096
15090
  }
15097
15091
  }
@@ -15102,7 +15096,7 @@ var EventRenderer = class {
15102
15096
  const color = isError ? chalk3.red : chalk3.green;
15103
15097
  console.log(prefix + color("[tool_result]") + suffix + " " + status);
15104
15098
  const result = String(event.data.result || "");
15105
- console.log(` ${chalk3.gray(result)}`);
15099
+ console.log(` ${chalk3.dim(result)}`);
15106
15100
  }
15107
15101
  static renderResult(event, prefix, suffix) {
15108
15102
  const success2 = Boolean(event.data.success);
@@ -15111,11 +15105,11 @@ var EventRenderer = class {
15111
15105
  console.log(prefix + color("[result]") + suffix + " " + status);
15112
15106
  const durationMs = Number(event.data.durationMs || 0);
15113
15107
  const durationSec = (durationMs / 1e3).toFixed(1);
15114
- console.log(` Duration: ${chalk3.gray(durationSec + "s")}`);
15108
+ console.log(` Duration: ${chalk3.dim(durationSec + "s")}`);
15115
15109
  const cost = Number(event.data.cost || 0);
15116
- console.log(` Cost: ${chalk3.gray("$" + cost.toFixed(4))}`);
15110
+ console.log(` Cost: ${chalk3.dim("$" + cost.toFixed(4))}`);
15117
15111
  const numTurns = Number(event.data.numTurns || 0);
15118
- console.log(` Turns: ${chalk3.gray(String(numTurns))}`);
15112
+ console.log(` Turns: ${chalk3.dim(String(numTurns))}`);
15119
15113
  const usage = event.data.usage;
15120
15114
  if (usage && typeof usage === "object") {
15121
15115
  const inputTokens = Number(usage.input_tokens || 0);
@@ -15127,7 +15121,7 @@ var EventRenderer = class {
15127
15121
  return String(count);
15128
15122
  };
15129
15123
  console.log(
15130
- ` Tokens: ${chalk3.gray(
15124
+ ` Tokens: ${chalk3.dim(
15131
15125
  `input=${formatTokens(inputTokens)} output=${formatTokens(outputTokens)}`
15132
15126
  )}`
15133
15127
  );
@@ -15183,7 +15177,7 @@ var CodexEventRenderer = class {
15183
15177
  }
15184
15178
  }
15185
15179
  static renderThreadStarted(event) {
15186
- console.log(chalk4.cyan("[thread.started]") + ` ${event.thread_id}`);
15180
+ console.log(`[thread.started] ${event.thread_id}`);
15187
15181
  }
15188
15182
  static renderTurnCompleted(event) {
15189
15183
  if (event.usage) {
@@ -15192,7 +15186,7 @@ var CodexEventRenderer = class {
15192
15186
  const cached2 = event.usage.cached_input_tokens || 0;
15193
15187
  const cachedStr = cached2 ? ` (${cached2} cached)` : "";
15194
15188
  console.log(
15195
- chalk4.cyan("[turn.completed]") + chalk4.gray(` ${input} in / ${output} out${cachedStr}`)
15189
+ "[turn.completed]" + chalk4.dim(` ${input} in / ${output} out${cachedStr}`)
15196
15190
  );
15197
15191
  }
15198
15192
  }
@@ -15207,25 +15201,25 @@ var CodexEventRenderer = class {
15207
15201
  const itemType = item.type;
15208
15202
  const eventType = event.type;
15209
15203
  if (itemType === "reasoning" && item.text) {
15210
- console.log(chalk4.magenta("[reasoning]") + ` ${item.text}`);
15204
+ console.log(`[reasoning] ${item.text}`);
15211
15205
  return;
15212
15206
  }
15213
15207
  if (itemType === "agent_message" && item.text) {
15214
- console.log(chalk4.blue("[message]") + ` ${item.text}`);
15208
+ console.log(`[message] ${item.text}`);
15215
15209
  return;
15216
15210
  }
15217
15211
  if (itemType === "command_execution") {
15218
15212
  if (eventType === "item.started" && item.command) {
15219
- console.log(chalk4.yellow("[exec]") + ` ${item.command}`);
15213
+ console.log(`[exec] ${item.command}`);
15220
15214
  } else if (eventType === "item.completed") {
15221
15215
  const output = item.aggregated_output || "";
15222
15216
  const exitCode = item.exit_code ?? 0;
15223
15217
  if (output) {
15224
15218
  const lines = output.split("\n").filter((l) => l.trim());
15225
15219
  const preview = lines.slice(0, 3).join("\n ");
15226
- const more = lines.length > 3 ? chalk4.gray(` ... (${lines.length - 3} more lines)`) : "";
15220
+ const more = lines.length > 3 ? chalk4.dim(` ... (${lines.length - 3} more lines)`) : "";
15227
15221
  console.log(
15228
- chalk4.gray("[output]") + (exitCode !== 0 ? chalk4.red(` exit=${exitCode}`) : "")
15222
+ "[output]" + (exitCode !== 0 ? chalk4.red(` exit=${exitCode}`) : "")
15229
15223
  );
15230
15224
  if (preview) {
15231
15225
  console.log(" " + preview + more);
@@ -15247,7 +15241,7 @@ var CodexEventRenderer = class {
15247
15241
  if (itemType === "file_edit" || itemType === "file_write" || itemType === "file_read") {
15248
15242
  const action = itemType.replace("file_", "");
15249
15243
  if (eventType === "item.started" && item.path) {
15250
- console.log(chalk4.blue(`[${action}]`) + ` ${item.path}`);
15244
+ console.log(`[${action}] ${item.path}`);
15251
15245
  }
15252
15246
  return;
15253
15247
  }
@@ -15382,7 +15376,7 @@ async function pollEvents(runId, options) {
15382
15376
  complete = true;
15383
15377
  console.error(chalk5.red("\n\u2717 Run timed out"));
15384
15378
  console.error(
15385
- chalk5.gray(` (use "vm0 logs ${runId} --system" to view system logs)`)
15379
+ chalk5.dim(` (use "vm0 logs ${runId} --system" to view system logs)`)
15386
15380
  );
15387
15381
  result = { succeeded: false, runId };
15388
15382
  }
@@ -15393,15 +15387,15 @@ async function pollEvents(runId, options) {
15393
15387
  return result;
15394
15388
  }
15395
15389
  function logVerbosePreFlight(action, details) {
15396
- console.log(chalk5.blue(`
15397
- ${action}...`));
15390
+ console.log(`
15391
+ ${action}...`);
15398
15392
  for (const { label, value } of details) {
15399
15393
  if (value !== void 0) {
15400
- console.log(chalk5.gray(` ${label}: ${value}`));
15394
+ console.log(chalk5.dim(` ${label}: ${value}`));
15401
15395
  }
15402
15396
  }
15403
15397
  console.log();
15404
- console.log(chalk5.blue("Executing in sandbox..."));
15398
+ console.log("Executing in sandbox...");
15405
15399
  console.log();
15406
15400
  }
15407
15401
  function showNextSteps(result) {
@@ -15458,7 +15452,7 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
15458
15452
  let composeContent;
15459
15453
  if (isUUID(name)) {
15460
15454
  if (verbose) {
15461
- console.log(chalk5.gray(` Using compose ID: ${identifier}`));
15455
+ console.log(chalk5.dim(` Using compose ID: ${identifier}`));
15462
15456
  }
15463
15457
  try {
15464
15458
  const compose = await apiClient.getComposeById(name);
@@ -15472,20 +15466,20 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
15472
15466
  }
15473
15467
  } else {
15474
15468
  if (verbose) {
15475
- console.log(chalk5.gray(` Resolving agent name: ${name}`));
15469
+ console.log(chalk5.dim(` Resolving agent name: ${name}`));
15476
15470
  }
15477
15471
  try {
15478
15472
  const compose = await apiClient.getComposeByName(name);
15479
15473
  composeId = compose.id;
15480
15474
  composeContent = compose.content;
15481
15475
  if (verbose) {
15482
- console.log(chalk5.gray(` Resolved to compose ID: ${composeId}`));
15476
+ console.log(chalk5.dim(` Resolved to compose ID: ${composeId}`));
15483
15477
  }
15484
15478
  } catch (error43) {
15485
15479
  if (error43 instanceof Error) {
15486
15480
  console.error(chalk5.red(`\u2717 Agent not found: ${name}`));
15487
15481
  console.error(
15488
- chalk5.gray(
15482
+ chalk5.dim(
15489
15483
  " Make sure you've composed the agent with: vm0 compose"
15490
15484
  )
15491
15485
  );
@@ -15496,7 +15490,7 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
15496
15490
  let agentComposeVersionId;
15497
15491
  if (version2 && version2 !== "latest") {
15498
15492
  if (verbose) {
15499
- console.log(chalk5.gray(` Resolving version: ${version2}`));
15493
+ console.log(chalk5.dim(` Resolving version: ${version2}`));
15500
15494
  }
15501
15495
  try {
15502
15496
  const versionInfo = await apiClient.getComposeVersion(
@@ -15506,7 +15500,7 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
15506
15500
  agentComposeVersionId = versionInfo.versionId;
15507
15501
  if (verbose) {
15508
15502
  console.log(
15509
- chalk5.gray(
15503
+ chalk5.dim(
15510
15504
  ` Resolved to version ID: ${agentComposeVersionId.slice(0, 8)}...`
15511
15505
  )
15512
15506
  );
@@ -15515,7 +15509,7 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
15515
15509
  if (error43 instanceof Error) {
15516
15510
  console.error(chalk5.red(`\u2717 Version not found: ${version2}`));
15517
15511
  console.error(
15518
- chalk5.gray(" Make sure the version hash is correct.")
15512
+ chalk5.dim(" Make sure the version hash is correct.")
15519
15513
  );
15520
15514
  }
15521
15515
  process.exit(1);
@@ -15526,22 +15520,20 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
15526
15520
  const secretNames = extractSecretNames(composeContent);
15527
15521
  const secrets = loadValues(options.secrets, secretNames);
15528
15522
  if (verbose && varNames.length > 0) {
15529
- console.log(chalk5.gray(` Required vars: ${varNames.join(", ")}`));
15523
+ console.log(chalk5.dim(` Required vars: ${varNames.join(", ")}`));
15530
15524
  if (vars) {
15531
15525
  console.log(
15532
- chalk5.gray(` Loaded vars: ${Object.keys(vars).join(", ")}`)
15526
+ chalk5.dim(` Loaded vars: ${Object.keys(vars).join(", ")}`)
15533
15527
  );
15534
15528
  }
15535
15529
  }
15536
15530
  if (verbose && secretNames.length > 0) {
15537
15531
  console.log(
15538
- chalk5.gray(` Required secrets: ${secretNames.join(", ")}`)
15532
+ chalk5.dim(` Required secrets: ${secretNames.join(", ")}`)
15539
15533
  );
15540
15534
  if (secrets) {
15541
15535
  console.log(
15542
- chalk5.gray(
15543
- ` Loaded secrets: ${Object.keys(secrets).join(", ")}`
15544
- )
15536
+ chalk5.dim(` Loaded secrets: ${Object.keys(secrets).join(", ")}`)
15545
15537
  );
15546
15538
  }
15547
15539
  }
@@ -15580,7 +15572,7 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
15580
15572
  if (response.status === "failed") {
15581
15573
  console.error(chalk5.red("\u2717 Run preparation failed"));
15582
15574
  if (response.error) {
15583
- console.error(chalk5.gray(` ${response.error}`));
15575
+ console.error(chalk5.dim(` ${response.error}`));
15584
15576
  }
15585
15577
  process.exit(1);
15586
15578
  }
@@ -15605,13 +15597,13 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
15605
15597
  } else if (error43.message.includes("not found")) {
15606
15598
  console.error(chalk5.red(`\u2717 Agent not found: ${identifier}`));
15607
15599
  console.error(
15608
- chalk5.gray(
15600
+ chalk5.dim(
15609
15601
  " Make sure you've composed the agent with: vm0 compose"
15610
15602
  )
15611
15603
  );
15612
15604
  } else {
15613
15605
  console.error(chalk5.red("\u2717 Run failed"));
15614
- console.error(chalk5.gray(` ${error43.message}`));
15606
+ console.error(chalk5.dim(` ${error43.message}`));
15615
15607
  }
15616
15608
  } else {
15617
15609
  console.error(chalk5.red("\u2717 An unexpected error occurred"));
@@ -15635,7 +15627,7 @@ runCmd.command("resume").description("Resume an agent run from a checkpoint (use
15635
15627
  console.error(
15636
15628
  chalk5.red(`\u2717 Invalid checkpoint ID format: ${checkpointId}`)
15637
15629
  );
15638
- console.error(chalk5.gray(" Checkpoint ID must be a valid UUID"));
15630
+ console.error(chalk5.dim(" Checkpoint ID must be a valid UUID"));
15639
15631
  process.exit(1);
15640
15632
  }
15641
15633
  if (verbose) {
@@ -15656,7 +15648,7 @@ runCmd.command("resume").description("Resume an agent run from a checkpoint (use
15656
15648
  if (response.status === "failed") {
15657
15649
  console.error(chalk5.red("\u2717 Run preparation failed"));
15658
15650
  if (response.error) {
15659
- console.error(chalk5.gray(` ${response.error}`));
15651
+ console.error(chalk5.dim(` ${response.error}`));
15660
15652
  }
15661
15653
  process.exit(1);
15662
15654
  }
@@ -15682,7 +15674,7 @@ runCmd.command("resume").description("Resume an agent run from a checkpoint (use
15682
15674
  console.error(chalk5.red(`\u2717 Checkpoint not found: ${checkpointId}`));
15683
15675
  } else {
15684
15676
  console.error(chalk5.red("\u2717 Resume failed"));
15685
- console.error(chalk5.gray(` ${error43.message}`));
15677
+ console.error(chalk5.dim(` ${error43.message}`));
15686
15678
  }
15687
15679
  } else {
15688
15680
  console.error(chalk5.red("\u2717 An unexpected error occurred"));
@@ -15708,7 +15700,7 @@ runCmd.command("continue").description(
15708
15700
  console.error(
15709
15701
  chalk5.red(`\u2717 Invalid agent session ID format: ${agentSessionId}`)
15710
15702
  );
15711
- console.error(chalk5.gray(" Agent session ID must be a valid UUID"));
15703
+ console.error(chalk5.dim(" Agent session ID must be a valid UUID"));
15712
15704
  process.exit(1);
15713
15705
  }
15714
15706
  if (verbose) {
@@ -15730,7 +15722,7 @@ runCmd.command("continue").description(
15730
15722
  if (response.status === "failed") {
15731
15723
  console.error(chalk5.red("\u2717 Run preparation failed"));
15732
15724
  if (response.error) {
15733
- console.error(chalk5.gray(` ${response.error}`));
15725
+ console.error(chalk5.dim(` ${response.error}`));
15734
15726
  }
15735
15727
  process.exit(1);
15736
15728
  }
@@ -15758,7 +15750,7 @@ runCmd.command("continue").description(
15758
15750
  );
15759
15751
  } else {
15760
15752
  console.error(chalk5.red("\u2717 Continue failed"));
15761
- console.error(chalk5.gray(` ${error43.message}`));
15753
+ console.error(chalk5.dim(` ${error43.message}`));
15762
15754
  }
15763
15755
  } else {
15764
15756
  console.error(chalk5.red("\u2717 An unexpected error occurred"));
@@ -15835,7 +15827,7 @@ var initCommand = new Command3().name("init").description("Initialize a volume i
15835
15827
  chalk6.yellow(`Volume already initialized: ${existingConfig.name}`)
15836
15828
  );
15837
15829
  console.log(
15838
- chalk6.gray(`Config file: ${path7.join(cwd, ".vm0", "storage.yaml")}`)
15830
+ chalk6.dim(`Config file: ${path7.join(cwd, ".vm0", "storage.yaml")}`)
15839
15831
  );
15840
15832
  return;
15841
15833
  }
@@ -15843,26 +15835,26 @@ var initCommand = new Command3().name("init").description("Initialize a volume i
15843
15835
  if (!isValidStorageName(volumeName)) {
15844
15836
  console.error(chalk6.red(`\u2717 Invalid volume name: "${dirName}"`));
15845
15837
  console.error(
15846
- chalk6.gray(
15838
+ chalk6.dim(
15847
15839
  " Volume names must be 3-64 characters, lowercase alphanumeric with hyphens"
15848
15840
  )
15849
15841
  );
15850
15842
  console.error(
15851
- chalk6.gray(" Example: my-dataset, user-data-v2, training-set-2024")
15843
+ chalk6.dim(" Example: my-dataset, user-data-v2, training-set-2024")
15852
15844
  );
15853
15845
  process.exit(1);
15854
15846
  }
15855
15847
  await writeStorageConfig(volumeName, cwd);
15856
15848
  console.log(chalk6.green(`\u2713 Initialized volume: ${volumeName}`));
15857
15849
  console.log(
15858
- chalk6.gray(
15850
+ chalk6.dim(
15859
15851
  `\u2713 Config saved to ${path7.join(cwd, ".vm0", "storage.yaml")}`
15860
15852
  )
15861
15853
  );
15862
15854
  } catch (error43) {
15863
15855
  console.error(chalk6.red("\u2717 Failed to initialize volume"));
15864
15856
  if (error43 instanceof Error) {
15865
- console.error(chalk6.gray(` ${error43.message}`));
15857
+ console.error(chalk6.dim(` ${error43.message}`));
15866
15858
  }
15867
15859
  process.exit(1);
15868
15860
  }
@@ -15887,13 +15879,13 @@ var pushCommand = new Command4().name("push").description("Push local files to c
15887
15879
  const config2 = await readStorageConfig(cwd);
15888
15880
  if (!config2) {
15889
15881
  console.error(chalk7.red("\u2717 No volume initialized in this directory"));
15890
- console.error(chalk7.gray(" Run: vm0 volume init"));
15882
+ console.error(chalk7.dim(" Run: vm0 volume init"));
15891
15883
  process.exit(1);
15892
15884
  }
15893
- console.log(chalk7.cyan(`Pushing volume: ${config2.name}`));
15885
+ console.log(`Pushing volume: ${config2.name}`);
15894
15886
  const result = await directUpload(config2.name, "volume", cwd, {
15895
15887
  onProgress: (message) => {
15896
- console.log(chalk7.gray(message));
15888
+ console.log(chalk7.dim(message));
15897
15889
  },
15898
15890
  force: options.force
15899
15891
  });
@@ -15905,13 +15897,13 @@ var pushCommand = new Command4().name("push").description("Push local files to c
15905
15897
  } else {
15906
15898
  console.log(chalk7.green("\u2713 Upload complete"));
15907
15899
  }
15908
- console.log(chalk7.gray(` Version: ${shortVersion}`));
15909
- console.log(chalk7.gray(` Files: ${result.fileCount.toLocaleString()}`));
15910
- console.log(chalk7.gray(` Size: ${formatBytes(result.size)}`));
15900
+ console.log(chalk7.dim(` Version: ${shortVersion}`));
15901
+ console.log(chalk7.dim(` Files: ${result.fileCount.toLocaleString()}`));
15902
+ console.log(chalk7.dim(` Size: ${formatBytes(result.size)}`));
15911
15903
  } catch (error43) {
15912
15904
  console.error(chalk7.red("\u2717 Push failed"));
15913
15905
  if (error43 instanceof Error) {
15914
- console.error(chalk7.gray(` ${error43.message}`));
15906
+ console.error(chalk7.dim(` ${error43.message}`));
15915
15907
  }
15916
15908
  process.exit(1);
15917
15909
  }
@@ -15928,7 +15920,7 @@ import * as tar3 from "tar";
15928
15920
  // src/lib/pull-utils.ts
15929
15921
  import chalk8 from "chalk";
15930
15922
  async function handleEmptyStorageResponse(cwd) {
15931
- console.log(chalk8.gray("Syncing local files..."));
15923
+ console.log(chalk8.dim("Syncing local files..."));
15932
15924
  const removedCount = await removeExtraFiles(cwd, /* @__PURE__ */ new Set());
15933
15925
  if (removedCount > 0) {
15934
15926
  console.log(chalk8.green(`\u2713 Removed ${removedCount} files not in remote`));
@@ -15951,17 +15943,15 @@ var pullCommand = new Command5().name("pull").description("Pull cloud files to l
15951
15943
  const config2 = await readStorageConfig(cwd);
15952
15944
  if (!config2) {
15953
15945
  console.error(chalk9.red("\u2717 No volume initialized in this directory"));
15954
- console.error(chalk9.gray(" Run: vm0 volume init"));
15946
+ console.error(chalk9.dim(" Run: vm0 volume init"));
15955
15947
  process.exit(1);
15956
15948
  }
15957
15949
  if (versionId) {
15958
- console.log(
15959
- chalk9.cyan(`Pulling volume: ${config2.name} (version: ${versionId})`)
15960
- );
15950
+ console.log(`Pulling volume: ${config2.name} (version: ${versionId})`);
15961
15951
  } else {
15962
- console.log(chalk9.cyan(`Pulling volume: ${config2.name}`));
15952
+ console.log(`Pulling volume: ${config2.name}`);
15963
15953
  }
15964
- console.log(chalk9.gray("Getting download URL..."));
15954
+ console.log(chalk9.dim("Getting download URL..."));
15965
15955
  let url2 = `/api/storages/download?name=${encodeURIComponent(config2.name)}&type=volume`;
15966
15956
  if (versionId) {
15967
15957
  url2 += `&version=${encodeURIComponent(versionId)}`;
@@ -15971,12 +15961,12 @@ var pullCommand = new Command5().name("pull").description("Pull cloud files to l
15971
15961
  if (response.status === 404) {
15972
15962
  console.error(chalk9.red(`\u2717 Volume "${config2.name}" not found`));
15973
15963
  console.error(
15974
- chalk9.gray(
15964
+ chalk9.dim(
15975
15965
  " Make sure the volume name is correct in .vm0/storage.yaml"
15976
15966
  )
15977
15967
  );
15978
15968
  console.error(
15979
- chalk9.gray(" Or push the volume first with: vm0 volume push")
15969
+ chalk9.dim(" Or push the volume first with: vm0 volume push")
15980
15970
  );
15981
15971
  } else {
15982
15972
  const error43 = await response.json();
@@ -15992,7 +15982,7 @@ var pullCommand = new Command5().name("pull").description("Pull cloud files to l
15992
15982
  if (!downloadInfo.url) {
15993
15983
  throw new Error("No download URL returned");
15994
15984
  }
15995
- console.log(chalk9.gray("Downloading from S3..."));
15985
+ console.log(chalk9.dim("Downloading from S3..."));
15996
15986
  const s3Response = await fetch(downloadInfo.url);
15997
15987
  if (!s3Response.ok) {
15998
15988
  throw new Error(`S3 download failed: ${s3Response.status}`);
@@ -16003,7 +15993,7 @@ var pullCommand = new Command5().name("pull").description("Pull cloud files to l
16003
15993
  const tmpDir = fs6.mkdtempSync(path8.join(os4.tmpdir(), "vm0-"));
16004
15994
  const tarPath = path8.join(tmpDir, "volume.tar.gz");
16005
15995
  await fs6.promises.writeFile(tarPath, tarBuffer);
16006
- console.log(chalk9.gray("Syncing local files..."));
15996
+ console.log(chalk9.dim("Syncing local files..."));
16007
15997
  const remoteFiles = await listTarFiles(tarPath);
16008
15998
  const remoteFilesSet = new Set(
16009
15999
  remoteFiles.map((f) => f.replace(/\\/g, "/"))
@@ -16014,7 +16004,7 @@ var pullCommand = new Command5().name("pull").description("Pull cloud files to l
16014
16004
  chalk9.green(`\u2713 Removed ${removedCount} files not in remote`)
16015
16005
  );
16016
16006
  }
16017
- console.log(chalk9.gray("Extracting files..."));
16007
+ console.log(chalk9.dim("Extracting files..."));
16018
16008
  await tar3.extract({
16019
16009
  file: tarPath,
16020
16010
  cwd,
@@ -16026,7 +16016,7 @@ var pullCommand = new Command5().name("pull").description("Pull cloud files to l
16026
16016
  } catch (error43) {
16027
16017
  console.error(chalk9.red("\u2717 Pull failed"));
16028
16018
  if (error43 instanceof Error) {
16029
- console.error(chalk9.gray(` ${error43.message}`));
16019
+ console.error(chalk9.dim(` ${error43.message}`));
16030
16020
  }
16031
16021
  process.exit(1);
16032
16022
  }
@@ -16048,7 +16038,7 @@ var statusCommand = new Command6().name("status").description("Show status of cl
16048
16038
  const config2 = await readStorageConfig(cwd);
16049
16039
  if (!config2) {
16050
16040
  console.error(chalk10.red("\u2717 No volume initialized in this directory"));
16051
- console.error(chalk10.gray(" Run: vm0 volume init"));
16041
+ console.error(chalk10.dim(" Run: vm0 volume init"));
16052
16042
  process.exit(1);
16053
16043
  }
16054
16044
  if (config2.type !== "volume") {
@@ -16057,16 +16047,16 @@ var statusCommand = new Command6().name("status").description("Show status of cl
16057
16047
  "\u2717 This directory is initialized as an artifact, not a volume"
16058
16048
  )
16059
16049
  );
16060
- console.error(chalk10.gray(" Use: vm0 artifact status"));
16050
+ console.error(chalk10.dim(" Use: vm0 artifact status"));
16061
16051
  process.exit(1);
16062
16052
  }
16063
- console.log(chalk10.cyan(`Checking volume: ${config2.name}`));
16053
+ console.log(`Checking volume: ${config2.name}`);
16064
16054
  const url2 = `/api/storages/download?name=${encodeURIComponent(config2.name)}&type=volume`;
16065
16055
  const response = await apiClient.get(url2);
16066
16056
  if (!response.ok) {
16067
16057
  if (response.status === 404) {
16068
16058
  console.error(chalk10.red("\u2717 Not found on remote"));
16069
- console.error(chalk10.gray(" Run: vm0 volume push"));
16059
+ console.error(chalk10.dim(" Run: vm0 volume push"));
16070
16060
  } else {
16071
16061
  const error43 = await response.json();
16072
16062
  throw new Error(error43.error?.message || "Status check failed");
@@ -16077,17 +16067,17 @@ var statusCommand = new Command6().name("status").description("Show status of cl
16077
16067
  const shortVersion = info.versionId.slice(0, 8);
16078
16068
  if (info.empty) {
16079
16069
  console.log(chalk10.green("\u2713 Found (empty)"));
16080
- console.log(chalk10.gray(` Version: ${shortVersion}`));
16070
+ console.log(chalk10.dim(` Version: ${shortVersion}`));
16081
16071
  } else {
16082
16072
  console.log(chalk10.green("\u2713 Found"));
16083
- console.log(chalk10.gray(` Version: ${shortVersion}`));
16084
- console.log(chalk10.gray(` Files: ${info.fileCount.toLocaleString()}`));
16085
- console.log(chalk10.gray(` Size: ${formatBytes3(info.size)}`));
16073
+ console.log(chalk10.dim(` Version: ${shortVersion}`));
16074
+ console.log(chalk10.dim(` Files: ${info.fileCount.toLocaleString()}`));
16075
+ console.log(chalk10.dim(` Size: ${formatBytes3(info.size)}`));
16086
16076
  }
16087
16077
  } catch (error43) {
16088
16078
  console.error(chalk10.red("\u2717 Status check failed"));
16089
16079
  if (error43 instanceof Error) {
16090
- console.error(chalk10.gray(` ${error43.message}`));
16080
+ console.error(chalk10.dim(` ${error43.message}`));
16091
16081
  }
16092
16082
  process.exit(1);
16093
16083
  }
@@ -16122,13 +16112,13 @@ var initCommand2 = new Command8().name("init").description("Initialize an artifa
16122
16112
  )
16123
16113
  );
16124
16114
  console.log(
16125
- chalk11.gray(
16115
+ chalk11.dim(
16126
16116
  " To change type, delete .vm0/storage.yaml and reinitialize"
16127
16117
  )
16128
16118
  );
16129
16119
  }
16130
16120
  console.log(
16131
- chalk11.gray(`Config file: ${path9.join(cwd, ".vm0", "storage.yaml")}`)
16121
+ chalk11.dim(`Config file: ${path9.join(cwd, ".vm0", "storage.yaml")}`)
16132
16122
  );
16133
16123
  return;
16134
16124
  }
@@ -16136,26 +16126,26 @@ var initCommand2 = new Command8().name("init").description("Initialize an artifa
16136
16126
  if (!isValidStorageName(artifactName)) {
16137
16127
  console.error(chalk11.red(`\u2717 Invalid artifact name: "${dirName}"`));
16138
16128
  console.error(
16139
- chalk11.gray(
16129
+ chalk11.dim(
16140
16130
  " Artifact names must be 3-64 characters, lowercase alphanumeric with hyphens"
16141
16131
  )
16142
16132
  );
16143
16133
  console.error(
16144
- chalk11.gray(" Example: my-project, user-workspace, code-artifact")
16134
+ chalk11.dim(" Example: my-project, user-workspace, code-artifact")
16145
16135
  );
16146
16136
  process.exit(1);
16147
16137
  }
16148
16138
  await writeStorageConfig(artifactName, cwd, "artifact");
16149
16139
  console.log(chalk11.green(`\u2713 Initialized artifact: ${artifactName}`));
16150
16140
  console.log(
16151
- chalk11.gray(
16141
+ chalk11.dim(
16152
16142
  `\u2713 Config saved to ${path9.join(cwd, ".vm0", "storage.yaml")}`
16153
16143
  )
16154
16144
  );
16155
16145
  } catch (error43) {
16156
16146
  console.error(chalk11.red("\u2717 Failed to initialize artifact"));
16157
16147
  if (error43 instanceof Error) {
16158
- console.error(chalk11.gray(` ${error43.message}`));
16148
+ console.error(chalk11.dim(` ${error43.message}`));
16159
16149
  }
16160
16150
  process.exit(1);
16161
16151
  }
@@ -16180,7 +16170,7 @@ var pushCommand2 = new Command9().name("push").description("Push local files to
16180
16170
  const config2 = await readStorageConfig(cwd);
16181
16171
  if (!config2) {
16182
16172
  console.error(chalk12.red("\u2717 No artifact initialized in this directory"));
16183
- console.error(chalk12.gray(" Run: vm0 artifact init"));
16173
+ console.error(chalk12.dim(" Run: vm0 artifact init"));
16184
16174
  process.exit(1);
16185
16175
  }
16186
16176
  if (config2.type !== "artifact") {
@@ -16189,13 +16179,13 @@ var pushCommand2 = new Command9().name("push").description("Push local files to
16189
16179
  `\u2717 This directory is initialized as a volume, not an artifact`
16190
16180
  )
16191
16181
  );
16192
- console.error(chalk12.gray(" Use: vm0 volume push"));
16182
+ console.error(chalk12.dim(" Use: vm0 volume push"));
16193
16183
  process.exit(1);
16194
16184
  }
16195
- console.log(chalk12.cyan(`Pushing artifact: ${config2.name}`));
16185
+ console.log(`Pushing artifact: ${config2.name}`);
16196
16186
  const result = await directUpload(config2.name, "artifact", cwd, {
16197
16187
  onProgress: (message) => {
16198
- console.log(chalk12.gray(message));
16188
+ console.log(chalk12.dim(message));
16199
16189
  },
16200
16190
  force: options.force
16201
16191
  });
@@ -16207,13 +16197,13 @@ var pushCommand2 = new Command9().name("push").description("Push local files to
16207
16197
  } else {
16208
16198
  console.log(chalk12.green("\u2713 Upload complete"));
16209
16199
  }
16210
- console.log(chalk12.gray(` Version: ${shortVersion}`));
16211
- console.log(chalk12.gray(` Files: ${result.fileCount.toLocaleString()}`));
16212
- console.log(chalk12.gray(` Size: ${formatBytes4(result.size)}`));
16200
+ console.log(chalk12.dim(` Version: ${shortVersion}`));
16201
+ console.log(chalk12.dim(` Files: ${result.fileCount.toLocaleString()}`));
16202
+ console.log(chalk12.dim(` Size: ${formatBytes4(result.size)}`));
16213
16203
  } catch (error43) {
16214
16204
  console.error(chalk12.red("\u2717 Push failed"));
16215
16205
  if (error43 instanceof Error) {
16216
- console.error(chalk12.gray(` ${error43.message}`));
16206
+ console.error(chalk12.dim(` ${error43.message}`));
16217
16207
  }
16218
16208
  process.exit(1);
16219
16209
  }
@@ -16239,7 +16229,7 @@ var pullCommand2 = new Command10().name("pull").description("Pull cloud artifact
16239
16229
  const config2 = await readStorageConfig(cwd);
16240
16230
  if (!config2) {
16241
16231
  console.error(chalk13.red("\u2717 No artifact initialized in this directory"));
16242
- console.error(chalk13.gray(" Run: vm0 artifact init"));
16232
+ console.error(chalk13.dim(" Run: vm0 artifact init"));
16243
16233
  process.exit(1);
16244
16234
  }
16245
16235
  if (config2.type !== "artifact") {
@@ -16248,19 +16238,15 @@ var pullCommand2 = new Command10().name("pull").description("Pull cloud artifact
16248
16238
  `\u2717 This directory is initialized as a volume, not an artifact`
16249
16239
  )
16250
16240
  );
16251
- console.error(chalk13.gray(" Use: vm0 volume pull"));
16241
+ console.error(chalk13.dim(" Use: vm0 volume pull"));
16252
16242
  process.exit(1);
16253
16243
  }
16254
16244
  if (versionId) {
16255
- console.log(
16256
- chalk13.cyan(
16257
- `Pulling artifact: ${config2.name} (version: ${versionId})`
16258
- )
16259
- );
16245
+ console.log(`Pulling artifact: ${config2.name} (version: ${versionId})`);
16260
16246
  } else {
16261
- console.log(chalk13.cyan(`Pulling artifact: ${config2.name}`));
16247
+ console.log(`Pulling artifact: ${config2.name}`);
16262
16248
  }
16263
- console.log(chalk13.gray("Getting download URL..."));
16249
+ console.log(chalk13.dim("Getting download URL..."));
16264
16250
  let url2 = `/api/storages/download?name=${encodeURIComponent(config2.name)}&type=artifact`;
16265
16251
  if (versionId) {
16266
16252
  url2 += `&version=${encodeURIComponent(versionId)}`;
@@ -16270,12 +16256,12 @@ var pullCommand2 = new Command10().name("pull").description("Pull cloud artifact
16270
16256
  if (response.status === 404) {
16271
16257
  console.error(chalk13.red(`\u2717 Artifact "${config2.name}" not found`));
16272
16258
  console.error(
16273
- chalk13.gray(
16259
+ chalk13.dim(
16274
16260
  " Make sure the artifact name is correct in .vm0/storage.yaml"
16275
16261
  )
16276
16262
  );
16277
16263
  console.error(
16278
- chalk13.gray(" Or push the artifact first with: vm0 artifact push")
16264
+ chalk13.dim(" Or push the artifact first with: vm0 artifact push")
16279
16265
  );
16280
16266
  } else {
16281
16267
  const error43 = await response.json();
@@ -16291,7 +16277,7 @@ var pullCommand2 = new Command10().name("pull").description("Pull cloud artifact
16291
16277
  if (!downloadInfo.url) {
16292
16278
  throw new Error("No download URL returned");
16293
16279
  }
16294
- console.log(chalk13.gray("Downloading from S3..."));
16280
+ console.log(chalk13.dim("Downloading from S3..."));
16295
16281
  const s3Response = await fetch(downloadInfo.url);
16296
16282
  if (!s3Response.ok) {
16297
16283
  throw new Error(`S3 download failed: ${s3Response.status}`);
@@ -16302,7 +16288,7 @@ var pullCommand2 = new Command10().name("pull").description("Pull cloud artifact
16302
16288
  const tmpDir = fs7.mkdtempSync(path10.join(os5.tmpdir(), "vm0-"));
16303
16289
  const tarPath = path10.join(tmpDir, "artifact.tar.gz");
16304
16290
  await fs7.promises.writeFile(tarPath, tarBuffer);
16305
- console.log(chalk13.gray("Syncing local files..."));
16291
+ console.log(chalk13.dim("Syncing local files..."));
16306
16292
  const remoteFiles = await listTarFiles(tarPath);
16307
16293
  const remoteFilesSet = new Set(
16308
16294
  remoteFiles.map((f) => f.replace(/\\/g, "/"))
@@ -16313,7 +16299,7 @@ var pullCommand2 = new Command10().name("pull").description("Pull cloud artifact
16313
16299
  chalk13.green(`\u2713 Removed ${removedCount} files not in remote`)
16314
16300
  );
16315
16301
  }
16316
- console.log(chalk13.gray("Extracting files..."));
16302
+ console.log(chalk13.dim("Extracting files..."));
16317
16303
  await tar4.extract({
16318
16304
  file: tarPath,
16319
16305
  cwd,
@@ -16325,7 +16311,7 @@ var pullCommand2 = new Command10().name("pull").description("Pull cloud artifact
16325
16311
  } catch (error43) {
16326
16312
  console.error(chalk13.red("\u2717 Pull failed"));
16327
16313
  if (error43 instanceof Error) {
16328
- console.error(chalk13.gray(` ${error43.message}`));
16314
+ console.error(chalk13.dim(` ${error43.message}`));
16329
16315
  }
16330
16316
  process.exit(1);
16331
16317
  }
@@ -16347,7 +16333,7 @@ var statusCommand2 = new Command11().name("status").description("Show status of
16347
16333
  const config2 = await readStorageConfig(cwd);
16348
16334
  if (!config2) {
16349
16335
  console.error(chalk14.red("\u2717 No artifact initialized in this directory"));
16350
- console.error(chalk14.gray(" Run: vm0 artifact init"));
16336
+ console.error(chalk14.dim(" Run: vm0 artifact init"));
16351
16337
  process.exit(1);
16352
16338
  }
16353
16339
  if (config2.type !== "artifact") {
@@ -16356,16 +16342,16 @@ var statusCommand2 = new Command11().name("status").description("Show status of
16356
16342
  "\u2717 This directory is initialized as a volume, not an artifact"
16357
16343
  )
16358
16344
  );
16359
- console.error(chalk14.gray(" Use: vm0 volume status"));
16345
+ console.error(chalk14.dim(" Use: vm0 volume status"));
16360
16346
  process.exit(1);
16361
16347
  }
16362
- console.log(chalk14.cyan(`Checking artifact: ${config2.name}`));
16348
+ console.log(`Checking artifact: ${config2.name}`);
16363
16349
  const url2 = `/api/storages/download?name=${encodeURIComponent(config2.name)}&type=artifact`;
16364
16350
  const response = await apiClient.get(url2);
16365
16351
  if (!response.ok) {
16366
16352
  if (response.status === 404) {
16367
16353
  console.error(chalk14.red("\u2717 Not found on remote"));
16368
- console.error(chalk14.gray(" Run: vm0 artifact push"));
16354
+ console.error(chalk14.dim(" Run: vm0 artifact push"));
16369
16355
  } else {
16370
16356
  const error43 = await response.json();
16371
16357
  throw new Error(error43.error?.message || "Status check failed");
@@ -16376,17 +16362,17 @@ var statusCommand2 = new Command11().name("status").description("Show status of
16376
16362
  const shortVersion = info.versionId.slice(0, 8);
16377
16363
  if (info.empty) {
16378
16364
  console.log(chalk14.green("\u2713 Found (empty)"));
16379
- console.log(chalk14.gray(` Version: ${shortVersion}`));
16365
+ console.log(chalk14.dim(` Version: ${shortVersion}`));
16380
16366
  } else {
16381
16367
  console.log(chalk14.green("\u2713 Found"));
16382
- console.log(chalk14.gray(` Version: ${shortVersion}`));
16383
- console.log(chalk14.gray(` Files: ${info.fileCount.toLocaleString()}`));
16384
- console.log(chalk14.gray(` Size: ${formatBytes6(info.size)}`));
16368
+ console.log(chalk14.dim(` Version: ${shortVersion}`));
16369
+ console.log(chalk14.dim(` Files: ${info.fileCount.toLocaleString()}`));
16370
+ console.log(chalk14.dim(` Size: ${formatBytes6(info.size)}`));
16385
16371
  }
16386
16372
  } catch (error43) {
16387
16373
  console.error(chalk14.red("\u2717 Status check failed"));
16388
16374
  if (error43 instanceof Error) {
16389
- console.error(chalk14.gray(` ${error43.message}`));
16375
+ console.error(chalk14.dim(` ${error43.message}`));
16390
16376
  }
16391
16377
  process.exit(1);
16392
16378
  }
@@ -16505,7 +16491,7 @@ async function checkAndUpgrade(currentVersion, prompt) {
16505
16491
  console.log();
16506
16492
  console.log(chalk15.red("Upgrade failed. Please run manually:"));
16507
16493
  console.log(chalk15.cyan(` npm install -g ${PACKAGE_NAME}@latest`));
16508
- console.log(chalk15.gray(" # or"));
16494
+ console.log(chalk15.dim(" # or"));
16509
16495
  console.log(chalk15.cyan(` pnpm add -g ${PACKAGE_NAME}@latest`));
16510
16496
  console.log();
16511
16497
  console.log("Then re-run:");
@@ -16520,22 +16506,62 @@ import { readFile as readFile5, writeFile as writeFile5, mkdir as mkdir5 } from
16520
16506
  import { existsSync as existsSync6 } from "fs";
16521
16507
  var CONFIG_DIR3 = join6(homedir2(), ".vm0");
16522
16508
  var COOK_STATE_FILE = join6(CONFIG_DIR3, "cook.json");
16523
- async function loadCookState() {
16509
+ var STALE_THRESHOLD_MS = 48 * 60 * 60 * 1e3;
16510
+ async function loadCookStateFile() {
16524
16511
  if (!existsSync6(COOK_STATE_FILE)) {
16525
- return {};
16512
+ return { ppid: {} };
16526
16513
  }
16527
16514
  try {
16528
16515
  const content = await readFile5(COOK_STATE_FILE, "utf8");
16529
- return JSON.parse(content);
16516
+ const data = JSON.parse(content);
16517
+ if (!data.ppid) {
16518
+ const oldState = data;
16519
+ return {
16520
+ ppid: {
16521
+ [String(process.ppid)]: {
16522
+ lastRunId: oldState.lastRunId,
16523
+ lastSessionId: oldState.lastSessionId,
16524
+ lastCheckpointId: oldState.lastCheckpointId,
16525
+ lastActiveAt: Date.now()
16526
+ }
16527
+ }
16528
+ };
16529
+ }
16530
+ return data;
16530
16531
  } catch {
16531
- return {};
16532
+ return { ppid: {} };
16532
16533
  }
16533
16534
  }
16535
+ async function loadCookState() {
16536
+ const file2 = await loadCookStateFile();
16537
+ const ppid = String(process.ppid);
16538
+ const entry = file2.ppid[ppid];
16539
+ if (!entry) return {};
16540
+ return {
16541
+ lastRunId: entry.lastRunId,
16542
+ lastSessionId: entry.lastSessionId,
16543
+ lastCheckpointId: entry.lastCheckpointId
16544
+ };
16545
+ }
16534
16546
  async function saveCookState(state) {
16535
16547
  await mkdir5(CONFIG_DIR3, { recursive: true });
16536
- const existing = await loadCookState();
16537
- const merged = { ...existing, ...state };
16538
- await writeFile5(COOK_STATE_FILE, JSON.stringify(merged, null, 2), "utf8");
16548
+ const file2 = await loadCookStateFile();
16549
+ const ppid = String(process.ppid);
16550
+ const now = Date.now();
16551
+ for (const key of Object.keys(file2.ppid)) {
16552
+ const entry = file2.ppid[key];
16553
+ if (entry && now - entry.lastActiveAt > STALE_THRESHOLD_MS) {
16554
+ delete file2.ppid[key];
16555
+ }
16556
+ }
16557
+ const existing = file2.ppid[ppid];
16558
+ file2.ppid[ppid] = {
16559
+ lastRunId: state.lastRunId ?? existing?.lastRunId,
16560
+ lastSessionId: state.lastSessionId ?? existing?.lastSessionId,
16561
+ lastCheckpointId: state.lastCheckpointId ?? existing?.lastCheckpointId,
16562
+ lastActiveAt: now
16563
+ };
16564
+ await writeFile5(COOK_STATE_FILE, JSON.stringify(file2, null, 2), "utf8");
16539
16565
  }
16540
16566
 
16541
16567
  // src/commands/cook.ts
@@ -16678,7 +16704,7 @@ async function autoPullArtifact(runOutput, artifactDir) {
16678
16704
  );
16679
16705
  if (serverVersion && existsSync7(artifactDir)) {
16680
16706
  console.log();
16681
- console.log(chalk16.blue("Pulling updated artifact:"));
16707
+ console.log(chalk16.bold("Pulling updated artifact:"));
16682
16708
  printCommand(`cd ${ARTIFACT_DIR}`);
16683
16709
  printCommand(`vm0 artifact pull ${serverVersion}`);
16684
16710
  try {
@@ -16690,19 +16716,19 @@ async function autoPullArtifact(runOutput, artifactDir) {
16690
16716
  } catch (error43) {
16691
16717
  console.error(chalk16.red(`\u2717 Artifact pull failed`));
16692
16718
  if (error43 instanceof Error) {
16693
- console.error(chalk16.gray(` ${error43.message}`));
16719
+ console.error(chalk16.dim(` ${error43.message}`));
16694
16720
  }
16695
16721
  }
16696
16722
  }
16697
16723
  }
16698
16724
  var cookCmd = new Command13().name("cook").description("One-click agent preparation and execution from vm0.yaml");
16699
16725
  cookCmd.argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
16700
- const shouldExit = await checkAndUpgrade("4.25.0", prompt);
16726
+ const shouldExit = await checkAndUpgrade("4.26.1", prompt);
16701
16727
  if (shouldExit) {
16702
16728
  process.exit(0);
16703
16729
  }
16704
16730
  const cwd = process.cwd();
16705
- console.log(chalk16.blue(`Reading config: ${CONFIG_FILE3}`));
16731
+ console.log(chalk16.bold(`Reading config: ${CONFIG_FILE3}`));
16706
16732
  if (!existsSync7(CONFIG_FILE3)) {
16707
16733
  console.error(chalk16.red(`\u2717 Config file not found: ${CONFIG_FILE3}`));
16708
16734
  process.exit(1);
@@ -16714,7 +16740,7 @@ cookCmd.argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
16714
16740
  } catch (error43) {
16715
16741
  console.error(chalk16.red("\u2717 Invalid YAML format"));
16716
16742
  if (error43 instanceof Error) {
16717
- console.error(chalk16.gray(` ${error43.message}`));
16743
+ console.error(chalk16.dim(` ${error43.message}`));
16718
16744
  }
16719
16745
  process.exit(1);
16720
16746
  }
@@ -16749,7 +16775,7 @@ cookCmd.argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
16749
16775
  }
16750
16776
  if (config2.volumes && Object.keys(config2.volumes).length > 0) {
16751
16777
  console.log();
16752
- console.log(chalk16.blue("Processing volumes:"));
16778
+ console.log(chalk16.bold("Processing volumes:"));
16753
16779
  for (const volumeConfig of Object.values(config2.volumes)) {
16754
16780
  const volumeDir = path11.join(cwd, volumeConfig.name);
16755
16781
  if (!existsSync7(volumeDir)) {
@@ -16779,14 +16805,14 @@ cookCmd.argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
16779
16805
  } catch (error43) {
16780
16806
  console.error(chalk16.red(`\u2717 Failed`));
16781
16807
  if (error43 instanceof Error) {
16782
- console.error(chalk16.gray(` ${error43.message}`));
16808
+ console.error(chalk16.dim(` ${error43.message}`));
16783
16809
  }
16784
16810
  process.exit(1);
16785
16811
  }
16786
16812
  }
16787
16813
  }
16788
16814
  console.log();
16789
- console.log(chalk16.blue("Processing artifact:"));
16815
+ console.log(chalk16.bold("Processing artifact:"));
16790
16816
  const artifactDir = path11.join(cwd, ARTIFACT_DIR);
16791
16817
  try {
16792
16818
  if (!existsSync7(artifactDir)) {
@@ -16811,12 +16837,12 @@ cookCmd.argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
16811
16837
  } catch (error43) {
16812
16838
  console.error(chalk16.red(`\u2717 Failed`));
16813
16839
  if (error43 instanceof Error) {
16814
- console.error(chalk16.gray(` ${error43.message}`));
16840
+ console.error(chalk16.dim(` ${error43.message}`));
16815
16841
  }
16816
16842
  process.exit(1);
16817
16843
  }
16818
16844
  console.log();
16819
- console.log(chalk16.blue("Composing agent:"));
16845
+ console.log(chalk16.bold("Composing agent:"));
16820
16846
  printCommand(`vm0 compose ${CONFIG_FILE3}`);
16821
16847
  try {
16822
16848
  await execVm0Command(["compose", CONFIG_FILE3], {
@@ -16826,13 +16852,13 @@ cookCmd.argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
16826
16852
  } catch (error43) {
16827
16853
  console.error(chalk16.red(`\u2717 Compose failed`));
16828
16854
  if (error43 instanceof Error) {
16829
- console.error(chalk16.gray(` ${error43.message}`));
16855
+ console.error(chalk16.dim(` ${error43.message}`));
16830
16856
  }
16831
16857
  process.exit(1);
16832
16858
  }
16833
16859
  if (prompt) {
16834
16860
  console.log();
16835
- console.log(chalk16.blue("Running agent:"));
16861
+ console.log(chalk16.bold("Running agent:"));
16836
16862
  printCommand(
16837
16863
  `vm0 run ${agentName} --artifact-name ${ARTIFACT_DIR} "${prompt}"`
16838
16864
  );
@@ -16867,23 +16893,54 @@ cookCmd.argument("[prompt]", "Prompt for the agent").action(async (prompt) => {
16867
16893
  );
16868
16894
  }
16869
16895
  });
16870
- cookCmd.command("logs").description("View logs from the last cook run").action(async () => {
16871
- const state = await loadCookState();
16872
- if (!state.lastRunId) {
16873
- console.error(chalk16.red("\u2717 No previous run found"));
16874
- console.error(chalk16.gray(" Run 'vm0 cook <prompt>' first"));
16875
- process.exit(1);
16896
+ cookCmd.command("logs").description("View logs from the last cook run").option("-a, --agent", "Show agent events (default)").option("-s, --system", "Show system log").option("-m, --metrics", "Show metrics").option("-n, --network", "Show network logs (proxy traffic)").option(
16897
+ "--since <time>",
16898
+ "Show logs since timestamp (e.g., 5m, 2h, 1d, 2024-01-15T10:30:00Z)"
16899
+ ).option("--limit <n>", "Maximum number of entries to show (default: 5)").action(
16900
+ async (options) => {
16901
+ const state = await loadCookState();
16902
+ if (!state.lastRunId) {
16903
+ console.error(chalk16.red("\u2717 No previous run found"));
16904
+ console.error(chalk16.dim(" Run 'vm0 cook <prompt>' first"));
16905
+ process.exit(1);
16906
+ }
16907
+ const args = ["logs", state.lastRunId];
16908
+ const displayArgs = [`vm0 logs ${state.lastRunId}`];
16909
+ if (options.agent) {
16910
+ args.push("--agent");
16911
+ displayArgs.push("--agent");
16912
+ }
16913
+ if (options.system) {
16914
+ args.push("--system");
16915
+ displayArgs.push("--system");
16916
+ }
16917
+ if (options.metrics) {
16918
+ args.push("--metrics");
16919
+ displayArgs.push("--metrics");
16920
+ }
16921
+ if (options.network) {
16922
+ args.push("--network");
16923
+ displayArgs.push("--network");
16924
+ }
16925
+ if (options.since) {
16926
+ args.push("--since", options.since);
16927
+ displayArgs.push(`--since ${options.since}`);
16928
+ }
16929
+ if (options.limit) {
16930
+ args.push("--limit", options.limit);
16931
+ displayArgs.push(`--limit ${options.limit}`);
16932
+ }
16933
+ printCommand(displayArgs.join(" "));
16934
+ await execVm0Command(args);
16876
16935
  }
16877
- printCommand(`vm0 logs ${state.lastRunId}`);
16878
- await execVm0Command(["logs", state.lastRunId]);
16879
- });
16936
+ );
16880
16937
  cookCmd.command("continue").description(
16881
16938
  "Continue from the last session (latest conversation and artifact)"
16882
16939
  ).argument("<prompt>", "Prompt for the continued agent").action(async (prompt) => {
16883
16940
  const state = await loadCookState();
16884
16941
  if (!state.lastSessionId) {
16885
16942
  console.error(chalk16.red("\u2717 No previous session found"));
16886
- console.error(chalk16.gray(" Run 'vm0 cook <prompt>' first"));
16943
+ console.error(chalk16.dim(" Run 'vm0 cook <prompt>' first"));
16887
16944
  process.exit(1);
16888
16945
  }
16889
16946
  const cwd = process.cwd();
@@ -16915,7 +16972,7 @@ cookCmd.command("resume").description(
16915
16972
  const state = await loadCookState();
16916
16973
  if (!state.lastCheckpointId) {
16917
16974
  console.error(chalk16.red("\u2717 No previous checkpoint found"));
16918
- console.error(chalk16.gray(" Run 'vm0 cook <prompt>' first"));
16975
+ console.error(chalk16.dim(" Run 'vm0 cook <prompt>' first"));
16919
16976
  process.exit(1);
16920
16977
  }
16921
16978
  const cwd = process.cwd();
@@ -17030,7 +17087,7 @@ var buildCommand = new Command14().name("build").description("Build a custom ima
17030
17087
  );
17031
17088
  process.exit(1);
17032
17089
  }
17033
- console.log(chalk17.blue(`Building image: ${scope.slug}/${name}`));
17090
+ console.log(chalk17.bold(`Building image: ${scope.slug}/${name}`));
17034
17091
  console.log();
17035
17092
  const buildInfo = await apiClient.createImage({
17036
17093
  dockerfile,
@@ -17038,7 +17095,7 @@ var buildCommand = new Command14().name("build").description("Build a custom ima
17038
17095
  deleteExisting
17039
17096
  });
17040
17097
  const { imageId, buildId, versionId } = buildInfo;
17041
- console.log(chalk17.gray(` Build ID: ${buildId}`));
17098
+ console.log(chalk17.dim(` Build ID: ${buildId}`));
17042
17099
  console.log();
17043
17100
  let logsOffset = 0;
17044
17101
  let status = "building";
@@ -17054,7 +17111,7 @@ var buildCommand = new Command14().name("build").description("Build a custom ima
17054
17111
  }
17055
17112
  const statusData = await statusResponse.json();
17056
17113
  for (const log of statusData.logs) {
17057
- console.log(chalk17.gray(` ${log}`));
17114
+ console.log(chalk17.dim(` ${log}`));
17058
17115
  }
17059
17116
  logsOffset = statusData.logsOffset;
17060
17117
  status = statusData.status;
@@ -17104,7 +17161,7 @@ var listCommand = new Command15().name("list").alias("ls").description("List you
17104
17161
  const data = await response.json();
17105
17162
  const { images } = data;
17106
17163
  if (images.length === 0) {
17107
- console.log(chalk18.gray("No images found."));
17164
+ console.log(chalk18.dim("No images found."));
17108
17165
  console.log();
17109
17166
  console.log("Build your first image:");
17110
17167
  console.log(
@@ -17126,11 +17183,11 @@ var listCommand = new Command15().name("list").alias("ls").description("List you
17126
17183
  latestVersions.set(alias, latestReady?.versionId || null);
17127
17184
  }
17128
17185
  console.log(
17129
- chalk18.gray(
17186
+ chalk18.dim(
17130
17187
  `${"NAME".padEnd(40)} ${"STATUS".padEnd(12)} ${"CREATED".padEnd(20)}`
17131
17188
  )
17132
17189
  );
17133
- console.log(chalk18.gray("-".repeat(72)));
17190
+ console.log(chalk18.dim("-".repeat(72)));
17134
17191
  for (const image of images) {
17135
17192
  const statusColor = image.status === "ready" ? chalk18.green : image.status === "building" ? chalk18.yellow : chalk18.red;
17136
17193
  const createdAt = new Date(image.createdAt).toLocaleString();
@@ -17139,7 +17196,7 @@ var listCommand = new Command15().name("list").alias("ls").description("List you
17139
17196
  const shortVersion = formatVersionIdForDisplay(image.versionId);
17140
17197
  displayName = `${image.alias}:${shortVersion}`;
17141
17198
  if (image.status === "ready" && latestVersions.get(image.alias) === image.versionId) {
17142
- displayName = `${displayName} ${chalk18.cyan("(latest)")}`;
17199
+ displayName = `${displayName} ${chalk18.cyan("latest")}`;
17143
17200
  }
17144
17201
  }
17145
17202
  console.log(
@@ -17150,7 +17207,7 @@ var listCommand = new Command15().name("list").alias("ls").description("List you
17150
17207
  }
17151
17208
  }
17152
17209
  console.log();
17153
- console.log(chalk18.gray(`Total: ${images.length} version(s)`));
17210
+ console.log(chalk18.dim(`Total: ${images.length} version(s)`));
17154
17211
  } catch (error43) {
17155
17212
  if (error43 instanceof Error) {
17156
17213
  if (error43.message.includes("Not authenticated")) {
@@ -17240,7 +17297,7 @@ var deleteCommand = new Command16().name("delete").alias("rm").description("Dele
17240
17297
  });
17241
17298
  });
17242
17299
  if (answer.toLowerCase() !== "y" && answer.toLowerCase() !== "yes") {
17243
- console.log(chalk19.gray("Cancelled."));
17300
+ console.log(chalk19.dim("Cancelled."));
17244
17301
  return;
17245
17302
  }
17246
17303
  }
@@ -17295,17 +17352,17 @@ var versionsCommand = new Command17().name("versions").description("List all ver
17295
17352
  console.log(chalk20.bold(`Versions of ${name}:`));
17296
17353
  console.log();
17297
17354
  console.log(
17298
- chalk20.gray(
17355
+ chalk20.dim(
17299
17356
  `${"VERSION".padEnd(20)} ${"STATUS".padEnd(12)} ${"CREATED".padEnd(24)}`
17300
17357
  )
17301
17358
  );
17302
- console.log(chalk20.gray("-".repeat(56)));
17359
+ console.log(chalk20.dim("-".repeat(56)));
17303
17360
  for (const version2 of versions) {
17304
17361
  const statusColor = version2.status === "ready" ? chalk20.green : version2.status === "building" ? chalk20.yellow : chalk20.red;
17305
17362
  const createdAt = new Date(version2.createdAt).toLocaleString();
17306
17363
  let versionDisplay = version2.versionId ? formatVersionIdForDisplay(version2.versionId) : "(legacy)";
17307
17364
  if (version2.status === "ready" && version2.versionId === latestVersionId) {
17308
- versionDisplay = `${versionDisplay} ${chalk20.cyan("(latest)")}`;
17365
+ versionDisplay = `${versionDisplay} ${chalk20.cyan("latest")}`;
17309
17366
  }
17310
17367
  console.log(
17311
17368
  `${versionDisplay.padEnd(20)} ${statusColor(version2.status.padEnd(12))} ${createdAt.padEnd(24)}`
@@ -17315,14 +17372,14 @@ var versionsCommand = new Command17().name("versions").description("List all ver
17315
17372
  }
17316
17373
  }
17317
17374
  console.log();
17318
- console.log(chalk20.gray(`Total: ${versions.length} version(s)`));
17375
+ console.log(chalk20.dim(`Total: ${versions.length} version(s)`));
17319
17376
  console.log();
17320
- console.log(chalk20.gray("Usage:"));
17321
- console.log(chalk20.gray(` image: "${name}" # uses latest`));
17377
+ console.log(chalk20.dim("Usage:"));
17378
+ console.log(chalk20.dim(` image: "${name}" # uses latest`));
17322
17379
  if (latestVersionId) {
17323
17380
  const shortVersion = formatVersionIdForDisplay(latestVersionId);
17324
17381
  console.log(
17325
- chalk20.gray(
17382
+ chalk20.dim(
17326
17383
  ` image: "${name}:${shortVersion}" # pin to specific version`
17327
17384
  )
17328
17385
  );
@@ -17424,7 +17481,7 @@ function formatNetworkLog(entry) {
17424
17481
  } else {
17425
17482
  latencyColor = chalk21.red;
17426
17483
  }
17427
- return `[${entry.timestamp}] ${chalk21.cyan(entry.method.padEnd(6))} ${statusColor(entry.status)} ${latencyColor(entry.latency_ms + "ms")} ${formatBytes7(entry.request_size)}/${formatBytes7(entry.response_size)} ${chalk21.gray(entry.url)}`;
17484
+ return `[${entry.timestamp}] ${entry.method.padEnd(6)} ${statusColor(entry.status)} ${latencyColor(entry.latency_ms + "ms")} ${formatBytes7(entry.request_size)}/${formatBytes7(entry.response_size)} ${chalk21.dim(entry.url)}`;
17428
17485
  }
17429
17486
  function renderAgentEvent(event, provider) {
17430
17487
  const eventData = event.eventData;
@@ -17509,7 +17566,7 @@ async function showAgentEvents(runId, options) {
17509
17566
  if (response.hasMore) {
17510
17567
  console.log();
17511
17568
  console.log(
17512
- chalk21.gray(
17569
+ chalk21.dim(
17513
17570
  `Showing ${response.events.length} events. Use --limit to see more.`
17514
17571
  )
17515
17572
  );
@@ -17525,7 +17582,7 @@ async function showSystemLog(runId, options) {
17525
17582
  if (response.hasMore) {
17526
17583
  console.log();
17527
17584
  console.log(
17528
- chalk21.gray("More log entries available. Use --limit to see more.")
17585
+ chalk21.dim("More log entries available. Use --limit to see more.")
17529
17586
  );
17530
17587
  }
17531
17588
  }
@@ -17541,7 +17598,7 @@ async function showMetrics(runId, options) {
17541
17598
  if (response.hasMore) {
17542
17599
  console.log();
17543
17600
  console.log(
17544
- chalk21.gray(
17601
+ chalk21.dim(
17545
17602
  `Showing ${response.metrics.length} metrics. Use --limit to see more.`
17546
17603
  )
17547
17604
  );
@@ -17563,7 +17620,7 @@ async function showNetworkLogs(runId, options) {
17563
17620
  if (response.hasMore) {
17564
17621
  console.log();
17565
17622
  console.log(
17566
- chalk21.gray(
17623
+ chalk21.dim(
17567
17624
  `Showing ${response.networkLogs.length} network logs. Use --limit to see more.`
17568
17625
  )
17569
17626
  );
@@ -17579,7 +17636,7 @@ function handleError(error43, runId) {
17579
17636
  console.error(chalk21.red(error43.message));
17580
17637
  } else {
17581
17638
  console.error(chalk21.red("Failed to fetch logs"));
17582
- console.error(chalk21.gray(` ${error43.message}`));
17639
+ console.error(chalk21.dim(` ${error43.message}`));
17583
17640
  }
17584
17641
  } else {
17585
17642
  console.error(chalk21.red("An unexpected error occurred"));
@@ -17595,7 +17652,7 @@ import chalk22 from "chalk";
17595
17652
  var statusCommand3 = new Command20().name("status").description("View current scope status").action(async () => {
17596
17653
  try {
17597
17654
  const scope = await apiClient.getScope();
17598
- console.log(chalk22.cyan("Scope Information:"));
17655
+ console.log(chalk22.bold("Scope Information:"));
17599
17656
  console.log(` Slug: ${chalk22.green(scope.slug)}`);
17600
17657
  console.log(` Type: ${scope.type}`);
17601
17658
  if (scope.displayName) {
@@ -17615,7 +17672,7 @@ var statusCommand3 = new Command20().name("status").description("View current sc
17615
17672
  console.log(chalk22.cyan(" vm0 scope set <slug>"));
17616
17673
  console.log();
17617
17674
  console.log("Example:");
17618
- console.log(chalk22.gray(" vm0 scope set myusername"));
17675
+ console.log(chalk22.dim(" vm0 scope set myusername"));
17619
17676
  } else {
17620
17677
  console.error(chalk22.red(`\u2717 ${error43.message}`));
17621
17678
  }
@@ -17783,9 +17840,9 @@ var initCommand3 = new Command23().name("init").description("Initialize a new VM
17783
17840
  if (!agentName || !validateAgentName(agentName)) {
17784
17841
  console.log(chalk24.red("\u2717 Invalid agent name"));
17785
17842
  console.log(
17786
- chalk24.gray(" Must be 3-64 characters, alphanumeric and hyphens only")
17843
+ chalk24.dim(" Must be 3-64 characters, alphanumeric and hyphens only")
17787
17844
  );
17788
- console.log(chalk24.gray(" Must start and end with letter or number"));
17845
+ console.log(chalk24.dim(" Must start and end with letter or number"));
17789
17846
  process.exit(1);
17790
17847
  }
17791
17848
  await writeFile7(VM0_YAML_FILE, generateVm0Yaml(agentName));
@@ -17800,15 +17857,15 @@ var initCommand3 = new Command23().name("init").description("Initialize a new VM
17800
17857
  ` 1. Get your Claude Code token: ${chalk24.cyan("claude setup-token")}`
17801
17858
  );
17802
17859
  console.log(` 2. Set the environment variable (or add to .env file):`);
17803
- console.log(chalk24.gray(` export CLAUDE_CODE_OAUTH_TOKEN=<your-token>`));
17860
+ console.log(chalk24.dim(` export CLAUDE_CODE_OAUTH_TOKEN=<your-token>`));
17804
17861
  console.log(` 3. Run your agent: ${chalk24.cyan('vm0 cook "your prompt"')}`);
17805
17862
  });
17806
17863
 
17807
17864
  // src/index.ts
17808
17865
  var program = new Command24();
17809
- program.name("vm0").description("VM0 CLI - A modern build tool").version("4.25.0");
17866
+ program.name("vm0").description("VM0 CLI - A modern build tool").version("4.26.1");
17810
17867
  program.command("info").description("Display environment information").action(async () => {
17811
- console.log(chalk25.cyan("System Information:"));
17868
+ console.log(chalk25.bold("System Information:"));
17812
17869
  console.log(`Node Version: ${process.version}`);
17813
17870
  console.log(`Platform: ${process.platform}`);
17814
17871
  console.log(`Architecture: ${process.arch}`);