@vm0/cli 3.2.0 → 3.2.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 +18 -9
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -12824,7 +12824,8 @@ var ClaudeEventParser = class {
|
|
|
12824
12824
|
static parseVm0StartEvent(event) {
|
|
12825
12825
|
return {
|
|
12826
12826
|
type: "vm0_start",
|
|
12827
|
-
timestamp: new Date(
|
|
12827
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
12828
|
+
// Use client receive time for consistent elapsed calculation
|
|
12828
12829
|
data: {
|
|
12829
12830
|
runId: event.runId,
|
|
12830
12831
|
agentComposeId: event.agentComposeId,
|
|
@@ -12841,7 +12842,8 @@ var ClaudeEventParser = class {
|
|
|
12841
12842
|
static parseVm0ResultEvent(event) {
|
|
12842
12843
|
return {
|
|
12843
12844
|
type: "vm0_result",
|
|
12844
|
-
timestamp: new Date(
|
|
12845
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
12846
|
+
// Use client receive time for consistent elapsed calculation
|
|
12845
12847
|
data: {
|
|
12846
12848
|
runId: event.runId,
|
|
12847
12849
|
checkpointId: event.checkpointId,
|
|
@@ -12855,7 +12857,8 @@ var ClaudeEventParser = class {
|
|
|
12855
12857
|
static parseVm0ErrorEvent(event) {
|
|
12856
12858
|
return {
|
|
12857
12859
|
type: "vm0_error",
|
|
12858
|
-
timestamp: new Date(
|
|
12860
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
12861
|
+
// Use client receive time for consistent elapsed calculation
|
|
12859
12862
|
data: {
|
|
12860
12863
|
runId: event.runId,
|
|
12861
12864
|
error: event.error,
|
|
@@ -13101,9 +13104,9 @@ async function pollEvents(runId, timeoutSeconds, options) {
|
|
|
13101
13104
|
const pollIntervalMs = 500;
|
|
13102
13105
|
const timeoutMs = timeoutSeconds * 1e3;
|
|
13103
13106
|
const startTime = Date.now();
|
|
13104
|
-
const startTimestamp =
|
|
13107
|
+
const startTimestamp = options.startTimestamp;
|
|
13105
13108
|
let previousTimestamp = startTimestamp;
|
|
13106
|
-
const verbose = options
|
|
13109
|
+
const verbose = options.verbose;
|
|
13107
13110
|
while (!complete) {
|
|
13108
13111
|
const elapsed = Date.now() - startTime;
|
|
13109
13112
|
if (elapsed > timeoutMs) {
|
|
@@ -13182,6 +13185,7 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
|
|
|
13182
13185
|
String(DEFAULT_TIMEOUT_SECONDS)
|
|
13183
13186
|
).option("-v, --verbose", "Show verbose output with timing information").action(
|
|
13184
13187
|
async (identifier, prompt, options) => {
|
|
13188
|
+
const startTimestamp = /* @__PURE__ */ new Date();
|
|
13185
13189
|
const timeoutSeconds = parseInt(options.timeout, 10);
|
|
13186
13190
|
if (isNaN(timeoutSeconds) || timeoutSeconds <= 0) {
|
|
13187
13191
|
console.error(
|
|
@@ -13254,7 +13258,8 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
|
|
|
13254
13258
|
conversationId: options.conversation
|
|
13255
13259
|
});
|
|
13256
13260
|
const succeeded = await pollEvents(response.runId, timeoutSeconds, {
|
|
13257
|
-
verbose
|
|
13261
|
+
verbose,
|
|
13262
|
+
startTimestamp
|
|
13258
13263
|
});
|
|
13259
13264
|
if (!succeeded) {
|
|
13260
13265
|
process.exit(1);
|
|
@@ -13292,6 +13297,7 @@ runCmd.command("resume").description("Resume an agent run from a checkpoint (use
|
|
|
13292
13297
|
String(DEFAULT_TIMEOUT_SECONDS)
|
|
13293
13298
|
).option("-v, --verbose", "Show verbose output with timing information").action(
|
|
13294
13299
|
async (checkpointId, prompt, options, command) => {
|
|
13300
|
+
const startTimestamp = /* @__PURE__ */ new Date();
|
|
13295
13301
|
const allOpts = command.optsWithGlobals();
|
|
13296
13302
|
const timeoutSeconds = parseInt(options.timeout, 10);
|
|
13297
13303
|
if (isNaN(timeoutSeconds) || timeoutSeconds <= 0) {
|
|
@@ -13325,7 +13331,8 @@ runCmd.command("resume").description("Resume an agent run from a checkpoint (use
|
|
|
13325
13331
|
volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0
|
|
13326
13332
|
});
|
|
13327
13333
|
const succeeded = await pollEvents(response.runId, timeoutSeconds, {
|
|
13328
|
-
verbose
|
|
13334
|
+
verbose,
|
|
13335
|
+
startTimestamp
|
|
13329
13336
|
});
|
|
13330
13337
|
if (!succeeded) {
|
|
13331
13338
|
process.exit(1);
|
|
@@ -13362,6 +13369,7 @@ runCmd.command("continue").description(
|
|
|
13362
13369
|
String(DEFAULT_TIMEOUT_SECONDS)
|
|
13363
13370
|
).option("-v, --verbose", "Show verbose output with timing information").action(
|
|
13364
13371
|
async (agentSessionId, prompt, options, command) => {
|
|
13372
|
+
const startTimestamp = /* @__PURE__ */ new Date();
|
|
13365
13373
|
const allOpts = command.optsWithGlobals();
|
|
13366
13374
|
const timeoutSeconds = parseInt(options.timeout, 10);
|
|
13367
13375
|
if (isNaN(timeoutSeconds) || timeoutSeconds <= 0) {
|
|
@@ -13396,7 +13404,8 @@ runCmd.command("continue").description(
|
|
|
13396
13404
|
volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0
|
|
13397
13405
|
});
|
|
13398
13406
|
const succeeded = await pollEvents(response.runId, timeoutSeconds, {
|
|
13399
|
-
verbose
|
|
13407
|
+
verbose,
|
|
13408
|
+
startTimestamp
|
|
13400
13409
|
});
|
|
13401
13410
|
if (!succeeded) {
|
|
13402
13411
|
process.exit(1);
|
|
@@ -14127,7 +14136,7 @@ var artifactCommand = new Command10().name("artifact").description("Manage cloud
|
|
|
14127
14136
|
|
|
14128
14137
|
// src/index.ts
|
|
14129
14138
|
var program = new Command11();
|
|
14130
|
-
program.name("vm0").description("VM0 CLI - A modern build tool").version("3.2.
|
|
14139
|
+
program.name("vm0").description("VM0 CLI - A modern build tool").version("3.2.2");
|
|
14131
14140
|
program.command("hello").description("Say hello from the App").action(() => {
|
|
14132
14141
|
console.log(chalk11.blue("Welcome to the VM0 CLI!"));
|
|
14133
14142
|
console.log(chalk11.green(`Core says: ${FOO}`));
|