@vm0/cli 9.169.0 → 9.169.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.169.0",
3
+ "version": "9.169.2",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -59,8 +59,8 @@ import {
59
59
  getApiUrl,
60
60
  getAuthMethodsForType,
61
61
  getComputerUseCommand,
62
- getConnectorDerivedNames,
63
- getConnectorEnvironmentMapping,
62
+ getConnectorEnvBindings,
63
+ getConnectorEnvNamesForSecret,
64
64
  getConnectorFirewall,
65
65
  getConnectorGenerationTypes,
66
66
  getConnectorTypeForSecretName,
@@ -153,7 +153,7 @@ import {
153
153
  zeroAgentCustomSkillNameSchema,
154
154
  zeroLocalAgentCommand,
155
155
  zeroTokenAllowsFeatureSwitch
156
- } from "./chunk-5KJLUOMN.js";
156
+ } from "./chunk-CZICABIP.js";
157
157
  import {
158
158
  __toESM,
159
159
  init_esm_shims
@@ -1886,7 +1886,9 @@ function parseLimit(raw) {
1886
1886
  }
1887
1887
  return n;
1888
1888
  }
1889
- var searchCommand = new Command().name("search").description("Search connectors by type, label, env var, secret, or tag").argument("<keyword>", "Search keyword (case-insensitive)").option("--agent <id>", "Show per-agent authorization column").option(
1889
+ var searchCommand = new Command().name("search").description(
1890
+ "Search connectors by type, label, environment name, secret, or tag"
1891
+ ).argument("<keyword>", "Search keyword (case-insensitive)").option("--agent <id>", "Show per-agent authorization column").option(
1890
1892
  "--limit <n>",
1891
1893
  `Maximum number of results to display (default ${DEFAULT_LIMIT})`,
1892
1894
  parseLimit,
@@ -2344,10 +2346,10 @@ function resolveConnectorFromUrl(url) {
2344
2346
  }
2345
2347
  }
2346
2348
  if (!bestMatch) return null;
2347
- const mapping = getConnectorEnvironmentMapping(
2349
+ const envBindings = getConnectorEnvBindings(
2348
2350
  bestMatch.connectorType
2349
2351
  );
2350
- const envName = Object.keys(mapping)[0];
2352
+ const envName = Object.keys(envBindings)[0];
2351
2353
  if (!envName) return null;
2352
2354
  const relativePath = normalized === bestMatch.base ? "/" : normalized.slice(bestMatch.base.length);
2353
2355
  return {
@@ -2357,8 +2359,8 @@ function resolveConnectorFromUrl(url) {
2357
2359
  relativePath
2358
2360
  };
2359
2361
  }
2360
- function checkEnvVariable(ctx) {
2361
- console.log("## Step 1: Sandbox environment variable");
2362
+ function checkEnvName(ctx) {
2363
+ console.log("## Step 1: Sandbox environment name");
2362
2364
  console.log("");
2363
2365
  const envPresent = Boolean(process.env[ctx.envName]);
2364
2366
  console.log(
@@ -2370,7 +2372,7 @@ function checkEnvVariable(ctx) {
2370
2372
  );
2371
2373
  } else {
2372
2374
  console.log(
2373
- "No value found for this environment variable. Note: credential replacement at the network boundary is independent of this variable \u2014 the proxy injects auth headers based on the destination URL, not the presence of this env var."
2375
+ "No value found for this environment name. Note: credential replacement at the network boundary is independent of this name \u2014 the proxy injects auth headers based on the destination URL."
2374
2376
  );
2375
2377
  }
2376
2378
  console.log("");
@@ -2615,16 +2617,16 @@ function resolvePermissionFromUrl(connectorType, label, method, relativePath, ma
2615
2617
  console.log("");
2616
2618
  }
2617
2619
  var checkConnectorCommand = new Command().name("check-connector").description(
2618
- "Diagnose connector health: environment variable, connector configuration, and permission policies"
2620
+ "Diagnose connector health: environment name, connector configuration, and permission policies"
2619
2621
  ).addOption(
2620
2622
  new Option(
2621
2623
  "--env-name <ENV_NAME>",
2622
- "The environment variable name to check (e.g. GITHUB_TOKEN)"
2624
+ "The connector environment name to check (e.g. GITHUB_TOKEN)"
2623
2625
  )
2624
2626
  ).addOption(
2625
2627
  new Option(
2626
2628
  "--url <URL>",
2627
- "A full URL to diagnose \u2014 auto-detects the connector, env var, and permission (e.g. https://api.github.com/repos/owner/repo)"
2629
+ "A full URL to diagnose \u2014 auto-detects the connector, environment name, and permission (e.g. https://api.github.com/repos/owner/repo)"
2628
2630
  )
2629
2631
  ).addOption(
2630
2632
  new Option(
@@ -2676,14 +2678,14 @@ How connectors work:
2676
2678
  );
2677
2679
  console.log(` Matched base URL: ${urlLookup.matchedBase}`);
2678
2680
  console.log(` Relative path: ${urlLookup.relativePath}`);
2679
- console.log(` Environment var: ${envName}`);
2681
+ console.log(` Environment name: ${envName}`);
2680
2682
  } else {
2681
2683
  connectorType = getConnectorTypeForSecretName(
2682
2684
  envName = opts.envName
2683
2685
  );
2684
2686
  if (!connectorType) {
2685
2687
  throw new Error(
2686
- `Unknown environment variable: ${envName} \u2014 not managed by any connector`
2688
+ `Unknown environment name: ${envName} \u2014 not managed by any connector`
2687
2689
  );
2688
2690
  }
2689
2691
  console.log(
@@ -2705,7 +2707,7 @@ How connectors work:
2705
2707
  platformOrigin: platformUrl.origin,
2706
2708
  agentId: process.env.ZERO_AGENT_ID || void 0
2707
2709
  };
2708
- checkEnvVariable(ctx);
2710
+ checkEnvName(ctx);
2709
2711
  const { isConnected, isExpired, hasPermission } = await checkConnectorStatus(ctx);
2710
2712
  const networkPolicies = await checkConnectorDomains(ctx);
2711
2713
  if (isConnected && !isExpired && hasPermission) {
@@ -3047,7 +3049,7 @@ Examples:
3047
3049
 
3048
3050
  Notes:
3049
3051
  - Use zero doctor credit when a run or generation fails because the org has insufficient credits, when a user asks how to recharge, or before trying to buy credits
3050
- - Use this when your task fails due to a missing environment variable or permission denial
3052
+ - Use this when your task fails due to a missing connector environment name or permission denial
3051
3053
  - Use zero generate <type> (no --prompt) to see every provider available for a given generation type
3052
3054
  - The doctor will identify the issue and give the user a link to resolve it`
3053
3055
  );
@@ -4202,21 +4204,21 @@ var listCommand8 = new Command().name("list").alias("ls").description("List all
4202
4204
  if (secret.type === "model-provider") {
4203
4205
  typeIndicator = source_default.dim(" [model-provider]");
4204
4206
  } else if (secret.type === "connector") {
4205
- const derived = getConnectorDerivedNames(secret.name);
4207
+ const derived = getConnectorEnvNamesForSecret(secret.name);
4206
4208
  if (derived) {
4207
4209
  typeIndicator = source_default.dim(` [${derived.connectorLabel} connector]`);
4208
4210
  derivedLine = source_default.dim(
4209
- `Available as: ${derived.envVarNames.join(", ")}`
4211
+ `Available as: ${derived.envNames.join(", ")}`
4210
4212
  );
4211
4213
  } else {
4212
4214
  typeIndicator = source_default.dim(" [connector]");
4213
4215
  }
4214
4216
  } else if (secret.type === "user") {
4215
- const derived = getConnectorDerivedNames(secret.name);
4217
+ const derived = getConnectorEnvNamesForSecret(secret.name);
4216
4218
  if (derived) {
4217
4219
  typeIndicator = source_default.dim(` [${derived.connectorLabel} connector]`);
4218
4220
  derivedLine = source_default.dim(
4219
- `Available as: ${derived.envVarNames.join(", ")}`
4221
+ `Available as: ${derived.envNames.join(", ")}`
4220
4222
  );
4221
4223
  }
4222
4224
  }
@@ -12564,7 +12566,7 @@ function registerZeroCommands(prog, commands) {
12564
12566
  var program = new Command();
12565
12567
  program.name("zero").description(
12566
12568
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
12567
- ).version("9.169.0").addHelpText("after", () => {
12569
+ ).version("9.169.2").addHelpText("after", () => {
12568
12570
  return buildZeroHelpText();
12569
12571
  });
12570
12572
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {