@vm0/cli 9.148.1 → 9.148.2

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
@@ -6,6 +6,7 @@ import {
6
6
  ApiRequestError,
7
7
  Command,
8
8
  EventRenderer,
9
+ EventStreamNormalizer,
9
10
  Option,
10
11
  agentDefinitionSchema,
11
12
  cancelRun,
@@ -67,7 +68,7 @@ import {
67
68
  source_default,
68
69
  volumeConfigSchema,
69
70
  withErrorHandler
70
- } from "./chunk-WSZTOGEW.js";
71
+ } from "./chunk-KAN2DFAY.js";
71
72
  import {
72
73
  __toESM,
73
74
  init_esm_shims
@@ -386,7 +387,7 @@ function getConfigPath() {
386
387
  return join(os.homedir(), ".vm0", "config.json");
387
388
  }
388
389
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
389
- console.log(source_default.bold(`VM0 CLI v${"9.148.1"}`));
390
+ console.log(source_default.bold(`VM0 CLI v${"9.148.2"}`));
390
391
  console.log();
391
392
  const config = await loadConfig();
392
393
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4279,7 +4280,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4279
4280
  options.autoUpdate = false;
4280
4281
  }
4281
4282
  if (options.autoUpdate !== false) {
4282
- await startSilentUpgrade("9.148.1");
4283
+ await startSilentUpgrade("9.148.2");
4283
4284
  }
4284
4285
  try {
4285
4286
  let result;
@@ -4371,7 +4372,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4371
4372
  withErrorHandler(
4372
4373
  async (identifier, prompt, options) => {
4373
4374
  if (options.autoUpdate !== false) {
4374
- await startSilentUpgrade("9.148.1");
4375
+ await startSilentUpgrade("9.148.2");
4375
4376
  }
4376
4377
  const { name, version } = parseIdentifier(identifier);
4377
4378
  let composeId;
@@ -5823,11 +5824,13 @@ function createLogRenderer(verbose) {
5823
5824
  verbose
5824
5825
  });
5825
5826
  }
5826
- function renderAgentEvent(event, renderer, framework) {
5827
- const eventData = event.eventData;
5828
- const parsed = parseEvent(eventData, framework);
5829
- if (parsed) {
5830
- parsed.timestamp = new Date(event.createdAt);
5827
+ function renderAgentEvent(event, renderer, normalizer, framework) {
5828
+ const parsedEvents = normalizer.process(
5829
+ event.eventData,
5830
+ framework,
5831
+ new Date(event.createdAt)
5832
+ );
5833
+ for (const parsed of parsedEvents) {
5831
5834
  renderer.render(parsed);
5832
5835
  }
5833
5836
  }
@@ -5948,9 +5951,13 @@ async function showAgentEvents(runId, options, platformUrl) {
5948
5951
  }
5949
5952
  const events = options.order === "desc" ? [...allEvents].reverse() : allEvents;
5950
5953
  const renderer = createLogRenderer(true);
5954
+ const normalizer = new EventStreamNormalizer();
5951
5955
  const framework = firstResponse.framework;
5952
5956
  for (const event of events) {
5953
- renderAgentEvent(event, renderer, framework);
5957
+ renderAgentEvent(event, renderer, normalizer, framework);
5958
+ }
5959
+ for (const parsed of normalizer.flush()) {
5960
+ renderer.render(parsed);
5954
5961
  }
5955
5962
  console.log(source_default.dim(`View on platform: ${platformUrl}`));
5956
5963
  }
@@ -6158,13 +6165,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6158
6165
  if (latestVersion === null) {
6159
6166
  throw new Error("Could not check for updates. Please try again later.");
6160
6167
  }
6161
- if (latestVersion === "9.148.1") {
6162
- console.log(source_default.green(`\u2713 Already up to date (${"9.148.1"})`));
6168
+ if (latestVersion === "9.148.2") {
6169
+ console.log(source_default.green(`\u2713 Already up to date (${"9.148.2"})`));
6163
6170
  return;
6164
6171
  }
6165
6172
  console.log(
6166
6173
  source_default.yellow(
6167
- `Current version: ${"9.148.1"} -> Latest version: ${latestVersion}`
6174
+ `Current version: ${"9.148.2"} -> Latest version: ${latestVersion}`
6168
6175
  )
6169
6176
  );
6170
6177
  console.log();
@@ -6191,7 +6198,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6191
6198
  const success = await performUpgrade(packageManager);
6192
6199
  if (success) {
6193
6200
  console.log(
6194
- source_default.green(`\u2713 Upgraded from ${"9.148.1"} to ${latestVersion}`)
6201
+ source_default.green(`\u2713 Upgraded from ${"9.148.2"} to ${latestVersion}`)
6195
6202
  );
6196
6203
  return;
6197
6204
  }
@@ -6258,7 +6265,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
6258
6265
 
6259
6266
  // src/index.ts
6260
6267
  var program = new Command();
6261
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.148.1");
6268
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.148.2");
6262
6269
  program.addCommand(authCommand);
6263
6270
  program.addCommand(infoCommand);
6264
6271
  program.addCommand(composeCommand);