@vm0/cli 9.175.1 → 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/index.js CHANGED
@@ -67,7 +67,7 @@ import {
67
67
  source_default,
68
68
  volumeConfigSchema,
69
69
  withErrorHandler
70
- } from "./chunk-23CPS6PB.js";
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.175.1"}`));
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.175.1");
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.175.1");
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.175.1") {
6193
- console.log(source_default.green(`\u2713 Already up to date (${"9.175.1"})`));
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.175.1"} -> Latest version: ${latestVersion}`
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.175.1"} to ${latestVersion}`)
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.175.1");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.175.1",
3
+ "version": "9.176.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
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
- hasRequiredScopes,
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-23CPS6PB.js";
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 = connector.authMethod === "oauth" && !hasRequiredScopes(connector.type, connector.oauthScopes);
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 (connector.authMethod === "oauth" && !hasRequiredScopes(type, connector.oauthScopes)) {
2291
- const diff = getScopeDiff(type, connector.oauthScopes);
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 current focus in Safari:
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
  })
@@ -9807,6 +9825,18 @@ var RESOURCE_REGISTRY = [
9807
9825
  ref: VM0_SKILLS_REF,
9808
9826
  path: "illustration-template/iberian-vignette"
9809
9827
  }
9828
+ },
9829
+ {
9830
+ id: "image-style:ink-storefront",
9831
+ kind: "image-style",
9832
+ name: "Ink Storefront",
9833
+ description: "Single-color hand-drawn ink fineliner illustration of a small storefront on warm cream paper \u2014 hand-lettered shop sign, foliage, and street props.",
9834
+ desc: 'Boutique-poster illustration style \u2014 a single-color hand-drawn ink line drawing of a small storefront (caf\xE9, boulangerie, florist, bookshop, ramen, wine bar, barber, record store, etc.) seen from street level on warm cream paper #f4ecd8. Locked frame: portrait 1024x1536, monochromatic ink with occasional double-stroke shadow under awnings and signs, a hand-lettered shop sign baked into the building, foliage and at least one small street prop (bike, A-frame chalkboard, planters, lanterns, caf\xE9 tables, dog/cat at the door), and a faint horizontal sidewalk line across the bottom. No solid color fills, no shading, no gradients. Seven dials per brief \u2014 ink color, shop name + subtitle, archetype, perspective (flat facade vs 3/4 corner), foreground props, foliage density, and complexity (L1 single facade / L2 small scene / L3 full vignette). Trigger when user says /ink-storefront, asks for a "shopfront illustration", "storefront poster", "boutique fineliner illustration", "caf\xE9 line drawing", or briefs with a shop name + ink color + archetype in this house style.',
9835
+ source: {
9836
+ repo: VM0_SKILLS_REPO,
9837
+ ref: VM0_SKILLS_REF,
9838
+ path: "illustration-template/ink-storefront"
9839
+ }
9810
9840
  }
9811
9841
  ];
9812
9842
  function filterByKind(kind) {
@@ -13025,7 +13055,7 @@ function registerZeroCommands(prog, commands) {
13025
13055
  var program = new Command();
13026
13056
  program.name("zero").description(
13027
13057
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
13028
- ).version("9.175.1").addHelpText("after", () => {
13058
+ ).version("9.176.1").addHelpText("after", () => {
13029
13059
  return buildZeroHelpText();
13030
13060
  });
13031
13061
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {