@vm0/cli 9.120.0 → 9.121.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.
@@ -73649,7 +73649,7 @@ if (DSN) {
73649
73649
  init2({
73650
73650
  dsn: DSN,
73651
73651
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
73652
- release: "9.120.0",
73652
+ release: "9.121.0",
73653
73653
  sendDefaultPii: false,
73654
73654
  tracesSampleRate: 0,
73655
73655
  shutdownTimeout: 500,
@@ -73668,7 +73668,7 @@ if (DSN) {
73668
73668
  }
73669
73669
  });
73670
73670
  setContext("cli", {
73671
- version: "9.120.0",
73671
+ version: "9.121.0",
73672
73672
  command: process.argv.slice(2).join(" ")
73673
73673
  });
73674
73674
  setContext("runtime", {
@@ -115989,4 +115989,4 @@ undici/lib/web/fetch/body.js:
115989
115989
  undici/lib/web/websocket/frame.js:
115990
115990
  (*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
115991
115991
  */
115992
- //# sourceMappingURL=chunk-CVXG5BRK.js.map
115992
+ //# sourceMappingURL=chunk-3CRO7Q5L.js.map
package/index.js CHANGED
@@ -65,7 +65,7 @@ import {
65
65
  source_default,
66
66
  volumeConfigSchema,
67
67
  withErrorHandler
68
- } from "./chunk-CVXG5BRK.js";
68
+ } from "./chunk-3CRO7Q5L.js";
69
69
  import {
70
70
  __toESM,
71
71
  init_esm_shims
@@ -398,7 +398,7 @@ function getConfigPath() {
398
398
  return join(homedir(), ".vm0", "config.json");
399
399
  }
400
400
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
401
- console.log(source_default.bold(`VM0 CLI v${"9.120.0"}`));
401
+ console.log(source_default.bold(`VM0 CLI v${"9.121.0"}`));
402
402
  console.log();
403
403
  const config = await loadConfig();
404
404
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4291,7 +4291,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4291
4291
  options.autoUpdate = false;
4292
4292
  }
4293
4293
  if (options.autoUpdate !== false) {
4294
- await startSilentUpgrade("9.120.0");
4294
+ await startSilentUpgrade("9.121.0");
4295
4295
  }
4296
4296
  try {
4297
4297
  let result;
@@ -4381,7 +4381,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4381
4381
  withErrorHandler(
4382
4382
  async (identifier, prompt, options) => {
4383
4383
  if (options.autoUpdate !== false) {
4384
- await startSilentUpgrade("9.120.0");
4384
+ await startSilentUpgrade("9.121.0");
4385
4385
  }
4386
4386
  const { name, version } = parseIdentifier(identifier);
4387
4387
  let composeId;
@@ -6393,13 +6393,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6393
6393
  if (latestVersion === null) {
6394
6394
  throw new Error("Could not check for updates. Please try again later.");
6395
6395
  }
6396
- if (latestVersion === "9.120.0") {
6397
- console.log(source_default.green(`\u2713 Already up to date (${"9.120.0"})`));
6396
+ if (latestVersion === "9.121.0") {
6397
+ console.log(source_default.green(`\u2713 Already up to date (${"9.121.0"})`));
6398
6398
  return;
6399
6399
  }
6400
6400
  console.log(
6401
6401
  source_default.yellow(
6402
- `Current version: ${"9.120.0"} -> Latest version: ${latestVersion}`
6402
+ `Current version: ${"9.121.0"} -> Latest version: ${latestVersion}`
6403
6403
  )
6404
6404
  );
6405
6405
  console.log();
@@ -6426,7 +6426,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6426
6426
  const success = await performUpgrade(packageManager);
6427
6427
  if (success) {
6428
6428
  console.log(
6429
- source_default.green(`\u2713 Upgraded from ${"9.120.0"} to ${latestVersion}`)
6429
+ source_default.green(`\u2713 Upgraded from ${"9.121.0"} to ${latestVersion}`)
6430
6430
  );
6431
6431
  return;
6432
6432
  }
@@ -6493,7 +6493,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
6493
6493
 
6494
6494
  // src/index.ts
6495
6495
  var program = new Command();
6496
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.120.0");
6496
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.121.0");
6497
6497
  program.addCommand(authCommand);
6498
6498
  program.addCommand(infoCommand);
6499
6499
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.120.0",
3
+ "version": "9.121.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -126,7 +126,7 @@ import {
126
126
  upsertZeroOrgModelProvider,
127
127
  withErrorHandler,
128
128
  zeroAgentCustomSkillNameSchema
129
- } from "./chunk-CVXG5BRK.js";
129
+ } from "./chunk-3CRO7Q5L.js";
130
130
  import {
131
131
  __toESM,
132
132
  init_esm_shims
@@ -1578,7 +1578,8 @@ async function resolveAgentContext(flagAgentId) {
1578
1578
  };
1579
1579
  }
1580
1580
 
1581
- // src/commands/zero/connector/list.ts
1581
+ // src/commands/zero/connector/connected-as.ts
1582
+ init_esm_shims();
1582
1583
  function renderIdentity(connector) {
1583
1584
  if (connector.externalUsername) return `@${connector.externalUsername}`;
1584
1585
  if (connector.externalEmail) return connector.externalEmail;
@@ -1604,6 +1605,8 @@ function padEndAnsi(s, width) {
1604
1605
  const visible = stripAnsi(s).length;
1605
1606
  return s + " ".repeat(Math.max(0, width - visible));
1606
1607
  }
1608
+
1609
+ // src/commands/zero/connector/list.ts
1607
1610
  var listCommand6 = new Command().name("list").alias("ls").description("List all connectors and their status").option("--agent <id>", "Show per-agent authorization column").action(
1608
1611
  withErrorHandler(async (options) => {
1609
1612
  const [{ connectors }, orgId, agentCtx] = await Promise.all([
@@ -1667,14 +1670,6 @@ var listCommand6 = new Command().name("list").alias("ls").description("List all
1667
1670
  init_esm_shims();
1668
1671
  var DEFAULT_LIMIT = 5;
1669
1672
  var EXACT_MATCH_THRESHOLD = 80;
1670
- var ANSI_PATTERN2 = /\u001b\[[0-9;]*m/g;
1671
- function stripAnsi2(s) {
1672
- return s.replace(ANSI_PATTERN2, "");
1673
- }
1674
- function padEndAnsi2(s, width) {
1675
- const visible = stripAnsi2(s).length;
1676
- return s + " ".repeat(Math.max(0, width - visible));
1677
- }
1678
1673
  function parseLimit(raw) {
1679
1674
  const n = Number.parseInt(raw, 10);
1680
1675
  if (!Number.isFinite(n) || n <= 0) {
@@ -1694,10 +1689,16 @@ var searchCommand = new Command().name("search").description("Search connectors
1694
1689
  if (!trimmed) {
1695
1690
  throw new Error("Keyword cannot be empty.");
1696
1691
  }
1697
- const [orgId, agentCtx] = await Promise.all([
1692
+ const [{ connectors }, orgId, agentCtx] = await Promise.all([
1693
+ listZeroConnectors(),
1698
1694
  getActiveOrg(),
1699
1695
  resolveAgentContext(options.agent)
1700
1696
  ]);
1697
+ const connectedMap = new Map(
1698
+ connectors.map((c) => {
1699
+ return [c.type, c];
1700
+ })
1701
+ );
1701
1702
  const isTypeAvailable = (type) => {
1702
1703
  const config = CONNECTOR_TYPES[type];
1703
1704
  const flag = config.featureFlag;
@@ -1721,32 +1722,35 @@ var searchCommand = new Command().name("search").description("Search connectors
1721
1722
  console.log(`Too many results (top ${options.limit} of ${total}):`);
1722
1723
  }
1723
1724
  const typeHeader = "TYPE";
1724
- const labelHeader = "LABEL";
1725
+ const connectedAsHeader = "CONNECTED AS";
1726
+ const connectedCells = results.map((r) => {
1727
+ return renderConnectedAsCell(connectedMap.get(r.type));
1728
+ });
1725
1729
  const typeWidth = Math.max(
1726
1730
  typeHeader.length,
1727
1731
  ...results.map((r) => {
1728
1732
  return r.type.length;
1729
1733
  })
1730
1734
  );
1731
- const labelWidth = Math.max(
1732
- labelHeader.length,
1733
- ...results.map((r) => {
1734
- return CONNECTOR_TYPES[r.type].label.length;
1735
+ const connectedAsWidth = Math.max(
1736
+ connectedAsHeader.length,
1737
+ ...connectedCells.map((c) => {
1738
+ return stripAnsi(c).length;
1735
1739
  })
1736
1740
  );
1737
1741
  const headerParts = [
1738
1742
  typeHeader.padEnd(typeWidth),
1739
- labelHeader.padEnd(labelWidth)
1743
+ connectedAsHeader.padEnd(connectedAsWidth)
1740
1744
  ];
1741
1745
  if (agentCtx) {
1742
1746
  headerParts.push(`AUTHORIZED FOR ${agentCtx.displayName}`);
1743
1747
  }
1744
1748
  console.log(source_default.dim(headerParts.join(" ")));
1745
- for (const result of results) {
1746
- const config = CONNECTOR_TYPES[result.type];
1749
+ for (let i = 0; i < results.length; i++) {
1750
+ const result = results[i];
1747
1751
  const parts = [
1748
1752
  result.type.padEnd(typeWidth),
1749
- padEndAnsi2(config.label, labelWidth)
1753
+ padEndAnsi(connectedCells[i], connectedAsWidth)
1750
1754
  ];
1751
1755
  if (agentCtx) {
1752
1756
  parts.push(
@@ -6291,7 +6295,7 @@ function registerZeroCommands(prog, commands) {
6291
6295
  var program = new Command();
6292
6296
  program.name("zero").description(
6293
6297
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
6294
- ).version("9.120.0").addHelpText(
6298
+ ).version("9.121.0").addHelpText(
6295
6299
  "after",
6296
6300
  `
6297
6301
  Examples: