@vm0/cli 1.3.0 → 1.4.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 +19 -23
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -12868,6 +12868,9 @@ var EventRenderer = class {
|
|
|
12868
12868
|
}
|
|
12869
12869
|
static renderVm0Start(event) {
|
|
12870
12870
|
console.log(chalk3.cyan("[vm0_start]") + " Run starting");
|
|
12871
|
+
if (event.data.runId) {
|
|
12872
|
+
console.log(` Run ID: ${chalk3.gray(String(event.data.runId))}`);
|
|
12873
|
+
}
|
|
12871
12874
|
const prompt = String(event.data.prompt || "");
|
|
12872
12875
|
const displayPrompt = prompt.length > 100 ? prompt.substring(0, 100) + "..." : prompt;
|
|
12873
12876
|
console.log(` Prompt: ${chalk3.gray(displayPrompt)}`);
|
|
@@ -12933,31 +12936,23 @@ async function pollEvents(runId) {
|
|
|
12933
12936
|
);
|
|
12934
12937
|
throw new Error("Agent execution timed out");
|
|
12935
12938
|
}
|
|
12936
|
-
|
|
12937
|
-
|
|
12938
|
-
|
|
12939
|
-
|
|
12940
|
-
|
|
12941
|
-
|
|
12942
|
-
|
|
12943
|
-
|
|
12944
|
-
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
complete = true;
|
|
12948
|
-
}
|
|
12939
|
+
const response = await apiClient.getEvents(runId, {
|
|
12940
|
+
since: nextSequence
|
|
12941
|
+
});
|
|
12942
|
+
for (const event of response.events) {
|
|
12943
|
+
const parsed = ClaudeEventParser.parse(
|
|
12944
|
+
event.eventData
|
|
12945
|
+
);
|
|
12946
|
+
if (parsed) {
|
|
12947
|
+
EventRenderer.render(parsed);
|
|
12948
|
+
if (parsed.type === "vm0_result" || parsed.type === "vm0_error") {
|
|
12949
|
+
complete = true;
|
|
12949
12950
|
}
|
|
12950
12951
|
}
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12954
|
-
|
|
12955
|
-
} catch (error43) {
|
|
12956
|
-
console.error(
|
|
12957
|
-
chalk4.red("\u2717 Failed to poll events:"),
|
|
12958
|
-
error43 instanceof Error ? error43.message : "Unknown error"
|
|
12959
|
-
);
|
|
12960
|
-
throw error43;
|
|
12952
|
+
}
|
|
12953
|
+
nextSequence = response.nextSequence;
|
|
12954
|
+
if (response.events.length === 0 && !complete) {
|
|
12955
|
+
await new Promise((resolve) => setTimeout(resolve, pollIntervalMs));
|
|
12961
12956
|
}
|
|
12962
12957
|
}
|
|
12963
12958
|
}
|
|
@@ -13240,6 +13235,7 @@ var pushCommand = new Command4().name("push").description("Push local files to c
|
|
|
13240
13235
|
}
|
|
13241
13236
|
const result = await response.json();
|
|
13242
13237
|
console.log(chalk6.green("\u2713 Upload complete"));
|
|
13238
|
+
console.log(chalk6.gray(` Version: ${result.versionId}`));
|
|
13243
13239
|
console.log(chalk6.gray(` Files: ${result.fileCount.toLocaleString()}`));
|
|
13244
13240
|
console.log(chalk6.gray(` Size: ${formatBytes(result.size)}`));
|
|
13245
13241
|
} catch (error43) {
|