@vm0/cli 9.276.0 → 9.276.2
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/{agent-W7PHJUVB.js → agent-6ITXJMRI.js} +5 -5
- package/{banking-O7T5PBM3.js → banking-42ENCWTB.js} +4 -4
- package/{browser-ZG7ZF46W.js → browser-SO3OMW7W.js} +4 -4
- package/{chat-HJMQOQ4I.js → chat-HKPUUBZ5.js} +5 -5
- package/{chunk-3WAJCD24.js → chunk-3HO2YPJ7.js} +174 -1689
- package/chunk-3HO2YPJ7.js.map +1 -0
- package/{chunk-VF6NEP63.js → chunk-H5EY44XP.js} +2 -2
- package/{chunk-TGZRWEM5.js → chunk-HP56K4IH.js} +7 -7
- package/chunk-HP56K4IH.js.map +1 -0
- package/{chunk-7L3QU2TW.js → chunk-PWTMDZXF.js} +2 -2
- package/{chunk-BINP2SIK.js → chunk-QFLEPOFZ.js} +2 -2
- package/{chunk-L3GNJDD6.js → chunk-RSN3T2HL.js} +2 -2
- package/{chunk-3UTY4STV.js → chunk-VBS2LZRM.js} +137 -252
- package/chunk-VBS2LZRM.js.map +1 -0
- package/{chunk-DNRMAFE7.js → chunk-VEPOQ7CY.js} +6 -4
- package/{chunk-DNRMAFE7.js.map → chunk-VEPOQ7CY.js.map} +1 -1
- package/chunk-YEA6WZTH.js +2589 -0
- package/chunk-YEA6WZTH.js.map +1 -0
- package/{computer-use-6QJW3BGZ.js → computer-use-VOM7GCLC.js} +4 -4
- package/{connector-JZ2LKHX6.js → connector-5KE577OI.js} +8 -7
- package/{connector-JZ2LKHX6.js.map → connector-5KE577OI.js.map} +1 -1
- package/{credit-E54GPGW4.js → credit-LJEZMXAC.js} +5 -5
- package/{developer-support-HEKO46UO.js → developer-support-CTGXYJ76.js} +4 -4
- package/{doctor-5T7XB6F7.js → doctor-M7J2DURH.js} +5 -5
- package/{feishu-PSHSAE4U.js → feishu-WNA7YZU5.js} +4 -4
- package/{finance-SK24ZFH5.js → finance-MZKXGURA.js} +4 -4
- package/{generate-PWII6LXX.js → generate-YCT7EXEC.js} +367 -10
- package/generate-YCT7EXEC.js.map +1 -0
- package/{github-BXDFR3GI.js → github-KSDGGF6A.js} +4 -4
- package/{goal-7TZI6AXS.js → goal-X3HQ72QS.js} +4 -4
- package/{host-5T4TVL7F.js → host-WY2FGWZC.js} +4 -4
- package/{logs-55XWHCPG.js → logs-IBV7W6ZE.js} +6 -6
- package/{mail-OE6L2CHN.js → mail-YQMBJDYH.js} +6 -6
- package/{maps-L6C46N3N.js → maps-4DLR4ZXS.js} +4 -4
- package/{model-6GXITD4Q.js → model-SATA2MAX.js} +5 -5
- package/{model-provider-UKVWA22U.js → model-provider-JUMPLHAH.js} +5 -5
- package/{org-UYC3RD7F.js → org-IS5U6VUN.js} +4 -4
- package/package.json +1 -1
- package/{people-search-ZCQGVJFI.js → people-search-AGKDK64T.js} +4 -4
- package/{phone-ATTTOOE7.js → phone-GLY2FEBE.js} +4 -4
- package/{preference-KOCJ2LAB.js → preference-DJHZ6S6Z.js} +4 -4
- package/{recognize-2HRC7AQW.js → recognize-6IIZXIA7.js} +4 -4
- package/{resource-IBNZRCB7.js → resource-ZPUBGTPE.js} +4 -4
- package/{scrape-MJYF5WW6.js → scrape-77OQC5UK.js} +4 -4
- package/{search-AJRMWA6A.js → search-GXDC6G5B.js} +6 -6
- package/{secret-C6BJFOWU.js → secret-TVTCDFMW.js} +4 -4
- package/{slack-5VGLSWXM.js → slack-73645HEZ.js} +4 -4
- package/{teams-XASRTN32.js → teams-M2AJTHIS.js} +4 -4
- package/{telegram-2HS7B3CT.js → telegram-ARAHFEGY.js} +4 -4
- package/{upgrade-X3HGDTJP.js → upgrade-6OWI3JS2.js} +3 -3
- package/{variable-OGD73T2Q.js → variable-4U4DJTTI.js} +4 -4
- package/{video-PUUGUN6K.js → video-SQTSIULB.js} +3 -3
- package/{weather-LFI7A6PF.js → weather-RUVZN7YL.js} +4 -4
- package/{web-44A7VBPM.js → web-QL4CLTB7.js} +4 -4
- package/{web-search-OERDKWJY.js → web-search-3EXUOOVM.js} +4 -4
- package/{whoami-E3272IN4.js → whoami-4PHYIXKP.js} +5 -5
- package/{workflow-F6EZ27SX.js → workflow-YP2JTAKU.js} +5 -5
- package/zero.js +45 -46
- package/zero.js.map +1 -1
- package/chunk-3UTY4STV.js.map +0 -1
- package/chunk-3WAJCD24.js.map +0 -1
- package/chunk-BWCUF4IV.js +0 -659
- package/chunk-BWCUF4IV.js.map +0 -1
- package/chunk-TGZRWEM5.js.map +0 -1
- package/generate-PWII6LXX.js.map +0 -1
- /package/{agent-W7PHJUVB.js.map → agent-6ITXJMRI.js.map} +0 -0
- /package/{banking-O7T5PBM3.js.map → banking-42ENCWTB.js.map} +0 -0
- /package/{browser-ZG7ZF46W.js.map → browser-SO3OMW7W.js.map} +0 -0
- /package/{chat-HJMQOQ4I.js.map → chat-HKPUUBZ5.js.map} +0 -0
- /package/{chunk-VF6NEP63.js.map → chunk-H5EY44XP.js.map} +0 -0
- /package/{chunk-7L3QU2TW.js.map → chunk-PWTMDZXF.js.map} +0 -0
- /package/{chunk-BINP2SIK.js.map → chunk-QFLEPOFZ.js.map} +0 -0
- /package/{chunk-L3GNJDD6.js.map → chunk-RSN3T2HL.js.map} +0 -0
- /package/{computer-use-6QJW3BGZ.js.map → computer-use-VOM7GCLC.js.map} +0 -0
- /package/{credit-E54GPGW4.js.map → credit-LJEZMXAC.js.map} +0 -0
- /package/{developer-support-HEKO46UO.js.map → developer-support-CTGXYJ76.js.map} +0 -0
- /package/{doctor-5T7XB6F7.js.map → doctor-M7J2DURH.js.map} +0 -0
- /package/{feishu-PSHSAE4U.js.map → feishu-WNA7YZU5.js.map} +0 -0
- /package/{finance-SK24ZFH5.js.map → finance-MZKXGURA.js.map} +0 -0
- /package/{github-BXDFR3GI.js.map → github-KSDGGF6A.js.map} +0 -0
- /package/{goal-7TZI6AXS.js.map → goal-X3HQ72QS.js.map} +0 -0
- /package/{host-5T4TVL7F.js.map → host-WY2FGWZC.js.map} +0 -0
- /package/{logs-55XWHCPG.js.map → logs-IBV7W6ZE.js.map} +0 -0
- /package/{mail-OE6L2CHN.js.map → mail-YQMBJDYH.js.map} +0 -0
- /package/{maps-L6C46N3N.js.map → maps-4DLR4ZXS.js.map} +0 -0
- /package/{model-6GXITD4Q.js.map → model-SATA2MAX.js.map} +0 -0
- /package/{model-provider-UKVWA22U.js.map → model-provider-JUMPLHAH.js.map} +0 -0
- /package/{org-UYC3RD7F.js.map → org-IS5U6VUN.js.map} +0 -0
- /package/{people-search-ZCQGVJFI.js.map → people-search-AGKDK64T.js.map} +0 -0
- /package/{phone-ATTTOOE7.js.map → phone-GLY2FEBE.js.map} +0 -0
- /package/{preference-KOCJ2LAB.js.map → preference-DJHZ6S6Z.js.map} +0 -0
- /package/{recognize-2HRC7AQW.js.map → recognize-6IIZXIA7.js.map} +0 -0
- /package/{resource-IBNZRCB7.js.map → resource-ZPUBGTPE.js.map} +0 -0
- /package/{scrape-MJYF5WW6.js.map → scrape-77OQC5UK.js.map} +0 -0
- /package/{search-AJRMWA6A.js.map → search-GXDC6G5B.js.map} +0 -0
- /package/{secret-C6BJFOWU.js.map → secret-TVTCDFMW.js.map} +0 -0
- /package/{slack-5VGLSWXM.js.map → slack-73645HEZ.js.map} +0 -0
- /package/{teams-XASRTN32.js.map → teams-M2AJTHIS.js.map} +0 -0
- /package/{telegram-2HS7B3CT.js.map → telegram-ARAHFEGY.js.map} +0 -0
- /package/{upgrade-X3HGDTJP.js.map → upgrade-6OWI3JS2.js.map} +0 -0
- /package/{variable-OGD73T2Q.js.map → variable-4U4DJTTI.js.map} +0 -0
- /package/{video-PUUGUN6K.js.map → video-SQTSIULB.js.map} +0 -0
- /package/{weather-LFI7A6PF.js.map → weather-RUVZN7YL.js.map} +0 -0
- /package/{web-44A7VBPM.js.map → web-QL4CLTB7.js.map} +0 -0
- /package/{web-search-OERDKWJY.js.map → web-search-3EXUOOVM.js.map} +0 -0
- /package/{whoami-E3272IN4.js.map → whoami-4PHYIXKP.js.map} +0 -0
- /package/{workflow-F6EZ27SX.js.map → workflow-YP2JTAKU.js.map} +0 -0
|
@@ -10,19 +10,19 @@ import {
|
|
|
10
10
|
createZeroCreditCheckout,
|
|
11
11
|
getZeroBillingStatus,
|
|
12
12
|
getZeroOrgMembers
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-3HO2YPJ7.js";
|
|
14
|
+
import "./chunk-YEA6WZTH.js";
|
|
15
15
|
import {
|
|
16
16
|
planUpgradeUrl
|
|
17
17
|
} from "./chunk-J45P5ALH.js";
|
|
18
18
|
import {
|
|
19
19
|
getPlatformOrigin
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-H5EY44XP.js";
|
|
21
21
|
import "./chunk-ANOLYIPL.js";
|
|
22
22
|
import {
|
|
23
23
|
source_default,
|
|
24
24
|
withErrorHandler
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-QFLEPOFZ.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-
|
|
166
|
+
//# sourceMappingURL=credit-LJEZMXAC.js.map
|
|
@@ -4,12 +4,12 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
requestDeveloperSupportConsent,
|
|
6
6
|
submitDeveloperSupport
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-3HO2YPJ7.js";
|
|
8
|
+
import "./chunk-YEA6WZTH.js";
|
|
9
9
|
import "./chunk-ANOLYIPL.js";
|
|
10
10
|
import {
|
|
11
11
|
withErrorHandler
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-QFLEPOFZ.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-
|
|
64
|
+
//# sourceMappingURL=developer-support-CTGXYJ76.js.map
|
|
@@ -9,19 +9,19 @@ import {
|
|
|
9
9
|
getZeroBillingStatus,
|
|
10
10
|
getZeroOrg,
|
|
11
11
|
getZeroOrgMembers
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-3HO2YPJ7.js";
|
|
13
|
+
import "./chunk-YEA6WZTH.js";
|
|
14
14
|
import {
|
|
15
15
|
planUpgradeUrl
|
|
16
16
|
} from "./chunk-J45P5ALH.js";
|
|
17
17
|
import {
|
|
18
18
|
getPlatformOrigin
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-H5EY44XP.js";
|
|
20
20
|
import "./chunk-ANOLYIPL.js";
|
|
21
21
|
import {
|
|
22
22
|
source_default,
|
|
23
23
|
withErrorHandler
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-QFLEPOFZ.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-
|
|
125
|
+
//# sourceMappingURL=doctor-M7J2DURH.js.map
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
downloadFeishuFile,
|
|
8
8
|
initFeishuFileUpload,
|
|
9
9
|
sendFeishuMessage
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-3HO2YPJ7.js";
|
|
11
|
+
import "./chunk-YEA6WZTH.js";
|
|
12
12
|
import "./chunk-ANOLYIPL.js";
|
|
13
13
|
import {
|
|
14
14
|
source_default,
|
|
15
15
|
withErrorHandler
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-QFLEPOFZ.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-
|
|
281
|
+
//# sourceMappingURL=feishu-WNA7YZU5.js.map
|
|
@@ -14,13 +14,13 @@ import {
|
|
|
14
14
|
zeroFinanceQuoteRequestSchema,
|
|
15
15
|
zeroFinanceRangeSchema,
|
|
16
16
|
zeroFinanceSearchRequestSchema
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
17
|
+
} from "./chunk-3HO2YPJ7.js";
|
|
18
|
+
import "./chunk-YEA6WZTH.js";
|
|
19
19
|
import "./chunk-ANOLYIPL.js";
|
|
20
20
|
import {
|
|
21
21
|
source_default,
|
|
22
22
|
withErrorHandler
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-QFLEPOFZ.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-
|
|
128
|
+
//# sourceMappingURL=finance-MZKXGURA.js.map
|
|
@@ -28,27 +28,30 @@ import {
|
|
|
28
28
|
getZeroBillingStatus,
|
|
29
29
|
listZeroConnectorCatalog,
|
|
30
30
|
listZeroConnectorCatalogStatus
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3HO2YPJ7.js";
|
|
32
32
|
import {
|
|
33
|
+
generateWebAvatarVideo,
|
|
33
34
|
generateWebImage,
|
|
34
35
|
generateWebVideo,
|
|
35
|
-
generateWebVoice
|
|
36
|
-
|
|
36
|
+
generateWebVoice,
|
|
37
|
+
listWebAvatarVideoAvatars,
|
|
38
|
+
listWebAvatarVideoVoices
|
|
39
|
+
} from "./chunk-YEA6WZTH.js";
|
|
37
40
|
import {
|
|
38
41
|
planUpgradeUrl
|
|
39
42
|
} from "./chunk-J45P5ALH.js";
|
|
40
43
|
import {
|
|
41
44
|
getPlatformOrigin
|
|
42
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-H5EY44XP.js";
|
|
43
46
|
import "./chunk-ANOLYIPL.js";
|
|
44
47
|
import {
|
|
45
48
|
ApiRequestError,
|
|
46
49
|
source_default,
|
|
47
50
|
withErrorHandler
|
|
48
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QFLEPOFZ.js";
|
|
49
52
|
import {
|
|
50
53
|
isFeatureEnabled
|
|
51
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-HP56K4IH.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-
|
|
3214
|
+
//# sourceMappingURL=generate-YCT7EXEC.js.map
|