@vm0/cli 9.104.0 → 9.105.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.
package/index.js CHANGED
@@ -61,7 +61,7 @@ import {
61
61
  showNextSteps,
62
62
  volumeConfigSchema,
63
63
  withErrorHandler
64
- } from "./chunk-FKDGKPGQ.js";
64
+ } from "./chunk-2SZAWYHO.js";
65
65
 
66
66
  // src/index.ts
67
67
  import { Command as Command44 } from "commander";
@@ -454,7 +454,7 @@ function getConfigPath() {
454
454
  return join(homedir(), ".vm0", "config.json");
455
455
  }
456
456
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
457
- console.log(chalk3.bold(`VM0 CLI v${"9.104.0"}`));
457
+ console.log(chalk3.bold(`VM0 CLI v${"9.105.0"}`));
458
458
  console.log();
459
459
  const config = await loadConfig();
460
460
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -1581,7 +1581,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
1581
1581
  options.autoUpdate = false;
1582
1582
  }
1583
1583
  if (options.autoUpdate !== false) {
1584
- await startSilentUpgrade("9.104.0");
1584
+ await startSilentUpgrade("9.105.0");
1585
1585
  }
1586
1586
  try {
1587
1587
  let result;
@@ -1651,11 +1651,14 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
1651
1651
  ).option(
1652
1652
  "--firewall-policies <json>",
1653
1653
  `Firewall policies JSON (e.g., '{"github": {"actions:read": "allow"}}')`
1654
- ).option("--verbose", "Show full tool inputs and outputs").addOption(new Option2("--debug-no-mock-claude").hideHelp()).addOption(new Option2("--no-auto-update").hideHelp()).action(
1654
+ ).option("--verbose", "Show full tool inputs and outputs").option(
1655
+ "--capture-network-bodies",
1656
+ "Capture HTTP request headers, request bodies, and response bodies in network logs"
1657
+ ).addOption(new Option2("--debug-no-mock-claude").hideHelp()).addOption(new Option2("--no-auto-update").hideHelp()).action(
1655
1658
  withErrorHandler(
1656
1659
  async (identifier, prompt, options) => {
1657
1660
  if (options.autoUpdate !== false) {
1658
- await startSilentUpgrade("9.104.0");
1661
+ await startSilentUpgrade("9.105.0");
1659
1662
  }
1660
1663
  const { name, version } = parseIdentifier(identifier);
1661
1664
  let composeId;
@@ -1711,6 +1714,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
1711
1714
  tools: options.tools,
1712
1715
  settings: options.settings,
1713
1716
  firewallPolicies: parseFirewallPolicies(options.firewallPolicies),
1717
+ captureNetworkBodies: options.captureNetworkBodies || void 0,
1714
1718
  debugNoMockClaude: options.debugNoMockClaude || void 0
1715
1719
  });
1716
1720
  if (response.status === "failed") {
@@ -3413,7 +3417,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
3413
3417
  withErrorHandler(
3414
3418
  async (prompt, options) => {
3415
3419
  if (options.autoUpdate !== false) {
3416
- const shouldExit = await checkAndUpgrade("9.104.0", prompt);
3420
+ const shouldExit = await checkAndUpgrade("9.105.0", prompt);
3417
3421
  if (shouldExit) {
3418
3422
  process.exit(0);
3419
3423
  }
@@ -3785,7 +3789,35 @@ function formatNetworkRequest(entry) {
3785
3789
  const url = entry.url || entry.host || "unknown";
3786
3790
  const firewall = entry.firewall_name ? ` ${chalk31.cyan(`[${entry.firewall_name}]`)}` : "";
3787
3791
  const error = entry.firewall_error ? ` ${chalk31.red(entry.firewall_error)}` : "";
3788
- return `[${entry.timestamp}] ${method.padEnd(6)} ${statusColor(status)} ${latencyColor(latencyMs + "ms")} ${formatBytes(requestSize)}/${formatBytes(responseSize)} ${chalk31.dim(url)}${firewall}${error}${formatAuthInfo(entry)}`;
3792
+ let line = `[${entry.timestamp}] ${method.padEnd(6)} ${statusColor(status)} ${latencyColor(latencyMs + "ms")} ${formatBytes(requestSize)}/${formatBytes(responseSize)} ${chalk31.dim(url)}${firewall}${error}${formatAuthInfo(entry)}`;
3793
+ line += formatCaptureFields(entry);
3794
+ return line;
3795
+ }
3796
+ var BODY_PREVIEW_LENGTH = 200;
3797
+ function formatCaptureFields(entry) {
3798
+ let result = "";
3799
+ if (entry.request_headers) {
3800
+ const hdrs = Object.entries(entry.request_headers).map(([k, v]) => {
3801
+ return `${k}: ${v}`;
3802
+ }).join(", ");
3803
+ result += `
3804
+ ${chalk31.gray("request_headers:")} ${hdrs}`;
3805
+ }
3806
+ if (entry.request_body) {
3807
+ const truncated = entry.request_body_truncated ? " (truncated)" : "";
3808
+ const preview = entry.request_body.slice(0, BODY_PREVIEW_LENGTH);
3809
+ const ellipsis = entry.request_body.length > BODY_PREVIEW_LENGTH ? "..." : "";
3810
+ result += `
3811
+ ${chalk31.gray("request_body:")} ${preview}${ellipsis}${truncated}`;
3812
+ }
3813
+ if (entry.response_body) {
3814
+ const truncated = entry.response_body_truncated ? " (truncated)" : "";
3815
+ const preview = entry.response_body.slice(0, BODY_PREVIEW_LENGTH);
3816
+ const ellipsis = entry.response_body.length > BODY_PREVIEW_LENGTH ? "..." : "";
3817
+ result += `
3818
+ ${chalk31.gray("response_body:")} ${preview}${ellipsis}${truncated}`;
3819
+ }
3820
+ return result;
3789
3821
  }
3790
3822
  function formatNetworkTcp(entry) {
3791
3823
  const host = entry.host || "unknown";
@@ -4156,13 +4188,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
4156
4188
  if (latestVersion === null) {
4157
4189
  throw new Error("Could not check for updates. Please try again later.");
4158
4190
  }
4159
- if (latestVersion === "9.104.0") {
4160
- console.log(chalk33.green(`\u2713 Already up to date (${"9.104.0"})`));
4191
+ if (latestVersion === "9.105.0") {
4192
+ console.log(chalk33.green(`\u2713 Already up to date (${"9.105.0"})`));
4161
4193
  return;
4162
4194
  }
4163
4195
  console.log(
4164
4196
  chalk33.yellow(
4165
- `Current version: ${"9.104.0"} -> Latest version: ${latestVersion}`
4197
+ `Current version: ${"9.105.0"} -> Latest version: ${latestVersion}`
4166
4198
  )
4167
4199
  );
4168
4200
  console.log();
@@ -4189,7 +4221,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
4189
4221
  const success = await performUpgrade(packageManager);
4190
4222
  if (success) {
4191
4223
  console.log(
4192
- chalk33.green(`\u2713 Upgraded from ${"9.104.0"} to ${latestVersion}`)
4224
+ chalk33.green(`\u2713 Upgraded from ${"9.105.0"} to ${latestVersion}`)
4193
4225
  );
4194
4226
  return;
4195
4227
  }
@@ -4257,7 +4289,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
4257
4289
 
4258
4290
  // src/index.ts
4259
4291
  var program = new Command44();
4260
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.104.0");
4292
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.105.0");
4261
4293
  program.addCommand(authCommand);
4262
4294
  program.addCommand(infoCommand);
4263
4295
  program.addCommand(composeCommand);