vidspotai-shared 1.0.95 → 1.0.96
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/lib/globals/aiModels/enums.d.ts +2 -0
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +5 -0
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +2 -0
- package/lib/globals/aiModels/providers/hostedAvatars.d.ts +22 -0
- package/lib/globals/aiModels/providers/hostedAvatars.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/hostedAvatars.js +129 -0
- package/lib/globals/types.d.ts +58 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +61 -1
- package/lib/models/demoVideoProject.model.d.ts +244 -0
- package/lib/models/demoVideoProject.model.d.ts.map +1 -0
- package/lib/models/demoVideoProject.model.js +2 -0
- package/lib/models/githubConnection.model.d.ts +35 -0
- package/lib/models/githubConnection.model.d.ts.map +1 -0
- package/lib/models/githubConnection.model.js +2 -0
- package/lib/models/index.d.ts +3 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +3 -0
- package/lib/models/outreach.model.d.ts +175 -0
- package/lib/models/outreach.model.d.ts.map +1 -0
- package/lib/models/outreach.model.js +2 -0
- package/lib/models/video.model.d.ts +4 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/schemas/brandKit.schema.d.ts +4 -0
- package/lib/schemas/brandKit.schema.d.ts.map +1 -1
- package/lib/schemas/brandKit.schema.js +10 -0
- package/lib/schemas/demoQuestion.schema.d.ts +286 -0
- package/lib/schemas/demoQuestion.schema.d.ts.map +1 -0
- package/lib/schemas/demoQuestion.schema.js +210 -0
- package/lib/schemas/demoSpec.schema.d.ts +109 -6
- package/lib/schemas/demoSpec.schema.d.ts.map +1 -1
- package/lib/schemas/demoSpec.schema.js +95 -7
- package/lib/schemas/index.d.ts +1 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +1 -0
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +9 -1
- package/lib/services/agent/taskPoller.d.ts.map +1 -1
- package/lib/services/agent/taskPoller.js +17 -6
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts +21 -9
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/generateAvatarVideo.tool.js +135 -39
- package/lib/services/aiGen/aiGenFactory.service.d.ts +1 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +10 -2
- package/lib/services/avatarGen/IAvatarVideoProvider.d.ts +136 -0
- package/lib/services/avatarGen/IAvatarVideoProvider.d.ts.map +1 -0
- package/lib/services/avatarGen/IAvatarVideoProvider.js +42 -0
- package/lib/services/avatarGen/avatarProviderFactory.d.ts +18 -0
- package/lib/services/avatarGen/avatarProviderFactory.d.ts.map +1 -0
- package/lib/services/avatarGen/avatarProviderFactory.js +54 -0
- package/lib/services/avatarGen/index.d.ts +6 -0
- package/lib/services/avatarGen/index.d.ts.map +1 -0
- package/lib/services/avatarGen/index.js +21 -0
- package/lib/services/avatarGen/providers/heygenAvatarProvider.d.ts +45 -0
- package/lib/services/avatarGen/providers/heygenAvatarProvider.d.ts.map +1 -0
- package/lib/services/avatarGen/providers/heygenAvatarProvider.js +190 -0
- package/lib/services/avatarGen/providers/klingAvatarProvider.d.ts +32 -0
- package/lib/services/avatarGen/providers/klingAvatarProvider.d.ts.map +1 -0
- package/lib/services/avatarGen/providers/klingAvatarProvider.js +69 -0
- package/lib/services/avatarGen/providers/tavusAvatarProvider.d.ts +56 -0
- package/lib/services/avatarGen/providers/tavusAvatarProvider.d.ts.map +1 -0
- package/lib/services/avatarGen/providers/tavusAvatarProvider.js +183 -0
- package/lib/services/demo/demoAuthor.d.ts +45 -0
- package/lib/services/demo/demoAuthor.d.ts.map +1 -0
- package/lib/services/demo/demoAuthor.js +75 -0
- package/lib/services/demo/demoAuthorNormalize.d.ts +49 -0
- package/lib/services/demo/demoAuthorNormalize.d.ts.map +1 -0
- package/lib/services/demo/demoAuthorNormalize.js +327 -0
- package/lib/services/demo/demoAuthorPrompt.d.ts +102 -0
- package/lib/services/demo/demoAuthorPrompt.d.ts.map +1 -0
- package/lib/services/demo/demoAuthorPrompt.js +243 -0
- package/lib/services/demo/demoCredits.d.ts +20 -0
- package/lib/services/demo/demoCredits.d.ts.map +1 -0
- package/lib/services/demo/demoCredits.js +51 -0
- package/lib/services/demo/demoMediaGuard.d.ts +43 -0
- package/lib/services/demo/demoMediaGuard.d.ts.map +1 -0
- package/lib/services/demo/demoMediaGuard.js +207 -0
- package/lib/services/demo/demoMusic.d.ts +13 -0
- package/lib/services/demo/demoMusic.d.ts.map +1 -0
- package/lib/services/demo/demoMusic.js +93 -0
- package/lib/services/demo/demoPrefill.d.ts +76 -0
- package/lib/services/demo/demoPrefill.d.ts.map +1 -0
- package/lib/services/demo/demoPrefill.js +435 -0
- package/lib/services/demo/demoRevisePrompt.d.ts +17 -0
- package/lib/services/demo/demoRevisePrompt.d.ts.map +1 -0
- package/lib/services/demo/demoRevisePrompt.js +85 -0
- package/lib/services/demo/demoReviser.d.ts +63 -0
- package/lib/services/demo/demoReviser.d.ts.map +1 -0
- package/lib/services/demo/demoReviser.js +81 -0
- package/lib/services/demo/demoScriptPrompt.d.ts +63 -0
- package/lib/services/demo/demoScriptPrompt.d.ts.map +1 -0
- package/lib/services/demo/demoScriptPrompt.js +234 -0
- package/lib/services/demo/demoScriptWriter.d.ts +65 -0
- package/lib/services/demo/demoScriptWriter.d.ts.map +1 -0
- package/lib/services/demo/demoScriptWriter.js +211 -0
- package/lib/services/demo/demoTriage.d.ts +65 -0
- package/lib/services/demo/demoTriage.d.ts.map +1 -0
- package/lib/services/demo/demoTriage.js +130 -0
- package/lib/services/demo/githubOAuth.d.ts +78 -0
- package/lib/services/demo/githubOAuth.d.ts.map +1 -0
- package/lib/services/demo/githubOAuth.js +209 -0
- package/lib/services/demo/githubOAuthState.d.ts +10 -0
- package/lib/services/demo/githubOAuthState.d.ts.map +1 -0
- package/lib/services/demo/githubOAuthState.js +63 -0
- package/lib/services/demo/index.d.ts +24 -0
- package/lib/services/demo/index.d.ts.map +1 -0
- package/lib/services/demo/index.js +39 -0
- package/lib/services/firestore.service.d.ts +11 -0
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +24 -0
- package/lib/services/index.d.ts +2 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +2 -0
- package/lib/services/tts/providers/elevenlabs.service.d.ts.map +1 -1
- package/lib/services/tts/providers/elevenlabs.service.js +16 -8
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.d.ts.map +1 -1
- package/lib/utils/index.js +1 -0
- package/lib/utils/outreachTemplate.d.ts +46 -0
- package/lib/utils/outreachTemplate.d.ts.map +1 -0
- package/lib/utils/outreachTemplate.js +174 -0
- package/package.json +1 -1
|
@@ -37,6 +37,8 @@ export declare const DemoBrandSchema: z.ZodObject<{
|
|
|
37
37
|
fonts: z.ZodDefault<z.ZodObject<{
|
|
38
38
|
heading: z.ZodOptional<z.ZodString>;
|
|
39
39
|
body: z.ZodOptional<z.ZodString>;
|
|
40
|
+
headingFileUrl: z.ZodOptional<z.ZodString>;
|
|
41
|
+
bodyFileUrl: z.ZodOptional<z.ZodString>;
|
|
40
42
|
}, z.core.$strip>>;
|
|
41
43
|
}, z.core.$strip>;
|
|
42
44
|
export type DemoBrand = z.infer<typeof DemoBrandSchema>;
|
|
@@ -173,6 +175,7 @@ export declare const DemoSceneSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
173
175
|
icon: z.ZodOptional<z.ZodString>;
|
|
174
176
|
}, z.core.$strip>>>;
|
|
175
177
|
screenshotUrl: z.ZodOptional<z.ZodString>;
|
|
178
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
176
179
|
}, z.core.$strip>, z.ZodObject<{
|
|
177
180
|
id: z.ZodString;
|
|
178
181
|
durationMs: z.ZodNumber;
|
|
@@ -190,6 +193,7 @@ export declare const DemoSceneSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
190
193
|
right: "right";
|
|
191
194
|
}>>;
|
|
192
195
|
screenshotUrl: z.ZodOptional<z.ZodString>;
|
|
196
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
193
197
|
cards: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
194
198
|
title: z.ZodString;
|
|
195
199
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
@@ -228,15 +232,34 @@ export declare const DemoSceneSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
228
232
|
laptop: "laptop";
|
|
229
233
|
tablet: "tablet";
|
|
230
234
|
}>>;
|
|
231
|
-
screenshotUrls: z.ZodArray<z.ZodString
|
|
235
|
+
screenshotUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
236
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
232
237
|
motion: z.ZodDefault<z.ZodEnum<{
|
|
233
238
|
parallax: "parallax";
|
|
234
|
-
scroll: "scroll";
|
|
235
239
|
tilt: "tilt";
|
|
240
|
+
scroll: "scroll";
|
|
236
241
|
"zoom-in": "zoom-in";
|
|
237
242
|
orbit: "orbit";
|
|
238
243
|
}>>;
|
|
239
244
|
headline: z.ZodOptional<z.ZodString>;
|
|
245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
246
|
+
id: z.ZodString;
|
|
247
|
+
durationMs: z.ZodNumber;
|
|
248
|
+
caption: z.ZodOptional<z.ZodObject<{
|
|
249
|
+
title: z.ZodString;
|
|
250
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
251
|
+
}, z.core.$strip>>;
|
|
252
|
+
narrationHint: z.ZodOptional<z.ZodString>;
|
|
253
|
+
type: z.ZodLiteral<"mediaShot">;
|
|
254
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
255
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
256
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
257
|
+
motion: z.ZodDefault<z.ZodEnum<{
|
|
258
|
+
static: "static";
|
|
259
|
+
"slow-zoom": "slow-zoom";
|
|
260
|
+
drift: "drift";
|
|
261
|
+
}>>;
|
|
262
|
+
scrim: z.ZodDefault<z.ZodBoolean>;
|
|
240
263
|
}, z.core.$strip>, z.ZodObject<{
|
|
241
264
|
id: z.ZodString;
|
|
242
265
|
durationMs: z.ZodNumber;
|
|
@@ -362,11 +385,44 @@ export declare const DemoSceneSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
362
385
|
}, z.core.$strip>>;
|
|
363
386
|
narrationHint: z.ZodOptional<z.ZodString>;
|
|
364
387
|
type: z.ZodLiteral<"custom">;
|
|
365
|
-
|
|
388
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
389
|
+
tsx: z.ZodDefault<z.ZodString>;
|
|
366
390
|
props: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
367
391
|
}, z.core.$strip>], "type">;
|
|
368
392
|
export type DemoScene = z.infer<typeof DemoSceneSchema>;
|
|
369
393
|
export type DemoSceneType = DemoScene["type"];
|
|
394
|
+
/**
|
|
395
|
+
* Scenes reference a generated asset by `gen://<assetId>` in any media URL slot
|
|
396
|
+
* (`screenshotUrl`, `videoUrl`, `screenshotUrls[]`, custom-scene `props`). The
|
|
397
|
+
* asset-generation stage resolves each request, uploads the result to GCS, and
|
|
398
|
+
* substitutes the real URL into the scenes; the request entry keeps the resolved
|
|
399
|
+
* `url` so redeliveries and revisions NEVER re-pay the provider for the same id.
|
|
400
|
+
*/
|
|
401
|
+
export declare const GEN_ASSET_URI_PREFIX: "gen://";
|
|
402
|
+
export declare const DemoGeneratedAssetSchema: z.ZodObject<{
|
|
403
|
+
id: z.ZodString;
|
|
404
|
+
kind: z.ZodEnum<{
|
|
405
|
+
image: "image";
|
|
406
|
+
video: "video";
|
|
407
|
+
}>;
|
|
408
|
+
prompt: z.ZodString;
|
|
409
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
410
|
+
aspect: z.ZodOptional<z.ZodEnum<{
|
|
411
|
+
"9:16": "9:16";
|
|
412
|
+
"1:1": "1:1";
|
|
413
|
+
"4:5": "4:5";
|
|
414
|
+
"16:9": "16:9";
|
|
415
|
+
}>>;
|
|
416
|
+
durationSec: z.ZodOptional<z.ZodNumber>;
|
|
417
|
+
url: z.ZodOptional<z.ZodString>;
|
|
418
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
419
|
+
ready: "ready";
|
|
420
|
+
failed: "failed";
|
|
421
|
+
pending: "pending";
|
|
422
|
+
}>>;
|
|
423
|
+
error: z.ZodOptional<z.ZodString>;
|
|
424
|
+
}, z.core.$strip>;
|
|
425
|
+
export type DemoGeneratedAsset = z.infer<typeof DemoGeneratedAssetSchema>;
|
|
370
426
|
export declare const DemoSpecSchema: z.ZodObject<{
|
|
371
427
|
schemaVersion: z.ZodDefault<z.ZodLiteral<1>>;
|
|
372
428
|
productName: z.ZodString;
|
|
@@ -386,6 +442,8 @@ export declare const DemoSpecSchema: z.ZodObject<{
|
|
|
386
442
|
fonts: z.ZodDefault<z.ZodObject<{
|
|
387
443
|
heading: z.ZodOptional<z.ZodString>;
|
|
388
444
|
body: z.ZodOptional<z.ZodString>;
|
|
445
|
+
headingFileUrl: z.ZodOptional<z.ZodString>;
|
|
446
|
+
bodyFileUrl: z.ZodOptional<z.ZodString>;
|
|
389
447
|
}, z.core.$strip>>;
|
|
390
448
|
}, z.core.$strip>;
|
|
391
449
|
style: z.ZodDefault<z.ZodObject<{
|
|
@@ -490,6 +548,7 @@ export declare const DemoSpecSchema: z.ZodObject<{
|
|
|
490
548
|
icon: z.ZodOptional<z.ZodString>;
|
|
491
549
|
}, z.core.$strip>>>;
|
|
492
550
|
screenshotUrl: z.ZodOptional<z.ZodString>;
|
|
551
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
493
552
|
}, z.core.$strip>, z.ZodObject<{
|
|
494
553
|
id: z.ZodString;
|
|
495
554
|
durationMs: z.ZodNumber;
|
|
@@ -507,6 +566,7 @@ export declare const DemoSpecSchema: z.ZodObject<{
|
|
|
507
566
|
right: "right";
|
|
508
567
|
}>>;
|
|
509
568
|
screenshotUrl: z.ZodOptional<z.ZodString>;
|
|
569
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
510
570
|
cards: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
511
571
|
title: z.ZodString;
|
|
512
572
|
subtitle: z.ZodOptional<z.ZodString>;
|
|
@@ -545,15 +605,34 @@ export declare const DemoSpecSchema: z.ZodObject<{
|
|
|
545
605
|
laptop: "laptop";
|
|
546
606
|
tablet: "tablet";
|
|
547
607
|
}>>;
|
|
548
|
-
screenshotUrls: z.ZodArray<z.ZodString
|
|
608
|
+
screenshotUrls: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
609
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
549
610
|
motion: z.ZodDefault<z.ZodEnum<{
|
|
550
611
|
parallax: "parallax";
|
|
551
|
-
scroll: "scroll";
|
|
552
612
|
tilt: "tilt";
|
|
613
|
+
scroll: "scroll";
|
|
553
614
|
"zoom-in": "zoom-in";
|
|
554
615
|
orbit: "orbit";
|
|
555
616
|
}>>;
|
|
556
617
|
headline: z.ZodOptional<z.ZodString>;
|
|
618
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
619
|
+
id: z.ZodString;
|
|
620
|
+
durationMs: z.ZodNumber;
|
|
621
|
+
caption: z.ZodOptional<z.ZodObject<{
|
|
622
|
+
title: z.ZodString;
|
|
623
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
624
|
+
}, z.core.$strip>>;
|
|
625
|
+
narrationHint: z.ZodOptional<z.ZodString>;
|
|
626
|
+
type: z.ZodLiteral<"mediaShot">;
|
|
627
|
+
imageUrl: z.ZodOptional<z.ZodString>;
|
|
628
|
+
videoUrl: z.ZodOptional<z.ZodString>;
|
|
629
|
+
headline: z.ZodOptional<z.ZodString>;
|
|
630
|
+
motion: z.ZodDefault<z.ZodEnum<{
|
|
631
|
+
static: "static";
|
|
632
|
+
"slow-zoom": "slow-zoom";
|
|
633
|
+
drift: "drift";
|
|
634
|
+
}>>;
|
|
635
|
+
scrim: z.ZodDefault<z.ZodBoolean>;
|
|
557
636
|
}, z.core.$strip>, z.ZodObject<{
|
|
558
637
|
id: z.ZodString;
|
|
559
638
|
durationMs: z.ZodNumber;
|
|
@@ -679,9 +758,33 @@ export declare const DemoSpecSchema: z.ZodObject<{
|
|
|
679
758
|
}, z.core.$strip>>;
|
|
680
759
|
narrationHint: z.ZodOptional<z.ZodString>;
|
|
681
760
|
type: z.ZodLiteral<"custom">;
|
|
682
|
-
|
|
761
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
762
|
+
tsx: z.ZodDefault<z.ZodString>;
|
|
683
763
|
props: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
684
764
|
}, z.core.$strip>], "type">>;
|
|
765
|
+
generatedAssets: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
766
|
+
id: z.ZodString;
|
|
767
|
+
kind: z.ZodEnum<{
|
|
768
|
+
image: "image";
|
|
769
|
+
video: "video";
|
|
770
|
+
}>;
|
|
771
|
+
prompt: z.ZodString;
|
|
772
|
+
purpose: z.ZodOptional<z.ZodString>;
|
|
773
|
+
aspect: z.ZodOptional<z.ZodEnum<{
|
|
774
|
+
"9:16": "9:16";
|
|
775
|
+
"1:1": "1:1";
|
|
776
|
+
"4:5": "4:5";
|
|
777
|
+
"16:9": "16:9";
|
|
778
|
+
}>>;
|
|
779
|
+
durationSec: z.ZodOptional<z.ZodNumber>;
|
|
780
|
+
url: z.ZodOptional<z.ZodString>;
|
|
781
|
+
status: z.ZodDefault<z.ZodEnum<{
|
|
782
|
+
ready: "ready";
|
|
783
|
+
failed: "failed";
|
|
784
|
+
pending: "pending";
|
|
785
|
+
}>>;
|
|
786
|
+
error: z.ZodOptional<z.ZodString>;
|
|
787
|
+
}, z.core.$strip>>>;
|
|
685
788
|
}, z.core.$strip>;
|
|
686
789
|
export type DemoSpec = z.infer<typeof DemoSpecSchema>;
|
|
687
790
|
/** Sum of scene durations — the canonical total timeline length in ms. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demoSpec.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/demoSpec.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AAMnD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"demoSpec.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/demoSpec.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,wBAAwB,EAAG,CAAU,CAAC;AAMnD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;iBAI1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AASxD,uCAAuC;AACvC,eAAO,MAAM,iBAAiB;;;;;;;EAO5B,CAAC;AACH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAIxD,8FAA8F;AAC9F,eAAO,MAAM,kBAAkB;;;iBAG7B,CAAC;AAiBH,gEAAgE;AAChE,eAAO,MAAM,UAAU;;;;;;iBAOrB,CAAC;AAEH,gEAAgE;AAChE,eAAO,MAAM,cAAc;;;;;;;;;;;iBAMzB,CAAC;AAEH,qDAAqD;AACrD,eAAO,MAAM,cAAc;;;;;;;iBAKzB,CAAC;AA6LH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAe1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAI9C;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,EAAG,QAAiB,CAAC;AAEtD,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;iBAoBnC,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAI1E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyCzB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,GAAG,MAAM,CAEzE"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DemoSpecSchema = exports.DemoSceneSchema = exports.ChatTurnSchema = exports.DemoCardSchema = exports.StatSchema = exports.SceneCaptionSchema = exports.DemoStyleSchema = exports.VisualStyleSchema = exports.DemoBrandSchema = exports.DEMO_SPEC_SCHEMA_VERSION = void 0;
|
|
3
|
+
exports.DemoSpecSchema = exports.DemoGeneratedAssetSchema = exports.GEN_ASSET_URI_PREFIX = exports.DemoSceneSchema = exports.ChatTurnSchema = exports.DemoCardSchema = exports.StatSchema = exports.SceneCaptionSchema = exports.DemoStyleSchema = exports.VisualStyleSchema = exports.DemoBrandSchema = exports.DEMO_SPEC_SCHEMA_VERSION = void 0;
|
|
4
4
|
exports.demoSpecDurationMs = demoSpecDurationMs;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const project_schema_1 = require("./project.schema");
|
|
@@ -149,6 +149,13 @@ const FeatureShowcaseSceneSchema = SceneBaseSchema.extend({
|
|
|
149
149
|
* surface. Often MORE accurate + reliable than a coded replica (see plan §2.6).
|
|
150
150
|
*/
|
|
151
151
|
screenshotUrl: zod_1.z.string().optional(),
|
|
152
|
+
/**
|
|
153
|
+
* Optional user-supplied video CLIP to play inside the surface (takes precedence
|
|
154
|
+
* over `screenshotUrl` when both are set). Sourced from `inputs.mediaAssets`; the
|
|
155
|
+
* render engine draws it via `<OffthreadVideo>`. Muted, cover-fit, loops to fill
|
|
156
|
+
* the scene duration.
|
|
157
|
+
*/
|
|
158
|
+
videoUrl: zod_1.z.string().optional(),
|
|
152
159
|
});
|
|
153
160
|
/** Bold headline + an isolated UI component/screenshot beside it (LinkedNav style). */
|
|
154
161
|
const SplitFeatureSceneSchema = SceneBaseSchema.extend({
|
|
@@ -160,6 +167,9 @@ const SplitFeatureSceneSchema = SceneBaseSchema.extend({
|
|
|
160
167
|
side: zod_1.z.enum(["left", "right"]).default("right"),
|
|
161
168
|
/** The isolated UI shown beside the headline: a screenshot or a small card set. */
|
|
162
169
|
screenshotUrl: zod_1.z.string().optional(),
|
|
170
|
+
/** Optional user-supplied video clip shown in the device frame beside the headline
|
|
171
|
+
* (takes precedence over `screenshotUrl`). Rendered via `<OffthreadVideo>`. */
|
|
172
|
+
videoUrl: zod_1.z.string().optional(),
|
|
163
173
|
cards: zod_1.z.array(exports.DemoCardSchema).default([]),
|
|
164
174
|
});
|
|
165
175
|
/** Large animated words, text-led (kinetic typography / value-prop / LangEase intro). */
|
|
@@ -174,12 +184,43 @@ const BigStatementSceneSchema = SceneBaseSchema.extend({
|
|
|
174
184
|
const DeviceMockupSceneSchema = SceneBaseSchema.extend({
|
|
175
185
|
type: zod_1.z.literal("deviceMockup"),
|
|
176
186
|
device: zod_1.z.enum(["browser", "laptop", "phone", "tablet"]).default("browser"),
|
|
177
|
-
/**
|
|
178
|
-
|
|
187
|
+
/**
|
|
188
|
+
* Screenshots to showcase (scroll/parallax/zoom across them). May be empty when
|
|
189
|
+
* `videoUrl` supplies the media instead — the canonical way to play a user's
|
|
190
|
+
* product clip inside a device frame. At least one of `screenshotUrls`/`videoUrl`
|
|
191
|
+
* should be present; the render engine draws a neutral frame if both are empty.
|
|
192
|
+
*/
|
|
193
|
+
screenshotUrls: zod_1.z.array(zod_1.z.string()).default([]),
|
|
194
|
+
/**
|
|
195
|
+
* Optional user-supplied video clip to play inside the device frame (the primary
|
|
196
|
+
* media when set; screenshots become supporting stills). Sourced from
|
|
197
|
+
* `inputs.mediaAssets`, rendered via `<OffthreadVideo>` (muted, loops to fill).
|
|
198
|
+
*/
|
|
199
|
+
videoUrl: zod_1.z.string().optional(),
|
|
179
200
|
/** Camera move applied to the mockup. */
|
|
180
201
|
motion: zod_1.z.enum(["tilt", "parallax", "scroll", "zoom-in", "orbit"]).default("parallax"),
|
|
181
202
|
headline: zod_1.z.string().optional(),
|
|
182
203
|
});
|
|
204
|
+
/**
|
|
205
|
+
* Full-bleed media moment — ONE image or clip fills the frame (cover-fit) under
|
|
206
|
+
* a slow camera move, with an optional headline over a readability scrim. The
|
|
207
|
+
* home for lifestyle/atmosphere media: user-uploaded photos/b-roll or
|
|
208
|
+
* planner-requested generated assets (`gen://` refs). Deliberately NOT framed in
|
|
209
|
+
* device chrome — this is emotional/contextual imagery, never "the product UI".
|
|
210
|
+
*/
|
|
211
|
+
const MediaShotSceneSchema = SceneBaseSchema.extend({
|
|
212
|
+
type: zod_1.z.literal("mediaShot"),
|
|
213
|
+
/** Image filling the frame (used when `videoUrl` is absent). */
|
|
214
|
+
imageUrl: zod_1.z.string().optional(),
|
|
215
|
+
/** Clip filling the frame (primary when set; muted, loops to fill). */
|
|
216
|
+
videoUrl: zod_1.z.string().optional(),
|
|
217
|
+
/** Optional big overlay line (kept short — this scene is media-led). */
|
|
218
|
+
headline: zod_1.z.string().optional(),
|
|
219
|
+
/** Camera move over the media. */
|
|
220
|
+
motion: zod_1.z.enum(["slow-zoom", "drift", "static"]).default("slow-zoom"),
|
|
221
|
+
/** Darkening gradient behind overlay text; disable for clean full-frame media. */
|
|
222
|
+
scrim: zod_1.z.boolean().default(true),
|
|
223
|
+
});
|
|
183
224
|
const ChatSceneSchema = SceneBaseSchema.extend({
|
|
184
225
|
type: zod_1.z.literal("chat"),
|
|
185
226
|
title: zod_1.z.string().default("AI Assistant"),
|
|
@@ -219,11 +260,20 @@ const CtaSceneSchema = SceneBaseSchema.extend({
|
|
|
219
260
|
const CustomSceneSchema = SceneBaseSchema.extend({
|
|
220
261
|
type: zod_1.z.literal("custom"),
|
|
221
262
|
/**
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
263
|
+
* Natural-language description of what this scene should show/do. The PLANNER
|
|
264
|
+
* writes this when a product needs a layout the Layer-A templates don't cover;
|
|
265
|
+
* the Layer-B codegen agent (Phase 8) reads it as the authoring brief and fills
|
|
266
|
+
* `tsx`. Optional so hand-authored/pre-filled custom scenes need not carry it.
|
|
225
267
|
*/
|
|
226
|
-
|
|
268
|
+
intent: zod_1.z.string().optional(),
|
|
269
|
+
/**
|
|
270
|
+
* Raw Remotion TSX authored by the Layer-B codegen agent. Rendered only by the
|
|
271
|
+
* Path B dynamic bundle (customSceneBundle.ts), after passing the AST allowlist
|
|
272
|
+
* + typecheck; the scene body executes only inside headless Chrome. Path A
|
|
273
|
+
* engines MUST placeholder these. May be empty when the planner emitted the
|
|
274
|
+
* scene as an `intent` for the codegen stage to fill (or when codegen failed).
|
|
275
|
+
*/
|
|
276
|
+
tsx: zod_1.z.string().default(""),
|
|
227
277
|
/** Optional prop bag injected into the custom component. */
|
|
228
278
|
props: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).default({}),
|
|
229
279
|
});
|
|
@@ -234,6 +284,7 @@ exports.DemoSceneSchema = zod_1.z.discriminatedUnion("type", [
|
|
|
234
284
|
SplitFeatureSceneSchema,
|
|
235
285
|
BigStatementSceneSchema,
|
|
236
286
|
DeviceMockupSceneSchema,
|
|
287
|
+
MediaShotSceneSchema,
|
|
237
288
|
ChatSceneSchema,
|
|
238
289
|
DashboardSceneSchema,
|
|
239
290
|
DocAnalysisSceneSchema,
|
|
@@ -242,6 +293,36 @@ exports.DemoSceneSchema = zod_1.z.discriminatedUnion("type", [
|
|
|
242
293
|
CtaSceneSchema,
|
|
243
294
|
CustomSceneSchema,
|
|
244
295
|
]);
|
|
296
|
+
// ─── generated media assets (planner-requested AI images/clips) ──────────────
|
|
297
|
+
/**
|
|
298
|
+
* Scenes reference a generated asset by `gen://<assetId>` in any media URL slot
|
|
299
|
+
* (`screenshotUrl`, `videoUrl`, `screenshotUrls[]`, custom-scene `props`). The
|
|
300
|
+
* asset-generation stage resolves each request, uploads the result to GCS, and
|
|
301
|
+
* substitutes the real URL into the scenes; the request entry keeps the resolved
|
|
302
|
+
* `url` so redeliveries and revisions NEVER re-pay the provider for the same id.
|
|
303
|
+
*/
|
|
304
|
+
exports.GEN_ASSET_URI_PREFIX = "gen://";
|
|
305
|
+
exports.DemoGeneratedAssetSchema = zod_1.z.object({
|
|
306
|
+
/** Stable id scenes reference as `gen://<id>`. */
|
|
307
|
+
id: zod_1.z.string(),
|
|
308
|
+
kind: zod_1.z.enum(["image", "video"]),
|
|
309
|
+
/**
|
|
310
|
+
* The full generation prompt, written by the PLANNER for THIS product:
|
|
311
|
+
* concrete subject + composition + lighting/mood + brand palette accents.
|
|
312
|
+
* Never contains readable text/UI copy (AI-rendered text artifacts).
|
|
313
|
+
*/
|
|
314
|
+
prompt: zod_1.z.string(),
|
|
315
|
+
/** Why this asset exists / which beat it serves — audit + revise context. */
|
|
316
|
+
purpose: zod_1.z.string().optional(),
|
|
317
|
+
/** Output geometry; defaults to the spec aspect at generation time. */
|
|
318
|
+
aspect: project_schema_1.AspectSchema.optional(),
|
|
319
|
+
/** Video only: clip length in seconds (engine loops it to fill the scene). */
|
|
320
|
+
durationSec: zod_1.z.number().int().min(2).max(10).optional(),
|
|
321
|
+
/** Resolved by the generation stage — a durable GCS URL once ready. */
|
|
322
|
+
url: zod_1.z.string().optional(),
|
|
323
|
+
status: zod_1.z.enum(["pending", "ready", "failed"]).default("pending"),
|
|
324
|
+
error: zod_1.z.string().optional(),
|
|
325
|
+
});
|
|
245
326
|
// ─── top-level DemoSpec ──────────────────────────────────────────────────────
|
|
246
327
|
exports.DemoSpecSchema = zod_1.z.object({
|
|
247
328
|
schemaVersion: zod_1.z.literal(exports.DEMO_SPEC_SCHEMA_VERSION).default(exports.DEMO_SPEC_SCHEMA_VERSION),
|
|
@@ -269,6 +350,13 @@ exports.DemoSpecSchema = zod_1.z.object({
|
|
|
269
350
|
audience: zod_1.z.string().optional(),
|
|
270
351
|
/** Ordered scenes. Total duration = sum of scene.durationMs. */
|
|
271
352
|
scenes: zod_1.z.array(exports.DemoSceneSchema).min(1),
|
|
353
|
+
/**
|
|
354
|
+
* Planner-requested AI-generated media (see DemoGeneratedAssetSchema). Most
|
|
355
|
+
* specs declare NONE — the planner reaches for generation only when no real
|
|
356
|
+
* asset can serve a beat (physical product, lifestyle/atmosphere imagery,
|
|
357
|
+
* abstract motion backdrop), never to fabricate product-UI "screenshots".
|
|
358
|
+
*/
|
|
359
|
+
generatedAssets: zod_1.z.array(exports.DemoGeneratedAssetSchema).default([]),
|
|
272
360
|
});
|
|
273
361
|
/** Sum of scene durations — the canonical total timeline length in ms. */
|
|
274
362
|
function demoSpecDurationMs(spec) {
|
package/lib/schemas/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./brief.schema";
|
|
|
3
3
|
export * from "./videoPlan.schema";
|
|
4
4
|
export * from "./brandKit.schema";
|
|
5
5
|
export * from "./demoSpec.schema";
|
|
6
|
+
export * from "./demoQuestion.schema";
|
|
6
7
|
export * from "./agentPersona.schema";
|
|
7
8
|
export * from "./agentRunJob.schema";
|
|
8
9
|
export * from "./social.schema";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC"}
|
package/lib/schemas/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __exportStar(require("./brief.schema"), exports);
|
|
|
19
19
|
__exportStar(require("./videoPlan.schema"), exports);
|
|
20
20
|
__exportStar(require("./brandKit.schema"), exports);
|
|
21
21
|
__exportStar(require("./demoSpec.schema"), exports);
|
|
22
|
+
__exportStar(require("./demoQuestion.schema"), exports);
|
|
22
23
|
__exportStar(require("./agentPersona.schema"), exports);
|
|
23
24
|
__exportStar(require("./agentRunJob.schema"), exports);
|
|
24
25
|
__exportStar(require("./social.schema"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/providerFallback/chains.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,eAAe,EACf,aAAa,EAEb,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAGnC;;;;;;;;;;;;GAYG;AAGH,eAAO,MAAM,sBAAsB,EAAE,SAAS,eAAe,EAM5D,CAAC;AAKF,eAAO,MAAM,sBAAsB,EAAE,SAAS,eAAe,EAQ5D,CAAC;AAQF,eAAO,MAAM,uBAAuB,EAAE,SAAS,eAAe,EAQ7D,CAAC;AAKF,eAAO,MAAM,uBAAuB,EAAE,SAAS,eAAe,EAM7D,CAAC;
|
|
1
|
+
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/providerFallback/chains.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,eAAe,EACf,aAAa,EAEb,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAGnC;;;;;;;;;;;;GAYG;AAGH,eAAO,MAAM,sBAAsB,EAAE,SAAS,eAAe,EAM5D,CAAC;AAKF,eAAO,MAAM,sBAAsB,EAAE,SAAS,eAAe,EAQ5D,CAAC;AAQF,eAAO,MAAM,uBAAuB,EAAE,SAAS,eAAe,EAQ7D,CAAC;AAKF,eAAO,MAAM,uBAAuB,EAAE,SAAS,eAAe,EAM7D,CAAC;AASF,eAAO,MAAM,kBAAkB,EAAE,SAAS,eAAe,EAIxD,CAAC;AAGF,eAAO,MAAM,WAAW,EAAE,SAAS,eAAe,EAGjD,CAAC;AAGF,eAAO,MAAM,SAAS,EAAE,SAAS,aAAa,EAE7C,CAAC;AAEF;;;;;;;;;;GAUG;AACH,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,qDAAqD;IACrD,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,sBAAsB,GAC1B,OAAO,CAuCT;AAED,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CASjD;AA6CD;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,eAAe,EAC5B,aAAa,EAAE,SAAS,eAAe,EAAE,GACxC,eAAe,EAAE,CAMnB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,mBAAmB;IAClC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,kBAAkB;IACjC,8CAA8C;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IACnB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,MAAM,GAAG,eAAe,EAC/B,WAAW,EAAE,MAAM,EACnB,IAAI,GAAE,mBAAwB,GAC7B,kBAAkB,GAAG,IAAI,CAyB3B"}
|
|
@@ -65,9 +65,17 @@ exports.T3_IMAGE_TO_VIDEO_CHAIN = [
|
|
|
65
65
|
aiModels_1.EVideoGenModels.RUNWAY_GEN4_5,
|
|
66
66
|
aiModels_1.EVideoGenModels.BYTEDANCE_SEEDANCE_2_0,
|
|
67
67
|
];
|
|
68
|
-
// ── Video: avatar / talking-head
|
|
68
|
+
// ── Video: avatar / talking-head ──────────────────────────────────────
|
|
69
|
+
// Kling (byo-media) is the default; HeyGen/Tavus (hosted) are fallbacks. NOTE:
|
|
70
|
+
// these engines take DIFFERENT inputs (byo-media vs hosted avatar+script), so a
|
|
71
|
+
// fallback hop is only valid when the job carries the inputs the next engine
|
|
72
|
+
// needs — the orchestrator must gate hops on capability, not blindly walk the
|
|
73
|
+
// chain. Listed here so the chain is discoverable; wiring of capability-aware
|
|
74
|
+
// fallback is Reach Phase 0b runtime work.
|
|
69
75
|
exports.AVATAR_VIDEO_CHAIN = [
|
|
70
76
|
aiModels_1.EVideoGenModels.KLING_AVATAR,
|
|
77
|
+
aiModels_1.EVideoGenModels.HEYGEN_AVATAR,
|
|
78
|
+
aiModels_1.EVideoGenModels.TAVUS_AVATAR,
|
|
71
79
|
];
|
|
72
80
|
// ── Music: search/gen ─────────────────────────────────────────────────
|
|
73
81
|
exports.MUSIC_CHAIN = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"taskPoller.d.ts","sourceRoot":"","sources":["../../../src/services/agent/taskPoller.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"taskPoller.d.ts","sourceRoot":"","sources":["../../../src/services/agent/taskPoller.ts"],"names":[],"mappings":"AACA,OAAO,EAAqB,aAAa,EAAE,MAAM,qBAAqB,CAAC;AASvE;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,GAAG,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,IAAI,EAAE,aAAa,CAAC;IACpB,8EAA8E;IAC9E,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,MAAM,gBAAgB,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEpE,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,2EAA2E;IAC3E,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uCAAuC;IACvC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gGAAgG;IAChG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAmBD,qBAAa,UAAU;IACrB,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAS;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAS;gBAEhC,IAAI,GAAE,iBAAsB;IAOxC;;;;;;OAMG;IACG,OAAO,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAwBnD,OAAO;IA4HrB;oFACgF;IAChF,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,cAAc;CAKvB"}
|
|
@@ -4,6 +4,7 @@ exports.TaskPoller = void 0;
|
|
|
4
4
|
const aiModels_1 = require("../../globals/aiModels");
|
|
5
5
|
const types_1 = require("../../globals/types");
|
|
6
6
|
const aiGenFactory_service_1 = require("../aiGen/aiGenFactory.service");
|
|
7
|
+
const avatarProviderFactory_1 = require("../avatarGen/avatarProviderFactory");
|
|
7
8
|
const rateLimiter_1 = require("../rateLimiter");
|
|
8
9
|
const logger_1 = require("../../utils/logger");
|
|
9
10
|
const DEFAULT_INITIAL_INTERVAL_MS = 10000;
|
|
@@ -69,12 +70,22 @@ class TaskPoller {
|
|
|
69
70
|
// with 10 tasks × 6 polls/min = 60 polls/min before any new submit).
|
|
70
71
|
const limiter = (0, rateLimiter_1.getAiGenModelRateLimiter)(input.modelKey);
|
|
71
72
|
await limiter.waitUntilAvailableForOneShot();
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
73
|
+
// Hosted avatar engines (HeyGen/Tavus) are NOT in the generic video
|
|
74
|
+
// factory (getAiGenProviderService throws for them) — they live behind the
|
|
75
|
+
// dedicated avatar seam, which exposes its own poll method. Kling avatar
|
|
76
|
+
// (byo-media) and all video models stay on the generic path unchanged, so
|
|
77
|
+
// their behavior is byte-for-byte identical. Both seams return the same
|
|
78
|
+
// { status, videoUrl?, errorMessage? } shape.
|
|
79
|
+
const result = (0, avatarProviderFactory_1.isHostedAvatarModel)(input.modelKey)
|
|
80
|
+
? await (0, avatarProviderFactory_1.getAvatarVideoProvider)(input.modelKey).checkStatus({
|
|
81
|
+
providerTaskId: input.task,
|
|
82
|
+
outputFilename: input.outputFilename ?? `agent-${input.ref}`,
|
|
83
|
+
})
|
|
84
|
+
: await (0, aiGenFactory_service_1.getAiGenProviderService)(input.modelKey).checkVideoStatus({
|
|
85
|
+
task: input.task,
|
|
86
|
+
modelKey: input.modelKey,
|
|
87
|
+
outputFilename: input.outputFilename ?? `agent-${input.ref}`,
|
|
88
|
+
});
|
|
78
89
|
switch (result.status) {
|
|
79
90
|
case types_1.EVideoSceneStatus.COMPLETED:
|
|
80
91
|
state.result = {
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { EVideoGenModels } from "../../../globals/aiModels";
|
|
2
3
|
import { ToolDefinition } from "../toolRegistry";
|
|
3
4
|
/**
|
|
4
|
-
* generate_avatar_video —
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* before handing off, since Kling avatar requires a public sound_file URL).
|
|
5
|
+
* generate_avatar_video — drives avatar generation through the dedicated avatar
|
|
6
|
+
* provider seam (getAvatarVideoProvider / IAvatarVideoProvider), so the planner's
|
|
7
|
+
* `talking-head-avatar` scene strategy is executable. Avatar gen is handled by
|
|
8
|
+
* the avatar provider — NOT the generic video-gen provider. Two engine families:
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
10
|
+
* - byo-media (default kling-avatar): caller supplies a presenter face image
|
|
11
|
+
* plus either a pre-uploaded audio URL or raw TTS text (the tool synthesizes
|
|
12
|
+
* via ElevenLabs + uploads to GCS first, since the engine needs a public
|
|
13
|
+
* audio URL).
|
|
14
|
+
* - hosted (heygen-avatar / tavus-avatar, via `model`): caller supplies a
|
|
15
|
+
* provider-hosted avatar id + a script; the engine runs its own TTS/lipsync,
|
|
16
|
+
* so the tool does NO TTS and passes no audio.
|
|
17
|
+
*
|
|
18
|
+
* Returns a provider task id; the executor's TaskPoller polls completion — it
|
|
19
|
+
* routes hosted models through the avatar seam and everything else through the
|
|
20
|
+
* generic video factory, so this works for both families.
|
|
12
21
|
*/
|
|
13
22
|
declare const InputSchema: z.ZodObject<{
|
|
14
|
-
|
|
23
|
+
model: z.ZodOptional<z.ZodEnum<typeof EVideoGenModels>>;
|
|
24
|
+
inputImageUrl: z.ZodOptional<z.ZodString>;
|
|
25
|
+
hostedAvatarId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
hostedVoiceId: z.ZodOptional<z.ZodString>;
|
|
15
27
|
ttsText: z.ZodOptional<z.ZodString>;
|
|
16
28
|
inputAudioUrl: z.ZodOptional<z.ZodString>;
|
|
17
29
|
voiceId: z.ZodOptional<z.ZodString>;
|
|
@@ -25,7 +37,7 @@ declare const InputSchema: z.ZodObject<{
|
|
|
25
37
|
declare const OutputSchema: z.ZodObject<{
|
|
26
38
|
status: z.ZodLiteral<"triggered">;
|
|
27
39
|
taskId: z.ZodString;
|
|
28
|
-
audioUrl: z.ZodString
|
|
40
|
+
audioUrl: z.ZodOptional<z.ZodString>;
|
|
29
41
|
}, z.core.$strip>;
|
|
30
42
|
export declare const generateAvatarVideoTool: ToolDefinition<typeof InputSchema, typeof OutputSchema>;
|
|
31
43
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateAvatarVideo.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/generateAvatarVideo.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"generateAvatarVideo.tool.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/tools/generateAvatarVideo.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAkB,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAY5E,OAAO,EAAgB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE/D;;;;;;;;;;;;;;;;;GAiBG;AAEH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;iBAwEb,CAAC;AAEL,QAAA,MAAM,YAAY;;;;iBAQhB,CAAC;AAEH,eAAO,MAAM,uBAAuB,EAAE,cAAc,CAClD,OAAO,WAAW,EAClB,OAAO,YAAY,CAqIpB,CAAC"}
|