@vm0/cli 3.2.1 → 3.3.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 +19 -9
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -12678,13 +12678,17 @@ var buildCommand = new Command().name("build").description("Create or update age
12678
12678
  process.exit(1);
12679
12679
  }
12680
12680
  console.log(chalk2.blue("Uploading compose..."));
12681
- const response = await apiClient.createOrUpdateCompose({ config: config2 });
12681
+ const response = await apiClient.createOrUpdateCompose({
12682
+ content: config2
12683
+ });
12684
+ const shortVersionId = response.versionId.slice(0, 8);
12682
12685
  if (response.action === "created") {
12683
12686
  console.log(chalk2.green(`\u2713 Compose created: ${response.name}`));
12684
12687
  } else {
12685
- console.log(chalk2.green(`\u2713 Compose updated: ${response.name}`));
12688
+ console.log(chalk2.green(`\u2713 Compose version exists: ${response.name}`));
12686
12689
  }
12687
12690
  console.log(chalk2.gray(` Compose ID: ${response.composeId}`));
12691
+ console.log(chalk2.gray(` Version: ${shortVersionId}`));
12688
12692
  console.log();
12689
12693
  console.log(" Run your agent:");
12690
12694
  console.log(
@@ -12828,7 +12832,7 @@ var ClaudeEventParser = class {
12828
12832
  // Use client receive time for consistent elapsed calculation
12829
12833
  data: {
12830
12834
  runId: event.runId,
12831
- agentComposeId: event.agentComposeId,
12835
+ agentComposeVersionId: event.agentComposeVersionId,
12832
12836
  agentName: event.agentName,
12833
12837
  prompt: event.prompt,
12834
12838
  templateVars: event.templateVars,
@@ -13104,9 +13108,9 @@ async function pollEvents(runId, timeoutSeconds, options) {
13104
13108
  const pollIntervalMs = 500;
13105
13109
  const timeoutMs = timeoutSeconds * 1e3;
13106
13110
  const startTime = Date.now();
13107
- const startTimestamp = /* @__PURE__ */ new Date();
13111
+ const startTimestamp = options.startTimestamp;
13108
13112
  let previousTimestamp = startTimestamp;
13109
- const verbose = options?.verbose;
13113
+ const verbose = options.verbose;
13110
13114
  while (!complete) {
13111
13115
  const elapsed = Date.now() - startTime;
13112
13116
  if (elapsed > timeoutMs) {
@@ -13185,6 +13189,7 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
13185
13189
  String(DEFAULT_TIMEOUT_SECONDS)
13186
13190
  ).option("-v, --verbose", "Show verbose output with timing information").action(
13187
13191
  async (identifier, prompt, options) => {
13192
+ const startTimestamp = /* @__PURE__ */ new Date();
13188
13193
  const timeoutSeconds = parseInt(options.timeout, 10);
13189
13194
  if (isNaN(timeoutSeconds) || timeoutSeconds <= 0) {
13190
13195
  console.error(
@@ -13257,7 +13262,8 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
13257
13262
  conversationId: options.conversation
13258
13263
  });
13259
13264
  const succeeded = await pollEvents(response.runId, timeoutSeconds, {
13260
- verbose
13265
+ verbose,
13266
+ startTimestamp
13261
13267
  });
13262
13268
  if (!succeeded) {
13263
13269
  process.exit(1);
@@ -13295,6 +13301,7 @@ runCmd.command("resume").description("Resume an agent run from a checkpoint (use
13295
13301
  String(DEFAULT_TIMEOUT_SECONDS)
13296
13302
  ).option("-v, --verbose", "Show verbose output with timing information").action(
13297
13303
  async (checkpointId, prompt, options, command) => {
13304
+ const startTimestamp = /* @__PURE__ */ new Date();
13298
13305
  const allOpts = command.optsWithGlobals();
13299
13306
  const timeoutSeconds = parseInt(options.timeout, 10);
13300
13307
  if (isNaN(timeoutSeconds) || timeoutSeconds <= 0) {
@@ -13328,7 +13335,8 @@ runCmd.command("resume").description("Resume an agent run from a checkpoint (use
13328
13335
  volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0
13329
13336
  });
13330
13337
  const succeeded = await pollEvents(response.runId, timeoutSeconds, {
13331
- verbose
13338
+ verbose,
13339
+ startTimestamp
13332
13340
  });
13333
13341
  if (!succeeded) {
13334
13342
  process.exit(1);
@@ -13365,6 +13373,7 @@ runCmd.command("continue").description(
13365
13373
  String(DEFAULT_TIMEOUT_SECONDS)
13366
13374
  ).option("-v, --verbose", "Show verbose output with timing information").action(
13367
13375
  async (agentSessionId, prompt, options, command) => {
13376
+ const startTimestamp = /* @__PURE__ */ new Date();
13368
13377
  const allOpts = command.optsWithGlobals();
13369
13378
  const timeoutSeconds = parseInt(options.timeout, 10);
13370
13379
  if (isNaN(timeoutSeconds) || timeoutSeconds <= 0) {
@@ -13399,7 +13408,8 @@ runCmd.command("continue").description(
13399
13408
  volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0
13400
13409
  });
13401
13410
  const succeeded = await pollEvents(response.runId, timeoutSeconds, {
13402
- verbose
13411
+ verbose,
13412
+ startTimestamp
13403
13413
  });
13404
13414
  if (!succeeded) {
13405
13415
  process.exit(1);
@@ -14130,7 +14140,7 @@ var artifactCommand = new Command10().name("artifact").description("Manage cloud
14130
14140
 
14131
14141
  // src/index.ts
14132
14142
  var program = new Command11();
14133
- program.name("vm0").description("VM0 CLI - A modern build tool").version("3.2.1");
14143
+ program.name("vm0").description("VM0 CLI - A modern build tool").version("3.3.0");
14134
14144
  program.command("hello").description("Say hello from the App").action(() => {
14135
14145
  console.log(chalk11.blue("Welcome to the VM0 CLI!"));
14136
14146
  console.log(chalk11.green(`Core says: ${FOO}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "3.2.1",
3
+ "version": "3.3.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",