@vm0/cli 9.101.0 → 9.102.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/{chunk-X2L3TKWA.js → chunk-KBGMCHAA.js} +3 -3
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +48 -4
- package/zero.js.map +1 -1
- /package/{chunk-X2L3TKWA.js.map → chunk-KBGMCHAA.js.map} +0 -0
|
@@ -49,7 +49,7 @@ if (DSN) {
|
|
|
49
49
|
Sentry.init({
|
|
50
50
|
dsn: DSN,
|
|
51
51
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
52
|
-
release: "9.
|
|
52
|
+
release: "9.102.0",
|
|
53
53
|
sendDefaultPii: false,
|
|
54
54
|
tracesSampleRate: 0,
|
|
55
55
|
shutdownTimeout: 500,
|
|
@@ -68,7 +68,7 @@ if (DSN) {
|
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
Sentry.setContext("cli", {
|
|
71
|
-
version: "9.
|
|
71
|
+
version: "9.102.0",
|
|
72
72
|
command: process.argv.slice(2).join(" ")
|
|
73
73
|
});
|
|
74
74
|
Sentry.setContext("runtime", {
|
|
@@ -32112,4 +32112,4 @@ export {
|
|
|
32112
32112
|
parseTime,
|
|
32113
32113
|
paginate
|
|
32114
32114
|
};
|
|
32115
|
-
//# sourceMappingURL=chunk-
|
|
32115
|
+
//# sourceMappingURL=chunk-KBGMCHAA.js.map
|
package/index.js
CHANGED
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
showNextSteps,
|
|
62
62
|
volumeConfigSchema,
|
|
63
63
|
withErrorHandler
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-KBGMCHAA.js";
|
|
65
65
|
|
|
66
66
|
// src/index.ts
|
|
67
67
|
import { Command as Command44 } from "commander";
|
|
@@ -454,7 +454,7 @@ function getConfigPath() {
|
|
|
454
454
|
return join(homedir(), ".vm0", "config.json");
|
|
455
455
|
}
|
|
456
456
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
457
|
-
console.log(chalk3.bold(`VM0 CLI v${"9.
|
|
457
|
+
console.log(chalk3.bold(`VM0 CLI v${"9.102.0"}`));
|
|
458
458
|
console.log();
|
|
459
459
|
const config = await loadConfig();
|
|
460
460
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1581,7 +1581,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
1581
1581
|
options.autoUpdate = false;
|
|
1582
1582
|
}
|
|
1583
1583
|
if (options.autoUpdate !== false) {
|
|
1584
|
-
await startSilentUpgrade("9.
|
|
1584
|
+
await startSilentUpgrade("9.102.0");
|
|
1585
1585
|
}
|
|
1586
1586
|
try {
|
|
1587
1587
|
let result;
|
|
@@ -1655,7 +1655,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
1655
1655
|
withErrorHandler(
|
|
1656
1656
|
async (identifier, prompt, options) => {
|
|
1657
1657
|
if (options.autoUpdate !== false) {
|
|
1658
|
-
await startSilentUpgrade("9.
|
|
1658
|
+
await startSilentUpgrade("9.102.0");
|
|
1659
1659
|
}
|
|
1660
1660
|
const { name, version } = parseIdentifier(identifier);
|
|
1661
1661
|
let composeId;
|
|
@@ -3413,7 +3413,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
|
|
|
3413
3413
|
withErrorHandler(
|
|
3414
3414
|
async (prompt, options) => {
|
|
3415
3415
|
if (options.autoUpdate !== false) {
|
|
3416
|
-
const shouldExit = await checkAndUpgrade("9.
|
|
3416
|
+
const shouldExit = await checkAndUpgrade("9.102.0", prompt);
|
|
3417
3417
|
if (shouldExit) {
|
|
3418
3418
|
process.exit(0);
|
|
3419
3419
|
}
|
|
@@ -4156,13 +4156,13 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4156
4156
|
if (latestVersion === null) {
|
|
4157
4157
|
throw new Error("Could not check for updates. Please try again later.");
|
|
4158
4158
|
}
|
|
4159
|
-
if (latestVersion === "9.
|
|
4160
|
-
console.log(chalk33.green(`\u2713 Already up to date (${"9.
|
|
4159
|
+
if (latestVersion === "9.102.0") {
|
|
4160
|
+
console.log(chalk33.green(`\u2713 Already up to date (${"9.102.0"})`));
|
|
4161
4161
|
return;
|
|
4162
4162
|
}
|
|
4163
4163
|
console.log(
|
|
4164
4164
|
chalk33.yellow(
|
|
4165
|
-
`Current version: ${"9.
|
|
4165
|
+
`Current version: ${"9.102.0"} -> Latest version: ${latestVersion}`
|
|
4166
4166
|
)
|
|
4167
4167
|
);
|
|
4168
4168
|
console.log();
|
|
@@ -4189,7 +4189,7 @@ var upgradeCommand = new Command42().name("upgrade").description("Upgrade vm0 CL
|
|
|
4189
4189
|
const success = await performUpgrade(packageManager);
|
|
4190
4190
|
if (success) {
|
|
4191
4191
|
console.log(
|
|
4192
|
-
chalk33.green(`\u2713 Upgraded from ${"9.
|
|
4192
|
+
chalk33.green(`\u2713 Upgraded from ${"9.102.0"} to ${latestVersion}`)
|
|
4193
4193
|
);
|
|
4194
4194
|
return;
|
|
4195
4195
|
}
|
|
@@ -4257,7 +4257,7 @@ var whoamiCommand = new Command43().name("whoami").description("Show current ide
|
|
|
4257
4257
|
|
|
4258
4258
|
// src/index.ts
|
|
4259
4259
|
var program = new Command44();
|
|
4260
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
4260
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.102.0");
|
|
4261
4261
|
program.addCommand(authCommand);
|
|
4262
4262
|
program.addCommand(infoCommand);
|
|
4263
4263
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -114,7 +114,7 @@ import {
|
|
|
114
114
|
updateZeroUserPreferences,
|
|
115
115
|
upsertZeroOrgModelProvider,
|
|
116
116
|
withErrorHandler
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-KBGMCHAA.js";
|
|
118
118
|
|
|
119
119
|
// src/zero.ts
|
|
120
120
|
import { Command as Command77 } from "commander";
|
|
@@ -4803,6 +4803,14 @@ var ACTION_COMMANDS = {
|
|
|
4803
4803
|
move: "m"
|
|
4804
4804
|
};
|
|
4805
4805
|
var VALID_ACTIONS = new Set(Object.keys(ACTION_COMMANDS));
|
|
4806
|
+
async function isCliclickInstalled() {
|
|
4807
|
+
try {
|
|
4808
|
+
await execFileAsync2("which", ["cliclick"]);
|
|
4809
|
+
return true;
|
|
4810
|
+
} catch {
|
|
4811
|
+
return false;
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4806
4814
|
async function checkCliclickInstalled() {
|
|
4807
4815
|
try {
|
|
4808
4816
|
await execFileAsync2("which", ["cliclick"]);
|
|
@@ -5293,6 +5301,18 @@ async function stopDesktopTunnel() {
|
|
|
5293
5301
|
}
|
|
5294
5302
|
|
|
5295
5303
|
// src/commands/zero/computer-use/host.ts
|
|
5304
|
+
async function registerWithRecovery() {
|
|
5305
|
+
try {
|
|
5306
|
+
return await registerComputerUseHost();
|
|
5307
|
+
} catch (error) {
|
|
5308
|
+
if (error instanceof ApiRequestError && error.status === 409) {
|
|
5309
|
+
console.log(chalk57.yellow("Stale registration found, cleaning up..."));
|
|
5310
|
+
await unregisterComputerUseHost();
|
|
5311
|
+
return await registerComputerUseHost();
|
|
5312
|
+
}
|
|
5313
|
+
throw error;
|
|
5314
|
+
}
|
|
5315
|
+
}
|
|
5296
5316
|
var hostStartCommand = new Command74().name("start").description("Start the computer-use host daemon (macOS only)").action(
|
|
5297
5317
|
withErrorHandler(async () => {
|
|
5298
5318
|
if (process.platform !== "darwin") {
|
|
@@ -5300,8 +5320,16 @@ var hostStartCommand = new Command74().name("start").description("Start the comp
|
|
|
5300
5320
|
"Computer-use host requires macOS\n\nThe host daemon uses macOS-specific commands (screencapture, system_profiler)."
|
|
5301
5321
|
);
|
|
5302
5322
|
}
|
|
5323
|
+
if (!await isCliclickInstalled()) {
|
|
5324
|
+
console.log(
|
|
5325
|
+
chalk57.yellow(
|
|
5326
|
+
"\u26A0 cliclick not found. Mouse and keyboard operations will not be available.\n Install with: brew install cliclick"
|
|
5327
|
+
)
|
|
5328
|
+
);
|
|
5329
|
+
console.log();
|
|
5330
|
+
}
|
|
5303
5331
|
console.log(chalk57.cyan("Registering computer-use host..."));
|
|
5304
|
-
const credentials = await
|
|
5332
|
+
const credentials = await registerWithRecovery();
|
|
5305
5333
|
const port = await getRandomPort2();
|
|
5306
5334
|
const server = await startDesktopServer(credentials.token, port);
|
|
5307
5335
|
try {
|
|
@@ -5349,6 +5377,21 @@ var hostStartCommand = new Command74().name("start").description("Start the comp
|
|
|
5349
5377
|
}
|
|
5350
5378
|
})
|
|
5351
5379
|
);
|
|
5380
|
+
var hostStopCommand = new Command74().name("stop").description("Stop and unregister the computer-use host").action(
|
|
5381
|
+
withErrorHandler(async () => {
|
|
5382
|
+
console.log(chalk57.cyan("Unregistering computer-use host..."));
|
|
5383
|
+
try {
|
|
5384
|
+
await unregisterComputerUseHost();
|
|
5385
|
+
console.log(chalk57.green("\u2713 Host unregistered"));
|
|
5386
|
+
} catch (error) {
|
|
5387
|
+
if (error instanceof ApiRequestError && error.status === 404) {
|
|
5388
|
+
console.log(chalk57.yellow("No active host registration found"));
|
|
5389
|
+
return;
|
|
5390
|
+
}
|
|
5391
|
+
throw error;
|
|
5392
|
+
}
|
|
5393
|
+
})
|
|
5394
|
+
);
|
|
5352
5395
|
|
|
5353
5396
|
// src/commands/zero/computer-use/client.ts
|
|
5354
5397
|
import { Command as Command75 } from "commander";
|
|
@@ -5620,13 +5663,14 @@ var clientCursorPositionCommand = new Command75().name("cursor-position").descri
|
|
|
5620
5663
|
);
|
|
5621
5664
|
|
|
5622
5665
|
// src/commands/zero/computer-use/index.ts
|
|
5623
|
-
var hostCommand = new Command76().name("host").description("Manage computer-use host daemon").addCommand(hostStartCommand);
|
|
5666
|
+
var hostCommand = new Command76().name("host").description("Manage computer-use host daemon").addCommand(hostStartCommand).addCommand(hostStopCommand);
|
|
5624
5667
|
var clientCommand = new Command76().name("client").description("Interact with remote computer-use host").addCommand(clientScreenshotCommand).addCommand(clientZoomCommand).addCommand(clientInfoCommand).addCommand(clientLeftClickCommand).addCommand(clientRightClickCommand).addCommand(clientMiddleClickCommand).addCommand(clientDoubleClickCommand).addCommand(clientTripleClickCommand).addCommand(clientLeftClickDragCommand).addCommand(clientLeftMouseDownCommand).addCommand(clientLeftMouseUpCommand).addCommand(clientScrollCommand).addCommand(clientReadClipboardCommand).addCommand(clientWriteClipboardCommand).addCommand(clientKeyCommand).addCommand(clientHoldKeyCommand).addCommand(clientTypeCommand).addCommand(clientOpenAppCommand).addCommand(clientMouseMoveCommand).addCommand(clientCursorPositionCommand);
|
|
5625
5668
|
var zeroComputerUseCommand = new Command76().name("computer-use").description("Remote desktop control for cloud agents").addCommand(hostCommand).addCommand(clientCommand).addHelpText(
|
|
5626
5669
|
"after",
|
|
5627
5670
|
`
|
|
5628
5671
|
Examples:
|
|
5629
5672
|
Start the host daemon (on macOS): zero computer-use host start
|
|
5673
|
+
Stop the host daemon: zero computer-use host stop
|
|
5630
5674
|
Take a screenshot (from agent): zero computer-use client screenshot
|
|
5631
5675
|
Zoom into a region (from agent): zero computer-use client zoom --x 0 --y 0 --width 500 --height 500
|
|
5632
5676
|
Get screen info (from agent): zero computer-use client info
|
|
@@ -5697,7 +5741,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
5697
5741
|
var program = new Command77();
|
|
5698
5742
|
program.name("zero").description(
|
|
5699
5743
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
5700
|
-
).version("9.
|
|
5744
|
+
).version("9.102.0").addHelpText(
|
|
5701
5745
|
"after",
|
|
5702
5746
|
`
|
|
5703
5747
|
Examples:
|