@vm0/cli 9.31.1 → 9.32.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.
Files changed (2) hide show
  1. package/index.js +45 -11
  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.31.1",
48
+ release: "9.32.0",
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.31.1",
67
+ version: "9.32.0",
68
68
  command: process.argv.slice(2).join(" ")
69
69
  });
70
70
  Sentry.setContext("runtime", {
@@ -605,7 +605,7 @@ async function waitForSilentUpgrade(timeout = TIMEOUT_MS) {
605
605
  // src/commands/info/index.ts
606
606
  var CONFIG_PATH = join2(homedir2(), ".vm0", "config.json");
607
607
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
608
- console.log(chalk7.bold(`VM0 CLI v${"9.31.1"}`));
608
+ console.log(chalk7.bold(`VM0 CLI v${"9.32.0"}`));
609
609
  console.log();
610
610
  const config = await loadConfig();
611
611
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -1097,6 +1097,8 @@ var unifiedRunRequestSchema = z5.object({
1097
1097
  debugNoMockClaude: z5.boolean().optional(),
1098
1098
  // Model provider for automatic credential injection
1099
1099
  modelProvider: z5.string().optional(),
1100
+ // Environment validation flag - when true, validates secrets/vars before running
1101
+ checkEnv: z5.boolean().optional(),
1100
1102
  // Required
1101
1103
  prompt: z5.string().min(1, "Missing prompt")
1102
1104
  });
@@ -3555,9 +3557,38 @@ var CONNECTOR_TYPES = {
3555
3557
  tokenUrl: "https://github.com/login/oauth/access_token",
3556
3558
  scopes: ["repo"]
3557
3559
  }
3560
+ },
3561
+ notion: {
3562
+ label: "Notion",
3563
+ helpText: "Connect your Notion workspace to access pages and databases",
3564
+ authMethods: {
3565
+ oauth: {
3566
+ label: "OAuth (Recommended)",
3567
+ helpText: "Sign in with Notion to grant access.",
3568
+ secrets: {
3569
+ NOTION_ACCESS_TOKEN: {
3570
+ label: "Access Token",
3571
+ required: true
3572
+ },
3573
+ NOTION_REFRESH_TOKEN: {
3574
+ label: "Refresh Token",
3575
+ required: true
3576
+ }
3577
+ }
3578
+ }
3579
+ },
3580
+ defaultAuthMethod: "oauth",
3581
+ environmentMapping: {
3582
+ NOTION_TOKEN: "$secrets.NOTION_ACCESS_TOKEN"
3583
+ },
3584
+ oauth: {
3585
+ authorizationUrl: "https://api.notion.com/v1/oauth/authorize",
3586
+ tokenUrl: "https://api.notion.com/v1/oauth/token",
3587
+ scopes: []
3588
+ }
3558
3589
  }
3559
3590
  };
3560
- var connectorTypeSchema = z23.enum(["github"]);
3591
+ var connectorTypeSchema = z23.enum(["github", "notion"]);
3561
3592
  function getConnectorEnvironmentMapping(type2) {
3562
3593
  return CONNECTOR_TYPES[type2].environmentMapping;
3563
3594
  }
@@ -6202,7 +6233,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
6202
6233
  options.autoUpdate = false;
6203
6234
  }
6204
6235
  if (options.autoUpdate !== false) {
6205
- await startSilentUpgrade("9.31.1");
6236
+ await startSilentUpgrade("9.32.0");
6206
6237
  }
6207
6238
  try {
6208
6239
  let result;
@@ -8395,11 +8426,11 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
8395
8426
  ).option("--verbose", "Show full tool inputs and outputs").option(
8396
8427
  "--experimental-shared-agent",
8397
8428
  "Allow running agents shared by other users (required when running scope/agent format)"
8398
- ).addOption(new Option2("--debug-no-mock-claude").hideHelp()).addOption(new Option2("--no-auto-update").hideHelp()).action(
8429
+ ).option("--check-env", "Validate secrets and vars before running").addOption(new Option2("--debug-no-mock-claude").hideHelp()).addOption(new Option2("--no-auto-update").hideHelp()).action(
8399
8430
  async (identifier, prompt, options) => {
8400
8431
  try {
8401
8432
  if (options.autoUpdate !== false) {
8402
- await startSilentUpgrade("9.31.1");
8433
+ await startSilentUpgrade("9.32.0");
8403
8434
  }
8404
8435
  const { scope, name, version } = parseIdentifier(identifier);
8405
8436
  if (scope && !options.experimentalSharedAgent) {
@@ -8476,6 +8507,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
8476
8507
  volumeVersions: Object.keys(options.volumeVersion).length > 0 ? options.volumeVersion : void 0,
8477
8508
  conversationId: options.conversation,
8478
8509
  modelProvider: options.modelProvider,
8510
+ checkEnv: options.checkEnv || void 0,
8479
8511
  debugNoMockClaude: options.debugNoMockClaude || void 0
8480
8512
  });
8481
8513
  if (response.status === "failed") {
@@ -8532,7 +8564,7 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
8532
8564
  ).option(
8533
8565
  "--model-provider <type>",
8534
8566
  "Override model provider (e.g., anthropic-api-key)"
8535
- ).option("--verbose", "Show full tool inputs and outputs").addOption(new Option3("--debug-no-mock-claude").hideHelp()).action(
8567
+ ).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option3("--debug-no-mock-claude").hideHelp()).action(
8536
8568
  async (checkpointId, prompt, options, command) => {
8537
8569
  const allOpts = command.optsWithGlobals();
8538
8570
  const vars = { ...allOpts.vars, ...options.vars };
@@ -8556,6 +8588,7 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
8556
8588
  secrets: loadedSecrets,
8557
8589
  volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0,
8558
8590
  modelProvider: options.modelProvider || allOpts.modelProvider,
8591
+ checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
8559
8592
  debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
8560
8593
  });
8561
8594
  if (response.status === "failed") {
@@ -8611,7 +8644,7 @@ var continueCommand = new Command10().name("continue").description(
8611
8644
  ).option(
8612
8645
  "--model-provider <type>",
8613
8646
  "Override model provider (e.g., anthropic-api-key)"
8614
- ).option("--verbose", "Show full tool inputs and outputs").addOption(new Option4("--debug-no-mock-claude").hideHelp()).action(
8647
+ ).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option4("--debug-no-mock-claude").hideHelp()).action(
8615
8648
  async (agentSessionId, prompt, options, command) => {
8616
8649
  const allOpts = command.optsWithGlobals();
8617
8650
  const vars = { ...allOpts.vars, ...options.vars };
@@ -8634,6 +8667,7 @@ var continueCommand = new Command10().name("continue").description(
8634
8667
  vars: Object.keys(vars).length > 0 ? vars : void 0,
8635
8668
  secrets: loadedSecrets,
8636
8669
  modelProvider: options.modelProvider || allOpts.modelProvider,
8670
+ checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
8637
8671
  debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
8638
8672
  });
8639
8673
  if (response.status === "failed") {
@@ -9972,7 +10006,7 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
9972
10006
  ).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(
9973
10007
  async (prompt, options) => {
9974
10008
  if (options.autoUpdate !== false) {
9975
- const shouldExit = await checkAndUpgrade("9.31.1", prompt);
10009
+ const shouldExit = await checkAndUpgrade("9.32.0", prompt);
9976
10010
  if (shouldExit) {
9977
10011
  process.exit(0);
9978
10012
  }
@@ -14388,7 +14422,7 @@ var devToolCommand = new Command75().name("dev-tool").description("Developer too
14388
14422
 
14389
14423
  // src/index.ts
14390
14424
  var program = new Command76();
14391
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.31.1");
14425
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.32.0");
14392
14426
  program.addCommand(authCommand);
14393
14427
  program.addCommand(infoCommand);
14394
14428
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.31.1",
3
+ "version": "9.32.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",