@vm0/cli 9.200.4 → 9.201.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.
package/zero.js CHANGED
@@ -35,12 +35,14 @@ import {
35
35
  createGithubLabelListener,
36
36
  createGoal,
37
37
  createWorkflow,
38
+ createWorkflowTrigger,
38
39
  createZeroAgent,
39
40
  createZeroCreditCheckout,
40
41
  decodeZeroTokenPayload,
41
42
  deleteAutomation,
42
43
  deleteGithubLabelListener,
43
44
  deleteWorkflow,
45
+ deleteWorkflowTrigger,
44
46
  deleteZeroAgent,
45
47
  deleteZeroOrg,
46
48
  deleteZeroOrgModelProvider,
@@ -50,6 +52,7 @@ import {
50
52
  deleteZeroVariable,
51
53
  disableAutomation,
52
54
  disableAutomationTrigger,
55
+ disableWorkflowTrigger,
53
56
  downloadGithubFile,
54
57
  downloadPhoneFile,
55
58
  downloadSlackFile,
@@ -58,6 +61,7 @@ import {
58
61
  editGoal,
59
62
  enableAutomation,
60
63
  enableAutomationTrigger,
64
+ enableWorkflowTrigger,
61
65
  extractSecretNamesFromApis,
62
66
  fetchComputerUseScreenshot,
63
67
  findColorSystem,
@@ -93,6 +97,7 @@ import {
93
97
  getToken,
94
98
  getVm0ModelMultiplier,
95
99
  getWorkflow,
100
+ getWorkflowTrigger,
96
101
  getZeroAgent,
97
102
  getZeroAgentInstructions,
98
103
  getZeroAgentUserConnectors,
@@ -122,6 +127,7 @@ import {
122
127
  listTelegramBots,
123
128
  listTemplates,
124
129
  listVideoTemplates,
130
+ listWorkflowTriggers,
125
131
  listWorkflows,
126
132
  listZeroAgents,
127
133
  listZeroConnectors,
@@ -154,6 +160,7 @@ import {
154
160
  rotateAutomationTriggerSecret,
155
161
  runAutomation,
156
162
  runWorkflow,
163
+ runWorkflowTrigger,
157
164
  saveConfig,
158
165
  searchZeroChat,
159
166
  searchZeroConnectors,
@@ -178,6 +185,7 @@ import {
178
185
  updateAutomationTrigger,
179
186
  updateGithubLabelListener,
180
187
  updateWorkflow,
188
+ updateWorkflowTrigger,
181
189
  updateZeroAgent,
182
190
  updateZeroAgentInstructions,
183
191
  updateZeroOrg,
@@ -185,7 +193,7 @@ import {
185
193
  uploadWebFile,
186
194
  upsertZeroOrgModelProvider,
187
195
  withErrorHandler
188
- } from "./chunk-IMHXYYPH.js";
196
+ } from "./chunk-ZSWMGND5.js";
189
197
  import "./chunk-NR42YJMI.js";
190
198
  import {
191
199
  __toESM,
@@ -3394,6 +3402,21 @@ init_esm_shims();
3394
3402
  // src/commands/zero/automation/create.ts
3395
3403
  init_esm_shims();
3396
3404
 
3405
+ // src/commands/zero/automation/at-time-input.ts
3406
+ init_esm_shims();
3407
+ var EXPLICIT_OFFSET_RE = /(?:[zZ]|[+-]\d{2}:?\d{2})$/u;
3408
+ function hasExplicitAtTimeOffset(atTime) {
3409
+ return EXPLICIT_OFFSET_RE.test(atTime.trim());
3410
+ }
3411
+ function requireTimezoneForLocalAtTime(atTime, timezone, flagName) {
3412
+ if (timezone || hasExplicitAtTimeOffset(atTime)) {
3413
+ return;
3414
+ }
3415
+ throw new Error(
3416
+ `${flagName} without Z or an explicit offset requires --timezone (e.g. ${flagName} "2026-06-10T09:00" --timezone Asia/Shanghai)`
3417
+ );
3418
+ }
3419
+
3397
3420
  // src/commands/zero/automation/duration.ts
3398
3421
  init_esm_shims();
3399
3422
  var DURATION_PATTERN = /^(\d+)([smhd])$/;
@@ -3565,6 +3588,7 @@ function buildInlineTrigger(options) {
3565
3588
  };
3566
3589
  }
3567
3590
  if (options.once) {
3591
+ requireTimezoneForLocalAtTime(options.once, options.timezone, "--once");
3568
3592
  return { kind: "once", atTime: options.once, timezone: options.timezone };
3569
3593
  }
3570
3594
  if (options.loop) {
@@ -3777,6 +3801,7 @@ function buildTimingUpdate(options) {
3777
3801
  };
3778
3802
  }
3779
3803
  if (options.once) {
3804
+ requireTimezoneForLocalAtTime(options.once, options.timezone, "--once");
3780
3805
  return { kind: "once", atTime: options.once, timezone: options.timezone };
3781
3806
  }
3782
3807
  if (options.loop) {
@@ -3957,6 +3982,7 @@ function buildTrigger(kind, options) {
3957
3982
  'once triggers require --at (e.g. --at "2026-06-10T09:00")'
3958
3983
  );
3959
3984
  }
3985
+ requireTimezoneForLocalAtTime(options.at, options.timezone, "--at");
3960
3986
  return { kind: "once", atTime: options.at, timezone: options.timezone };
3961
3987
  case "loop":
3962
3988
  if (!options.every) {
@@ -4029,6 +4055,7 @@ function buildUpdate(options) {
4029
4055
  };
4030
4056
  }
4031
4057
  if (options.at) {
4058
+ requireTimezoneForLocalAtTime(options.at, options.timezone, "--at");
4032
4059
  return { kind: "once", atTime: options.at, timezone: options.timezone };
4033
4060
  }
4034
4061
  if (options.every) {
@@ -5909,8 +5936,373 @@ Examples:
5909
5936
  })
5910
5937
  );
5911
5938
 
5939
+ // src/commands/zero/workflow/trigger/index.ts
5940
+ init_esm_shims();
5941
+
5942
+ // src/commands/zero/workflow/trigger/display.ts
5943
+ init_esm_shims();
5944
+ function formatWorkflowTriggerSchedule(trigger) {
5945
+ const { schedule } = trigger;
5946
+ switch (schedule.type) {
5947
+ case "cron":
5948
+ return `${schedule.cronExpression} (${schedule.timezone})`;
5949
+ case "once":
5950
+ return `at ${schedule.atTime} (${schedule.timezone})`;
5951
+ case "loop":
5952
+ return `every ${formatDurationSeconds(schedule.intervalSeconds)}`;
5953
+ }
5954
+ }
5955
+ function formatRunTime(value) {
5956
+ return value ? formatRelativeTime(value) : source_default.dim("-");
5957
+ }
5958
+ function printWorkflowTriggersTable(triggers) {
5959
+ const idWidth = Math.max(
5960
+ 2,
5961
+ ...triggers.map((trigger) => {
5962
+ return trigger.id.length;
5963
+ })
5964
+ );
5965
+ const scheduleWidth = Math.max(
5966
+ 8,
5967
+ ...triggers.map((trigger) => {
5968
+ return formatWorkflowTriggerSchedule(trigger).length;
5969
+ })
5970
+ );
5971
+ console.log(
5972
+ source_default.dim(
5973
+ [
5974
+ "ID".padEnd(idWidth),
5975
+ "STATUS".padEnd(8),
5976
+ "SCHEDULE".padEnd(scheduleWidth),
5977
+ "NEXT RUN"
5978
+ ].join(" ")
5979
+ )
5980
+ );
5981
+ for (const trigger of triggers) {
5982
+ const status = trigger.enabled ? source_default.green("enabled") : source_default.yellow("disabled");
5983
+ console.log(
5984
+ [
5985
+ trigger.id.padEnd(idWidth),
5986
+ status.padEnd(8 + (trigger.enabled ? 0 : 2)),
5987
+ formatWorkflowTriggerSchedule(trigger).padEnd(scheduleWidth),
5988
+ formatRunTime(trigger.nextRunAt)
5989
+ ].join(" ")
5990
+ );
5991
+ }
5992
+ }
5993
+ function printWorkflowTriggerDetails(trigger, options) {
5994
+ const status = trigger.enabled ? source_default.green("enabled") : source_default.yellow("disabled");
5995
+ console.log(`${"Kind:".padEnd(14)}${trigger.kind}`);
5996
+ console.log(`${"ID:".padEnd(14)}${trigger.id}`);
5997
+ if (options?.workflowRef) {
5998
+ console.log(`${"Workflow:".padEnd(14)}${options.workflowRef}`);
5999
+ }
6000
+ console.log(`${"Status:".padEnd(14)}${status}`);
6001
+ console.log(
6002
+ `${"Schedule:".padEnd(14)}${formatWorkflowTriggerSchedule(trigger)}`
6003
+ );
6004
+ console.log(`${"Owner:".padEnd(14)}${trigger.ownerUserId}`);
6005
+ console.log(
6006
+ `${"Chat thread:".padEnd(14)}${trigger.chatThreadId ?? source_default.dim("-")}`
6007
+ );
6008
+ console.log(`${"Next run:".padEnd(14)}${formatRunTime(trigger.nextRunAt)}`);
6009
+ console.log(`${"Last run:".padEnd(14)}${formatRunTime(trigger.lastRunAt)}`);
6010
+ }
6011
+
6012
+ // src/commands/zero/workflow/trigger/index.ts
6013
+ var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
6014
+ var SCHEDULE_KINDS = ["cron", "once", "loop"];
6015
+ var EXACTLY_ONE_FLAG_MESSAGE2 = "Provide exactly one of --expr (cron), --at (once), --every (loop)";
6016
+ function timezoneOrUtc(timezone) {
6017
+ return timezone ?? "UTC";
6018
+ }
6019
+ function assertValidTimezone(timezone) {
6020
+ new Intl.DateTimeFormat("en-US", { timeZone: timezone });
6021
+ }
6022
+ function hasExplicitOffset(value) {
6023
+ return /(?:Z|[+-]\d{2}:?\d{2})$/i.test(value);
6024
+ }
6025
+ function parseLocalDateTime(value) {
6026
+ const match = value.match(
6027
+ /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/
6028
+ );
6029
+ if (!match) {
6030
+ throw new Error(
6031
+ `Invalid at time: "${value}". Use ISO datetime, e.g. 2026-06-10T09:00 or 2026-06-10T09:00:00Z`
6032
+ );
6033
+ }
6034
+ return {
6035
+ year: Number(match[1]),
6036
+ month: Number(match[2]),
6037
+ day: Number(match[3]),
6038
+ hour: Number(match[4]),
6039
+ minute: Number(match[5]),
6040
+ second: match[6] ? Number(match[6]) : 0,
6041
+ millisecond: match[7] ? Number(match[7].padEnd(3, "0")) : 0
6042
+ };
6043
+ }
6044
+ function zonedParts(instant, timezone) {
6045
+ const parts = new Intl.DateTimeFormat("en-US", {
6046
+ timeZone: timezone,
6047
+ year: "numeric",
6048
+ month: "2-digit",
6049
+ day: "2-digit",
6050
+ hour: "2-digit",
6051
+ minute: "2-digit",
6052
+ second: "2-digit",
6053
+ hourCycle: "h23"
6054
+ }).formatToParts(instant);
6055
+ const values = /* @__PURE__ */ new Map();
6056
+ for (const part of parts) {
6057
+ if (part.type !== "literal") {
6058
+ values.set(part.type, part.value);
6059
+ }
6060
+ }
6061
+ return {
6062
+ year: Number(values.get("year")),
6063
+ month: Number(values.get("month")),
6064
+ day: Number(values.get("day")),
6065
+ hour: Number(values.get("hour")),
6066
+ minute: Number(values.get("minute")),
6067
+ second: Number(values.get("second"))
6068
+ };
6069
+ }
6070
+ function wallTimeToUtcIso(value, timezone) {
6071
+ assertValidTimezone(timezone);
6072
+ if (hasExplicitOffset(value)) {
6073
+ const instant = new Date(value);
6074
+ if (Number.isNaN(instant.getTime())) {
6075
+ throw new Error(`Invalid at time: "${value}"`);
6076
+ }
6077
+ return instant.toISOString();
6078
+ }
6079
+ const target = parseLocalDateTime(value);
6080
+ const targetUtc = Date.UTC(
6081
+ target.year,
6082
+ target.month - 1,
6083
+ target.day,
6084
+ target.hour,
6085
+ target.minute,
6086
+ target.second,
6087
+ target.millisecond
6088
+ );
6089
+ let guess = targetUtc;
6090
+ for (let i = 0; i < 3; i++) {
6091
+ const parts = zonedParts(new Date(guess), timezone);
6092
+ const renderedUtc = Date.UTC(
6093
+ parts.year,
6094
+ parts.month - 1,
6095
+ parts.day,
6096
+ parts.hour,
6097
+ parts.minute,
6098
+ parts.second,
6099
+ target.millisecond
6100
+ );
6101
+ guess += targetUtc - renderedUtc;
6102
+ }
6103
+ const result = new Date(guess);
6104
+ const rendered = zonedParts(result, timezone);
6105
+ if (rendered.year !== target.year || rendered.month !== target.month || rendered.day !== target.day || rendered.hour !== target.hour || rendered.minute !== target.minute || rendered.second !== target.second) {
6106
+ throw new Error(
6107
+ `Invalid at time for ${timezone}: "${value}". The local time does not exist`
6108
+ );
6109
+ }
6110
+ return result.toISOString();
6111
+ }
6112
+ function buildSchedule(kind, options) {
6113
+ switch (kind) {
6114
+ case "cron":
6115
+ if (!options.expr) {
6116
+ throw new Error(
6117
+ 'cron triggers require --expr (e.g. --expr "0 9 * * *")'
6118
+ );
6119
+ }
6120
+ return {
6121
+ type: "cron",
6122
+ cronExpression: options.expr,
6123
+ timezone: timezoneOrUtc(options.timezone)
6124
+ };
6125
+ case "once": {
6126
+ if (!options.at) {
6127
+ throw new Error(
6128
+ 'once triggers require --at (e.g. --at "2026-06-10T09:00")'
6129
+ );
6130
+ }
6131
+ const timezone = timezoneOrUtc(options.timezone);
6132
+ return {
6133
+ type: "once",
6134
+ atTime: wallTimeToUtcIso(options.at, timezone),
6135
+ timezone
6136
+ };
6137
+ }
6138
+ case "loop":
6139
+ if (!options.every) {
6140
+ throw new Error("loop triggers require --every (e.g. --every 15m)");
6141
+ }
6142
+ return {
6143
+ type: "loop",
6144
+ intervalSeconds: parseDurationSeconds(options.every)
6145
+ };
6146
+ default:
6147
+ throw new Error(
6148
+ `Unknown trigger kind: "${kind}". Use one of: ${SCHEDULE_KINDS.join(", ")}`
6149
+ );
6150
+ }
6151
+ }
6152
+ function buildUpdate2(options) {
6153
+ const flagCount = [options.expr, options.at, options.every].filter(
6154
+ (value) => {
6155
+ return value !== void 0;
6156
+ }
6157
+ ).length;
6158
+ if (flagCount !== 1) {
6159
+ throw new Error(EXACTLY_ONE_FLAG_MESSAGE2);
6160
+ }
6161
+ if (options.timezone && !options.expr && !options.at) {
6162
+ throw new Error("--timezone only applies to --expr and --at");
6163
+ }
6164
+ if (options.expr) {
6165
+ return { schedule: buildSchedule("cron", options) };
6166
+ }
6167
+ if (options.at) {
6168
+ return { schedule: buildSchedule("once", options) };
6169
+ }
6170
+ return { schedule: buildSchedule("loop", options) };
6171
+ }
6172
+ async function resolveWorkflowId(ref, options) {
6173
+ if (UUID_RE.test(ref)) {
6174
+ return ref;
6175
+ }
6176
+ const agentId = options.agent ?? process.env.ZERO_AGENT_ID;
6177
+ const workflows = await listWorkflows(agentId ? { agentId } : {});
6178
+ const matches = workflows.filter((workflow) => {
6179
+ return workflow.name === ref;
6180
+ });
6181
+ if (matches.length === 0) {
6182
+ const hint = agentId ? ` under agent "${agentId}"` : ". Provide --agent <agent-id> or use the workflow ID";
6183
+ throw new Error(`Workflow not found: "${ref}"${hint}`);
6184
+ }
6185
+ if (matches.length > 1) {
6186
+ throw new Error(
6187
+ `Ambiguous workflow name: "${ref}". Provide --agent <agent-id> or use the workflow ID`
6188
+ );
6189
+ }
6190
+ return matches[0].id;
6191
+ }
6192
+ var addCommand2 = new Command().name("add").description("Add a schedule trigger to a workflow").argument("<workflow>", "Workflow ID or name").argument("<kind>", `Trigger kind: ${SCHEDULE_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("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
6193
+ "after",
6194
+ `
6195
+ Examples:
6196
+ zero workflow trigger add tell-a-joke cron --expr "0 9 * * *" -z Asia/Shanghai
6197
+ zero workflow trigger add tell-a-joke once --at "2026-06-10T09:00" -z Asia/Shanghai
6198
+ zero workflow trigger add tell-a-joke loop --every 15m
6199
+
6200
+ Notes:
6201
+ - Workflow names resolve under --agent, then ZERO_AGENT_ID, then all visible workflows
6202
+ - Use the workflow ID when a name is ambiguous`
6203
+ ).action(
6204
+ withErrorHandler(
6205
+ async (workflowRef, kind, options) => {
6206
+ if (options.timezone && kind !== "cron" && kind !== "once") {
6207
+ throw new Error("--timezone only applies to cron and once triggers");
6208
+ }
6209
+ const workflowId = await resolveWorkflowId(workflowRef, options);
6210
+ const body = {
6211
+ schedule: buildSchedule(kind, options)
6212
+ };
6213
+ const trigger = await createWorkflowTrigger(workflowId, body);
6214
+ console.log(
6215
+ source_default.green(`\u2713 Trigger added to workflow "${workflowRef}"`)
6216
+ );
6217
+ printWorkflowTriggerDetails(trigger, { workflowRef });
6218
+ }
6219
+ )
6220
+ );
6221
+ var updateCommand4 = 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(
6222
+ "after",
6223
+ `
6224
+ Examples:
6225
+ zero workflow trigger update 22222222-2222-4222-8222-222222222222 --expr "0 9 * * *" -z Asia/Shanghai
6226
+ zero workflow trigger update 22222222-2222-4222-8222-222222222222 --at "2026-06-10T09:00" -z UTC
6227
+ zero workflow trigger update 22222222-2222-4222-8222-222222222222 --every 10m`
6228
+ ).action(
6229
+ withErrorHandler(async (id, options) => {
6230
+ const trigger = await updateWorkflowTrigger(id, buildUpdate2(options));
6231
+ console.log(source_default.green(`\u2713 Trigger ${trigger.id} updated`));
6232
+ printWorkflowTriggerDetails(trigger);
6233
+ })
6234
+ );
6235
+ var listCommand14 = new Command().name("list").alias("ls").description("List a workflow's schedule triggers").argument("<workflow>", "Workflow ID or name").option("--agent <id>", "Agent ID for resolving a workflow name").addHelpText(
6236
+ "after",
6237
+ `
6238
+ Examples:
6239
+ zero workflow trigger list tell-a-joke
6240
+ zero workflow trigger list tell-a-joke --agent <agent-id>`
6241
+ ).action(
6242
+ withErrorHandler(
6243
+ async (workflowRef, options) => {
6244
+ const workflowId = await resolveWorkflowId(workflowRef, options);
6245
+ const triggers = await listWorkflowTriggers(workflowId);
6246
+ if (triggers.length === 0) {
6247
+ console.log(source_default.dim("No triggers"));
6248
+ console.log(
6249
+ source_default.dim(
6250
+ ` Add one with: zero workflow trigger add ${workflowRef} cron --expr "0 9 * * *"`
6251
+ )
6252
+ );
6253
+ return;
6254
+ }
6255
+ printWorkflowTriggersTable(triggers);
6256
+ }
6257
+ )
6258
+ );
6259
+ var showCommand3 = new Command().name("show").description("Show a workflow trigger").argument("<trigger>", "Workflow trigger ID").action(
6260
+ withErrorHandler(async (id) => {
6261
+ const trigger = await getWorkflowTrigger(id);
6262
+ printWorkflowTriggerDetails(trigger);
6263
+ })
6264
+ );
6265
+ var rmCommand2 = new Command().name("rm").alias("remove").description("Remove a workflow trigger").argument("<trigger>", "Workflow trigger ID").action(
6266
+ withErrorHandler(async (id) => {
6267
+ await deleteWorkflowTrigger(id);
6268
+ console.log(source_default.green(`\u2713 Trigger ${id} removed`));
6269
+ })
6270
+ );
6271
+ var enableCommand3 = new Command().name("enable").description("Enable a workflow trigger").argument("<trigger>", "Workflow trigger ID").action(
6272
+ withErrorHandler(async (id) => {
6273
+ const trigger = await enableWorkflowTrigger(id);
6274
+ console.log(source_default.green(`\u2713 Trigger ${trigger.id} enabled`));
6275
+ })
6276
+ );
6277
+ var disableCommand3 = new Command().name("disable").description("Disable a workflow trigger").argument("<trigger>", "Workflow trigger ID").action(
6278
+ withErrorHandler(async (id) => {
6279
+ const trigger = await disableWorkflowTrigger(id);
6280
+ console.log(source_default.green(`\u2713 Trigger ${trigger.id} disabled`));
6281
+ })
6282
+ );
6283
+ var runCommand3 = new Command().name("run").description("Fire a workflow trigger test run").argument("<trigger>", "Workflow trigger ID").action(
6284
+ withErrorHandler(async (id) => {
6285
+ const result = await runWorkflowTrigger(id);
6286
+ console.log(source_default.green(`\u2713 Workflow trigger ${id} run started`));
6287
+ console.log(` Run ID: ${result.runId}`);
6288
+ console.log();
6289
+ console.log(`Stream logs: zero logs ${result.runId}`);
6290
+ })
6291
+ );
6292
+ var triggerCommand2 = new Command().name("trigger").description("Manage a workflow's schedule triggers").addCommand(addCommand2).addCommand(updateCommand4).addCommand(listCommand14).addCommand(showCommand3).addCommand(rmCommand2).addCommand(enableCommand3).addCommand(disableCommand3).addCommand(runCommand3).addHelpText(
6293
+ "after",
6294
+ `
6295
+ Examples:
6296
+ Add a trigger: zero workflow trigger add <workflow> cron --expr "0 9 * * *"
6297
+ Update a schedule: zero workflow trigger update <trigger-id> --every 10m
6298
+ List triggers: zero workflow trigger list <workflow>
6299
+ Inspect a trigger: zero workflow trigger show <trigger-id>
6300
+ Test run: zero workflow trigger run <trigger-id>
6301
+ Pause one trigger: zero workflow trigger disable <trigger-id>`
6302
+ );
6303
+
5912
6304
  // src/commands/zero/workflow/index.ts
5913
- var zeroWorkflowCommand = new Command("workflow").description("Manage workflows").addCommand(createCommand4).addCommand(editCommand2).addCommand(viewCommand2).addCommand(listCommand13).addCommand(deleteCommand7).addCommand(copyCommand).addCommand(runCommand2).addHelpText(
6305
+ var zeroWorkflowCommand = new Command("workflow").description("Manage workflows").addCommand(createCommand4).addCommand(editCommand2).addCommand(viewCommand2).addCommand(listCommand13).addCommand(deleteCommand7).addCommand(copyCommand).addCommand(runCommand2).addCommand(triggerCommand2).addHelpText(
5914
6306
  "after",
5915
6307
  `
5916
6308
  Examples:
@@ -5920,6 +6312,7 @@ Examples:
5920
6312
  Update workflow content: zero workflow edit <workflow-id> --instruction "New steps"
5921
6313
  Copy onto another agent: zero workflow copy <workflow-id> --to-agent <agent-id>
5922
6314
  Run a workflow once: zero workflow run <workflow-id>
6315
+ Manage triggers: zero workflow trigger --help
5923
6316
  Delete a workflow: zero workflow delete <workflow-id> -y`
5924
6317
  );
5925
6318
 
@@ -6007,7 +6400,7 @@ function formatStatus(status) {
6007
6400
  function formatTime(iso) {
6008
6401
  return new Date(iso).toISOString().replace(/\.\d{3}Z$/, "Z");
6009
6402
  }
6010
- var listCommand14 = new Command().name("list").alias("ls").description("List agent run logs").option("--agent <id>", "Filter by Zero agent ID").option(
6403
+ var listCommand15 = new Command().name("list").alias("ls").description("List agent run logs").option("--agent <id>", "Filter by Zero agent ID").option(
6011
6404
  "--status <status>",
6012
6405
  "Filter by status (queued|pending|running|completed|failed|timeout|cancelled)"
6013
6406
  ).option(
@@ -6253,7 +6646,7 @@ async function showAgentEvents(runId, options) {
6253
6646
  renderer.render(parsed);
6254
6647
  }
6255
6648
  }
6256
- var zeroLogsCommand = new Command().name("logs").description("View and search agent run logs").argument("[runId]", "Run ID to view agent events for").addCommand(listCommand14).addCommand(searchCommand2).option(
6649
+ var zeroLogsCommand = new Command().name("logs").description("View and search agent run logs").argument("[runId]", "Run ID to view agent events for").addCommand(listCommand15).addCommand(searchCommand2).option(
6257
6650
  "--since <time>",
6258
6651
  "Show logs since timestamp (e.g., 5m, 2h, 1d, 2024-01-15T10:30:00Z)"
6259
6652
  ).option("--tail <n>", "Show last N entries (default: 5)").option("--head <n>", "Show first N entries").option("--all", "Fetch all log entries").addHelpText(
@@ -10504,7 +10897,7 @@ function getModelSwitchGuidance(integration = getCurrentIntegration()) {
10504
10897
  }
10505
10898
  return "Open https://app.vm0.ai and switch models from the model selector next to the input box.";
10506
10899
  }
10507
- var listCommand15 = new Command().name("list").alias("ls").description("List models allowed by the current organization").action(
10900
+ var listCommand16 = new Command().name("list").alias("ls").description("List models allowed by the current organization").action(
10508
10901
  withErrorHandler(async () => {
10509
10902
  const result = await listZeroModelPolicies();
10510
10903
  if (result.policies.length === 0) {
@@ -10540,7 +10933,7 @@ var listCommand15 = new Command().name("list").alias("ls").description("List mod
10540
10933
  var switchCommand = new Command().name("switch").description("Show how to switch models in the current environment").action(() => {
10541
10934
  console.log(getModelSwitchGuidance());
10542
10935
  });
10543
- var zeroModelCommand = new Command().name("model").description("List available models and model-switching guidance").addCommand(listCommand15).addCommand(switchCommand);
10936
+ var zeroModelCommand = new Command().name("model").description("List available models and model-switching guidance").addCommand(listCommand16).addCommand(switchCommand);
10544
10937
 
10545
10938
  // src/commands/zero/model-provider/index.ts
10546
10939
  init_esm_shims();
@@ -10551,7 +10944,7 @@ var MODEL_PROVIDER_SET_GUIDANCE = [
10551
10944
  "",
10552
10945
  "If an organization admin sets a model provider to subscription, members must use the bottom-left user menu, choose Preferences / Personal Models, and connect their personal subscription."
10553
10946
  ].join("\n");
10554
- var listCommand16 = new Command().name("list").alias("ls").description(
10947
+ var listCommand17 = new Command().name("list").alias("ls").description(
10555
10948
  "List provider routing for each model allowed by the organization"
10556
10949
  ).action(
10557
10950
  withErrorHandler(async () => {
@@ -10586,7 +10979,7 @@ var setCommand6 = new Command().name("set").description("Show where to adjust mo
10586
10979
  ${MODEL_PROVIDER_SET_GUIDANCE}`).action(() => {
10587
10980
  console.log(MODEL_PROVIDER_SET_GUIDANCE);
10588
10981
  });
10589
- var zeroModelProviderCommand = new Command().name("model-provider").description("Inspect model provider routing").addCommand(listCommand16).addCommand(setCommand6);
10982
+ var zeroModelProviderCommand = new Command().name("model-provider").description("Inspect model provider routing").addCommand(listCommand17).addCommand(setCommand6);
10590
10983
 
10591
10984
  // src/commands/zero/video/index.ts
10592
10985
  init_esm_shims();
@@ -11043,7 +11436,7 @@ function registerZeroCommands(prog, commands) {
11043
11436
  var program = new Command();
11044
11437
  program.name("zero").description(
11045
11438
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
11046
- ).version("9.200.4").addHelpText("after", () => {
11439
+ ).version("9.201.1").addHelpText("after", () => {
11047
11440
  return buildZeroHelpText();
11048
11441
  });
11049
11442
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {