@vm0/cli 9.275.1 → 9.276.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.
Files changed (107) hide show
  1. package/{agent-FSN2GJMD.js → agent-Y2VPFJTJ.js} +5 -5
  2. package/{banking-DQZ2AEIW.js → banking-Y5WT7M34.js} +4 -4
  3. package/{browser-NETPPDQ6.js → browser-H55S7OEH.js} +4 -4
  4. package/{chat-A6SB23VM.js → chat-P6UC665V.js} +5 -5
  5. package/{chunk-GRD57BA4.js → chunk-52BQC77O.js} +2 -2
  6. package/{chunk-G45XGQ25.js → chunk-7MOGRZIF.js} +12 -1
  7. package/chunk-7MOGRZIF.js.map +1 -0
  8. package/{chunk-6IZATZTU.js → chunk-DCTUWMGG.js} +234 -1696
  9. package/chunk-DCTUWMGG.js.map +1 -0
  10. package/{chunk-H6QAMEXS.js → chunk-JPHMTCJS.js} +130 -249
  11. package/chunk-JPHMTCJS.js.map +1 -0
  12. package/{chunk-HXI2NYPO.js → chunk-NUK6BSMQ.js} +2 -2
  13. package/chunk-NUK6BSMQ.js.map +1 -0
  14. package/{chunk-6RWOJ4OL.js → chunk-OHA5XMTM.js} +2 -2
  15. package/{chunk-6IN6OKYZ.js → chunk-VH6AYJ2T.js} +6 -4
  16. package/{chunk-6IN6OKYZ.js.map → chunk-VH6AYJ2T.js.map} +1 -1
  17. package/{chunk-IDXPNDWE.js → chunk-WVWTGU3D.js} +2 -2
  18. package/chunk-X6A4NKYJ.js +2582 -0
  19. package/chunk-X6A4NKYJ.js.map +1 -0
  20. package/{computer-use-LBGMJU3E.js → computer-use-IIMQVGVS.js} +4 -4
  21. package/{connector-YSCD5UKK.js → connector-BOSPE34U.js} +8 -7
  22. package/{connector-YSCD5UKK.js.map → connector-BOSPE34U.js.map} +1 -1
  23. package/{credit-3RU2G5JG.js → credit-HCG4ZY2S.js} +5 -5
  24. package/{developer-support-NIVYOD5A.js → developer-support-OQFPD6WL.js} +4 -4
  25. package/{doctor-EAOYULTS.js → doctor-4MUE6KKK.js} +5 -5
  26. package/{feishu-FBIELF7H.js → feishu-ZZAR72ZM.js} +4 -4
  27. package/{finance-44VXLKJI.js → finance-QPLN4RKW.js} +4 -4
  28. package/{generate-L6ZOETPQ.js → generate-KGLIGGYD.js} +367 -10
  29. package/generate-KGLIGGYD.js.map +1 -0
  30. package/{github-BGFLAMOO.js → github-IVVDB43M.js} +4 -4
  31. package/{goal-XG7LFY7I.js → goal-O5AXGFTU.js} +4 -4
  32. package/{host-DHYMUPTC.js → host-25ULGADV.js} +4 -4
  33. package/{logs-GVWAF6MU.js → logs-JUK326FY.js} +6 -6
  34. package/{mail-IVJEYHBZ.js → mail-FTPC3QXX.js} +6 -6
  35. package/{maps-TZNW7NNW.js → maps-EWXICPSJ.js} +4 -4
  36. package/{model-HDI53F4S.js → model-OOYMO6RP.js} +5 -5
  37. package/{model-provider-PMT5UZFW.js → model-provider-JTY2NTCE.js} +5 -5
  38. package/{org-5TZVP6FZ.js → org-JOUYJEBD.js} +4 -4
  39. package/package.json +1 -1
  40. package/{people-search-YTGBNW6D.js → people-search-Y64QIJ7A.js} +4 -4
  41. package/{phone-2WRBOJKP.js → phone-DT3XBSU4.js} +4 -4
  42. package/{preference-JG75NHDC.js → preference-JUOFGAIR.js} +4 -4
  43. package/{recognize-323KRKAP.js → recognize-WSEXD3D2.js} +4 -4
  44. package/{resource-7T44AGQ7.js → resource-OMELMO73.js} +4 -4
  45. package/{scrape-C6QBZD3G.js → scrape-CHKGSKK6.js} +4 -4
  46. package/{search-DJHCQ44L.js → search-5TB6SYTY.js} +6 -6
  47. package/{secret-PHORSWLH.js → secret-AIV5RRZT.js} +4 -4
  48. package/{slack-R2R3PAY7.js → slack-5FG5YGYU.js} +4 -4
  49. package/{teams-AIKZ54LZ.js → teams-PZQSLTEP.js} +4 -4
  50. package/{telegram-Q7X3VUA7.js → telegram-NKZQNHE3.js} +4 -4
  51. package/{upgrade-CUG54HZN.js → upgrade-ARASMGTA.js} +3 -3
  52. package/{variable-ULQTVWCG.js → variable-C5UWLXPG.js} +4 -4
  53. package/{video-WXGC2GRR.js → video-FHJSJDWV.js} +3 -3
  54. package/{weather-KO5ARUSQ.js → weather-UEPFRQEG.js} +4 -4
  55. package/{web-STMNCWSR.js → web-3LQQFMED.js} +4 -4
  56. package/{web-search-YHBKDKXE.js → web-search-TXH5O7YM.js} +4 -4
  57. package/{whoami-FIJ5A7WN.js → whoami-IFTY3LVR.js} +5 -5
  58. package/{workflow-6ZJ5XJCV.js → workflow-RLCIZUED.js} +5 -5
  59. package/zero.js +44 -44
  60. package/chunk-4GU5ZKEO.js +0 -659
  61. package/chunk-4GU5ZKEO.js.map +0 -1
  62. package/chunk-6IZATZTU.js.map +0 -1
  63. package/chunk-G45XGQ25.js.map +0 -1
  64. package/chunk-H6QAMEXS.js.map +0 -1
  65. package/chunk-HXI2NYPO.js.map +0 -1
  66. package/generate-L6ZOETPQ.js.map +0 -1
  67. /package/{agent-FSN2GJMD.js.map → agent-Y2VPFJTJ.js.map} +0 -0
  68. /package/{banking-DQZ2AEIW.js.map → banking-Y5WT7M34.js.map} +0 -0
  69. /package/{browser-NETPPDQ6.js.map → browser-H55S7OEH.js.map} +0 -0
  70. /package/{chat-A6SB23VM.js.map → chat-P6UC665V.js.map} +0 -0
  71. /package/{chunk-GRD57BA4.js.map → chunk-52BQC77O.js.map} +0 -0
  72. /package/{chunk-6RWOJ4OL.js.map → chunk-OHA5XMTM.js.map} +0 -0
  73. /package/{chunk-IDXPNDWE.js.map → chunk-WVWTGU3D.js.map} +0 -0
  74. /package/{computer-use-LBGMJU3E.js.map → computer-use-IIMQVGVS.js.map} +0 -0
  75. /package/{credit-3RU2G5JG.js.map → credit-HCG4ZY2S.js.map} +0 -0
  76. /package/{developer-support-NIVYOD5A.js.map → developer-support-OQFPD6WL.js.map} +0 -0
  77. /package/{doctor-EAOYULTS.js.map → doctor-4MUE6KKK.js.map} +0 -0
  78. /package/{feishu-FBIELF7H.js.map → feishu-ZZAR72ZM.js.map} +0 -0
  79. /package/{finance-44VXLKJI.js.map → finance-QPLN4RKW.js.map} +0 -0
  80. /package/{github-BGFLAMOO.js.map → github-IVVDB43M.js.map} +0 -0
  81. /package/{goal-XG7LFY7I.js.map → goal-O5AXGFTU.js.map} +0 -0
  82. /package/{host-DHYMUPTC.js.map → host-25ULGADV.js.map} +0 -0
  83. /package/{logs-GVWAF6MU.js.map → logs-JUK326FY.js.map} +0 -0
  84. /package/{mail-IVJEYHBZ.js.map → mail-FTPC3QXX.js.map} +0 -0
  85. /package/{maps-TZNW7NNW.js.map → maps-EWXICPSJ.js.map} +0 -0
  86. /package/{model-HDI53F4S.js.map → model-OOYMO6RP.js.map} +0 -0
  87. /package/{model-provider-PMT5UZFW.js.map → model-provider-JTY2NTCE.js.map} +0 -0
  88. /package/{org-5TZVP6FZ.js.map → org-JOUYJEBD.js.map} +0 -0
  89. /package/{people-search-YTGBNW6D.js.map → people-search-Y64QIJ7A.js.map} +0 -0
  90. /package/{phone-2WRBOJKP.js.map → phone-DT3XBSU4.js.map} +0 -0
  91. /package/{preference-JG75NHDC.js.map → preference-JUOFGAIR.js.map} +0 -0
  92. /package/{recognize-323KRKAP.js.map → recognize-WSEXD3D2.js.map} +0 -0
  93. /package/{resource-7T44AGQ7.js.map → resource-OMELMO73.js.map} +0 -0
  94. /package/{scrape-C6QBZD3G.js.map → scrape-CHKGSKK6.js.map} +0 -0
  95. /package/{search-DJHCQ44L.js.map → search-5TB6SYTY.js.map} +0 -0
  96. /package/{secret-PHORSWLH.js.map → secret-AIV5RRZT.js.map} +0 -0
  97. /package/{slack-R2R3PAY7.js.map → slack-5FG5YGYU.js.map} +0 -0
  98. /package/{teams-AIKZ54LZ.js.map → teams-PZQSLTEP.js.map} +0 -0
  99. /package/{telegram-Q7X3VUA7.js.map → telegram-NKZQNHE3.js.map} +0 -0
  100. /package/{upgrade-CUG54HZN.js.map → upgrade-ARASMGTA.js.map} +0 -0
  101. /package/{variable-ULQTVWCG.js.map → variable-C5UWLXPG.js.map} +0 -0
  102. /package/{video-WXGC2GRR.js.map → video-FHJSJDWV.js.map} +0 -0
  103. /package/{weather-KO5ARUSQ.js.map → weather-UEPFRQEG.js.map} +0 -0
  104. /package/{web-STMNCWSR.js.map → web-3LQQFMED.js.map} +0 -0
  105. /package/{web-search-YHBKDKXE.js.map → web-search-TXH5O7YM.js.map} +0 -0
  106. /package/{whoami-FIJ5A7WN.js.map → whoami-IFTY3LVR.js.map} +0 -0
  107. /package/{workflow-6ZJ5XJCV.js.map → workflow-RLCIZUED.js.map} +0 -0
@@ -10,19 +10,19 @@ import {
10
10
  createZeroCreditCheckout,
11
11
  getZeroBillingStatus,
12
12
  getZeroOrgMembers
13
- } from "./chunk-6IZATZTU.js";
14
- import "./chunk-4GU5ZKEO.js";
13
+ } from "./chunk-DCTUWMGG.js";
14
+ import "./chunk-X6A4NKYJ.js";
15
15
  import {
16
16
  planUpgradeUrl
17
17
  } from "./chunk-J45P5ALH.js";
18
18
  import {
19
19
  getPlatformOrigin
20
- } from "./chunk-6RWOJ4OL.js";
20
+ } from "./chunk-OHA5XMTM.js";
21
21
  import "./chunk-ANOLYIPL.js";
22
22
  import {
23
23
  source_default,
24
24
  withErrorHandler
25
- } from "./chunk-HXI2NYPO.js";
25
+ } from "./chunk-NUK6BSMQ.js";
26
26
  import {
27
27
  decodeZeroTokenPayload
28
28
  } from "./chunk-32FE3MDA.js";
@@ -163,4 +163,4 @@ var zeroCreditCommand = new Command().name("credit").description("View credit ba
163
163
  export {
164
164
  zeroCreditCommand
165
165
  };
166
- //# sourceMappingURL=credit-3RU2G5JG.js.map
166
+ //# sourceMappingURL=credit-HCG4ZY2S.js.map
@@ -4,12 +4,12 @@ const require = __createRequire(import.meta.url);
4
4
  import {
5
5
  requestDeveloperSupportConsent,
6
6
  submitDeveloperSupport
7
- } from "./chunk-6IZATZTU.js";
8
- import "./chunk-4GU5ZKEO.js";
7
+ } from "./chunk-DCTUWMGG.js";
8
+ import "./chunk-X6A4NKYJ.js";
9
9
  import "./chunk-ANOLYIPL.js";
10
10
  import {
11
11
  withErrorHandler
12
- } from "./chunk-HXI2NYPO.js";
12
+ } from "./chunk-NUK6BSMQ.js";
13
13
  import "./chunk-32FE3MDA.js";
14
14
  import {
15
15
  Command
@@ -61,4 +61,4 @@ Notes:
61
61
  export {
62
62
  zeroDeveloperSupportCommand
63
63
  };
64
- //# sourceMappingURL=developer-support-NIVYOD5A.js.map
64
+ //# sourceMappingURL=developer-support-OQFPD6WL.js.map
@@ -9,19 +9,19 @@ import {
9
9
  getZeroBillingStatus,
10
10
  getZeroOrg,
11
11
  getZeroOrgMembers
12
- } from "./chunk-6IZATZTU.js";
13
- import "./chunk-4GU5ZKEO.js";
12
+ } from "./chunk-DCTUWMGG.js";
13
+ import "./chunk-X6A4NKYJ.js";
14
14
  import {
15
15
  planUpgradeUrl
16
16
  } from "./chunk-J45P5ALH.js";
17
17
  import {
18
18
  getPlatformOrigin
19
- } from "./chunk-6RWOJ4OL.js";
19
+ } from "./chunk-OHA5XMTM.js";
20
20
  import "./chunk-ANOLYIPL.js";
21
21
  import {
22
22
  source_default,
23
23
  withErrorHandler
24
- } from "./chunk-HXI2NYPO.js";
24
+ } from "./chunk-NUK6BSMQ.js";
25
25
  import "./chunk-32FE3MDA.js";
26
26
  import {
27
27
  Command
@@ -122,4 +122,4 @@ Notes:
122
122
  export {
123
123
  zeroDoctorCommand
124
124
  };
125
- //# sourceMappingURL=doctor-EAOYULTS.js.map
125
+ //# sourceMappingURL=doctor-4MUE6KKK.js.map
@@ -7,13 +7,13 @@ import {
7
7
  downloadFeishuFile,
8
8
  initFeishuFileUpload,
9
9
  sendFeishuMessage
10
- } from "./chunk-6IZATZTU.js";
11
- import "./chunk-4GU5ZKEO.js";
10
+ } from "./chunk-DCTUWMGG.js";
11
+ import "./chunk-X6A4NKYJ.js";
12
12
  import "./chunk-ANOLYIPL.js";
13
13
  import {
14
14
  source_default,
15
15
  withErrorHandler
16
- } from "./chunk-HXI2NYPO.js";
16
+ } from "./chunk-NUK6BSMQ.js";
17
17
  import "./chunk-32FE3MDA.js";
18
18
  import {
19
19
  Command
@@ -278,4 +278,4 @@ Examples:
278
278
  export {
279
279
  zeroFeishuCommand
280
280
  };
281
- //# sourceMappingURL=feishu-FBIELF7H.js.map
281
+ //# sourceMappingURL=feishu-ZZAR72ZM.js.map
@@ -14,13 +14,13 @@ import {
14
14
  zeroFinanceQuoteRequestSchema,
15
15
  zeroFinanceRangeSchema,
16
16
  zeroFinanceSearchRequestSchema
17
- } from "./chunk-6IZATZTU.js";
18
- import "./chunk-4GU5ZKEO.js";
17
+ } from "./chunk-DCTUWMGG.js";
18
+ import "./chunk-X6A4NKYJ.js";
19
19
  import "./chunk-ANOLYIPL.js";
20
20
  import {
21
21
  source_default,
22
22
  withErrorHandler
23
- } from "./chunk-HXI2NYPO.js";
23
+ } from "./chunk-NUK6BSMQ.js";
24
24
  import "./chunk-32FE3MDA.js";
25
25
  import {
26
26
  Command,
@@ -125,4 +125,4 @@ Notes:
125
125
  export {
126
126
  zeroFinanceCommand
127
127
  };
128
- //# sourceMappingURL=finance-44VXLKJI.js.map
128
+ //# sourceMappingURL=finance-QPLN4RKW.js.map
@@ -28,27 +28,30 @@ import {
28
28
  getZeroBillingStatus,
29
29
  listZeroConnectorCatalog,
30
30
  listZeroConnectorCatalogStatus
31
- } from "./chunk-6IZATZTU.js";
31
+ } from "./chunk-DCTUWMGG.js";
32
32
  import {
33
+ generateWebAvatarVideo,
33
34
  generateWebImage,
34
35
  generateWebVideo,
35
- generateWebVoice
36
- } from "./chunk-4GU5ZKEO.js";
36
+ generateWebVoice,
37
+ listWebAvatarVideoAvatars,
38
+ listWebAvatarVideoVoices
39
+ } from "./chunk-X6A4NKYJ.js";
37
40
  import {
38
41
  planUpgradeUrl
39
42
  } from "./chunk-J45P5ALH.js";
40
43
  import {
41
44
  getPlatformOrigin
42
- } from "./chunk-6RWOJ4OL.js";
45
+ } from "./chunk-OHA5XMTM.js";
43
46
  import "./chunk-ANOLYIPL.js";
44
47
  import {
45
48
  ApiRequestError,
46
49
  source_default,
47
50
  withErrorHandler
48
- } from "./chunk-HXI2NYPO.js";
51
+ } from "./chunk-NUK6BSMQ.js";
49
52
  import {
50
53
  isFeatureEnabled
51
- } from "./chunk-G45XGQ25.js";
54
+ } from "./chunk-7MOGRZIF.js";
52
55
  import {
53
56
  decodeZeroTokenPayload
54
57
  } from "./chunk-32FE3MDA.js";
@@ -210,6 +213,8 @@ import { readFileSync } from "fs";
210
213
  init_esm_shims();
211
214
  function toConnectorGenerationType(generationType) {
212
215
  switch (generationType) {
216
+ case "avatar-video":
217
+ return "video";
213
218
  case "voice":
214
219
  case "music":
215
220
  return "audio";
@@ -391,6 +396,11 @@ var BUILT_IN_GENERATION_PROVIDERS = {
391
396
  ]
392
397
  };
393
398
  var BUILT_IN_GENERATION_COMMANDS = {
399
+ "avatar-video": {
400
+ label: "Built-in JoggAI talking-avatar video generation",
401
+ command: "zero generate avatar-video --provider built-in -h",
402
+ models: "joggai-talking-avatar"
403
+ },
394
404
  image: {
395
405
  label: "Built-in image generation",
396
406
  command: "zero generate image --provider built-in -h",
@@ -458,6 +468,7 @@ var GENERATION_CONTEXT = {
458
468
  };
459
469
  var GENERATION_TYPE_LABELS = {
460
470
  audio: "Audio",
471
+ "avatar-video": "Talking-avatar video",
461
472
  code: "Code",
462
473
  "dashboard-design": "Dashboard design",
463
474
  document: "Document",
@@ -476,6 +487,8 @@ var GENERATION_TYPE_LABELS = {
476
487
  };
477
488
  function getConnectorGenerationType(generationType) {
478
489
  switch (generationType) {
490
+ case "avatar-video":
491
+ return "video";
479
492
  case "voice":
480
493
  case "music":
481
494
  return "audio";
@@ -625,7 +638,7 @@ function renderBuiltInProvider(params) {
625
638
  console.log("Built-in command:");
626
639
  console.log(` vm0 ${command.label}`);
627
640
  console.log(` Models: ${command.models}`);
628
- if (generationType === "video") {
641
+ if (generationType === "video" || generationType === "avatar-video") {
629
642
  if (videoGenerationAllowed === false) {
630
643
  console.log(
631
644
  " Availability: Requires a Pro, Team, or Custom workspace plan."
@@ -722,7 +735,7 @@ async function runLister(generationType, options = {}) {
722
735
  listZeroConnectorCatalogStatus(),
723
736
  agentId ? getZeroAgentUserConnectors(agentId) : Promise.resolve(null),
724
737
  getPlatformOrigin(),
725
- generationType === "video" && currentTokenCanReadBilling() ? getZeroBillingStatus() : Promise.resolve(null)
738
+ (generationType === "video" || generationType === "avatar-video") && currentTokenCanReadBilling() ? getZeroBillingStatus() : Promise.resolve(null)
726
739
  ]);
727
740
  const authorizedConnectorSlugs = enabledConnectorSlugs ? new Set(enabledConnectorSlugs) : null;
728
741
  const candidates = connectorGenerationType ? getGenerationConnectors(connectorGenerationType, catalog.connectors).map(
@@ -2566,6 +2579,349 @@ var videoCommand = createVideoGenerateCommand({
2566
2579
  Use HeyGen: zero generate video --provider heygen`
2567
2580
  });
2568
2581
 
2582
+ // src/commands/zero/generate/avatar-video.ts
2583
+ init_esm_shims();
2584
+ function parsePositiveInteger(value, name) {
2585
+ const parsed = Number(value);
2586
+ if (!Number.isSafeInteger(parsed) || parsed <= 0) {
2587
+ throw new InvalidArgumentError(`${name} must be a positive integer`);
2588
+ }
2589
+ return parsed;
2590
+ }
2591
+ function parseAvatarId(value) {
2592
+ return parsePositiveInteger(value, "avatar id");
2593
+ }
2594
+ function parsePage(value) {
2595
+ return parsePositiveInteger(value, "page");
2596
+ }
2597
+ function parsePageSize(value) {
2598
+ const parsed = parsePositiveInteger(value, "page size");
2599
+ if (parsed > 100) {
2600
+ throw new InvalidArgumentError("page size must be at most 100");
2601
+ }
2602
+ return parsed;
2603
+ }
2604
+ function parseScreenStyle(value) {
2605
+ const parsed = Number(value);
2606
+ if (parsed === 1 || parsed === 2 || parsed === 3) {
2607
+ return parsed;
2608
+ }
2609
+ throw new InvalidArgumentError("screen style must be 1, 2, or 3");
2610
+ }
2611
+ function parseChoice(value, choices, name) {
2612
+ const match = choices.find((choice) => {
2613
+ return choice === value;
2614
+ });
2615
+ if (!match) {
2616
+ throw new InvalidArgumentError(
2617
+ `${name} must be one of: ${choices.join(", ")}`
2618
+ );
2619
+ }
2620
+ return match;
2621
+ }
2622
+ function parseAspectRatio2(value) {
2623
+ return parseChoice(
2624
+ value,
2625
+ ["portrait", "landscape", "square"],
2626
+ "aspect ratio"
2627
+ );
2628
+ }
2629
+ function parseGender(value) {
2630
+ return parseChoice(value, ["female", "male"], "gender");
2631
+ }
2632
+ function parseAvatarStyle(value) {
2633
+ return parseChoice(value, ["professional", "social"], "avatar style");
2634
+ }
2635
+ function parseAvatarAge(value) {
2636
+ return parseChoice(value, ["adult", "senior", "young_adult"], "avatar age");
2637
+ }
2638
+ function parseAvatarScene(value) {
2639
+ return parseChoice(
2640
+ value,
2641
+ [
2642
+ "lifestyle",
2643
+ "outdoors",
2644
+ "business",
2645
+ "studio",
2646
+ "health_fitness",
2647
+ "education",
2648
+ "news"
2649
+ ],
2650
+ "avatar scene"
2651
+ );
2652
+ }
2653
+ function parseAvatarEthnicity(value) {
2654
+ return parseChoice(
2655
+ value,
2656
+ [
2657
+ "european",
2658
+ "african",
2659
+ "south_asian",
2660
+ "east_asian",
2661
+ "middle_eastern",
2662
+ "south_american",
2663
+ "north_american"
2664
+ ],
2665
+ "avatar ethnicity"
2666
+ );
2667
+ }
2668
+ function parseVoiceAge(value) {
2669
+ return parseChoice(value, ["young", "middle_aged", "old"], "voice age");
2670
+ }
2671
+ function hasAvatarFilters(options) {
2672
+ return Boolean(
2673
+ options.avatarStyle || options.avatarGender || options.avatarAge || options.avatarScene || options.avatarEthnicity
2674
+ );
2675
+ }
2676
+ function hasVoiceFilters(options) {
2677
+ return Boolean(
2678
+ options.voiceLanguage || options.voiceGender || options.voiceAge || options.voiceUseCase
2679
+ );
2680
+ }
2681
+ function hasGenerationInput(options) {
2682
+ return Boolean(
2683
+ options.script || options.audioUrl || options.avatarId || options.voiceId || options.videoName
2684
+ );
2685
+ }
2686
+ async function listAvatars(options) {
2687
+ if (hasVoiceFilters(options)) {
2688
+ throw new Error("Voice filters can only be used with --list-voices");
2689
+ }
2690
+ const result = await listWebAvatarVideoAvatars({
2691
+ page: options.page,
2692
+ pageSize: options.pageSize,
2693
+ aspectRatio: options.aspectRatio,
2694
+ style: options.avatarStyle,
2695
+ gender: options.avatarGender,
2696
+ age: options.avatarAge,
2697
+ scene: options.avatarScene,
2698
+ ethnicity: options.avatarEthnicity
2699
+ });
2700
+ if (options.json) {
2701
+ console.log(JSON.stringify(result));
2702
+ return;
2703
+ }
2704
+ console.log("Public JoggAI avatars");
2705
+ if (result.avatars.length === 0) {
2706
+ console.log(" No avatars matched the selected filters.");
2707
+ return;
2708
+ }
2709
+ for (const avatar of result.avatars) {
2710
+ const details = [avatar.style, avatar.gender, avatar.age].filter(Boolean).join(", ");
2711
+ console.log(
2712
+ ` ${avatar.id} ${avatar.name}${details ? ` ${details}` : ""}`
2713
+ );
2714
+ if (avatar.coverUrl) {
2715
+ console.log(source_default.dim(` Preview: ${avatar.coverUrl}`));
2716
+ }
2717
+ }
2718
+ }
2719
+ async function listVoices(options) {
2720
+ if (hasAvatarFilters(options)) {
2721
+ throw new Error("Avatar filters can only be used with --list-avatars");
2722
+ }
2723
+ const result = await listWebAvatarVideoVoices({
2724
+ page: options.page,
2725
+ pageSize: options.pageSize,
2726
+ language: options.voiceLanguage,
2727
+ gender: options.voiceGender,
2728
+ age: options.voiceAge,
2729
+ useCase: options.voiceUseCase
2730
+ });
2731
+ if (options.json) {
2732
+ console.log(JSON.stringify(result));
2733
+ return;
2734
+ }
2735
+ console.log("Public JoggAI voices");
2736
+ if (result.voices.length === 0) {
2737
+ console.log(" No voices matched the selected filters.");
2738
+ return;
2739
+ }
2740
+ for (const voice of result.voices) {
2741
+ const details = [voice.language, voice.gender, voice.age, voice.accent].filter(Boolean).join(", ");
2742
+ console.log(` ${voice.id} ${voice.name}${details ? ` ${details}` : ""}`);
2743
+ if (voice.sampleUrl) {
2744
+ console.log(source_default.dim(` Sample: ${voice.sampleUrl}`));
2745
+ }
2746
+ }
2747
+ if (result.hasMore) {
2748
+ console.log(
2749
+ source_default.dim(" More voices are available; use --page to continue.")
2750
+ );
2751
+ }
2752
+ }
2753
+ async function ensureVideoPlan() {
2754
+ if (!currentTokenCanReadBilling()) {
2755
+ return;
2756
+ }
2757
+ const billing = await getZeroBillingStatus();
2758
+ if (!currentPlanAllowsVideo(billing)) {
2759
+ throw new ApiRequestError(
2760
+ "Built-in avatar video generation requires Pro, Team, or Custom workspace access.",
2761
+ "PRO_REQUIRED",
2762
+ 402
2763
+ );
2764
+ }
2765
+ }
2766
+ function validateCommandModes(options) {
2767
+ if (options.listAvatars && options.listVoices) {
2768
+ throw new Error("Use only one of --list-avatars and --list-voices");
2769
+ }
2770
+ if (options.script && options.audioUrl) {
2771
+ throw new Error("Use exactly one of --script and --audio-url");
2772
+ }
2773
+ const listingResources = options.listAvatars || options.listVoices;
2774
+ if (listingResources && hasGenerationInput(options)) {
2775
+ throw new Error(
2776
+ "Resource listing flags cannot be combined with generation options"
2777
+ );
2778
+ }
2779
+ if (!options.listAvatars && hasAvatarFilters(options)) {
2780
+ throw new Error("Avatar filters require --list-avatars");
2781
+ }
2782
+ if (!options.listVoices && hasVoiceFilters(options)) {
2783
+ throw new Error("Voice filters require --list-voices");
2784
+ }
2785
+ }
2786
+ async function resolveCommandDispatch(options) {
2787
+ const listingResources = options.listAvatars || options.listVoices;
2788
+ const builtInResourceListing = listingResources && (!options.provider || options.provider === "built-in");
2789
+ if (builtInResourceListing) {
2790
+ return { outcome: "continue", script: options.script };
2791
+ }
2792
+ const dispatch = await dispatchGenerate({
2793
+ generationType: "avatar-video",
2794
+ provider: options.provider,
2795
+ prompt: options.audioUrl ? "Generate from the supplied audio URL" : options.script,
2796
+ all: options.all,
2797
+ requireExecutionFor: options.json ? "--json" : void 0
2798
+ });
2799
+ if (dispatch.outcome === "handled") {
2800
+ return { outcome: "handled" };
2801
+ }
2802
+ return {
2803
+ outcome: "continue",
2804
+ script: options.audioUrl ? void 0 : dispatch.prompt
2805
+ };
2806
+ }
2807
+ async function handleResourceListing(options) {
2808
+ if (options.listAvatars) {
2809
+ await listAvatars(options);
2810
+ return true;
2811
+ }
2812
+ if (options.listVoices) {
2813
+ await listVoices(options);
2814
+ return true;
2815
+ }
2816
+ return false;
2817
+ }
2818
+ function printAvatarVideoResult(result, json) {
2819
+ if (json) {
2820
+ console.log(JSON.stringify(result));
2821
+ return;
2822
+ }
2823
+ console.log(source_default.green(`\u2713 Avatar video generated: ${result.url}`));
2824
+ console.log(source_default.dim(` File: ${result.filename}`));
2825
+ console.log(source_default.dim(` Duration: ${result.durationSeconds}s`));
2826
+ console.log(source_default.dim(` Aspect ratio: ${result.aspectRatio}`));
2827
+ console.log(source_default.dim(` Avatar: ${result.avatarId}`));
2828
+ console.log(source_default.dim(` Voice: ${result.voiceId}`));
2829
+ console.log(source_default.dim(` Credits charged: ${result.creditsCharged}`));
2830
+ }
2831
+ async function generateAvatarVideo(options, script) {
2832
+ if (!script && !options.audioUrl) {
2833
+ return;
2834
+ }
2835
+ if (!options.avatarId) {
2836
+ throw new Error(
2837
+ "--avatar-id is required; use --list-avatars to discover IDs"
2838
+ );
2839
+ }
2840
+ const voiceId = options.voiceId?.trim();
2841
+ if (!voiceId) {
2842
+ throw new Error(
2843
+ "--voice-id is required; use --list-voices to discover IDs"
2844
+ );
2845
+ }
2846
+ await ensureVideoPlan();
2847
+ const result = await generateWebAvatarVideo({
2848
+ avatarId: options.avatarId,
2849
+ voiceId,
2850
+ ...script ? { script } : {},
2851
+ ...options.audioUrl ? { audioUrl: options.audioUrl } : {},
2852
+ aspectRatio: options.aspectRatio ?? "portrait",
2853
+ screenStyle: options.screenStyle,
2854
+ caption: options.caption,
2855
+ ...options.videoName ? { videoName: options.videoName } : {}
2856
+ });
2857
+ printAvatarVideoResult(result, options.json === true);
2858
+ }
2859
+ async function runAvatarVideoCommand(options) {
2860
+ validateCommandModes(options);
2861
+ const dispatch = await resolveCommandDispatch(options);
2862
+ if (dispatch.outcome === "handled") {
2863
+ return;
2864
+ }
2865
+ if (await handleResourceListing(options)) {
2866
+ return;
2867
+ }
2868
+ await generateAvatarVideo(options, dispatch.script);
2869
+ }
2870
+ var avatarVideoCommand = new Command().name("avatar-video").description("Generate a billed JoggAI talking-avatar video").option("--script <text>", "Speech script; can also be piped via stdin").option("--audio-url <url>", "Public audio URL to drive the avatar").option("--avatar-id <id>", "Public JoggAI avatar ID", parseAvatarId).option("--voice-id <id>", "JoggAI voice ID").option(
2871
+ "--aspect-ratio <ratio>",
2872
+ "Output ratio: portrait, landscape, or square",
2873
+ parseAspectRatio2
2874
+ ).option(
2875
+ "--screen-style <style>",
2876
+ "Screen style: 1 full screen, 2 split screen, or 3 picture in picture",
2877
+ parseScreenStyle,
2878
+ 1
2879
+ ).option("--no-caption", "Disable generated captions").option("--video-name <name>", "Name the video in JoggAI").option("--list-avatars", "List public JoggAI avatars").option("--list-voices", "List public JoggAI voices").option("--page <number>", "Discovery page", parsePage, 1).option(
2880
+ "--page-size <number>",
2881
+ "Discovery page size (1-100)",
2882
+ parsePageSize,
2883
+ 10
2884
+ ).option("--avatar-style <style>", "professional or social", parseAvatarStyle).option("--avatar-gender <gender>", "female or male", parseGender).option("--avatar-age <age>", "adult, senior, or young_adult", parseAvatarAge).option("--avatar-scene <scene>", "Avatar scene filter", parseAvatarScene).option(
2885
+ "--avatar-ethnicity <ethnicity>",
2886
+ "Avatar ethnicity filter",
2887
+ parseAvatarEthnicity
2888
+ ).option("--voice-language <language>", "Voice language filter").option("--voice-gender <gender>", "female or male", parseGender).option("--voice-age <age>", "young, middle_aged, or old", parseVoiceAge).option("--voice-use-case <use-case>", "Voice use-case filter").option(
2889
+ "--provider <name>",
2890
+ "Provider: 'built-in' to use vm0 credits, or a connector name for skill guidance"
2891
+ ).option(
2892
+ "--all",
2893
+ "When listing providers, include unavailable or unauthorized connectors"
2894
+ ).option("--json", "Print resource lists or the generation result as JSON").addHelpText(
2895
+ "after",
2896
+ `
2897
+ Examples:
2898
+ List provider choices: zero generate avatar-video
2899
+ Generate from audio: zero generate avatar-video --provider built-in --avatar-id 81 --voice-id en-US-ChristopherNeural --audio-url https://example.com/voice.mp3
2900
+ Pipe a script: cat script.txt | zero generate avatar-video --provider built-in --avatar-id 81 --voice-id en-US-ChristopherNeural
2901
+
2902
+ Built-in workflow (vm0 credits):
2903
+ 1. zero generate avatar-video --provider built-in --list-avatars
2904
+ 2. zero generate avatar-video --provider built-in --list-voices --voice-language english
2905
+ 3. zero generate avatar-video --provider built-in --avatar-id 81 --voice-id en-US-ChristopherNeural --script "Welcome to vm0"
2906
+
2907
+ JoggAI connector workflow (BYOK):
2908
+ 1. zero connector status joggai
2909
+ 2. zero generate avatar-video --provider joggai
2910
+ Follow the printed JoggAI skill guidance for direct provider operations.
2911
+
2912
+ Output:
2913
+ Prints the generated /f/ video URL and metadata. Use --json for a complete,
2914
+ machine-readable resource list or generation result.
2915
+
2916
+ Notes:
2917
+ - Run the command with no script/audio to reflect built-in and connector choices.
2918
+ - Use exactly one of --script (or piped stdin) and --audio-url.
2919
+ - Public avatar and voice IDs are discoverable with the list flags.
2920
+ - Built-in generation uses vm0-managed JoggAI credentials and charges org credits.
2921
+ - Connector generation uses the connected JoggAI account and provider credits.
2922
+ - Authenticates via ZERO_TOKEN and requires file:write capability.`
2923
+ ).action(withErrorHandler(runAvatarVideoCommand));
2924
+
2569
2925
  // src/commands/zero/generate/website.ts
2570
2926
  init_esm_shims();
2571
2927
  var WEBSITE_TARGET = "website";
@@ -2829,6 +3185,7 @@ function buildGenerateHelpText() {
2829
3185
  ' Generate report: zero generate report --prompt "A Q2 usage report"',
2830
3186
  ' Generate docs: zero generate docs-design --prompt "A setup guide"',
2831
3187
  ' Generate video: zero generate video --prompt "A cinematic city shot"',
3188
+ ' Generate avatar video: zero generate avatar-video --avatar-id 81 --voice-id en-US-ChristopherNeural --script "Hello"',
2832
3189
  ' Generate site: zero generate website --prompt "A launch site"',
2833
3190
  ' Generate sprite: zero generate sprite --prompt "A slime monster idle loop"',
2834
3191
  ' Generate speech: zero generate voice --prompt "Hello"',
@@ -2850,8 +3207,8 @@ Notes:
2850
3207
  }
2851
3208
  var generateCommand = new Command().name("generate").description(
2852
3209
  "Generate assets via vm0's built-in pipelines or get connector skill-invocation guidance"
2853
- ).addCommand(imageCommand).addCommand(presentationCommand).addCommand(reportCommand).addCommand(docsDesignCommand).addCommand(posterCommand).addCommand(dashboardDesignCommand).addCommand(mobileAppDesignCommand).addCommand(videoCommand).addCommand(websiteCommand).addCommand(spriteCommand).addCommand(voiceCommand).addCommand(musicCommand).addCommand(textCommand).addCommand(codeCommand).addCommand(documentCommand).addHelpText("after", buildGenerateHelpText);
3210
+ ).addCommand(imageCommand).addCommand(presentationCommand).addCommand(reportCommand).addCommand(docsDesignCommand).addCommand(posterCommand).addCommand(dashboardDesignCommand).addCommand(mobileAppDesignCommand).addCommand(videoCommand).addCommand(avatarVideoCommand).addCommand(websiteCommand).addCommand(spriteCommand).addCommand(voiceCommand).addCommand(musicCommand).addCommand(textCommand).addCommand(codeCommand).addCommand(documentCommand).addHelpText("after", buildGenerateHelpText);
2854
3211
  export {
2855
3212
  generateCommand
2856
3213
  };
2857
- //# sourceMappingURL=generate-L6ZOETPQ.js.map
3214
+ //# sourceMappingURL=generate-KGLIGGYD.js.map