@vm0/cli 9.100.0 → 9.100.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/index.js CHANGED
@@ -61,7 +61,7 @@ import {
61
61
  showNextSteps,
62
62
  volumeConfigSchema,
63
63
  withErrorHandler
64
- } from "./chunk-2KKNOZ4M.js";
64
+ } from "./chunk-7RQXNUYT.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.100.0"}`));
457
+ console.log(chalk3.bold(`VM0 CLI v${"9.100.2"}`));
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.100.0");
1584
+ await startSilentUpgrade("9.100.2");
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.100.0");
1658
+ await startSilentUpgrade("9.100.2");
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.100.0", prompt);
3416
+ const shouldExit = await checkAndUpgrade("9.100.2", 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.100.0") {
4160
- console.log(chalk33.green(`\u2713 Already up to date (${"9.100.0"})`));
4159
+ if (latestVersion === "9.100.2") {
4160
+ console.log(chalk33.green(`\u2713 Already up to date (${"9.100.2"})`));
4161
4161
  return;
4162
4162
  }
4163
4163
  console.log(
4164
4164
  chalk33.yellow(
4165
- `Current version: ${"9.100.0"} -> Latest version: ${latestVersion}`
4165
+ `Current version: ${"9.100.2"} -> 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.100.0"} to ${latestVersion}`)
4192
+ chalk33.green(`\u2713 Upgraded from ${"9.100.2"} 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.100.0");
4260
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.100.2");
4261
4261
  program.addCommand(authCommand);
4262
4262
  program.addCommand(infoCommand);
4263
4263
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.100.0",
3
+ "version": "9.100.2",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -89,6 +89,7 @@ import {
89
89
  promptText,
90
90
  removeZeroOrgMember,
91
91
  renderRunCreated,
92
+ requestDeveloperSupportConsent,
92
93
  resolveCompose,
93
94
  resolveFirewallPolicies,
94
95
  resolveZeroScheduleByAgent,
@@ -100,6 +101,7 @@ import {
100
101
  setZeroOrgVariable,
101
102
  setZeroSecret,
102
103
  setZeroVariable,
104
+ submitDeveloperSupport,
103
105
  switchZeroOrg,
104
106
  updateSkill,
105
107
  updateZeroAgent,
@@ -109,10 +111,10 @@ import {
109
111
  updateZeroUserPreferences,
110
112
  upsertZeroOrgModelProvider,
111
113
  withErrorHandler
112
- } from "./chunk-2KKNOZ4M.js";
114
+ } from "./chunk-7RQXNUYT.js";
113
115
 
114
116
  // src/zero.ts
115
- import { Command as Command73 } from "commander";
117
+ import { Command as Command74 } from "commander";
116
118
 
117
119
  // src/commands/zero/org/index.ts
118
120
  import { Command as Command23 } from "commander";
@@ -1304,8 +1306,8 @@ function formatConnectorSummary(info, identity) {
1304
1306
  if (!info.policies) return `${info.type}${idStr} (full access)`;
1305
1307
  return `${info.type}${idStr} (${info.allowed}/${info.total} allowed)`;
1306
1308
  }
1307
- function printAccountLine(connector) {
1308
- if (!connector) return;
1309
+ function formatDetailIdentity(connector) {
1310
+ if (!connector) return "";
1309
1311
  let identity = "";
1310
1312
  if (connector.externalUsername && connector.externalEmail) {
1311
1313
  identity = `@${connector.externalUsername} (${connector.externalEmail})`;
@@ -1314,11 +1316,11 @@ function printAccountLine(connector) {
1314
1316
  } else if (connector.externalEmail) {
1315
1317
  identity = connector.externalEmail;
1316
1318
  }
1317
- if (!identity) return;
1319
+ if (!identity) return "";
1318
1320
  if (connector.needsReconnect) {
1319
1321
  identity += ` ${chalk23.yellow("(needs reconnect)")}`;
1320
1322
  }
1321
- console.log(` Account: ${identity}`);
1323
+ return identity;
1322
1324
  }
1323
1325
  var viewCommand = new Command26().name("view").description("View a zero agent").argument("<agent-id>", "Agent ID").option("--instructions", "Also show instructions content").option("--permissions", "Show full permission details for each connector").addHelpText(
1324
1326
  "after",
@@ -1368,27 +1370,17 @@ Examples:
1368
1370
  if (agent.sound) console.log(`Sound: ${agent.sound}`);
1369
1371
  if (options.permissions && connectorInfos.length > 0) {
1370
1372
  console.log();
1373
+ console.log(chalk23.bold("Connectors:"));
1371
1374
  for (const info of connectorInfos) {
1372
- if (!info.hasFirewall) {
1373
- console.log(chalk23.dim(`\u2500\u2500 ${info.type} \u2500\u2500`));
1374
- printAccountLine(identityMap.get(info.type));
1375
- console.log(" No firewall configured.");
1376
- continue;
1377
- }
1375
+ const identity = formatDetailIdentity(identityMap.get(info.type));
1376
+ console.log(` ${info.type.padEnd(14)}${identity}`);
1377
+ if (!info.hasFirewall) continue;
1378
1378
  if (!info.policies) {
1379
- console.log(chalk23.dim(`\u2500\u2500 ${info.type} (full access) \u2500\u2500`));
1380
- printAccountLine(identityMap.get(info.type));
1381
1379
  console.log(
1382
- " No permission rules configured \u2014 all API calls allowed."
1380
+ chalk23.dim(" full access \u2014 no permission rules configured")
1383
1381
  );
1384
1382
  continue;
1385
1383
  }
1386
- console.log(
1387
- chalk23.dim(
1388
- `\u2500\u2500 ${info.type} (${info.allowed}/${info.total} allowed) \u2500\u2500`
1389
- )
1390
- );
1391
- printAccountLine(identityMap.get(info.type));
1392
1384
  const nameWidth = Math.max(
1393
1385
  ...info.permissions.map((p) => {
1394
1386
  return p.name.length;
@@ -1398,7 +1390,9 @@ Examples:
1398
1390
  const policy = info.policies[perm.name] ?? "deny";
1399
1391
  const icon = policy === "allow" ? chalk23.green("\u2713") : policy === "ask" ? chalk23.yellow("?") : chalk23.dim("\u2717");
1400
1392
  const desc = perm.description ?? "";
1401
- console.log(` ${icon} ${perm.name.padEnd(nameWidth)} ${desc}`);
1393
+ console.log(
1394
+ ` ${icon} ${perm.name.padEnd(nameWidth)} ${desc}`
1395
+ );
1402
1396
  }
1403
1397
  }
1404
1398
  }
@@ -3878,7 +3872,7 @@ function printConnectorPermissions(type, resolvedPolicies) {
3878
3872
  console.log(` ${icon} ${perm.name.padEnd(nameWidth)} ${desc}`);
3879
3873
  }
3880
3874
  }
3881
- async function showSandboxInfo() {
3875
+ async function showSandboxInfo(showPermissions) {
3882
3876
  const agentId = process.env.ZERO_AGENT_ID;
3883
3877
  const payload = decodeZeroTokenPayload();
3884
3878
  console.log(`Agent ID: ${agentId}`);
@@ -3890,31 +3884,45 @@ async function showSandboxInfo() {
3890
3884
  console.log(` ${payload.capabilities.join(", ")}`);
3891
3885
  }
3892
3886
  try {
3893
- const [connectorsResult, agentResult, enabledResult] = await Promise.allSettled([
3894
- listZeroConnectors(),
3895
- getZeroAgent(agentId),
3896
- getZeroAgentUserConnectors(agentId)
3897
- ]);
3898
- if (connectorsResult.status === "rejected") return;
3899
- const identities = connectorsResult.value.connectors.filter((c) => {
3900
- return c.externalUsername !== null || c.externalEmail !== null;
3901
- });
3902
- if (identities.length === 0) return;
3903
- let resolvedPolicies = null;
3904
- const permissionDataAvailable = agentResult.status === "fulfilled" && enabledResult.status === "fulfilled";
3905
- if (permissionDataAvailable) {
3906
- resolvedPolicies = resolveFirewallPolicies(
3907
- agentResult.value.firewallPolicies,
3908
- enabledResult.value
3909
- );
3910
- }
3911
- console.log();
3912
- console.log(chalk47.bold("Connected Services:"));
3913
- for (const connector of identities) {
3914
- const identity = formatConnectorIdentity2(connector);
3915
- console.log(` ${connector.type.padEnd(14)}${identity}`);
3887
+ if (showPermissions) {
3888
+ const [connectorsResult, agentResult, enabledResult] = await Promise.allSettled([
3889
+ listZeroConnectors(),
3890
+ getZeroAgent(agentId),
3891
+ getZeroAgentUserConnectors(agentId)
3892
+ ]);
3893
+ if (connectorsResult.status === "rejected") return;
3894
+ const identities = connectorsResult.value.connectors.filter((c) => {
3895
+ return c.externalUsername !== null || c.externalEmail !== null;
3896
+ });
3897
+ if (identities.length === 0) return;
3898
+ let resolvedPolicies = null;
3899
+ const permissionDataAvailable = agentResult.status === "fulfilled" && enabledResult.status === "fulfilled";
3916
3900
  if (permissionDataAvailable) {
3917
- printConnectorPermissions(connector.type, resolvedPolicies);
3901
+ resolvedPolicies = resolveFirewallPolicies(
3902
+ agentResult.value.firewallPolicies,
3903
+ enabledResult.value
3904
+ );
3905
+ }
3906
+ console.log();
3907
+ console.log(chalk47.bold("Connectors:"));
3908
+ for (const connector of identities) {
3909
+ const identity = formatConnectorIdentity2(connector);
3910
+ console.log(` ${connector.type.padEnd(14)}${identity}`);
3911
+ if (permissionDataAvailable) {
3912
+ printConnectorPermissions(connector.type, resolvedPolicies);
3913
+ }
3914
+ }
3915
+ } else {
3916
+ const connectors = await listZeroConnectors();
3917
+ const identities = connectors.connectors.filter((c) => {
3918
+ return c.externalUsername !== null || c.externalEmail !== null;
3919
+ });
3920
+ if (identities.length === 0) return;
3921
+ console.log();
3922
+ console.log(chalk47.bold("Connectors:"));
3923
+ for (const connector of identities) {
3924
+ const identity = formatConnectorIdentity2(connector);
3925
+ console.log(` ${connector.type.padEnd(14)}${identity}`);
3918
3926
  }
3919
3927
  }
3920
3928
  } catch {
@@ -3940,19 +3948,21 @@ async function showLocalInfo() {
3940
3948
  console.log(` Active: ${activeOrg}`);
3941
3949
  }
3942
3950
  }
3943
- var zeroWhoamiCommand = new Command61().name("whoami").description("Show agent identity, run ID, and capabilities").addHelpText(
3951
+ var zeroWhoamiCommand = new Command61().name("whoami").description("Show agent identity, run ID, and capabilities").option("--permissions", "Show full permission details for each connector").addHelpText(
3944
3952
  "after",
3945
3953
  `
3946
3954
  Examples:
3947
3955
  zero whoami
3956
+ zero whoami --permissions
3948
3957
 
3949
3958
  Notes:
3950
3959
  - Inside sandbox: shows agent ID, run ID, org ID, and granted capabilities
3960
+ - Use --permissions to see detailed permission breakdown per connector
3951
3961
  - Your agent ID is also available as $ZERO_AGENT_ID`
3952
3962
  ).action(
3953
- withErrorHandler(async () => {
3963
+ withErrorHandler(async (options) => {
3954
3964
  if (isInsideSandbox()) {
3955
- await showSandboxInfo();
3965
+ await showSandboxInfo(options.permissions ?? false);
3956
3966
  } else {
3957
3967
  await showLocalInfo();
3958
3968
  }
@@ -4632,6 +4642,47 @@ Examples:
4632
4642
  )
4633
4643
  );
4634
4644
 
4645
+ // src/commands/zero/developer-support.ts
4646
+ import { Command as Command73 } from "commander";
4647
+ var zeroDeveloperSupportCommand = new Command73().name("developer-support").description("Submit a diagnostic report to the dev team").requiredOption("--title <text>", "Issue title").requiredOption("--description <text>", "Diagnostic description").option("--consent-code <code>", "User-provided verification code").addHelpText(
4648
+ "after",
4649
+ `
4650
+ Examples:
4651
+ Step 1 \u2014 Get consent code:
4652
+ zero developer-support --title "GitHub 403 error" --description "Connector connected but API returns 403"
4653
+
4654
+ Step 2 \u2014 Submit with code:
4655
+ zero developer-support --title "GitHub 403 error" --description "Connector connected but API returns 403" --consent-code A7X3
4656
+
4657
+ Notes:
4658
+ - The consent code must be provided by the user to confirm sharing their conversation
4659
+ - The dev team will receive a diagnostic bundle with conversation, environment, and connector info`
4660
+ ).action(
4661
+ withErrorHandler(
4662
+ async (options) => {
4663
+ if (!options.consentCode) {
4664
+ const { consentCode } = await requestDeveloperSupportConsent({
4665
+ title: options.title,
4666
+ description: options.description
4667
+ });
4668
+ console.log(
4669
+ "Consent required to share chat history with developers."
4670
+ );
4671
+ console.log(`Code: ${consentCode}`);
4672
+ console.log("Ask the user to confirm by providing this code.");
4673
+ } else {
4674
+ const { reference } = await submitDeveloperSupport({
4675
+ title: options.title,
4676
+ description: options.description,
4677
+ consentCode: options.consentCode
4678
+ });
4679
+ console.log("Developer support request submitted successfully.");
4680
+ console.log(`Reference: ${reference}`);
4681
+ }
4682
+ }
4683
+ )
4684
+ );
4685
+
4635
4686
  // src/zero.ts
4636
4687
  var COMMAND_CAPABILITY_MAP = {
4637
4688
  agent: "agent:read",
@@ -4643,7 +4694,8 @@ var COMMAND_CAPABILITY_MAP = {
4643
4694
  logs: "agent-run:read",
4644
4695
  slack: "slack:write",
4645
4696
  whoami: null,
4646
- "ask-user": null
4697
+ "ask-user": null,
4698
+ "developer-support": null
4647
4699
  };
4648
4700
  var DEFAULT_COMMANDS = [
4649
4701
  zeroOrgCommand,
@@ -4659,7 +4711,8 @@ var DEFAULT_COMMANDS = [
4659
4711
  zeroLogsCommand,
4660
4712
  zeroWhoamiCommand,
4661
4713
  zeroAskUserCommand,
4662
- zeroSkillCommand
4714
+ zeroSkillCommand,
4715
+ zeroDeveloperSupportCommand
4663
4716
  ];
4664
4717
  function shouldHideCommand(name, payload) {
4665
4718
  if (!payload) return false;
@@ -4675,10 +4728,10 @@ function registerZeroCommands(prog, commands) {
4675
4728
  prog.addCommand(cmd, hidden ? { hidden: true } : {});
4676
4729
  }
4677
4730
  }
4678
- var program = new Command73();
4731
+ var program = new Command74();
4679
4732
  program.name("zero").description(
4680
4733
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
4681
- ).version("9.100.0").addHelpText(
4734
+ ).version("9.100.2").addHelpText(
4682
4735
  "after",
4683
4736
  `
4684
4737
  Examples: