@vm0/cli 9.205.0 → 9.206.1

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.
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
3
3
  const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  getConnectorEnvBindingEntries
6
- } from "./chunk-GTPY5BQJ.js";
6
+ } from "./chunk-A7UBSZER.js";
7
7
  import {
8
8
  init_esm_shims
9
9
  } from "./chunk-QI47S6VO.js";
@@ -47,4 +47,4 @@ function expandFirewallPlaceholders(firewall, connectorType) {
47
47
  export {
48
48
  expandFirewallPlaceholders
49
49
  };
50
- //# sourceMappingURL=firewall-placeholder-expansion-EZ5WNMSE.js.map
50
+ //# sourceMappingURL=firewall-placeholder-expansion-ZRRX27DR.js.map
package/index.js CHANGED
@@ -74,10 +74,10 @@ import {
74
74
  uo,
75
75
  volumeConfigSchema,
76
76
  withErrorHandler
77
- } from "./chunk-URAOWQX7.js";
77
+ } from "./chunk-BX6IGPXR.js";
78
78
  import {
79
79
  external_exports
80
- } from "./chunk-GTPY5BQJ.js";
80
+ } from "./chunk-A7UBSZER.js";
81
81
  import "./chunk-NR42YJMI.js";
82
82
  import {
83
83
  __toESM,
@@ -411,7 +411,7 @@ function getConfigPath() {
411
411
  return join(os.homedir(), ".vm0", "config.json");
412
412
  }
413
413
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
414
- console.log(source_default.bold(`VM0 CLI v${"9.205.0"}`));
414
+ console.log(source_default.bold(`VM0 CLI v${"9.206.1"}`));
415
415
  console.log();
416
416
  const config = await loadConfig();
417
417
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -1113,7 +1113,7 @@ var composeCommand = new Command().name("compose").description("Create or update
1113
1113
  options.autoUpdate = false;
1114
1114
  }
1115
1115
  if (options.autoUpdate !== false) {
1116
- await startSilentUpgrade("9.205.0");
1116
+ await startSilentUpgrade("9.206.1");
1117
1117
  }
1118
1118
  try {
1119
1119
  const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
@@ -1210,7 +1210,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
1210
1210
  withErrorHandler(
1211
1211
  async (identifier, prompt, options) => {
1212
1212
  if (options.autoUpdate !== false) {
1213
- await startSilentUpgrade("9.205.0");
1213
+ await startSilentUpgrade("9.206.1");
1214
1214
  }
1215
1215
  const { name, version } = parseIdentifier(identifier);
1216
1216
  let composeId;
@@ -3016,13 +3016,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
3016
3016
  if (latestVersion === null) {
3017
3017
  throw new Error("Could not check for updates. Please try again later.");
3018
3018
  }
3019
- if (latestVersion === "9.205.0") {
3020
- console.log(source_default.green(`\u2713 Already up to date (${"9.205.0"})`));
3019
+ if (latestVersion === "9.206.1") {
3020
+ console.log(source_default.green(`\u2713 Already up to date (${"9.206.1"})`));
3021
3021
  return;
3022
3022
  }
3023
3023
  console.log(
3024
3024
  source_default.yellow(
3025
- `Current version: ${"9.205.0"} -> Latest version: ${latestVersion}`
3025
+ `Current version: ${"9.206.1"} -> Latest version: ${latestVersion}`
3026
3026
  )
3027
3027
  );
3028
3028
  console.log();
@@ -3049,7 +3049,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
3049
3049
  const success = await performUpgrade(packageManager);
3050
3050
  if (success) {
3051
3051
  console.log(
3052
- source_default.green(`\u2713 Upgraded from ${"9.205.0"} to ${latestVersion}`)
3052
+ source_default.green(`\u2713 Upgraded from ${"9.206.1"} to ${latestVersion}`)
3053
3053
  );
3054
3054
  return;
3055
3055
  }
@@ -3116,7 +3116,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
3116
3116
 
3117
3117
  // src/index.ts
3118
3118
  var program = new Command();
3119
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.205.0");
3119
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.206.1");
3120
3120
  program.addCommand(authCommand);
3121
3121
  program.addCommand(infoCommand);
3122
3122
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.205.0",
3
+ "version": "9.206.1",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  callZeroBanking,
16
16
  callZeroMaps,
17
17
  checkDirectoryStatus,
18
+ clearGoal,
18
19
  collectLogItems,
19
20
  completeGithubFileUpload,
20
21
  completeGoal,
@@ -131,6 +132,7 @@ import {
131
132
  parseEvent,
132
133
  parsePositiveLogCount,
133
134
  parseTime,
135
+ pauseGoal,
134
136
  prepareHostedSite,
135
137
  promptConfirm,
136
138
  promptPassword,
@@ -175,7 +177,7 @@ import {
175
177
  uploadWebFile,
176
178
  upsertZeroOrgModelProvider,
177
179
  withErrorHandler
178
- } from "./chunk-URAOWQX7.js";
180
+ } from "./chunk-BX6IGPXR.js";
179
181
  import {
180
182
  CONNECTOR_TYPES,
181
183
  CONNECTOR_TYPE_KEYS,
@@ -188,7 +190,7 @@ import {
188
190
  getConnectorStoredSecretDisplayInfo,
189
191
  getDiagnosticConnectorTypeForRuntimeEnvName,
190
192
  hasRequiredConnectorAuthMethodScopes
191
- } from "./chunk-GTPY5BQJ.js";
193
+ } from "./chunk-A7UBSZER.js";
192
194
  import "./chunk-NR42YJMI.js";
193
195
  import {
194
196
  __toESM,
@@ -6733,7 +6735,7 @@ function isRuntimeFirewallConnectorType(type) {
6733
6735
  async function loadExpandedConnectorFirewall(type) {
6734
6736
  const [firewall, { expandFirewallPlaceholders }] = await Promise.all([
6735
6737
  loadGeneratedRuntimeFirewall(type),
6736
- import("./firewall-placeholder-expansion-EZ5WNMSE.js")
6738
+ import("./firewall-placeholder-expansion-ZRRX27DR.js")
6737
6739
  ]);
6738
6740
  return expandFirewallPlaceholders(firewall, type);
6739
6741
  }
@@ -10005,9 +10007,6 @@ function formatGmailMatchSummary(config) {
10005
10007
  parts.push(...textMatcherParts(field, matcher));
10006
10008
  }
10007
10009
  }
10008
- if (match.snippet || match.labels || match.hasAttachment !== void 0) {
10009
- parts.push("custom match rules");
10010
- }
10011
10010
  return parts.length > 0 ? parts.join("; ") : "all inbound messages";
10012
10011
  }
10013
10012
  function formatWorkflowTriggerEntry(trigger) {
@@ -10288,7 +10287,34 @@ var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
10288
10287
  var SCHEDULE_KINDS = ["cron", "once", "loop"];
10289
10288
  var EVENT_KINDS = ["gmail-new-message"];
10290
10289
  var TRIGGER_KINDS = [...SCHEDULE_KINDS, ...EVENT_KINDS];
10291
- var EXACTLY_ONE_FLAG_MESSAGE = "Provide exactly one of --expr (cron), --at (once), --every (loop)";
10290
+ var EXACTLY_ONE_FLAG_MESSAGE = "Provide exactly one of --expr (cron), --at (once), --every (loop), or provide Gmail match options";
10291
+ function addGmailTriggerOptions(command) {
10292
+ return command.option(
10293
+ "--config <path>",
10294
+ "Path to a Gmail new message trigger config JSON"
10295
+ ).option("--from-contains <text>", "Require the From header to contain text").option(
10296
+ "--from-not-contains <text>",
10297
+ "Require the From header not to contain text"
10298
+ ).option(
10299
+ "--subject-contains <text>",
10300
+ "Require the Subject header to contain text"
10301
+ ).option(
10302
+ "--subject-not-contains <text>",
10303
+ "Require the Subject header not to contain text"
10304
+ ).option(
10305
+ "--body-contains <text>",
10306
+ "Require the message body to contain text"
10307
+ ).option(
10308
+ "--body-not-contains <text>",
10309
+ "Require the message body not to contain text"
10310
+ ).option("--to-contains <text>", "Require the To header to contain text").option(
10311
+ "--to-not-contains <text>",
10312
+ "Require the To header not to contain text"
10313
+ ).option("--cc-contains <text>", "Require the Cc header to contain text").option(
10314
+ "--cc-not-contains <text>",
10315
+ "Require the Cc header not to contain text"
10316
+ );
10317
+ }
10292
10318
  function timezoneOrUtc(timezone) {
10293
10319
  return timezone ?? "UTC";
10294
10320
  }
@@ -10454,6 +10480,13 @@ function buildUpdate(options) {
10454
10480
  return value !== void 0;
10455
10481
  }
10456
10482
  ).length;
10483
+ const hasGmailOptions = hasGmailTriggerOptions(options);
10484
+ if (hasGmailOptions) {
10485
+ if (flagCount > 0 || options.timezone !== void 0) {
10486
+ throw new Error("Use either schedule flags or Gmail match options");
10487
+ }
10488
+ return { eventConfig: buildGmailNewMessageEventConfig(options) };
10489
+ }
10457
10490
  if (flagCount !== 1) {
10458
10491
  throw new Error(EXACTLY_ONE_FLAG_MESSAGE);
10459
10492
  }
@@ -10488,24 +10521,14 @@ async function resolveWorkflowId(ref, options) {
10488
10521
  }
10489
10522
  return matches[0].id;
10490
10523
  }
10491
- var addCommand = new Command().name("add").description("Add a trigger to a workflow").argument("<workflow>", "Workflow ID or name").argument("<kind>", `Trigger type: ${TRIGGER_KINDS.join(" | ")}`).option("--expr <expression>", 'Cron expression for kind "cron"').option("--at <iso-time>", 'Fire time for kind "once"').option("--every <duration>", 'Interval for kind "loop" (e.g. 15m, 1h, 90s)').option("-z, --timezone <tz>", "IANA timezone for cron/once (default: UTC)").option("--config <path>", "Path to a Gmail new message trigger config JSON").option("--from-contains <text>", "Require the From header to contain text").option(
10492
- "--from-not-contains <text>",
10493
- "Require the From header not to contain text"
10494
- ).option(
10495
- "--subject-contains <text>",
10496
- "Require the Subject header to contain text"
10497
- ).option(
10498
- "--subject-not-contains <text>",
10499
- "Require the Subject header not to contain text"
10500
- ).option("--body-contains <text>", "Require the message body to contain text").option(
10501
- "--body-not-contains <text>",
10502
- "Require the message body not to contain text"
10503
- ).option("--to-contains <text>", "Require the To header to contain text").option(
10504
- "--to-not-contains <text>",
10505
- "Require the To header not to contain text"
10506
- ).option("--cc-contains <text>", "Require the Cc header to contain text").option(
10507
- "--cc-not-contains <text>",
10508
- "Require the Cc header not to contain text"
10524
+ var addCommand = addGmailTriggerOptions(
10525
+ new Command().name("add").description("Add a trigger to a workflow").argument("<workflow>", "Workflow ID or name").argument("<kind>", `Trigger type: ${TRIGGER_KINDS.join(" | ")}`).option("--expr <expression>", 'Cron expression for kind "cron"').option("--at <iso-time>", 'Fire time for kind "once"').option(
10526
+ "--every <duration>",
10527
+ 'Interval for kind "loop" (e.g. 15m, 1h, 90s)'
10528
+ ).option(
10529
+ "-z, --timezone <tz>",
10530
+ "IANA timezone for cron/once (default: UTC)"
10531
+ )
10509
10532
  ).option("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
10510
10533
  "after",
10511
10534
  `
@@ -10536,13 +10559,17 @@ Notes:
10536
10559
  }
10537
10560
  )
10538
10561
  );
10539
- var updateCommand3 = new Command().name("update").description("Replace a workflow trigger's schedule").argument("<trigger>", "Workflow trigger ID").option("--expr <expression>", 'New cron schedule (e.g. "0 9 * * *")').option("--at <iso-time>", 'New one-time fire (e.g. "2026-06-10T09:00")').option("--every <duration>", "New loop interval (e.g. 15m, 1h, 90s)").option("-z, --timezone <tz>", "IANA timezone for --expr / --at").addHelpText(
10562
+ var updateCommand3 = addGmailTriggerOptions(
10563
+ new Command().name("update").description("Replace a workflow trigger's schedule or Gmail match config").argument("<trigger>", "Workflow trigger ID").option("--expr <expression>", 'New cron schedule (e.g. "0 9 * * *")').option("--at <iso-time>", 'New one-time fire (e.g. "2026-06-10T09:00")').option("--every <duration>", "New loop interval (e.g. 15m, 1h, 90s)").option("-z, --timezone <tz>", "IANA timezone for --expr / --at")
10564
+ ).addHelpText(
10540
10565
  "after",
10541
10566
  `
10542
10567
  Examples:
10543
10568
  zero workflow trigger update 22222222-2222-4222-8222-222222222222 --expr "0 9 * * *" -z Asia/Shanghai
10544
10569
  zero workflow trigger update 22222222-2222-4222-8222-222222222222 --at "2026-06-10T09:00" -z UTC
10545
- zero workflow trigger update 22222222-2222-4222-8222-222222222222 --every 10m`
10570
+ zero workflow trigger update 22222222-2222-4222-8222-222222222222 --every 10m
10571
+ zero workflow trigger update 22222222-2222-4222-8222-222222222222 --from-contains "@example.com"
10572
+ zero workflow trigger update 22222222-2222-4222-8222-222222222222 --config ./gmail-trigger.json`
10546
10573
  ).action(
10547
10574
  withErrorHandler(async (id, options) => {
10548
10575
  const trigger = await updateWorkflowTrigger(id, buildUpdate(options));
@@ -10639,36 +10666,19 @@ init_esm_shims();
10639
10666
  function printJson(value) {
10640
10667
  console.log(JSON.stringify(value));
10641
10668
  }
10642
- function parseTokenBudget(value) {
10643
- const parsed = Number(value);
10644
- if (!Number.isInteger(parsed) || parsed <= 0) {
10645
- throw new InvalidArgumentError("--token-budget must be a positive integer");
10646
- }
10647
- return parsed;
10648
- }
10649
10669
  var createCommand5 = new Command().name("create").description(
10650
10670
  "Create a persistent goal for the current thread. Create a goal ONLY when the user explicitly asks for a persistent, autonomous, cross-turn task; do not infer a goal from an ordinary one-off request."
10651
10671
  ).requiredOption(
10652
10672
  "--objective <text>",
10653
10673
  "Goal objective. Set a goal ONLY on an explicit user request for autonomous cross-turn work; never infer one from a one-off request."
10654
- ).option("--token-budget <tokens>", "Optional token budget", parseTokenBudget).action(
10674
+ ).action(
10655
10675
  withErrorHandler(async (options) => {
10656
- printJson(
10657
- await createGoal({
10658
- objective: options.objective,
10659
- ...options.tokenBudget ? { tokenBudget: options.tokenBudget } : {}
10660
- })
10661
- );
10676
+ printJson(await createGoal({ objective: options.objective }));
10662
10677
  })
10663
10678
  );
10664
- var editCommand3 = new Command().name("edit").description("Edit the current thread goal's objective or token budget").option("--objective <text>", "New goal objective").option("--token-budget <tokens>", "New token budget", parseTokenBudget).action(
10679
+ var editCommand3 = new Command().name("edit").description("Edit the current thread goal objective").requiredOption("--objective <text>", "New goal objective").action(
10665
10680
  withErrorHandler(async (options) => {
10666
- printJson(
10667
- await editGoal({
10668
- ...options.objective !== void 0 ? { objective: options.objective } : {},
10669
- ...options.tokenBudget !== void 0 ? { tokenBudget: options.tokenBudget } : {}
10670
- })
10671
- );
10681
+ printJson(await editGoal({ objective: options.objective }));
10672
10682
  })
10673
10683
  );
10674
10684
  var getCommand = new Command().name("get").description("Get the current thread goal").action(
@@ -10681,17 +10691,27 @@ var completeCommand = new Command().name("complete").description("Mark the curre
10681
10691
  printJson(await completeGoal());
10682
10692
  })
10683
10693
  );
10684
- var blockCommand = new Command().name("block").description("Pause continuation for the current thread goal").action(
10694
+ var blockCommand = new Command().name("block").description("Mark the current thread goal blocked").action(
10685
10695
  withErrorHandler(async () => {
10686
10696
  printJson(await blockGoal());
10687
10697
  })
10688
10698
  );
10699
+ var pauseCommand = new Command().name("pause").description("Pause the current thread goal").action(
10700
+ withErrorHandler(async () => {
10701
+ printJson(await pauseGoal());
10702
+ })
10703
+ );
10689
10704
  var resumeCommand = new Command().name("resume").description("Resume continuation for the current thread goal").action(
10690
10705
  withErrorHandler(async () => {
10691
10706
  printJson(await resumeGoal());
10692
10707
  })
10693
10708
  );
10694
- var zeroGoalCommand = new Command().name("goal").description("Manage the current thread goal").addCommand(createCommand5).addCommand(editCommand3).addCommand(getCommand).addCommand(completeCommand).addCommand(blockCommand).addCommand(resumeCommand);
10709
+ var clearCommand = new Command().name("clear").description("Clear the current thread goal").action(
10710
+ withErrorHandler(async () => {
10711
+ printJson(await clearGoal());
10712
+ })
10713
+ );
10714
+ var zeroGoalCommand = new Command().name("goal").description("Manage the current thread goal").addCommand(createCommand5).addCommand(editCommand3).addCommand(getCommand).addCommand(completeCommand).addCommand(blockCommand).addCommand(pauseCommand).addCommand(resumeCommand).addCommand(clearCommand);
10695
10715
 
10696
10716
  // src/commands/zero/logs/index.ts
10697
10717
  init_esm_shims();
@@ -15635,7 +15655,7 @@ var zeroResourceCommand = new Command().name("resource").description("Pull regis
15635
15655
  var COMMAND_CAPABILITY_MAP = {
15636
15656
  agent: "agent:read",
15637
15657
  workflow: "agent:read",
15638
- goal: ["goal:read", "goal:write"],
15658
+ goal: ["goal:read", "goal:agent-result:write", "goal:user-control:write"],
15639
15659
  connector: "connector:read",
15640
15660
  // "schedule" is deliberately absent: the rename stub stays out of
15641
15661
  // token-scoped (agent) help but remains invokable and visible to humans.
@@ -15754,7 +15774,7 @@ function registerZeroCommands(prog, commands) {
15754
15774
  var program = new Command();
15755
15775
  program.name("zero").description(
15756
15776
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
15757
- ).version("9.205.0").addHelpText("after", () => {
15777
+ ).version("9.206.1").addHelpText("after", () => {
15758
15778
  return buildZeroHelpText();
15759
15779
  });
15760
15780
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {