@vm0/cli 9.38.3 → 9.38.5

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.
Files changed (2) hide show
  1. package/index.js +58 -57
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -45,7 +45,7 @@ if (DSN) {
45
45
  Sentry.init({
46
46
  dsn: DSN,
47
47
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
48
- release: "9.38.3",
48
+ release: "9.38.5",
49
49
  sendDefaultPii: false,
50
50
  tracesSampleRate: 0,
51
51
  shutdownTimeout: 500,
@@ -64,7 +64,7 @@ if (DSN) {
64
64
  }
65
65
  });
66
66
  Sentry.setContext("cli", {
67
- version: "9.38.3",
67
+ version: "9.38.5",
68
68
  command: process.argv.slice(2).join(" ")
69
69
  });
70
70
  Sentry.setContext("runtime", {
@@ -607,7 +607,7 @@ function getConfigPath() {
607
607
  return join2(homedir2(), ".vm0", "config.json");
608
608
  }
609
609
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
610
- console.log(chalk7.bold(`VM0 CLI v${"9.38.3"}`));
610
+ console.log(chalk7.bold(`VM0 CLI v${"9.38.5"}`));
611
611
  console.log();
612
612
  const config = await loadConfig();
613
613
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -854,8 +854,9 @@ var composeVersionQuerySchema = z4.string().min(1, "Missing version query parame
854
854
  /^[a-f0-9]{8,64}$|^latest$/i,
855
855
  "Version must be 8-64 hex characters or 'latest'"
856
856
  );
857
+ var AGENT_NAME_REGEX = /^[a-zA-Z0-9][a-zA-Z0-9-]{1,62}[a-zA-Z0-9]$/;
857
858
  var agentNameSchema = z4.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
858
- /^[a-zA-Z0-9][a-zA-Z0-9-]{1,62}[a-zA-Z0-9]$/,
859
+ AGENT_NAME_REGEX,
859
860
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
860
861
  );
861
862
  var volumeConfigSchema = z4.object({
@@ -992,7 +993,9 @@ var composesMainContract = c2.router({
992
993
  path: "/api/agent/composes",
993
994
  headers: authHeadersSchema,
994
995
  body: z4.object({
995
- content: agentComposeContentSchema
996
+ content: agentComposeContentSchema,
997
+ /** When renaming an agent, pass the previous name so the server can migrate storage volumes. */
998
+ previousName: agentNameSchema.optional()
996
999
  }),
997
1000
  responses: {
998
1001
  200: createComposeResponseSchema,
@@ -3647,15 +3650,15 @@ var CONNECTOR_TYPES = {
3647
3650
  COMPUTER_CONNECTOR_DOMAIN: "$secrets.COMPUTER_CONNECTOR_DOMAIN"
3648
3651
  }
3649
3652
  },
3650
- gmail: {
3651
- label: "Gmail",
3652
- helpText: "Connect your Gmail account to access email",
3653
+ slack: {
3654
+ label: "Slack",
3655
+ helpText: "Connect your Slack account to send messages and read channels",
3653
3656
  authMethods: {
3654
3657
  oauth: {
3655
3658
  label: "OAuth (Recommended)",
3656
- helpText: "Sign in with Google to grant Gmail access.",
3659
+ helpText: "Sign in with Slack to grant access.",
3657
3660
  secrets: {
3658
- GMAIL_ACCESS_TOKEN: {
3661
+ SLACK_ACCESS_TOKEN: {
3659
3662
  label: "Access Token",
3660
3663
  required: true
3661
3664
  }
@@ -3664,13 +3667,19 @@ var CONNECTOR_TYPES = {
3664
3667
  },
3665
3668
  defaultAuthMethod: "oauth",
3666
3669
  environmentMapping: {
3667
- GMAIL_TOKEN: "$secrets.GMAIL_ACCESS_TOKEN",
3668
- GMAIL_ACCESS_TOKEN: "$secrets.GMAIL_ACCESS_TOKEN"
3670
+ SLACK_TOKEN: "$secrets.SLACK_ACCESS_TOKEN"
3669
3671
  },
3670
3672
  oauth: {
3671
- authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
3672
- tokenUrl: "https://oauth2.googleapis.com/token",
3673
- scopes: []
3673
+ authorizationUrl: "https://slack.com/oauth/v2/authorize",
3674
+ tokenUrl: "https://slack.com/api/oauth.v2.access",
3675
+ scopes: [
3676
+ "channels:read",
3677
+ "channels:history",
3678
+ "chat:write",
3679
+ "users:read",
3680
+ "users:read.email",
3681
+ "files:read"
3682
+ ]
3674
3683
  }
3675
3684
  }
3676
3685
  };
@@ -3678,7 +3687,7 @@ var connectorTypeSchema = z23.enum([
3678
3687
  "github",
3679
3688
  "notion",
3680
3689
  "computer",
3681
- "gmail"
3690
+ "slack"
3682
3691
  ]);
3683
3692
  function getConnectorEnvironmentMapping(type2) {
3684
3693
  return CONNECTOR_TYPES[type2].environmentMapping;
@@ -3724,8 +3733,6 @@ var connectorResponseSchema = z23.object({
3724
3733
  id: z23.string().uuid(),
3725
3734
  type: connectorTypeSchema,
3726
3735
  authMethod: z23.string(),
3727
- platform: z23.enum(["self-hosted", "nango"]),
3728
- nangoConnectionId: z23.string().nullable().optional(),
3729
3736
  externalId: z23.string().nullable(),
3730
3737
  externalUsername: z23.string().nullable(),
3731
3738
  externalEmail: z23.string().nullable(),
@@ -4628,17 +4635,38 @@ var FEATURE_SWITCHES = {
4628
4635
  ["computerConnector" /* ComputerConnector */]: {
4629
4636
  maintainer: "ethan@vm0.ai",
4630
4637
  enabled: false
4631
- },
4632
- ["agentDetailPage" /* AgentDetailPage */]: {
4633
- maintainer: "yuma@vm0.ai",
4634
- enabled: false
4635
- },
4636
- ["connectorNango" /* ConnectorNango */]: {
4637
- maintainer: "ethan@vm0.ai",
4638
- enabled: false
4639
4638
  }
4640
4639
  };
4641
4640
 
4641
+ // ../../packages/core/src/skill-frontmatter.ts
4642
+ import { parse as parseYaml } from "yaml";
4643
+ function parseSkillFrontmatter(content) {
4644
+ const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
4645
+ if (!frontmatterMatch) {
4646
+ return {};
4647
+ }
4648
+ const yamlContent = frontmatterMatch[1];
4649
+ if (!yamlContent) {
4650
+ return {};
4651
+ }
4652
+ let parsed;
4653
+ try {
4654
+ parsed = parseYaml(yamlContent);
4655
+ } catch {
4656
+ return {};
4657
+ }
4658
+ if (!parsed || typeof parsed !== "object") {
4659
+ return {};
4660
+ }
4661
+ const data = parsed;
4662
+ return {
4663
+ name: typeof data.name === "string" ? data.name : void 0,
4664
+ description: typeof data.description === "string" ? data.description : void 0,
4665
+ vm0_secrets: Array.isArray(data.vm0_secrets) ? data.vm0_secrets.filter((s) => typeof s === "string") : void 0,
4666
+ vm0_vars: Array.isArray(data.vm0_vars) ? data.vm0_vars.filter((s) => typeof s === "string") : void 0
4667
+ };
4668
+ }
4669
+
4642
4670
  // src/lib/api/core/http.ts
4643
4671
  async function getRawHeaders() {
4644
4672
  const token = await getToken();
@@ -5406,7 +5434,6 @@ function validateAgentCompose(config) {
5406
5434
  // src/lib/domain/github-skills.ts
5407
5435
  import * as fs2 from "fs/promises";
5408
5436
  import * as path2 from "path";
5409
- import { parse as parseYaml } from "yaml";
5410
5437
 
5411
5438
  // src/lib/external/git-client.ts
5412
5439
  import * as fs from "fs/promises";
@@ -5536,32 +5563,6 @@ async function validateSkillDirectory(skillDir) {
5536
5563
  );
5537
5564
  }
5538
5565
  }
5539
- function parseSkillFrontmatter(content) {
5540
- const frontmatterMatch = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
5541
- if (!frontmatterMatch) {
5542
- return {};
5543
- }
5544
- const yamlContent = frontmatterMatch[1];
5545
- if (!yamlContent) {
5546
- return {};
5547
- }
5548
- let parsed;
5549
- try {
5550
- parsed = parseYaml(yamlContent);
5551
- } catch {
5552
- return {};
5553
- }
5554
- if (!parsed || typeof parsed !== "object") {
5555
- return {};
5556
- }
5557
- const data = parsed;
5558
- return {
5559
- name: typeof data.name === "string" ? data.name : void 0,
5560
- description: typeof data.description === "string" ? data.description : void 0,
5561
- vm0_secrets: Array.isArray(data.vm0_secrets) ? data.vm0_secrets.filter((s) => typeof s === "string") : void 0,
5562
- vm0_vars: Array.isArray(data.vm0_vars) ? data.vm0_vars.filter((s) => typeof s === "string") : void 0
5563
- };
5564
- }
5565
5566
  async function readSkillFrontmatter(skillDir) {
5566
5567
  const skillMdPath = path2.join(skillDir, "SKILL.md");
5567
5568
  const content = await fs2.readFile(skillMdPath, "utf8");
@@ -6481,7 +6482,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
6481
6482
  options.autoUpdate = false;
6482
6483
  }
6483
6484
  if (options.autoUpdate !== false) {
6484
- await startSilentUpgrade("9.38.3");
6485
+ await startSilentUpgrade("9.38.5");
6485
6486
  }
6486
6487
  try {
6487
6488
  let result;
@@ -8695,7 +8696,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
8695
8696
  async (identifier, prompt, options) => {
8696
8697
  try {
8697
8698
  if (options.autoUpdate !== false) {
8698
- await startSilentUpgrade("9.38.3");
8699
+ await startSilentUpgrade("9.38.5");
8699
8700
  }
8700
8701
  const { scope, name, version } = parseIdentifier(identifier);
8701
8702
  if (scope && !options.experimentalSharedAgent) {
@@ -10271,7 +10272,7 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
10271
10272
  ).option("-y, --yes", "Skip confirmation prompts").option("-v, --verbose", "Show full tool inputs and outputs").addOption(new Option5("--debug-no-mock-claude").hideHelp()).addOption(new Option5("--no-auto-update").hideHelp()).action(
10272
10273
  async (prompt, options) => {
10273
10274
  if (options.autoUpdate !== false) {
10274
- const shouldExit = await checkAndUpgrade("9.38.3", prompt);
10275
+ const shouldExit = await checkAndUpgrade("9.38.5", prompt);
10275
10276
  if (shouldExit) {
10276
10277
  process.exit(0);
10277
10278
  }
@@ -15199,7 +15200,7 @@ var preferenceCommand = new Command77().name("preference").description("View or
15199
15200
 
15200
15201
  // src/index.ts
15201
15202
  var program = new Command78();
15202
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.38.3");
15203
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.38.5");
15203
15204
  program.addCommand(authCommand);
15204
15205
  program.addCommand(infoCommand);
15205
15206
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.38.3",
3
+ "version": "9.38.5",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",