@vm0/cli 9.176.0 → 9.176.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/{chunk-3WAS5ORK.js → chunk-TPUYVLNY.js} +42 -27
- package/{chunk-3WAS5ORK.js.map → chunk-TPUYVLNY.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +31 -13
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -67,7 +67,7 @@ import {
|
|
|
67
67
|
source_default,
|
|
68
68
|
volumeConfigSchema,
|
|
69
69
|
withErrorHandler
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-TPUYVLNY.js";
|
|
71
71
|
import {
|
|
72
72
|
__toESM,
|
|
73
73
|
init_esm_shims
|
|
@@ -400,7 +400,7 @@ function getConfigPath() {
|
|
|
400
400
|
return join(os.homedir(), ".vm0", "config.json");
|
|
401
401
|
}
|
|
402
402
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
403
|
-
console.log(source_default.bold(`VM0 CLI v${"9.176.
|
|
403
|
+
console.log(source_default.bold(`VM0 CLI v${"9.176.1"}`));
|
|
404
404
|
console.log();
|
|
405
405
|
const config = await loadConfig();
|
|
406
406
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4293,7 +4293,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4293
4293
|
options.autoUpdate = false;
|
|
4294
4294
|
}
|
|
4295
4295
|
if (options.autoUpdate !== false) {
|
|
4296
|
-
await startSilentUpgrade("9.176.
|
|
4296
|
+
await startSilentUpgrade("9.176.1");
|
|
4297
4297
|
}
|
|
4298
4298
|
try {
|
|
4299
4299
|
let result;
|
|
@@ -4395,7 +4395,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4395
4395
|
withErrorHandler(
|
|
4396
4396
|
async (identifier, prompt, options) => {
|
|
4397
4397
|
if (options.autoUpdate !== false) {
|
|
4398
|
-
await startSilentUpgrade("9.176.
|
|
4398
|
+
await startSilentUpgrade("9.176.1");
|
|
4399
4399
|
}
|
|
4400
4400
|
const { name, version } = parseIdentifier(identifier);
|
|
4401
4401
|
let composeId;
|
|
@@ -6189,13 +6189,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6189
6189
|
if (latestVersion === null) {
|
|
6190
6190
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6191
6191
|
}
|
|
6192
|
-
if (latestVersion === "9.176.
|
|
6193
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.176.
|
|
6192
|
+
if (latestVersion === "9.176.1") {
|
|
6193
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.176.1"})`));
|
|
6194
6194
|
return;
|
|
6195
6195
|
}
|
|
6196
6196
|
console.log(
|
|
6197
6197
|
source_default.yellow(
|
|
6198
|
-
`Current version: ${"9.176.
|
|
6198
|
+
`Current version: ${"9.176.1"} -> Latest version: ${latestVersion}`
|
|
6199
6199
|
)
|
|
6200
6200
|
);
|
|
6201
6201
|
console.log();
|
|
@@ -6222,7 +6222,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6222
6222
|
const success = await performUpgrade(packageManager);
|
|
6223
6223
|
if (success) {
|
|
6224
6224
|
console.log(
|
|
6225
|
-
source_default.green(`\u2713 Upgraded from ${"9.176.
|
|
6225
|
+
source_default.green(`\u2713 Upgraded from ${"9.176.1"} to ${latestVersion}`)
|
|
6226
6226
|
);
|
|
6227
6227
|
return;
|
|
6228
6228
|
}
|
|
@@ -6289,7 +6289,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6289
6289
|
|
|
6290
6290
|
// src/index.ts
|
|
6291
6291
|
var program = new Command();
|
|
6292
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.176.
|
|
6292
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.176.1");
|
|
6293
6293
|
program.addCommand(authCommand);
|
|
6294
6294
|
program.addCommand(infoCommand);
|
|
6295
6295
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -56,6 +56,7 @@ import {
|
|
|
56
56
|
getApiUrl,
|
|
57
57
|
getAuthMethodsForType,
|
|
58
58
|
getComputerUseCommand,
|
|
59
|
+
getConnectorAuthMethodScopeDiff,
|
|
59
60
|
getConnectorEnvBindings,
|
|
60
61
|
getConnectorEnvNamesForSecret,
|
|
61
62
|
getConnectorFirewall,
|
|
@@ -63,7 +64,6 @@ import {
|
|
|
63
64
|
getConnectorTypeForSecretName,
|
|
64
65
|
getDefaultAuthMethod,
|
|
65
66
|
getGithubInstallation,
|
|
66
|
-
getScopeDiff,
|
|
67
67
|
getSecretsForAuthMethod,
|
|
68
68
|
getSelectableProviderTypes,
|
|
69
69
|
getSkill,
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
getZeroRunContext,
|
|
82
82
|
getZeroUserPreferences,
|
|
83
83
|
hasAuthMethods,
|
|
84
|
-
|
|
84
|
+
hasRequiredConnectorAuthMethodScopes,
|
|
85
85
|
initGithubFileUpload,
|
|
86
86
|
initPhoneFileUpload,
|
|
87
87
|
initSlackFileUpload,
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
withErrorHandler,
|
|
146
146
|
zeroAgentCustomSkillNameSchema,
|
|
147
147
|
zeroTokenAllowsFeatureSwitch
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-TPUYVLNY.js";
|
|
149
149
|
import {
|
|
150
150
|
__toESM,
|
|
151
151
|
init_esm_shims
|
|
@@ -1792,7 +1792,11 @@ function renderConnectedAsCell(connector) {
|
|
|
1792
1792
|
if (connector.needsReconnect) {
|
|
1793
1793
|
return source_default.yellow(`${identity} (reconnect needed)`);
|
|
1794
1794
|
}
|
|
1795
|
-
const scopeMismatch =
|
|
1795
|
+
const scopeMismatch = !hasRequiredConnectorAuthMethodScopes(
|
|
1796
|
+
connector.type,
|
|
1797
|
+
connector.authMethod,
|
|
1798
|
+
connector.oauthScopes
|
|
1799
|
+
);
|
|
1796
1800
|
if (scopeMismatch) {
|
|
1797
1801
|
return source_default.yellow(`${identity} (permissions update available)`);
|
|
1798
1802
|
}
|
|
@@ -2287,8 +2291,16 @@ function printConnectorDetails(type, connector) {
|
|
|
2287
2291
|
`${"OAuth Scopes:".padEnd(LABEL_WIDTH)}${connector.oauthScopes.join(", ")}`
|
|
2288
2292
|
);
|
|
2289
2293
|
}
|
|
2290
|
-
if (
|
|
2291
|
-
|
|
2294
|
+
if (!hasRequiredConnectorAuthMethodScopes(
|
|
2295
|
+
type,
|
|
2296
|
+
connector.authMethod,
|
|
2297
|
+
connector.oauthScopes
|
|
2298
|
+
)) {
|
|
2299
|
+
const diff = getConnectorAuthMethodScopeDiff(
|
|
2300
|
+
type,
|
|
2301
|
+
connector.authMethod,
|
|
2302
|
+
connector.oauthScopes
|
|
2303
|
+
);
|
|
2292
2304
|
console.log(
|
|
2293
2305
|
`${"Permissions:".padEnd(LABEL_WIDTH)}${source_default.yellow("update available")}`
|
|
2294
2306
|
);
|
|
@@ -6577,6 +6589,10 @@ Notes:
|
|
|
6577
6589
|
set-value when you need deterministic accessibility value assignment.
|
|
6578
6590
|
press-key accepts xdotool-style names such as shift+semicolon, Control_L+J,
|
|
6579
6591
|
ctrl+alt+n, and BackSpace, plus existing macOS-style forms such as Command+L.
|
|
6592
|
+
type-text and press-key accept the same --snapshot-id as the element actions:
|
|
6593
|
+
pass it to deliver keyboard input to that snapshot's window. Without it, the
|
|
6594
|
+
most relevant window for the app is picked, which is ambiguous for multi-window
|
|
6595
|
+
apps.
|
|
6580
6596
|
|
|
6581
6597
|
Examples:
|
|
6582
6598
|
List available apps:
|
|
@@ -6591,11 +6607,11 @@ Examples:
|
|
|
6591
6607
|
Click screenshot coordinate (320, 240) from snapshot desktop_abc:
|
|
6592
6608
|
zero computer-use click --app Safari --snapshot-id desktop_abc --x 320 --y 240
|
|
6593
6609
|
|
|
6594
|
-
Type text into the
|
|
6595
|
-
zero computer-use type-text --app Safari --text "Hello"
|
|
6610
|
+
Type text into the snapshot desktop_abc window in Safari:
|
|
6611
|
+
zero computer-use type-text --app Safari --snapshot-id desktop_abc --text "Hello"
|
|
6596
6612
|
|
|
6597
|
-
Press a keyboard shortcut:
|
|
6598
|
-
zero computer-use press-key --app Safari --key shift+semicolon
|
|
6613
|
+
Press a keyboard shortcut in the snapshot desktop_abc window:
|
|
6614
|
+
zero computer-use press-key --app Safari --snapshot-id desktop_abc --key shift+semicolon
|
|
6599
6615
|
|
|
6600
6616
|
Open an app without activating the current foreground app:
|
|
6601
6617
|
zero computer-use open-app --app Things`;
|
|
@@ -6884,10 +6900,11 @@ var setValueCommand = appOption(
|
|
|
6884
6900
|
);
|
|
6885
6901
|
var typeTextCommand = appOption(
|
|
6886
6902
|
addTargetOptions(
|
|
6887
|
-
new Command().name("type-text").description("Type literal keyboard input into the target app").requiredOption("--text <text>", "Text to type").action(
|
|
6903
|
+
new Command().name("type-text").description("Type literal keyboard input into the target app").option("--snapshot-id <id>", "Snapshot id returned by get-app-state").requiredOption("--text <text>", "Text to type").action(
|
|
6888
6904
|
withErrorHandler(async (options) => {
|
|
6889
6905
|
await runWriteCommand("keyboard.type_text", options, {
|
|
6890
6906
|
app: options.app,
|
|
6907
|
+
...options.snapshotId ? { snapshotId: options.snapshotId } : {},
|
|
6891
6908
|
text: options.text
|
|
6892
6909
|
});
|
|
6893
6910
|
})
|
|
@@ -6896,13 +6913,14 @@ var typeTextCommand = appOption(
|
|
|
6896
6913
|
);
|
|
6897
6914
|
var pressKeyCommand = appOption(
|
|
6898
6915
|
addTargetOptions(
|
|
6899
|
-
new Command().name("press-key").description("Send a background key or key combination to the target app").requiredOption(
|
|
6916
|
+
new Command().name("press-key").description("Send a background key or key combination to the target app").option("--snapshot-id <id>", "Snapshot id returned by get-app-state").requiredOption(
|
|
6900
6917
|
"--key <key>",
|
|
6901
6918
|
"Key or xdotool-style combination, for example Command+K, shift+semicolon, or Control_L+J"
|
|
6902
6919
|
).action(
|
|
6903
6920
|
withErrorHandler(async (options) => {
|
|
6904
6921
|
await runWriteCommand("keyboard.press_key", options, {
|
|
6905
6922
|
app: options.app,
|
|
6923
|
+
...options.snapshotId ? { snapshotId: options.snapshotId } : {},
|
|
6906
6924
|
key: options.key
|
|
6907
6925
|
});
|
|
6908
6926
|
})
|
|
@@ -13037,7 +13055,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
13037
13055
|
var program = new Command();
|
|
13038
13056
|
program.name("zero").description(
|
|
13039
13057
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
13040
|
-
).version("9.176.
|
|
13058
|
+
).version("9.176.1").addHelpText("after", () => {
|
|
13041
13059
|
return buildZeroHelpText();
|
|
13042
13060
|
});
|
|
13043
13061
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|