@vm0/cli 9.171.0 → 9.172.1
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
|
@@ -69,7 +69,7 @@ import {
|
|
|
69
69
|
source_default,
|
|
70
70
|
volumeConfigSchema,
|
|
71
71
|
withErrorHandler
|
|
72
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-BBCUKURF.js";
|
|
73
73
|
import {
|
|
74
74
|
__toESM,
|
|
75
75
|
init_esm_shims
|
|
@@ -388,7 +388,7 @@ function getConfigPath() {
|
|
|
388
388
|
return join(os.homedir(), ".vm0", "config.json");
|
|
389
389
|
}
|
|
390
390
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
391
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
391
|
+
console.log(source_default.bold(`VM0 CLI v${"9.172.1"}`));
|
|
392
392
|
console.log();
|
|
393
393
|
const config = await loadConfig();
|
|
394
394
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4281,7 +4281,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4281
4281
|
options.autoUpdate = false;
|
|
4282
4282
|
}
|
|
4283
4283
|
if (options.autoUpdate !== false) {
|
|
4284
|
-
await startSilentUpgrade("9.
|
|
4284
|
+
await startSilentUpgrade("9.172.1");
|
|
4285
4285
|
}
|
|
4286
4286
|
try {
|
|
4287
4287
|
let result;
|
|
@@ -4383,7 +4383,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4383
4383
|
withErrorHandler(
|
|
4384
4384
|
async (identifier, prompt, options) => {
|
|
4385
4385
|
if (options.autoUpdate !== false) {
|
|
4386
|
-
await startSilentUpgrade("9.
|
|
4386
|
+
await startSilentUpgrade("9.172.1");
|
|
4387
4387
|
}
|
|
4388
4388
|
const { name, version } = parseIdentifier(identifier);
|
|
4389
4389
|
let composeId;
|
|
@@ -6177,13 +6177,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6177
6177
|
if (latestVersion === null) {
|
|
6178
6178
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6179
6179
|
}
|
|
6180
|
-
if (latestVersion === "9.
|
|
6181
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
6180
|
+
if (latestVersion === "9.172.1") {
|
|
6181
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.172.1"})`));
|
|
6182
6182
|
return;
|
|
6183
6183
|
}
|
|
6184
6184
|
console.log(
|
|
6185
6185
|
source_default.yellow(
|
|
6186
|
-
`Current version: ${"9.
|
|
6186
|
+
`Current version: ${"9.172.1"} -> Latest version: ${latestVersion}`
|
|
6187
6187
|
)
|
|
6188
6188
|
);
|
|
6189
6189
|
console.log();
|
|
@@ -6210,7 +6210,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6210
6210
|
const success = await performUpgrade(packageManager);
|
|
6211
6211
|
if (success) {
|
|
6212
6212
|
console.log(
|
|
6213
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
6213
|
+
source_default.green(`\u2713 Upgraded from ${"9.172.1"} to ${latestVersion}`)
|
|
6214
6214
|
);
|
|
6215
6215
|
return;
|
|
6216
6216
|
}
|
|
@@ -6277,7 +6277,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6277
6277
|
|
|
6278
6278
|
// src/index.ts
|
|
6279
6279
|
var program = new Command();
|
|
6280
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
6280
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.172.1");
|
|
6281
6281
|
program.addCommand(authCommand);
|
|
6282
6282
|
program.addCommand(infoCommand);
|
|
6283
6283
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -152,7 +152,7 @@ import {
|
|
|
152
152
|
zeroAgentCustomSkillNameSchema,
|
|
153
153
|
zeroLocalAgentCommand,
|
|
154
154
|
zeroTokenAllowsFeatureSwitch
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-BBCUKURF.js";
|
|
156
156
|
import {
|
|
157
157
|
__toESM,
|
|
158
158
|
init_esm_shims
|
|
@@ -6560,7 +6560,7 @@ Notes:
|
|
|
6560
6560
|
init_esm_shims();
|
|
6561
6561
|
import { mkdir, writeFile } from "fs/promises";
|
|
6562
6562
|
import { join as join6 } from "path";
|
|
6563
|
-
var
|
|
6563
|
+
var COMPUTER_USE_OUTPUT_DIR = "/tmp/vm0/computer-use";
|
|
6564
6564
|
var DATA_URL_PATTERN = /^data:([^;,]+);base64,(.*)$/s;
|
|
6565
6565
|
var COMPUTER_USE_HELP_TEXT = `
|
|
6566
6566
|
Workflow:
|
|
@@ -6571,8 +6571,10 @@ Workflow:
|
|
|
6571
6571
|
4. Prefer element actions with --snapshot-id and --element-index. Use --x/--y
|
|
6572
6572
|
only when the target is visible in the returned screenshot but has no useful
|
|
6573
6573
|
accessibility element.
|
|
6574
|
-
5. Read the JSON result. Screenshot data
|
|
6575
|
-
and replaced with
|
|
6574
|
+
5. Read the JSON result. Screenshot and App State data are saved under
|
|
6575
|
+
/tmp/vm0/computer-use and replaced with local file paths in CLI output.
|
|
6576
|
+
Files are named from app and snapshotId; rerunning the same snapshot
|
|
6577
|
+
overwrites the same files.
|
|
6576
6578
|
|
|
6577
6579
|
Notes:
|
|
6578
6580
|
Write commands are sent to the connected Desktop host and may wait for local
|
|
@@ -6698,13 +6700,24 @@ async function writeScreenshotDataUrl(result, dataUrl) {
|
|
|
6698
6700
|
const appName = sanitizeFilenamePart(result.app, "app");
|
|
6699
6701
|
const snapshotId = sanitizeFilenamePart(result.snapshotId, "snapshot");
|
|
6700
6702
|
const outputPath = join6(
|
|
6701
|
-
|
|
6703
|
+
COMPUTER_USE_OUTPUT_DIR,
|
|
6702
6704
|
`${appName}-${snapshotId}.${extensionForMimeType(mimeType)}`
|
|
6703
6705
|
);
|
|
6704
|
-
await mkdir(
|
|
6706
|
+
await mkdir(COMPUTER_USE_OUTPUT_DIR, { recursive: true });
|
|
6705
6707
|
await writeFile(outputPath, Buffer.from(base64Data, "base64"));
|
|
6706
6708
|
return outputPath;
|
|
6707
6709
|
}
|
|
6710
|
+
async function writeAppStateText(result, appState) {
|
|
6711
|
+
const appName = sanitizeFilenamePart(result.app, "app");
|
|
6712
|
+
const snapshotId = sanitizeFilenamePart(result.snapshotId, "snapshot");
|
|
6713
|
+
const outputPath = join6(
|
|
6714
|
+
COMPUTER_USE_OUTPUT_DIR,
|
|
6715
|
+
`${appName}-${snapshotId}.appState.txt`
|
|
6716
|
+
);
|
|
6717
|
+
await mkdir(COMPUTER_USE_OUTPUT_DIR, { recursive: true });
|
|
6718
|
+
await writeFile(outputPath, appState, "utf8");
|
|
6719
|
+
return outputPath;
|
|
6720
|
+
}
|
|
6708
6721
|
function compactActionResult(action) {
|
|
6709
6722
|
const compact = {};
|
|
6710
6723
|
for (const [key, value] of Object.entries(action)) {
|
|
@@ -6726,7 +6739,7 @@ async function formatComputerUseResultForConsole(result) {
|
|
|
6726
6739
|
}
|
|
6727
6740
|
const appState = stringField(result, "appState");
|
|
6728
6741
|
if (appState) {
|
|
6729
|
-
printable.appState = appState;
|
|
6742
|
+
printable.appState = await writeAppStateText(result, appState);
|
|
6730
6743
|
}
|
|
6731
6744
|
const screenshot = stringField(result, "screenshot");
|
|
6732
6745
|
if (screenshot) {
|
|
@@ -12824,7 +12837,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
12824
12837
|
var program = new Command();
|
|
12825
12838
|
program.name("zero").description(
|
|
12826
12839
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
12827
|
-
).version("9.
|
|
12840
|
+
).version("9.172.1").addHelpText("after", () => {
|
|
12828
12841
|
return buildZeroHelpText();
|
|
12829
12842
|
});
|
|
12830
12843
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|