@vanillaskyai/video 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +66 -0
- package/PUBLIC-API.md +83 -79
- package/README.md +16 -15
- package/dist/{builtin-server-KB7FKF6A.js → builtin-server-CUYPIDE7.js} +2 -2
- package/dist/check-runtime.js +1 -1
- package/dist/{chunk-2PYO6VAC.js → chunk-2DOLF4QN.js} +1 -43
- package/dist/{chunk-GAIOHGNR.js → chunk-2OKB27TG.js} +42 -45
- package/dist/{chunk-K746NUIP.js → chunk-2USVB3CY.js} +80 -29
- package/dist/{chunk-RE4IMWJR.js → chunk-3VRMKFM7.js} +87 -14
- package/dist/{chunk-JNN3EYVP.js → chunk-4UNKZEAT.js} +46 -46
- package/dist/{chunk-2XT4MZ76.js → chunk-APQKY6P3.js} +36 -3
- package/dist/{chunk-RXHW4EP4.js → chunk-L7QGGKJ2.js} +71 -40
- package/dist/{chunk-RGF452LL.js → chunk-OWBT45EN.js} +1 -1
- package/dist/{chunk-LKBZX7GV.js → chunk-PP3MCPN4.js} +4 -4
- package/dist/chunk-ZD2VTUYR.js +28 -0
- package/dist/cli.js +131 -24
- package/dist/{compose-video-PD6LKKRK.js → compose-video-2NFH4DZY.js} +3 -3
- package/dist/{events-B6qS1Lsb.d.ts → events-BQ6z264n.d.ts} +1 -1
- package/dist/index.d.ts +5 -67
- package/dist/index.js +2 -4
- package/dist/{kit-8g46H2RZ.d.ts → kit-tQnCPMOM.d.ts} +1 -1
- package/dist/react.d.ts +33 -53
- package/dist/react.js +642 -536
- package/dist/server.d.ts +11 -13
- package/dist/server.js +170 -81
- package/dist/template-catalog.js +1 -1
- package/dist/templates.d.ts +3 -3
- package/dist/test.d.ts +2 -2
- package/dist/test.js +3 -3
- package/dist/{text-stream-FW4BLBAL.js → text-stream-54LXABJW.js} +1 -1
- package/dist/{types-2wHBqtg8.d.ts → types-CEh9eUFu.d.ts} +1 -1
- package/dist/{types-DrABlRa7.d.ts → types-DWFO6qca.d.ts} +1 -1
- package/docs/agent-integration.md +9 -3
- package/docs/architecture.md +8 -10
- package/docs/concepts.md +16 -40
- package/docs/custom-templates.md +27 -23
- package/docs/customization.md +12 -49
- package/docs/errors.md +58 -68
- package/docs/getting-started.md +21 -14
- package/docs/media-and-audio.md +2 -2
- package/docs/performance.md +69 -0
- package/docs/persistence.md +12 -27
- package/docs/production.md +2 -2
- package/docs/provider-integration.md +11 -5
- package/docs/reference/provider-adapters.md +37 -89
- package/docs/security.md +1 -1
- package/docs/streaming-protocol.md +2 -2
- package/examples/custom-template/README.md +6 -6
- package/package.json +6 -7
- package/registry/items/barChart.json +2 -2
- package/registry/items/bigNumber.json +2 -2
- package/registry/items/brandMessage.json +2 -2
- package/registry/items/cardList.json +2 -2
- package/registry/items/codeEditor.json +2 -2
- package/registry/items/ctaLogo.json +2 -2
- package/registry/items/ctaMedia.json +2 -2
- package/registry/items/incomingCall.json +2 -2
- package/registry/items/media.json +2 -2
- package/registry/items/milestone.json +2 -2
- package/registry/items/notification.json +2 -2
- package/registry/items/phoneMockup.json +2 -2
- package/registry/items/problemSolution.json +2 -2
- package/registry/items/progressRing.json +2 -2
- package/registry/items/promptInput.json +2 -2
- package/registry/items/reaction.json +2 -2
- package/registry/items/reviewStack.json +2 -2
- package/registry/items/steps.json +2 -2
- package/registry/items/terminal.json +2 -2
- package/registry/items/testimonial.json +2 -2
- package/registry/items/tripleStats.json +2 -2
- package/registry/items/tweet.json +2 -2
- package/registry/items/webMockup.json +2 -2
- package/starters/video-chat/.env.example +4 -2
- package/starters/video-chat/README.md +17 -5
- package/starters/video-chat/package.json +2 -4
- package/starters/video-chat/providers/speech.ts +20 -0
- package/starters/video-chat/providers/video.ts +66 -0
- package/starters/video-chat/providers.ts +3 -0
- package/starters/video-chat/server.ts +4 -80
- package/starters/video-chat/stock.ts +114 -99
- package/dist/chunk-SKRGRKHY.js +0 -142
- package/dist/state-DZcKuS32.d.ts +0 -3
- package/docs/branding-and-personalization.md +0 -87
- package/examples/custom-template/supplied-media.tsx +0 -92
|
@@ -40,7 +40,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
40
40
|
"mediaKeyword": {
|
|
41
41
|
"type": "string",
|
|
42
42
|
"title": "Background search keyword",
|
|
43
|
-
"description": "2-4 word English term for
|
|
43
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
44
44
|
"format": "stock-media-keyword",
|
|
45
45
|
"default": ""
|
|
46
46
|
},
|
|
@@ -59,7 +59,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
59
59
|
"mediaPoster": {
|
|
60
60
|
"type": "string",
|
|
61
61
|
"title": "Background poster image",
|
|
62
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
62
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
63
63
|
"format": "uri",
|
|
64
64
|
"default": ""
|
|
65
65
|
},
|
|
@@ -144,7 +144,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
144
144
|
"reactionTag": {
|
|
145
145
|
"type": "string",
|
|
146
146
|
"title": "Reaction tag",
|
|
147
|
-
"description": "
|
|
147
|
+
"description": "Stock-media search intent. Pick from the punchline/problem copy first, then the overall video topic.",
|
|
148
148
|
"enum": [
|
|
149
149
|
"launch",
|
|
150
150
|
"productLaunch",
|
|
@@ -185,7 +185,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
185
185
|
"mediaUrl": {
|
|
186
186
|
"type": "string",
|
|
187
187
|
"title": "Reaction clip",
|
|
188
|
-
"description": "Resolved
|
|
188
|
+
"description": "Resolved stock-video URL.",
|
|
189
189
|
"format": "uri",
|
|
190
190
|
"default": ""
|
|
191
191
|
},
|
|
@@ -393,7 +393,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
393
393
|
"mediaKeyword": {
|
|
394
394
|
"type": "string",
|
|
395
395
|
"title": "Background search keyword",
|
|
396
|
-
"description": "2-4 word English term for
|
|
396
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
397
397
|
"format": "stock-media-keyword",
|
|
398
398
|
"default": ""
|
|
399
399
|
},
|
|
@@ -412,7 +412,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
412
412
|
"mediaPoster": {
|
|
413
413
|
"type": "string",
|
|
414
414
|
"title": "Background poster image",
|
|
415
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
415
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
416
416
|
"format": "uri",
|
|
417
417
|
"default": ""
|
|
418
418
|
},
|
|
@@ -564,7 +564,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
564
564
|
"mediaKeyword": {
|
|
565
565
|
"type": "string",
|
|
566
566
|
"title": "Background search keyword",
|
|
567
|
-
"description": "2-4 word English term for
|
|
567
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
568
568
|
"format": "stock-media-keyword",
|
|
569
569
|
"default": ""
|
|
570
570
|
},
|
|
@@ -583,7 +583,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
583
583
|
"mediaPoster": {
|
|
584
584
|
"type": "string",
|
|
585
585
|
"title": "Background poster image",
|
|
586
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
586
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
587
587
|
"format": "uri",
|
|
588
588
|
"default": ""
|
|
589
589
|
},
|
|
@@ -698,7 +698,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
698
698
|
"mediaKeyword": {
|
|
699
699
|
"type": "string",
|
|
700
700
|
"title": "Background search keyword",
|
|
701
|
-
"description": "2-4 word English term for
|
|
701
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
702
702
|
"format": "stock-media-keyword",
|
|
703
703
|
"default": ""
|
|
704
704
|
},
|
|
@@ -717,7 +717,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
717
717
|
"mediaPoster": {
|
|
718
718
|
"type": "string",
|
|
719
719
|
"title": "Background poster image",
|
|
720
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
720
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
721
721
|
"format": "uri",
|
|
722
722
|
"default": ""
|
|
723
723
|
},
|
|
@@ -878,7 +878,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
878
878
|
"mediaKeyword": {
|
|
879
879
|
"type": "string",
|
|
880
880
|
"title": "Background search keyword",
|
|
881
|
-
"description": "2-4 word English term for
|
|
881
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
882
882
|
"default": ""
|
|
883
883
|
},
|
|
884
884
|
"mediaType": {
|
|
@@ -896,7 +896,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
896
896
|
"mediaPoster": {
|
|
897
897
|
"type": "string",
|
|
898
898
|
"title": "Background poster image",
|
|
899
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
899
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
900
900
|
"format": "uri",
|
|
901
901
|
"default": ""
|
|
902
902
|
},
|
|
@@ -1070,7 +1070,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1070
1070
|
"mediaKeyword": {
|
|
1071
1071
|
"type": "string",
|
|
1072
1072
|
"title": "Background search keyword",
|
|
1073
|
-
"description": "2-4 word English term for
|
|
1073
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
1074
1074
|
"default": ""
|
|
1075
1075
|
},
|
|
1076
1076
|
"mediaType": {
|
|
@@ -1088,7 +1088,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1088
1088
|
"mediaPoster": {
|
|
1089
1089
|
"type": "string",
|
|
1090
1090
|
"title": "Background poster image",
|
|
1091
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
1091
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
1092
1092
|
"format": "uri",
|
|
1093
1093
|
"default": ""
|
|
1094
1094
|
},
|
|
@@ -1186,7 +1186,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1186
1186
|
"mediaKeyword": {
|
|
1187
1187
|
"type": "string",
|
|
1188
1188
|
"title": "Background search keyword",
|
|
1189
|
-
"description": "2-4 word English term for
|
|
1189
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
1190
1190
|
"format": "stock-media-keyword",
|
|
1191
1191
|
"default": ""
|
|
1192
1192
|
},
|
|
@@ -1205,7 +1205,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1205
1205
|
"mediaPoster": {
|
|
1206
1206
|
"type": "string",
|
|
1207
1207
|
"title": "Background poster image",
|
|
1208
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
1208
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
1209
1209
|
"format": "uri",
|
|
1210
1210
|
"default": ""
|
|
1211
1211
|
},
|
|
@@ -1328,7 +1328,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1328
1328
|
"mediaKeyword": {
|
|
1329
1329
|
"type": "string",
|
|
1330
1330
|
"title": "Background search keyword",
|
|
1331
|
-
"description": "2-4 word English term for
|
|
1331
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
1332
1332
|
"format": "stock-media-keyword",
|
|
1333
1333
|
"default": ""
|
|
1334
1334
|
},
|
|
@@ -1347,7 +1347,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1347
1347
|
"mediaPoster": {
|
|
1348
1348
|
"type": "string",
|
|
1349
1349
|
"title": "Background poster image",
|
|
1350
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
1350
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
1351
1351
|
"format": "uri",
|
|
1352
1352
|
"default": ""
|
|
1353
1353
|
},
|
|
@@ -1475,7 +1475,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1475
1475
|
"mediaKeyword": {
|
|
1476
1476
|
"type": "string",
|
|
1477
1477
|
"title": "Background search keyword",
|
|
1478
|
-
"description": "2-4 word English term for
|
|
1478
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
1479
1479
|
"format": "stock-media-keyword",
|
|
1480
1480
|
"default": ""
|
|
1481
1481
|
},
|
|
@@ -1494,7 +1494,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1494
1494
|
"mediaPoster": {
|
|
1495
1495
|
"type": "string",
|
|
1496
1496
|
"title": "Background poster image",
|
|
1497
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
1497
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
1498
1498
|
"format": "uri",
|
|
1499
1499
|
"default": ""
|
|
1500
1500
|
},
|
|
@@ -1600,7 +1600,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1600
1600
|
"mediaKeyword": {
|
|
1601
1601
|
"type": "string",
|
|
1602
1602
|
"title": "Background search keyword",
|
|
1603
|
-
"description": "2-4 word English term for
|
|
1603
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
1604
1604
|
"format": "stock-media-keyword",
|
|
1605
1605
|
"default": ""
|
|
1606
1606
|
},
|
|
@@ -1619,7 +1619,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1619
1619
|
"mediaPoster": {
|
|
1620
1620
|
"type": "string",
|
|
1621
1621
|
"title": "Background poster image",
|
|
1622
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
1622
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
1623
1623
|
"format": "uri",
|
|
1624
1624
|
"default": ""
|
|
1625
1625
|
},
|
|
@@ -1923,7 +1923,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1923
1923
|
"mediaKeyword": {
|
|
1924
1924
|
"type": "string",
|
|
1925
1925
|
"title": "Background search keyword",
|
|
1926
|
-
"description": "2-4 word English term for
|
|
1926
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
1927
1927
|
"format": "stock-media-keyword",
|
|
1928
1928
|
"default": ""
|
|
1929
1929
|
},
|
|
@@ -1942,7 +1942,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
1942
1942
|
"mediaPoster": {
|
|
1943
1943
|
"type": "string",
|
|
1944
1944
|
"title": "Background poster image",
|
|
1945
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
1945
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
1946
1946
|
"format": "uri",
|
|
1947
1947
|
"default": ""
|
|
1948
1948
|
},
|
|
@@ -2098,7 +2098,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2098
2098
|
"mediaKeyword": {
|
|
2099
2099
|
"type": "string",
|
|
2100
2100
|
"title": "Background search keyword",
|
|
2101
|
-
"description": "2-4 word English term for
|
|
2101
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
2102
2102
|
"format": "stock-media-keyword",
|
|
2103
2103
|
"default": ""
|
|
2104
2104
|
},
|
|
@@ -2117,7 +2117,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2117
2117
|
"mediaPoster": {
|
|
2118
2118
|
"type": "string",
|
|
2119
2119
|
"title": "Background poster image",
|
|
2120
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
2120
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
2121
2121
|
"format": "uri",
|
|
2122
2122
|
"default": ""
|
|
2123
2123
|
},
|
|
@@ -2221,7 +2221,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2221
2221
|
"mediaKeyword": {
|
|
2222
2222
|
"type": "string",
|
|
2223
2223
|
"title": "Background search keyword",
|
|
2224
|
-
"description": "2-4 word English term for
|
|
2224
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
2225
2225
|
"format": "stock-media-keyword",
|
|
2226
2226
|
"default": ""
|
|
2227
2227
|
},
|
|
@@ -2240,7 +2240,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2240
2240
|
"mediaPoster": {
|
|
2241
2241
|
"type": "string",
|
|
2242
2242
|
"title": "Background poster image",
|
|
2243
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
2243
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
2244
2244
|
"format": "uri",
|
|
2245
2245
|
"default": ""
|
|
2246
2246
|
},
|
|
@@ -2348,7 +2348,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2348
2348
|
"mediaKeyword": {
|
|
2349
2349
|
"type": "string",
|
|
2350
2350
|
"title": "Background search keyword",
|
|
2351
|
-
"description": "2-4 word English term for
|
|
2351
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
2352
2352
|
"format": "stock-media-keyword",
|
|
2353
2353
|
"default": ""
|
|
2354
2354
|
},
|
|
@@ -2367,7 +2367,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2367
2367
|
"mediaPoster": {
|
|
2368
2368
|
"type": "string",
|
|
2369
2369
|
"title": "Background poster image",
|
|
2370
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
2370
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
2371
2371
|
"format": "uri",
|
|
2372
2372
|
"default": ""
|
|
2373
2373
|
},
|
|
@@ -2449,7 +2449,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2449
2449
|
"mediaKeyword": {
|
|
2450
2450
|
"type": "string",
|
|
2451
2451
|
"title": "Background search keyword",
|
|
2452
|
-
"description": "2-4 word English term for
|
|
2452
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
2453
2453
|
"format": "stock-media-keyword",
|
|
2454
2454
|
"default": ""
|
|
2455
2455
|
},
|
|
@@ -2468,7 +2468,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2468
2468
|
"mediaPoster": {
|
|
2469
2469
|
"type": "string",
|
|
2470
2470
|
"title": "Background poster image",
|
|
2471
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
2471
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
2472
2472
|
"format": "uri",
|
|
2473
2473
|
"default": ""
|
|
2474
2474
|
},
|
|
@@ -2552,7 +2552,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2552
2552
|
"mediaKeyword": {
|
|
2553
2553
|
"type": "string",
|
|
2554
2554
|
"title": "Background search keyword",
|
|
2555
|
-
"description": "2-4 word English term for
|
|
2555
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
2556
2556
|
"format": "stock-media-keyword",
|
|
2557
2557
|
"default": ""
|
|
2558
2558
|
},
|
|
@@ -2571,7 +2571,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2571
2571
|
"mediaPoster": {
|
|
2572
2572
|
"type": "string",
|
|
2573
2573
|
"title": "Background poster image",
|
|
2574
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
2574
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
2575
2575
|
"format": "uri",
|
|
2576
2576
|
"default": ""
|
|
2577
2577
|
},
|
|
@@ -2823,7 +2823,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2823
2823
|
"mediaKeyword": {
|
|
2824
2824
|
"type": "string",
|
|
2825
2825
|
"title": "Background search keyword",
|
|
2826
|
-
"description": "2-4 word English term for
|
|
2826
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
2827
2827
|
"format": "stock-media-keyword",
|
|
2828
2828
|
"default": ""
|
|
2829
2829
|
},
|
|
@@ -2842,7 +2842,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2842
2842
|
"mediaPoster": {
|
|
2843
2843
|
"type": "string",
|
|
2844
2844
|
"title": "Background poster image",
|
|
2845
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
2845
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
2846
2846
|
"format": "uri",
|
|
2847
2847
|
"default": ""
|
|
2848
2848
|
},
|
|
@@ -2954,7 +2954,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2954
2954
|
"mediaKeyword": {
|
|
2955
2955
|
"type": "string",
|
|
2956
2956
|
"title": "Background search keyword",
|
|
2957
|
-
"description": "2-4 word English term for
|
|
2957
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
2958
2958
|
"format": "stock-media-keyword",
|
|
2959
2959
|
"default": ""
|
|
2960
2960
|
},
|
|
@@ -2973,7 +2973,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
2973
2973
|
"mediaPoster": {
|
|
2974
2974
|
"type": "string",
|
|
2975
2975
|
"title": "Background poster image",
|
|
2976
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
2976
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
2977
2977
|
"format": "uri",
|
|
2978
2978
|
"default": ""
|
|
2979
2979
|
},
|
|
@@ -3093,7 +3093,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
3093
3093
|
"mediaKeyword": {
|
|
3094
3094
|
"type": "string",
|
|
3095
3095
|
"title": "Background search keyword",
|
|
3096
|
-
"description": "2-4 word English term for
|
|
3096
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
3097
3097
|
"format": "stock-media-keyword",
|
|
3098
3098
|
"default": ""
|
|
3099
3099
|
},
|
|
@@ -3112,7 +3112,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
3112
3112
|
"mediaPoster": {
|
|
3113
3113
|
"type": "string",
|
|
3114
3114
|
"title": "Background poster image",
|
|
3115
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
3115
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
3116
3116
|
"format": "uri",
|
|
3117
3117
|
"default": ""
|
|
3118
3118
|
},
|
|
@@ -3232,7 +3232,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
3232
3232
|
"mediaKeyword": {
|
|
3233
3233
|
"type": "string",
|
|
3234
3234
|
"title": "Background search keyword",
|
|
3235
|
-
"description": "2-4 word English term for
|
|
3235
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
3236
3236
|
"format": "stock-media-keyword",
|
|
3237
3237
|
"default": ""
|
|
3238
3238
|
},
|
|
@@ -3251,7 +3251,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
3251
3251
|
"mediaPoster": {
|
|
3252
3252
|
"type": "string",
|
|
3253
3253
|
"title": "Background poster image",
|
|
3254
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
3254
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
3255
3255
|
"format": "uri",
|
|
3256
3256
|
"default": ""
|
|
3257
3257
|
},
|
|
@@ -3346,7 +3346,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
3346
3346
|
"mediaKeyword": {
|
|
3347
3347
|
"type": "string",
|
|
3348
3348
|
"title": "Background search keyword",
|
|
3349
|
-
"description": "2-4 word English term for
|
|
3349
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
3350
3350
|
"default": ""
|
|
3351
3351
|
},
|
|
3352
3352
|
"mediaType": {
|
|
@@ -3364,7 +3364,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
3364
3364
|
"mediaPoster": {
|
|
3365
3365
|
"type": "string",
|
|
3366
3366
|
"title": "Background poster image",
|
|
3367
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
3367
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
3368
3368
|
"format": "uri",
|
|
3369
3369
|
"default": ""
|
|
3370
3370
|
},
|
|
@@ -3467,7 +3467,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
3467
3467
|
"mediaKeyword": {
|
|
3468
3468
|
"type": "string",
|
|
3469
3469
|
"title": "Background search keyword",
|
|
3470
|
-
"description": "2-4 word English term for
|
|
3470
|
+
"description": "2-4 word English term for stock-media search (auto-fills mediaUrl).",
|
|
3471
3471
|
"format": "stock-media-keyword",
|
|
3472
3472
|
"default": ""
|
|
3473
3473
|
},
|
|
@@ -3486,7 +3486,7 @@ var GENERATED_BUILTIN_TEMPLATE_CATALOG = [
|
|
|
3486
3486
|
"mediaPoster": {
|
|
3487
3487
|
"type": "string",
|
|
3488
3488
|
"title": "Background poster image",
|
|
3489
|
-
"description": "Still image URL shown while a video backdrop is decoding its first frame.
|
|
3489
|
+
"description": "Still image URL shown while a video backdrop is decoding its first frame. A media resolver can supply a poster alongside a video mediaUrl. Hides the gradient flash that would otherwise appear in the ~50\u2013400ms gap between a <video> mounting and decoding its first frame.",
|
|
3490
3490
|
"format": "uri",
|
|
3491
3491
|
"default": ""
|
|
3492
3492
|
},
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-MMUXVA47.js";
|
|
4
4
|
import {
|
|
5
5
|
MAX_RETAINED_MEDIA_URL_LENGTH
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2DOLF4QN.js";
|
|
7
7
|
import {
|
|
8
8
|
VIDEO_PROTOCOL_VERSION
|
|
9
9
|
} from "./chunk-AOWSXU2K.js";
|
|
@@ -95,6 +95,40 @@ function videoSseHeaders(headers) {
|
|
|
95
95
|
return result;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
+
// src/video-chat/deadline.ts
|
|
99
|
+
function withDeadline(operation, timeoutMs, parent) {
|
|
100
|
+
return new Promise((resolve, reject) => {
|
|
101
|
+
const controller = new AbortController();
|
|
102
|
+
let settled = false;
|
|
103
|
+
const timer = setTimeout(() => finish({ error: new DOMException("Optional work exceeded its deadline", "TimeoutError") }), timeoutMs);
|
|
104
|
+
const finish = (result) => {
|
|
105
|
+
if (settled) return;
|
|
106
|
+
settled = true;
|
|
107
|
+
clearTimeout(timer);
|
|
108
|
+
parent?.removeEventListener("abort", cancel);
|
|
109
|
+
if ("error" in result) {
|
|
110
|
+
reject(result.error);
|
|
111
|
+
controller.abort(result.error);
|
|
112
|
+
} else {
|
|
113
|
+
resolve(result.value);
|
|
114
|
+
controller.abort();
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
const cancel = () => finish({ error: parent?.reason ?? new DOMException("Cancelled", "AbortError") });
|
|
118
|
+
if (parent?.aborted) {
|
|
119
|
+
cancel();
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
parent?.addEventListener("abort", cancel, { once: true });
|
|
123
|
+
try {
|
|
124
|
+
const result = operation(controller.signal);
|
|
125
|
+
Promise.resolve(result).then((value) => finish({ value }), (error) => finish({ error }));
|
|
126
|
+
} catch (error) {
|
|
127
|
+
finish({ error });
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
98
132
|
// src/video-chat/media.ts
|
|
99
133
|
function sanitizeVideoChatMedia(value) {
|
|
100
134
|
if (!value || typeof value !== "object" || Array.isArray(value)) return null;
|
|
@@ -123,10 +157,9 @@ function safeMediaUrl(value) {
|
|
|
123
157
|
}
|
|
124
158
|
|
|
125
159
|
export {
|
|
126
|
-
VIDEO_STREAM_HEADER,
|
|
127
|
-
VIDEO_STREAM_CONTENT_TYPE,
|
|
128
160
|
encodeVideoSseEvent,
|
|
129
161
|
decodeVideoSse,
|
|
130
162
|
videoSseHeaders,
|
|
163
|
+
withDeadline,
|
|
131
164
|
sanitizeVideoChatMedia
|
|
132
165
|
};
|
|
@@ -61,8 +61,8 @@ function parsePlanLine(line) {
|
|
|
61
61
|
delete planPart.timing;
|
|
62
62
|
repaired = true;
|
|
63
63
|
}
|
|
64
|
-
if (object.narration != null
|
|
65
|
-
repairedScene.narration = object.narration;
|
|
64
|
+
if (object.narration != null) {
|
|
65
|
+
if (!("narration" in scene)) repairedScene.narration = object.narration;
|
|
66
66
|
delete planPart.narration;
|
|
67
67
|
repaired = true;
|
|
68
68
|
}
|
|
@@ -110,6 +110,7 @@ function requestedModelFromStep(value) {
|
|
|
110
110
|
function providerWarning(code, message) {
|
|
111
111
|
return { code, category: "provider", message, recoverable: true };
|
|
112
112
|
}
|
|
113
|
+
var PROVIDER_DIAGNOSTICS_TIMEOUT_MS = 1e3;
|
|
113
114
|
var PROVIDER_RESULT_ABORTED = /* @__PURE__ */ Symbol("provider-result-aborted");
|
|
114
115
|
function settle(value) {
|
|
115
116
|
return Promise.resolve(value).then(
|
|
@@ -120,7 +121,16 @@ function settle(value) {
|
|
|
120
121
|
function providerResultOrAbort(result, signal) {
|
|
121
122
|
return new Promise((resolve, reject) => {
|
|
122
123
|
let completed = false;
|
|
123
|
-
const
|
|
124
|
+
const timeout = setTimeout(() => {
|
|
125
|
+
if (completed) return;
|
|
126
|
+
completed = true;
|
|
127
|
+
cleanup();
|
|
128
|
+
resolve({ warnings: [providerWarning("provider_diagnostics_unavailable", "Some response diagnostics were unavailable.")] });
|
|
129
|
+
}, PROVIDER_DIAGNOSTICS_TIMEOUT_MS);
|
|
130
|
+
const cleanup = () => {
|
|
131
|
+
clearTimeout(timeout);
|
|
132
|
+
signal.removeEventListener("abort", onAbort);
|
|
133
|
+
};
|
|
124
134
|
const onAbort = () => {
|
|
125
135
|
if (completed) return;
|
|
126
136
|
completed = true;
|
|
@@ -224,52 +234,73 @@ function createTextDeltaVideoPlanner(options) {
|
|
|
224
234
|
const source = options.streamText(context);
|
|
225
235
|
const enriched = isEnrichedSource(source) ? source : void 0;
|
|
226
236
|
const providerResult = enriched ? inspectProviderSource(enriched, options.includeRawProviderData ?? false) : void 0;
|
|
227
|
-
|
|
237
|
+
let releaseDiagnostics;
|
|
238
|
+
const stoppedDiagnostics = new Promise((resolve) => {
|
|
239
|
+
releaseDiagnostics = (result) => resolve(result ?? { warnings: [] });
|
|
240
|
+
});
|
|
241
|
+
if (providerResult) getGenerationLifecycleSink(context)?.registerProviderResult(Promise.race([providerResult, stoppedDiagnostics]));
|
|
228
242
|
const textStream = enriched?.textStream ?? source;
|
|
243
|
+
const parseLine = (line) => {
|
|
244
|
+
try {
|
|
245
|
+
return parsePlanLine(line);
|
|
246
|
+
} catch (cause) {
|
|
247
|
+
const error = cause instanceof Error ? cause : new Error(String(cause));
|
|
248
|
+
if (!getGenerationLifecycleSink(context)?.rejectPart?.(error)) throw error;
|
|
249
|
+
return void 0;
|
|
250
|
+
}
|
|
251
|
+
};
|
|
229
252
|
let buffer = "";
|
|
230
253
|
let explicitlyCompleted = false;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
254
|
+
try {
|
|
255
|
+
for await (const delta of textStream) {
|
|
256
|
+
if (typeof delta !== "string") throw new Error("The LLM adapter returned a non-text delta");
|
|
257
|
+
buffer += delta;
|
|
258
|
+
let newline = buffer.indexOf("\n");
|
|
259
|
+
while (newline >= 0) {
|
|
260
|
+
const line = buffer.slice(0, newline).trim();
|
|
261
|
+
buffer = buffer.slice(newline + 1);
|
|
262
|
+
const part = parseLine(line);
|
|
263
|
+
if (part) {
|
|
264
|
+
if (part.type === "plan.complete") explicitlyCompleted = true;
|
|
265
|
+
yield part;
|
|
266
|
+
}
|
|
267
|
+
newline = buffer.indexOf("\n");
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const tail = buffer.trim();
|
|
271
|
+
try {
|
|
272
|
+
const part = parsePlanLine(tail);
|
|
239
273
|
if (part) {
|
|
240
274
|
if (part.type === "plan.complete") explicitlyCompleted = true;
|
|
241
275
|
yield part;
|
|
242
276
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
if (part.type === "plan.complete") explicitlyCompleted = true;
|
|
251
|
-
yield part;
|
|
252
|
-
}
|
|
253
|
-
} catch (error) {
|
|
254
|
-
if (!tail.startsWith("{") || !isConfidentlyTruncatedJson(tail)) throw error;
|
|
255
|
-
yield { type: "plan.complete", finishReason: "length" };
|
|
256
|
-
explicitlyCompleted = true;
|
|
257
|
-
}
|
|
258
|
-
if (enriched) {
|
|
259
|
-
const provider = await providerResultOrAbort(providerResult, context.signal);
|
|
260
|
-
if (provider === PROVIDER_RESULT_ABORTED) return;
|
|
261
|
-
const standardReason = normalizeFinishReason(provider.finishReason);
|
|
262
|
-
const rawReason = normalizeFinishReason(provider.rawFinishReason);
|
|
263
|
-
const providerReason = standardReason && standardReason !== "other" ? standardReason : rawReason ?? standardReason;
|
|
264
|
-
if (providerReason === "provider-error") {
|
|
265
|
-
throw new Error("The model provider finished with an error");
|
|
266
|
-
}
|
|
267
|
-
if (providerReason === "tool-calls") {
|
|
268
|
-
throw new Error("The model provider requested unsupported tool calls");
|
|
277
|
+
} catch (error) {
|
|
278
|
+
if (!tail.startsWith("{") || !isConfidentlyTruncatedJson(tail)) {
|
|
279
|
+
if (!getGenerationLifecycleSink(context)?.rejectPart?.(error instanceof Error ? error : new Error(String(error)))) throw error;
|
|
280
|
+
} else {
|
|
281
|
+
yield { type: "plan.complete", finishReason: "length" };
|
|
282
|
+
explicitlyCompleted = true;
|
|
283
|
+
}
|
|
269
284
|
}
|
|
270
|
-
if (
|
|
271
|
-
|
|
285
|
+
if (enriched) {
|
|
286
|
+
const provider = await providerResultOrAbort(providerResult, context.signal);
|
|
287
|
+
if (provider === PROVIDER_RESULT_ABORTED) return;
|
|
288
|
+
releaseDiagnostics(provider);
|
|
289
|
+
const standardReason = normalizeFinishReason(provider.finishReason);
|
|
290
|
+
const rawReason = normalizeFinishReason(provider.rawFinishReason);
|
|
291
|
+
const providerReason = standardReason && standardReason !== "other" ? standardReason : rawReason ?? standardReason;
|
|
292
|
+
if (providerReason === "provider-error") {
|
|
293
|
+
throw new Error("The model provider finished with an error");
|
|
294
|
+
}
|
|
295
|
+
if (providerReason === "tool-calls") {
|
|
296
|
+
throw new Error("The model provider requested unsupported tool calls");
|
|
297
|
+
}
|
|
298
|
+
if (!explicitlyCompleted && (providerReason === "length" || providerReason === "content-filter" || providerReason === "other")) {
|
|
299
|
+
yield { type: "plan.complete", finishReason: providerReason };
|
|
300
|
+
}
|
|
272
301
|
}
|
|
302
|
+
} finally {
|
|
303
|
+
releaseDiagnostics();
|
|
273
304
|
}
|
|
274
305
|
};
|
|
275
306
|
}
|