@vm0/cli 9.148.2 → 9.149.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.
package/index.js CHANGED
@@ -68,7 +68,7 @@ import {
68
68
  source_default,
69
69
  volumeConfigSchema,
70
70
  withErrorHandler
71
- } from "./chunk-KAN2DFAY.js";
71
+ } from "./chunk-APA2EBPJ.js";
72
72
  import {
73
73
  __toESM,
74
74
  init_esm_shims
@@ -387,7 +387,7 @@ function getConfigPath() {
387
387
  return join(os.homedir(), ".vm0", "config.json");
388
388
  }
389
389
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
390
- console.log(source_default.bold(`VM0 CLI v${"9.148.2"}`));
390
+ console.log(source_default.bold(`VM0 CLI v${"9.149.0"}`));
391
391
  console.log();
392
392
  const config = await loadConfig();
393
393
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -4280,7 +4280,7 @@ var composeCommand = new Command().name("compose").description("Create or update
4280
4280
  options.autoUpdate = false;
4281
4281
  }
4282
4282
  if (options.autoUpdate !== false) {
4283
- await startSilentUpgrade("9.148.2");
4283
+ await startSilentUpgrade("9.149.0");
4284
4284
  }
4285
4285
  try {
4286
4286
  let result;
@@ -4372,7 +4372,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
4372
4372
  withErrorHandler(
4373
4373
  async (identifier, prompt, options) => {
4374
4374
  if (options.autoUpdate !== false) {
4375
- await startSilentUpgrade("9.148.2");
4375
+ await startSilentUpgrade("9.149.0");
4376
4376
  }
4377
4377
  const { name, version } = parseIdentifier(identifier);
4378
4378
  let composeId;
@@ -6165,13 +6165,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6165
6165
  if (latestVersion === null) {
6166
6166
  throw new Error("Could not check for updates. Please try again later.");
6167
6167
  }
6168
- if (latestVersion === "9.148.2") {
6169
- console.log(source_default.green(`\u2713 Already up to date (${"9.148.2"})`));
6168
+ if (latestVersion === "9.149.0") {
6169
+ console.log(source_default.green(`\u2713 Already up to date (${"9.149.0"})`));
6170
6170
  return;
6171
6171
  }
6172
6172
  console.log(
6173
6173
  source_default.yellow(
6174
- `Current version: ${"9.148.2"} -> Latest version: ${latestVersion}`
6174
+ `Current version: ${"9.149.0"} -> Latest version: ${latestVersion}`
6175
6175
  )
6176
6176
  );
6177
6177
  console.log();
@@ -6198,7 +6198,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
6198
6198
  const success = await performUpgrade(packageManager);
6199
6199
  if (success) {
6200
6200
  console.log(
6201
- source_default.green(`\u2713 Upgraded from ${"9.148.2"} to ${latestVersion}`)
6201
+ source_default.green(`\u2713 Upgraded from ${"9.149.0"} to ${latestVersion}`)
6202
6202
  );
6203
6203
  return;
6204
6204
  }
@@ -6265,7 +6265,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
6265
6265
 
6266
6266
  // src/index.ts
6267
6267
  var program = new Command();
6268
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.148.2");
6268
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.149.0");
6269
6269
  program.addCommand(authCommand);
6270
6270
  program.addCommand(infoCommand);
6271
6271
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.148.2",
3
+ "version": "9.149.0",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -7,6 +7,7 @@ import {
7
7
  Command,
8
8
  EventRenderer,
9
9
  EventStreamNormalizer,
10
+ InvalidArgumentError,
10
11
  MODEL_PROVIDER_TYPES,
11
12
  Option,
12
13
  completePhoneFileUpload,
@@ -38,6 +39,7 @@ import {
38
39
  extractSecretNamesFromApis,
39
40
  findMatchingPermissions,
40
41
  generateWebImage,
42
+ generateWebVideo,
41
43
  generateWebVoice,
42
44
  getActiveOrg,
43
45
  getApiUrl,
@@ -127,7 +129,7 @@ import {
127
129
  withErrorHandler,
128
130
  zeroAgentCustomSkillNameSchema,
129
131
  zeroRemoteAgentCommand
130
- } from "./chunk-KAN2DFAY.js";
132
+ } from "./chunk-APA2EBPJ.js";
131
133
  import {
132
134
  __toESM,
133
135
  init_esm_shims
@@ -1987,16 +1989,101 @@ async function getPlatformOrigin() {
1987
1989
 
1988
1990
  // src/commands/zero/connector/status.ts
1989
1991
  var LABEL_WIDTH = 16;
1990
- function getDoctorCommand(type) {
1991
- const [envName] = Object.keys(getConnectorEnvironmentMapping(type));
1992
- return envName ? `zero doctor check-connector --env-name ${envName}` : null;
1993
- }
1994
- function printDoctorHint(type) {
1995
- const command = getDoctorCommand(type);
1996
- if (command) {
1997
- console.log(`Diagnose it with: ${command}`);
1992
+ function printConnectorDetails(type, connector) {
1993
+ if (connector) {
1994
+ console.log(
1995
+ `${"Status:".padEnd(LABEL_WIDTH)}${connector.needsReconnect ? source_default.yellow("reconnect needed") : source_default.green("connected")}`
1996
+ );
1997
+ console.log(
1998
+ `${"Account:".padEnd(LABEL_WIDTH)}@${connector.externalUsername}`
1999
+ );
2000
+ console.log(`${"Auth Method:".padEnd(LABEL_WIDTH)}${connector.authMethod}`);
2001
+ if (connector.oauthScopes && connector.oauthScopes.length > 0) {
2002
+ console.log(
2003
+ `${"OAuth Scopes:".padEnd(LABEL_WIDTH)}${connector.oauthScopes.join(", ")}`
2004
+ );
2005
+ }
2006
+ if (connector.authMethod === "oauth" && !hasRequiredScopes(type, connector.oauthScopes)) {
2007
+ const diff = getScopeDiff(type, connector.oauthScopes);
2008
+ console.log(
2009
+ `${"Permissions:".padEnd(LABEL_WIDTH)}${source_default.yellow("update available")}`
2010
+ );
2011
+ if (diff.addedScopes.length > 0) {
2012
+ console.log(
2013
+ `${" Added:".padEnd(LABEL_WIDTH)}${diff.addedScopes.join(", ")}`
2014
+ );
2015
+ }
2016
+ if (diff.removedScopes.length > 0) {
2017
+ console.log(
2018
+ `${" Removed:".padEnd(LABEL_WIDTH)}${diff.removedScopes.join(", ")}`
2019
+ );
2020
+ }
2021
+ }
2022
+ console.log(
2023
+ `${"Connected:".padEnd(LABEL_WIDTH)}${formatDateTime(connector.createdAt)}`
2024
+ );
2025
+ if (connector.updatedAt !== connector.createdAt) {
2026
+ console.log(
2027
+ `${"Last Updated:".padEnd(LABEL_WIDTH)}${formatDateTime(connector.updatedAt)}`
2028
+ );
2029
+ }
1998
2030
  } else {
1999
- console.log("Having trouble? Run: zero doctor --help");
2031
+ console.log(
2032
+ `${"Status:".padEnd(LABEL_WIDTH)}${source_default.dim("not connected")}`
2033
+ );
2034
+ }
2035
+ }
2036
+ async function printAgentAction(type, connector, agentCtx) {
2037
+ const authorized = agentCtx.authorizedTypes.has(type);
2038
+ const isConnected = connector !== null;
2039
+ const needsReconnect = connector?.needsReconnect === true;
2040
+ const agentLabel = agentCtx.displayName === agentCtx.agentId ? agentCtx.agentId : `${agentCtx.displayName} (${agentCtx.agentId})`;
2041
+ console.log();
2042
+ if (needsReconnect) {
2043
+ const origin = await getPlatformOrigin();
2044
+ const url = `${origin}/connectors`;
2045
+ console.log(
2046
+ `The ${type} connector is connected but needs to be reconnected before agent ${agentLabel} can use it.`
2047
+ );
2048
+ console.log(`Reconnect it at: [Reconnect ${type}](${url})`);
2049
+ } else if (authorized && !isConnected) {
2050
+ const origin = await getPlatformOrigin();
2051
+ const url = `${origin}/connectors/${type}/connect?agentId=${agentCtx.agentId}`;
2052
+ console.log(
2053
+ `The ${type} connector is authorized for agent ${agentLabel}, but it is not connected.`
2054
+ );
2055
+ console.log(`Connect it at: [Connect ${type}](${url})`);
2056
+ } else if (authorized) {
2057
+ console.log(`The ${type} connector is authorized for agent ${agentLabel}.`);
2058
+ } else if (!isConnected) {
2059
+ const origin = await getPlatformOrigin();
2060
+ const url = `${origin}/connectors/${type}/connect?agentId=${agentCtx.agentId}`;
2061
+ console.log(
2062
+ `The ${type} connector is not connected. Once connected, it will be authorized for agent ${agentLabel}.`
2063
+ );
2064
+ console.log(`Connect and authorize it at: [Connect ${type}](${url})`);
2065
+ } else {
2066
+ const origin = await getPlatformOrigin();
2067
+ const url = `${origin}/connectors/${type}/authorize?agentId=${agentCtx.agentId}`;
2068
+ console.log(
2069
+ `The ${type} connector is not authorized for agent ${agentLabel}.`
2070
+ );
2071
+ console.log(`Authorize it at: [Authorize ${type}](${url})`);
2072
+ }
2073
+ }
2074
+ async function printStandaloneAction(type, connector) {
2075
+ if (connector && !connector.needsReconnect) return;
2076
+ const origin = await getPlatformOrigin();
2077
+ console.log();
2078
+ if (connector?.needsReconnect) {
2079
+ const url = `${origin}/connectors`;
2080
+ console.log(
2081
+ `The ${type} connector is connected but needs to be reconnected.`
2082
+ );
2083
+ console.log(`Reconnect it at: [Reconnect ${type}](${url})`);
2084
+ } else {
2085
+ const url = `${origin}/connectors/${type}/connect`;
2086
+ console.log(`Connect it at: [Connect ${type}](${url})`);
2000
2087
  }
2001
2088
  }
2002
2089
  var statusCommand2 = new Command().name("status").description("Show detailed status of a connector").argument("<type>", "Connector type (e.g., github)").option("--agent <id>", "Show authorization state for the given agent").action(
@@ -2014,88 +2101,11 @@ var statusCommand2 = new Command().name("status").description("Show detailed sta
2014
2101
  ]);
2015
2102
  console.log(`Connector: ${source_default.cyan(type)}`);
2016
2103
  console.log();
2017
- if (connector) {
2018
- console.log(
2019
- `${"Status:".padEnd(LABEL_WIDTH)}${source_default.green("connected")}`
2020
- );
2021
- console.log(
2022
- `${"Account:".padEnd(LABEL_WIDTH)}@${connector.externalUsername}`
2023
- );
2024
- console.log(
2025
- `${"Auth Method:".padEnd(LABEL_WIDTH)}${connector.authMethod}`
2026
- );
2027
- if (connector.oauthScopes && connector.oauthScopes.length > 0) {
2028
- console.log(
2029
- `${"OAuth Scopes:".padEnd(LABEL_WIDTH)}${connector.oauthScopes.join(", ")}`
2030
- );
2031
- }
2032
- if (connector.authMethod === "oauth" && !hasRequiredScopes(parseResult.data, connector.oauthScopes)) {
2033
- const diff = getScopeDiff(parseResult.data, connector.oauthScopes);
2034
- console.log(
2035
- `${"Permissions:".padEnd(LABEL_WIDTH)}${source_default.yellow("update available")}`
2036
- );
2037
- if (diff.addedScopes.length > 0) {
2038
- console.log(
2039
- `${" Added:".padEnd(LABEL_WIDTH)}${diff.addedScopes.join(", ")}`
2040
- );
2041
- }
2042
- if (diff.removedScopes.length > 0) {
2043
- console.log(
2044
- `${" Removed:".padEnd(LABEL_WIDTH)}${diff.removedScopes.join(", ")}`
2045
- );
2046
- }
2047
- }
2048
- console.log(
2049
- `${"Connected:".padEnd(LABEL_WIDTH)}${formatDateTime(connector.createdAt)}`
2050
- );
2051
- if (connector.updatedAt !== connector.createdAt) {
2052
- console.log(
2053
- `${"Last Updated:".padEnd(LABEL_WIDTH)}${formatDateTime(connector.updatedAt)}`
2054
- );
2055
- }
2056
- } else {
2057
- console.log(
2058
- `${"Status:".padEnd(LABEL_WIDTH)}${source_default.dim("not connected")}`
2059
- );
2060
- }
2104
+ printConnectorDetails(parseResult.data, connector);
2061
2105
  if (agentCtx) {
2062
- const authorized = agentCtx.authorizedTypes.has(parseResult.data);
2063
- const isConnected = connector !== null;
2064
- const agentLabel = agentCtx.displayName === agentCtx.agentId ? agentCtx.agentId : `${agentCtx.displayName} (${agentCtx.agentId})`;
2065
- console.log();
2066
- if (authorized && !isConnected) {
2067
- const origin = await getPlatformOrigin();
2068
- const url = `${origin}/connectors/${parseResult.data}/connect?agentId=${agentCtx.agentId}`;
2069
- console.log(
2070
- `The ${parseResult.data} connector is authorized for agent ${agentLabel}, but it is not connected.`
2071
- );
2072
- console.log(`Connect it at: [Connect ${parseResult.data}](${url})`);
2073
- printDoctorHint(parseResult.data);
2074
- } else if (authorized) {
2075
- console.log(
2076
- `The ${parseResult.data} connector is authorized for agent ${agentLabel}.`
2077
- );
2078
- } else if (!isConnected) {
2079
- const origin = await getPlatformOrigin();
2080
- const url = `${origin}/connectors/${parseResult.data}/connect?agentId=${agentCtx.agentId}`;
2081
- console.log(
2082
- `The ${parseResult.data} connector is not connected. Once connected, it will be authorized for agent ${agentLabel}.`
2083
- );
2084
- console.log(`Connect it at: [Connect ${parseResult.data}](${url})`);
2085
- printDoctorHint(parseResult.data);
2086
- } else {
2087
- const origin = await getPlatformOrigin();
2088
- const url = `${origin}/connectors/${parseResult.data}/authorize?agentId=${agentCtx.agentId}`;
2089
- console.log(
2090
- `The ${parseResult.data} connector is not authorized for agent ${agentLabel}.`
2091
- );
2092
- console.log(
2093
- `Authorize it at: [Authorize ${parseResult.data}](${url})`
2094
- );
2095
- }
2096
- } else if (!connector) {
2097
- console.log();
2098
- printDoctorHint(parseResult.data);
2106
+ await printAgentAction(parseResult.data, connector, agentCtx);
2107
+ } else {
2108
+ await printStandaloneAction(parseResult.data, connector);
2099
2109
  }
2100
2110
  })
2101
2111
  );
@@ -2521,18 +2531,60 @@ How connectors work:
2521
2531
  // src/commands/zero/doctor/generate.ts
2522
2532
  init_esm_shims();
2523
2533
  var BUILT_IN_GENERATION_PROVIDERS = {
2524
- image: {
2525
- label: "Built-in",
2526
- model: "gpt-image-2",
2527
- command: "zero built-in generate image -h",
2528
- reason: "available without connector setup"
2529
- },
2530
- voice: {
2531
- label: "Built-in",
2532
- model: "gpt-4o-mini-tts",
2533
- command: "zero built-in generate voice -h",
2534
- reason: "available without connector setup"
2535
- }
2534
+ image: [
2535
+ {
2536
+ label: "Built-in",
2537
+ model: "gpt-image-2",
2538
+ command: "zero built-in generate image -h",
2539
+ reason: "available without connector setup"
2540
+ }
2541
+ ],
2542
+ video: [
2543
+ {
2544
+ label: "Built-in",
2545
+ model: "fal-ai/veo3.1/fast",
2546
+ command: "zero built-in generate video --model veo3.1-fast -h",
2547
+ reason: "available without connector setup"
2548
+ },
2549
+ {
2550
+ label: "Built-in",
2551
+ model: "fal-ai/veo3.1",
2552
+ command: "zero built-in generate video --model veo3.1 -h",
2553
+ reason: "available without connector setup"
2554
+ },
2555
+ {
2556
+ label: "Built-in",
2557
+ model: "fal-ai/kling-video/o3/standard/text-to-video",
2558
+ command: "zero built-in generate video --model kling-o3-standard -h",
2559
+ reason: "available without connector setup"
2560
+ },
2561
+ {
2562
+ label: "Built-in",
2563
+ model: "fal-ai/kling-video/v3/4k/text-to-video",
2564
+ command: "zero built-in generate video --model kling-v3-4k -h",
2565
+ reason: "available without connector setup"
2566
+ },
2567
+ {
2568
+ label: "Built-in",
2569
+ model: "bytedance/seedance-2.0/text-to-video",
2570
+ command: "zero built-in generate video --model seedance2.0 -h",
2571
+ reason: "available without connector setup"
2572
+ },
2573
+ {
2574
+ label: "Built-in",
2575
+ model: "bytedance/seedance-2.0/fast/text-to-video",
2576
+ command: "zero built-in generate video --model seedance2.0-fast -h",
2577
+ reason: "available without connector setup"
2578
+ }
2579
+ ],
2580
+ voice: [
2581
+ {
2582
+ label: "Built-in",
2583
+ model: "gpt-4o-mini-tts",
2584
+ command: "zero built-in generate voice -h",
2585
+ reason: "available without connector setup"
2586
+ }
2587
+ ]
2536
2588
  };
2537
2589
  var GENERATION_TYPE_ORDER = [
2538
2590
  "image",
@@ -2562,6 +2614,9 @@ function getConnectorGenerationType(generationType) {
2562
2614
  }
2563
2615
  return generationType;
2564
2616
  }
2617
+ function getBuiltInProviders(generationType) {
2618
+ return BUILT_IN_GENERATION_PROVIDERS[generationType] ?? [];
2619
+ }
2565
2620
  function getAvailableGenerationTypes() {
2566
2621
  const available = /* @__PURE__ */ new Set();
2567
2622
  for (const config of Object.values(CONNECTOR_TYPES)) {
@@ -2570,7 +2625,7 @@ function getAvailableGenerationTypes() {
2570
2625
  }
2571
2626
  }
2572
2627
  return GENERATION_TYPE_ORDER.filter((type) => {
2573
- return type in BUILT_IN_GENERATION_PROVIDERS || available.has(getConnectorGenerationType(type));
2628
+ return getBuiltInProviders(type).length > 0 || available.has(getConnectorGenerationType(type));
2574
2629
  });
2575
2630
  }
2576
2631
  function parseGenerationType(value) {
@@ -2692,12 +2747,16 @@ function renderActions(candidates) {
2692
2747
  }
2693
2748
  }
2694
2749
  function renderBuiltInProvider(generationType) {
2695
- const provider = BUILT_IN_GENERATION_PROVIDERS[generationType];
2696
- if (!provider) return;
2750
+ const providers = getBuiltInProviders(generationType);
2751
+ if (providers.length === 0) return;
2697
2752
  console.log("");
2698
- console.log("Built-in provider:");
2699
- console.log(` vm0 ${provider.label} Model: ${provider.model}`);
2700
- console.log(` Use: ${provider.command}`);
2753
+ console.log(
2754
+ providers.length === 1 ? "Built-in provider:" : "Built-in providers:"
2755
+ );
2756
+ for (const provider of providers) {
2757
+ console.log(` vm0 ${provider.label} Model: ${provider.model}`);
2758
+ console.log(` Use: ${provider.command}`);
2759
+ }
2701
2760
  }
2702
2761
  function renderText(params) {
2703
2762
  const { generationType, agentId, ready, other, showAll } = params;
@@ -2770,6 +2829,7 @@ var generateCommand = new Command().name("generate").description("Show generatio
2770
2829
  const other = candidates.filter((candidate) => {
2771
2830
  return candidate.status !== "ready";
2772
2831
  });
2832
+ const builtInProviders = getBuiltInProviders(generationType);
2773
2833
  if (options.json) {
2774
2834
  console.log(
2775
2835
  JSON.stringify(
@@ -2780,7 +2840,8 @@ var generateCommand = new Command().name("generate").description("Show generatio
2780
2840
  agentId: agentId ?? null,
2781
2841
  choices: ready,
2782
2842
  otherCandidates: other,
2783
- builtInProvider: BUILT_IN_GENERATION_PROVIDERS[generationType] ?? null
2843
+ builtInProvider: builtInProviders[0] ?? null,
2844
+ builtInProviders
2784
2845
  },
2785
2846
  null,
2786
2847
  2
@@ -3039,6 +3100,7 @@ Examples:
3039
3100
  Check a connector? zero doctor check-connector --env-name GITHUB_TOKEN
3040
3101
  Check a URL? zero doctor check-connector --url https://api.github.com/repos/owner/repo
3041
3102
  Generate with image? zero doctor generate image
3103
+ Generate with video? zero doctor generate video
3042
3104
  Check with permission? zero doctor check-connector --env-name SLACK_TOKEN --check-permission chat:write
3043
3105
  Permission denied? zero doctor permission-deny github --method GET --path /repos/owner/repo
3044
3106
  Change a permission? zero doctor permission-change github --permission contents:read --enable
@@ -7198,18 +7260,115 @@ var imageCommand = createImageGenerateCommand({
7198
7260
  Pick size/quality: zero built-in generate image --prompt "A poster" --size 1024x1536 --quality high`
7199
7261
  });
7200
7262
 
7263
+ // src/commands/zero/built-in/generate/video.ts
7264
+ init_esm_shims();
7265
+
7266
+ // src/commands/zero/shared/video-generate.ts
7267
+ init_esm_shims();
7268
+ import { readFileSync as readFileSync13 } from "fs";
7269
+ function parseSeed(value) {
7270
+ const seed = Number(value);
7271
+ if (!Number.isInteger(seed) || seed < 0 || !Number.isSafeInteger(seed)) {
7272
+ throw new InvalidArgumentError("seed must be a non-negative safe integer");
7273
+ }
7274
+ return seed;
7275
+ }
7276
+ function readPrompt2(options, usageCommand) {
7277
+ if (options.prompt?.trim()) {
7278
+ return options.prompt.trim();
7279
+ }
7280
+ if (process.stdin.isTTY === false) {
7281
+ const prompt = readFileSync13("/dev/stdin", "utf8").trim();
7282
+ if (prompt.length > 0) {
7283
+ return prompt;
7284
+ }
7285
+ }
7286
+ throw new Error("--prompt is required", {
7287
+ cause: new Error(`Usage: ${usageCommand} --prompt "A cinematic city shot"`)
7288
+ });
7289
+ }
7290
+ function createVideoGenerateCommand(config) {
7291
+ return new Command().name(config.name).description("Generate a billed video file from a prompt").option("--prompt <text>", "Video prompt; can also be piped via stdin").option(
7292
+ "--model <model>",
7293
+ "Model: veo3.1-fast, veo3.1, kling-o3-standard, kling-v3-4k, seedance2.0, or seedance2.0-fast",
7294
+ "veo3.1-fast"
7295
+ ).option(
7296
+ "--aspect-ratio <ratio>",
7297
+ "Aspect ratio: 16:9 or 9:16; Seedance also supports 21:9, 4:3, 1:1, 3:4",
7298
+ "16:9"
7299
+ ).option(
7300
+ "--duration <duration>",
7301
+ "Duration: 3s-15s; Veo supports 4s/6s/8s",
7302
+ "8s"
7303
+ ).option("--resolution <resolution>", "Resolution: 720p, 1080p, or 4k").option("--no-audio", "Generate a silent video").option("--negative-prompt <text>", "Negative prompt").option("--seed <integer>", "Deterministic seed", parseSeed).option("--no-auto-fix", "Disable fal prompt auto-fix").option("--safety-tolerance <level>", "Safety tolerance: 1-6", "4").option("--json", "Print metadata as JSON").addHelpText(
7304
+ "after",
7305
+ `
7306
+ Examples:
7307
+ ${config.examples}
7308
+
7309
+ Output:
7310
+ Prints the generated /f/ video file URL and metadata
7311
+
7312
+ Notes:
7313
+ - Authenticates via ZERO_TOKEN (requires file:write capability)
7314
+ - Charges org credits after successful video generation
7315
+ - Uses fal video models with configured usage pricing`
7316
+ ).action(
7317
+ withErrorHandler(async (options) => {
7318
+ const prompt = readPrompt2(options, config.usageCommand);
7319
+ const result = await generateWebVideo({
7320
+ prompt,
7321
+ model: options.model,
7322
+ aspectRatio: options.aspectRatio,
7323
+ duration: options.duration,
7324
+ resolution: options.resolution,
7325
+ generateAudio: options.audio !== false,
7326
+ negativePrompt: options.negativePrompt,
7327
+ seed: options.seed,
7328
+ autoFix: options.autoFix !== false,
7329
+ safetyTolerance: options.safetyTolerance
7330
+ });
7331
+ if (options.json) {
7332
+ console.log(JSON.stringify(result));
7333
+ return;
7334
+ }
7335
+ console.log(source_default.green(`\u2713 Video generated: ${result.url}`));
7336
+ console.log(source_default.dim(` File: ${result.filename}`));
7337
+ console.log(source_default.dim(` Duration: ${result.duration}`));
7338
+ console.log(source_default.dim(` Resolution: ${result.resolution}`));
7339
+ console.log(source_default.dim(` Aspect ratio: ${result.aspectRatio}`));
7340
+ console.log(
7341
+ source_default.dim(` Audio: ${result.generateAudio ? "on" : "off"}`)
7342
+ );
7343
+ console.log(source_default.dim(` Credits charged: ${result.creditsCharged}`));
7344
+ console.log(source_default.dim(` Model: ${result.model}`));
7345
+ })
7346
+ );
7347
+ }
7348
+
7349
+ // src/commands/zero/built-in/generate/video.ts
7350
+ var videoCommand = createVideoGenerateCommand({
7351
+ name: "video",
7352
+ usageCommand: "zero built-in generate video",
7353
+ examples: ` Generate video: zero built-in generate video --prompt "A tracking shot through a neon market"
7354
+ Pipe prompt: cat prompt.txt | zero built-in generate video
7355
+ Use Kling: zero built-in generate video --model kling-o3-standard --prompt "A product reveal" --duration 10s
7356
+ Use Seedance: zero built-in generate video --model seedance2.0-fast --prompt "A multi-shot chase scene" --duration 8s --resolution 480p
7357
+ Use Veo 3.1: zero built-in generate video --model veo3.1 --prompt "A cinematic product reveal" --duration 6s --resolution 1080p`
7358
+ });
7359
+
7201
7360
  // src/commands/zero/built-in/generate/voice.ts
7202
7361
  init_esm_shims();
7203
7362
 
7204
7363
  // src/commands/zero/shared/voice-generate.ts
7205
7364
  init_esm_shims();
7206
- import { readFileSync as readFileSync13 } from "fs";
7365
+ import { readFileSync as readFileSync14 } from "fs";
7207
7366
  function readText(options, usageCommand) {
7208
7367
  if (options.text?.trim()) {
7209
7368
  return options.text.trim();
7210
7369
  }
7211
7370
  if (process.stdin.isTTY === false) {
7212
- const text = readFileSync13("/dev/stdin", "utf8").trim();
7371
+ const text = readFileSync14("/dev/stdin", "utf8").trim();
7213
7372
  if (text.length > 0) {
7214
7373
  return text;
7215
7374
  }
@@ -7264,11 +7423,12 @@ var voiceCommand = createVoiceGenerateCommand({
7264
7423
  });
7265
7424
 
7266
7425
  // src/commands/zero/built-in/generate/index.ts
7267
- var generateCommand2 = new Command().name("generate").description("Generate assets with built-in vm0 services").addCommand(imageCommand).addCommand(voiceCommand).addHelpText(
7426
+ var generateCommand2 = new Command().name("generate").description("Generate assets with built-in vm0 services").addCommand(imageCommand).addCommand(videoCommand).addCommand(voiceCommand).addHelpText(
7268
7427
  "after",
7269
7428
  `
7270
7429
  Examples:
7271
7430
  Generate image: zero built-in generate image --prompt "A watercolor fox"
7431
+ Generate video: zero built-in generate video --prompt "A cinematic city shot"
7272
7432
  Generate speech: zero built-in generate voice --text "Hello"`
7273
7433
  );
7274
7434
 
@@ -7278,6 +7438,7 @@ var zeroBuiltInCommand = new Command().name("built-in").description("Use built-i
7278
7438
  `
7279
7439
  Examples:
7280
7440
  Generate image: zero built-in generate image --prompt "A watercolor fox"
7441
+ Generate video: zero built-in generate video --prompt "A cinematic city shot"
7281
7442
  Generate speech: zero built-in generate voice --text "Hello"`
7282
7443
  );
7283
7444
 
@@ -7435,7 +7596,7 @@ function registerZeroCommands(prog, commands) {
7435
7596
  var program = new Command();
7436
7597
  program.name("zero").description(
7437
7598
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
7438
- ).version("9.148.2").addHelpText(
7599
+ ).version("9.149.0").addHelpText(
7439
7600
  "after",
7440
7601
  `
7441
7602
  Examples: