@vanillaskyai/video 0.5.8 → 0.7.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.
Files changed (135) hide show
  1. package/CHANGELOG.md +178 -0
  2. package/PUBLIC-API.md +129 -9
  3. package/README.md +70 -108
  4. package/dist/{bg-confetti-SHQI7ATB.js → bg-confetti-HITCGLGD.js} +1 -1
  5. package/dist/{bg-emoji-XYFRA63Q.js → bg-emoji-VU4UZYZN.js} +1 -1
  6. package/dist/{bg-media-FEBATBT2.js → bg-media-L34PDQXJ.js} +4 -4
  7. package/dist/{brand-message-P56WEJPG.js → brand-message-FUJ4STFO.js} +3 -3
  8. package/dist/{builtin-server-YHEZ2JRF.js → builtin-server-KB7FKF6A.js} +2 -2
  9. package/dist/{chart-bar-ZB45ZRKH.js → chart-bar-EGPHJATL.js} +4 -4
  10. package/dist/{chart-counter-HFYNE4HT.js → chart-counter-5FFWQNZO.js} +4 -4
  11. package/dist/{chart-progress-ring-ZKMLRGSB.js → chart-progress-ring-JMXQLMLC.js} +4 -4
  12. package/dist/check-runtime.js +2 -2
  13. package/dist/{chunk-66MNRUCR.js → chunk-2PYO6VAC.js} +51 -3
  14. package/dist/{chunk-ZQQQAAKP.js → chunk-2XT4MZ76.js} +33 -2
  15. package/dist/chunk-5CDAM24P.js +31 -0
  16. package/dist/{chunk-PNS52FL4.js → chunk-5SLENAJW.js} +19 -6
  17. package/dist/{chunk-EFL34TXF.js → chunk-AITKH6QT.js} +24 -8
  18. package/dist/{chunk-HT6BGERF.js → chunk-FRN6WKHA.js} +28 -10
  19. package/dist/{chunk-FZHMQFG3.js → chunk-GAIOHGNR.js} +5 -21
  20. package/dist/{chunk-3RV4YKB3.js → chunk-JNN3EYVP.js} +51 -26
  21. package/dist/{chunk-NGY3TNND.js → chunk-K746NUIP.js} +70 -50
  22. package/dist/{chunk-HVCPEAQF.js → chunk-LKBZX7GV.js} +9 -6
  23. package/dist/{chunk-G66Z5CWR.js → chunk-MMUXVA47.js} +27 -3
  24. package/dist/{chunk-6M6DATLW.js → chunk-MXZSDGZQ.js} +6 -5
  25. package/dist/{chunk-3OU7HIEB.js → chunk-RE4IMWJR.js} +15 -31
  26. package/dist/{chunk-FVTMYS6U.js → chunk-RGF452LL.js} +1 -1
  27. package/dist/{chunk-34O5BY6X.js → chunk-RXHW4EP4.js} +21 -4
  28. package/dist/chunk-SKRGRKHY.js +142 -0
  29. package/dist/{chunk-TCEHK2BW.js → chunk-YJJC4N4D.js} +2 -1
  30. package/dist/cli.js +438 -30
  31. package/dist/{compose-video-JWIEDTEJ.js → compose-video-PD6LKKRK.js} +4 -4
  32. package/dist/{cta-logo-S4OMTNXD.js → cta-logo-YR7LYUR5.js} +3 -3
  33. package/dist/{cta-media-EROTHDRR.js → cta-media-DQJBKUO2.js} +4 -4
  34. package/dist/{events-BBP30j3c.d.ts → events-B6qS1Lsb.d.ts} +2 -2
  35. package/dist/{incoming-call-5IWJ2TAS.js → incoming-call-54KQ7O5A.js} +3 -3
  36. package/dist/index.d.ts +89 -3
  37. package/dist/index.js +12 -1
  38. package/dist/{infographic-before-after-2I7YZVDD.js → infographic-before-after-ROS52GOW.js} +1 -1
  39. package/dist/{infographic-feature-list-7SK65U3K.js → infographic-feature-list-E7MGUDAN.js} +4 -4
  40. package/dist/{infographic-problem-solution-IW35S6BR.js → infographic-problem-solution-3S6NGO5N.js} +4 -4
  41. package/dist/{infographic-stat-row-XHUZZPDM.js → infographic-stat-row-SYB7AB7H.js} +4 -4
  42. package/dist/{infographic-steps-JDDEDI7X.js → infographic-steps-KCE6JWE2.js} +4 -4
  43. package/dist/{kit-DEG3fcaL.d.ts → kit-8g46H2RZ.d.ts} +1 -1
  44. package/dist/{prompt-input-6ZWXEL3V.js → prompt-input-MHX4O42G.js} +3 -3
  45. package/dist/react.d.ts +200 -6
  46. package/dist/react.js +1859 -43
  47. package/dist/{reaction-Z3JIM3MQ.js → reaction-SLEGR3BE.js} +4 -4
  48. package/dist/{scene-video-backdrop-IL4F2SVD.js → scene-video-backdrop-XFPX4O3I.js} +2 -1
  49. package/dist/server.d.ts +104 -4
  50. package/dist/server.js +976 -26
  51. package/dist/{showcase-code-NWQAAJIA.js → showcase-code-2HLAVKBM.js} +4 -4
  52. package/dist/{showcase-phone-5UW45ATT.js → showcase-phone-Q4HEO4LH.js} +4 -4
  53. package/dist/{showcase-terminal-UVOD25UF.js → showcase-terminal-DL45LUFG.js} +4 -4
  54. package/dist/{showcase-web-3AW6VHIG.js → showcase-web-2QZO73FZ.js} +4 -4
  55. package/dist/{social-milestone-KPKHFOB5.js → social-milestone-GEFUQSBF.js} +3 -3
  56. package/dist/{social-notification-EDOU6TZB.js → social-notification-FJ5VHVLK.js} +3 -3
  57. package/dist/{social-review-stack-EZOO33SV.js → social-review-stack-KXQCKFRP.js} +3 -3
  58. package/dist/{social-testimonial-DLOINMMY.js → social-testimonial-JZ7CHC7S.js} +3 -3
  59. package/dist/{social-tweet-6JUM323G.js → social-tweet-UCDXM25F.js} +3 -3
  60. package/dist/{system-prompt-4I6Z5HK3.js → system-prompt-RRXIWDDD.js} +5 -3
  61. package/dist/template-catalog.js +1 -1
  62. package/dist/templates.d.ts +3 -3
  63. package/dist/test.d.ts +2 -2
  64. package/dist/test.js +3 -3
  65. package/dist/{text-stream-J6EDDJP4.js → text-stream-FW4BLBAL.js} +2 -2
  66. package/dist/{types-BV9IqExh.d.ts → types-2wHBqtg8.d.ts} +29 -1
  67. package/dist/types-DrABlRa7.d.ts +46 -0
  68. package/docs/agent-integration.md +49 -25
  69. package/docs/architecture.md +37 -22
  70. package/docs/branding-and-personalization.md +1 -1
  71. package/docs/concepts.md +14 -0
  72. package/docs/custom-templates.md +9 -9
  73. package/docs/customization.md +41 -5
  74. package/docs/getting-started.md +81 -84
  75. package/docs/media-and-audio.md +113 -117
  76. package/docs/persistence.md +1 -1
  77. package/docs/production.md +81 -92
  78. package/docs/prompt-and-input.md +71 -161
  79. package/docs/provider-integration.md +91 -49
  80. package/docs/responsive-orientation.md +1 -1
  81. package/docs/security.md +6 -5
  82. package/docs/streaming-protocol.md +1 -1
  83. package/docs/testing.md +51 -43
  84. package/examples/custom-template/README.md +1 -1
  85. package/package.json +20 -21
  86. package/registry/items/backgrounds.json +2 -2
  87. package/registry/items/barChart.json +6 -4
  88. package/registry/items/beforeAfter.json +1 -1
  89. package/registry/items/bigNumber.json +4 -3
  90. package/registry/items/brandMessage.json +3 -2
  91. package/registry/items/cardList.json +6 -4
  92. package/registry/items/codeEditor.json +4 -3
  93. package/registry/items/confetti.json +1 -1
  94. package/registry/items/ctaLogo.json +3 -2
  95. package/registry/items/ctaMedia.json +4 -3
  96. package/registry/items/emojiBurst.json +1 -1
  97. package/registry/items/incomingCall.json +3 -2
  98. package/registry/items/media.json +4 -3
  99. package/registry/items/milestone.json +3 -2
  100. package/registry/items/notification.json +3 -2
  101. package/registry/items/phoneMockup.json +4 -3
  102. package/registry/items/problemSolution.json +4 -3
  103. package/registry/items/progressRing.json +4 -3
  104. package/registry/items/promptInput.json +3 -2
  105. package/registry/items/reaction.json +2 -2
  106. package/registry/items/reviewStack.json +3 -2
  107. package/registry/items/steps.json +6 -4
  108. package/registry/items/terminal.json +5 -4
  109. package/registry/items/testimonial.json +3 -2
  110. package/registry/items/tripleStats.json +4 -3
  111. package/registry/items/tweet.json +3 -2
  112. package/registry/items/webMockup.json +4 -3
  113. package/starters/video-chat/.env.example +16 -0
  114. package/starters/video-chat/README.md +63 -0
  115. package/starters/video-chat/index.html +12 -0
  116. package/starters/video-chat/package.json +28 -0
  117. package/starters/video-chat/server.ts +152 -0
  118. package/starters/video-chat/src/main.tsx +8 -0
  119. package/starters/video-chat/stock.ts +139 -0
  120. package/starters/video-chat/tsconfig.json +20 -0
  121. package/starters/video-chat/vite.config.ts +81 -0
  122. package/styles/video-chat.css +713 -0
  123. package/dist/chunk-C6WVCZRW.js +0 -19
  124. package/docs/input-and-first-scene.md +0 -64
  125. package/docs/integrate-nextjs.md +0 -86
  126. package/docs/live-channels.md +0 -149
  127. package/docs/use-cases.md +0 -59
  128. package/examples/nextjs-quickstart/.env.example +0 -2
  129. package/examples/nextjs-quickstart/README.md +0 -27
  130. package/examples/nextjs-quickstart/next-env.d.ts +0 -4
  131. package/examples/nextjs-quickstart/package.json +0 -25
  132. package/examples/nextjs-quickstart/src/app/api/video/route.ts +0 -24
  133. package/examples/nextjs-quickstart/src/app/layout.tsx +0 -5
  134. package/examples/nextjs-quickstart/src/app/page.tsx +0 -31
  135. package/examples/nextjs-quickstart/tsconfig.json +0 -26
@@ -5,21 +5,21 @@ import {
5
5
  import {
6
6
  SceneBackground,
7
7
  getMediaBackgroundProps
8
- } from "./chunk-6M6DATLW.js";
8
+ } from "./chunk-MXZSDGZQ.js";
9
9
  import {
10
10
  TemplateText
11
- } from "./chunk-TCEHK2BW.js";
11
+ } from "./chunk-YJJC4N4D.js";
12
12
  import "./chunk-L5BTTCZV.js";
13
- import "./chunk-HT6BGERF.js";
13
+ import "./chunk-FRN6WKHA.js";
14
14
  import "./chunk-W3VDIBGR.js";
15
15
  import {
16
16
  interpolate,
17
17
  spring
18
18
  } from "./chunk-XTOXFMLM.js";
19
- import "./chunk-C6WVCZRW.js";
20
19
  import {
21
20
  hasSceneMedia
22
21
  } from "./chunk-224QNWRA.js";
22
+ import "./chunk-5CDAM24P.js";
23
23
  import {
24
24
  resolveTokens
25
25
  } from "./chunk-XWWLKRNU.js";
@@ -7,22 +7,22 @@ import "./chunk-S7HFLYNN.js";
7
7
  import {
8
8
  SceneBackground,
9
9
  getMediaBackgroundProps
10
- } from "./chunk-6M6DATLW.js";
10
+ } from "./chunk-MXZSDGZQ.js";
11
11
  import {
12
12
  TemplateText
13
- } from "./chunk-TCEHK2BW.js";
13
+ } from "./chunk-YJJC4N4D.js";
14
14
  import "./chunk-L5BTTCZV.js";
15
- import "./chunk-HT6BGERF.js";
15
+ import "./chunk-FRN6WKHA.js";
16
16
  import "./chunk-W3VDIBGR.js";
17
17
  import {
18
18
  SPRING_SMOOTH,
19
19
  interpolate,
20
20
  spring
21
21
  } from "./chunk-XTOXFMLM.js";
22
- import "./chunk-C6WVCZRW.js";
23
22
  import {
24
23
  hasSceneMedia
25
24
  } from "./chunk-224QNWRA.js";
25
+ import "./chunk-5CDAM24P.js";
26
26
  import {
27
27
  TOKEN_DEFAULTS,
28
28
  resolveTokens
@@ -7,21 +7,21 @@ import {
7
7
  import {
8
8
  SceneBackground,
9
9
  getMediaBackgroundProps
10
- } from "./chunk-6M6DATLW.js";
10
+ } from "./chunk-MXZSDGZQ.js";
11
11
  import {
12
12
  TemplateText
13
- } from "./chunk-TCEHK2BW.js";
13
+ } from "./chunk-YJJC4N4D.js";
14
14
  import "./chunk-L5BTTCZV.js";
15
- import "./chunk-HT6BGERF.js";
15
+ import "./chunk-FRN6WKHA.js";
16
16
  import "./chunk-W3VDIBGR.js";
17
17
  import {
18
18
  interpolate,
19
19
  spring
20
20
  } from "./chunk-XTOXFMLM.js";
21
- import "./chunk-C6WVCZRW.js";
22
21
  import {
23
22
  hasSceneMedia
24
23
  } from "./chunk-224QNWRA.js";
24
+ import "./chunk-5CDAM24P.js";
25
25
  import {
26
26
  TOKEN_DEFAULTS,
27
27
  resolveTokens
@@ -9,22 +9,22 @@ import {
9
9
  import {
10
10
  SceneBackground,
11
11
  getMediaBackgroundProps
12
- } from "./chunk-6M6DATLW.js";
12
+ } from "./chunk-MXZSDGZQ.js";
13
13
  import {
14
14
  TemplateText
15
- } from "./chunk-TCEHK2BW.js";
15
+ } from "./chunk-YJJC4N4D.js";
16
16
  import "./chunk-L5BTTCZV.js";
17
- import "./chunk-HT6BGERF.js";
17
+ import "./chunk-FRN6WKHA.js";
18
18
  import "./chunk-W3VDIBGR.js";
19
19
  import {
20
20
  SPRING_SMOOTH,
21
21
  interpolate,
22
22
  spring
23
23
  } from "./chunk-XTOXFMLM.js";
24
- import "./chunk-C6WVCZRW.js";
25
24
  import {
26
25
  hasSceneMedia
27
26
  } from "./chunk-224QNWRA.js";
27
+ import "./chunk-5CDAM24P.js";
28
28
  import {
29
29
  TOKEN_DEFAULTS,
30
30
  resolveTokens
@@ -8,12 +8,12 @@ import "./chunk-QAAO7OAY.js";
8
8
  import {
9
9
  SceneBackground,
10
10
  getMediaBackgroundProps
11
- } from "./chunk-6M6DATLW.js";
11
+ } from "./chunk-MXZSDGZQ.js";
12
12
  import {
13
13
  Emoji,
14
14
  renderWithEmoji
15
15
  } from "./chunk-L5BTTCZV.js";
16
- import "./chunk-HT6BGERF.js";
16
+ import "./chunk-FRN6WKHA.js";
17
17
  import {
18
18
  accessibleTextColor,
19
19
  withOpacity
@@ -24,8 +24,8 @@ import {
24
24
  interpolate,
25
25
  spring
26
26
  } from "./chunk-XTOXFMLM.js";
27
- import "./chunk-C6WVCZRW.js";
28
27
  import "./chunk-224QNWRA.js";
28
+ import "./chunk-5CDAM24P.js";
29
29
  import {
30
30
  MEDIA_TEXT_SHADOW,
31
31
  TOKEN_DEFAULTS,
@@ -4,20 +4,20 @@ import {
4
4
  import {
5
5
  SceneBackground,
6
6
  getMediaBackgroundProps
7
- } from "./chunk-6M6DATLW.js";
7
+ } from "./chunk-MXZSDGZQ.js";
8
8
  import {
9
9
  Emoji,
10
10
  renderWithEmoji
11
11
  } from "./chunk-L5BTTCZV.js";
12
- import "./chunk-HT6BGERF.js";
12
+ import "./chunk-FRN6WKHA.js";
13
13
  import "./chunk-W3VDIBGR.js";
14
14
  import {
15
15
  SPRING_SMOOTH,
16
16
  interpolate,
17
17
  spring
18
18
  } from "./chunk-XTOXFMLM.js";
19
- import "./chunk-C6WVCZRW.js";
20
19
  import "./chunk-224QNWRA.js";
20
+ import "./chunk-5CDAM24P.js";
21
21
  import {
22
22
  resolveTokens
23
23
  } from "./chunk-XWWLKRNU.js";
@@ -4,8 +4,8 @@ import {
4
4
  import {
5
5
  SceneBackground,
6
6
  getMediaBackgroundProps
7
- } from "./chunk-6M6DATLW.js";
8
- import "./chunk-HT6BGERF.js";
7
+ } from "./chunk-MXZSDGZQ.js";
8
+ import "./chunk-FRN6WKHA.js";
9
9
  import {
10
10
  accessibleTextColor,
11
11
  withOpacity
@@ -15,8 +15,8 @@ import {
15
15
  interpolate,
16
16
  spring
17
17
  } from "./chunk-XTOXFMLM.js";
18
- import "./chunk-C6WVCZRW.js";
19
18
  import "./chunk-224QNWRA.js";
19
+ import "./chunk-5CDAM24P.js";
20
20
  import {
21
21
  lighten,
22
22
  resolveTokens
@@ -4,8 +4,8 @@ import {
4
4
  import {
5
5
  SceneBackground,
6
6
  getMediaBackgroundProps
7
- } from "./chunk-6M6DATLW.js";
8
- import "./chunk-HT6BGERF.js";
7
+ } from "./chunk-MXZSDGZQ.js";
8
+ import "./chunk-FRN6WKHA.js";
9
9
  import {
10
10
  accessibleTextColor,
11
11
  autoTextColor,
@@ -17,8 +17,8 @@ import {
17
17
  interpolate,
18
18
  spring
19
19
  } from "./chunk-XTOXFMLM.js";
20
- import "./chunk-C6WVCZRW.js";
21
20
  import "./chunk-224QNWRA.js";
21
+ import "./chunk-5CDAM24P.js";
22
22
  import {
23
23
  TOKEN_DEFAULTS,
24
24
  lighten,
@@ -4,11 +4,11 @@ import {
4
4
  import {
5
5
  SceneBackground,
6
6
  getMediaBackgroundProps
7
- } from "./chunk-6M6DATLW.js";
7
+ } from "./chunk-MXZSDGZQ.js";
8
8
  import {
9
9
  renderWithEmoji
10
10
  } from "./chunk-L5BTTCZV.js";
11
- import "./chunk-HT6BGERF.js";
11
+ import "./chunk-FRN6WKHA.js";
12
12
  import {
13
13
  autoTextColor
14
14
  } from "./chunk-W3VDIBGR.js";
@@ -17,8 +17,8 @@ import {
17
17
  interpolate,
18
18
  spring
19
19
  } from "./chunk-XTOXFMLM.js";
20
- import "./chunk-C6WVCZRW.js";
21
20
  import "./chunk-224QNWRA.js";
21
+ import "./chunk-5CDAM24P.js";
22
22
  import {
23
23
  resolveTokens
24
24
  } from "./chunk-XWWLKRNU.js";
@@ -1,10 +1,12 @@
1
1
  import {
2
2
  DEFAULT_VIDEO_SYSTEM_PROMPT,
3
3
  VIDEO_PLAN_INSTRUCTION,
4
- createVideoSystemPrompt
5
- } from "./chunk-PNS52FL4.js";
4
+ createVideoSystemPrompt,
5
+ videoPlanInstruction
6
+ } from "./chunk-5SLENAJW.js";
6
7
  export {
7
8
  DEFAULT_VIDEO_SYSTEM_PROMPT,
8
9
  VIDEO_PLAN_INSTRUCTION,
9
- createVideoSystemPrompt
10
+ createVideoSystemPrompt,
11
+ videoPlanInstruction
10
12
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  BUILTIN_TEMPLATE_MANIFEST
3
- } from "./chunk-HVCPEAQF.js";
3
+ } from "./chunk-LKBZX7GV.js";
4
4
  export {
5
5
  BUILTIN_TEMPLATE_MANIFEST as builtinTemplates
6
6
  };
@@ -1,9 +1,9 @@
1
- import { I as InferTemplateJsonSchema, S as SceneTemplateProps, a as SceneTemplate } from './kit-DEG3fcaL.js';
2
- export { T as TemplateRegistry, c as createTemplateRegistry } from './kit-DEG3fcaL.js';
1
+ import { I as InferTemplateJsonSchema, S as SceneTemplateProps, a as SceneTemplate } from './kit-8g46H2RZ.js';
2
+ export { T as TemplateRegistry, c as createTemplateRegistry } from './kit-8g46H2RZ.js';
3
3
  import { ComponentType } from 'react';
4
4
  import { d as TemplateJsonSchema, S as SceneTemplateMetadata } from './catalog-types-BIhSpOWK.js';
5
5
  export { T as TemplateFamily, c as TemplateTimingMetadata, e as TemplateTransitionTiming } from './catalog-types-BIhSpOWK.js';
6
- import './types-BV9IqExh.js';
6
+ import './types-2wHBqtg8.js';
7
7
 
8
8
  interface TemplateExample<Variables extends Record<string, unknown> = Record<string, unknown>> {
9
9
  name: string;
package/dist/test.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { e as VideoScene, b as VideoOrientation, V as VideoStyle, c as Video, d as VideoAudio, j as VideoInput } from './types-BV9IqExh.js';
2
- import { V as VideoWarning, a as VideoFinishReason } from './events-BBP30j3c.js';
1
+ import { e as VideoScene, b as VideoOrientation, V as VideoStyle, c as Video, d as VideoAudio, g as VideoInput } from './types-2wHBqtg8.js';
2
+ import { V as VideoWarning, a as VideoFinishReason } from './events-B6qS1Lsb.js';
3
3
 
4
4
  type MockVideoStreamPart = {
5
5
  type: "scene.add";
package/dist/test.js CHANGED
@@ -233,9 +233,9 @@ async function* simulateVideoStream(parts, options = {}) {
233
233
  if (timeoutMs != null && (!Number.isFinite(timeoutMs) || timeoutMs < 0)) {
234
234
  throw new Error("Simulation timeoutMs must be a non-negative finite number");
235
235
  }
236
- const { createVideo } = await import("./compose-video-JWIEDTEJ.js");
237
- const { createTextDeltaVideoPlanner } = await import("./text-stream-J6EDDJP4.js");
238
- const { BUILTIN_SERVER_TEMPLATE_KIT } = await import("./builtin-server-YHEZ2JRF.js");
236
+ const { createVideo } = await import("./compose-video-PD6LKKRK.js");
237
+ const { createTextDeltaVideoPlanner } = await import("./text-stream-FW4BLBAL.js");
238
+ const { BUILTIN_SERVER_TEMPLATE_KIT } = await import("./builtin-server-KB7FKF6A.js");
239
239
  const { createTemplateSceneValidator } = await import("./validate-T7GBU2YF.js");
240
240
  const controller = new AbortController();
241
241
  const forwardAbort = () => controller.abort(options.signal?.reason);
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createTextDeltaVideoPlanner
3
- } from "./chunk-34O5BY6X.js";
3
+ } from "./chunk-RXHW4EP4.js";
4
4
  import "./chunk-E7CL7UPB.js";
5
- import "./chunk-G66Z5CWR.js";
5
+ import "./chunk-MMUXVA47.js";
6
6
  import "./chunk-AOWSXU2K.js";
7
7
  import "./chunk-XGRA2MUV.js";
8
8
  export {
@@ -47,8 +47,23 @@ interface VideoStyle {
47
47
  defaultTransition?: string;
48
48
  density?: string;
49
49
  motion?: string;
50
+ /**
51
+ * The visual language generated media is produced in.
52
+ *
53
+ * A style has two halves once media can be generated: the brand decides how
54
+ * captions are drawn, and this decides what the footage behind them looks
55
+ * like. They have to travel together - pale illustrated ground under dark
56
+ * documentary footage is unreadable - so this belongs on the style rather
57
+ * than being threaded into each provider call by hand.
58
+ *
59
+ * Nothing is rendered from it. It reaches `resolveMedia`, which is where a
60
+ * provider prompt is written.
61
+ */
62
+ generatedLook?: string;
50
63
  }
51
64
  interface VideoStyleOptions {
65
+ /** The visual language generated media is produced in. See `VideoStyle`. */
66
+ generatedLook?: string;
52
67
  density?: "airy" | "normal" | "packed";
53
68
  motion?: "calm" | "normal" | "punchy";
54
69
  textArchetype?: "subtle" | "typewriter" | "wordStagger" | "slam" | "cinematic" | "heroWord";
@@ -69,6 +84,19 @@ interface VideoScene {
69
84
  textArchetype?: string;
70
85
  backgroundEffect?: string;
71
86
  timing: VideoTiming;
87
+ /**
88
+ * What is said aloud while this scene is showing.
89
+ *
90
+ * A narrated video otherwise has to be carried as two things kept in step by
91
+ * index - the scenes, and a separate script - and they drift. Holding the
92
+ * line on the scene keeps them together through planning, playback, storage
93
+ * and replay, so a stored video can be spoken again without the model that
94
+ * wrote it.
95
+ *
96
+ * The renderer never draws this. It is the spoken half of the scene, not
97
+ * on-screen copy.
98
+ */
99
+ narration?: string;
72
100
  }
73
101
  interface VideoAudio {
74
102
  trackId: string;
@@ -194,4 +222,4 @@ interface VideoSnapshotRetention {
194
222
  suppliedMediaUrls?: boolean;
195
223
  }
196
224
 
197
- export { type VideoStyle as V, type VideoCapabilities as a, type VideoOrientation as b, type Video as c, type VideoAudio as d, type VideoScene as e, VIDEO_PROTOCOL_VERSION as f, type VideoBrandInput as g, type VideoBrand as h, type VideoBackground as i, type VideoInput as j, type VideoKnowledgeMode as k, type VideoStyleOptions as l, type VideoSuppliedMedia as m, type VideoGenerationContext as n, type VideoPlanner as o, type VideoRequest as p, type VideoSceneValidator as q, type VideoTemplatePacing as r, type VideoSnapshotRetention as s, type VideoResumeCursor as t, type VideoSceneValidationContext as u };
225
+ export { type VideoStyle as V, type VideoCapabilities as a, type VideoOrientation as b, type Video as c, type VideoAudio as d, type VideoScene as e, VIDEO_PROTOCOL_VERSION as f, type VideoInput as g, type VideoBrandInput as h, type VideoBrand as i, type VideoTemplatePacing as j, type VideoBackground as k, type VideoKnowledgeMode as l, type VideoStyleOptions as m, type VideoSuppliedMedia as n, type VideoGenerationContext as o, type VideoPlanner as p, type VideoRequest as q, type VideoSceneValidator as r, type VideoSnapshotRetention as s, type VideoResumeCursor as t, type VideoSceneValidationContext as u };
@@ -0,0 +1,46 @@
1
+ type VideoChatMode = "templates" | "full";
2
+ interface VideoChatConversationTurn {
3
+ prompt: string;
4
+ response?: string;
5
+ }
6
+ interface VideoChatCapabilities {
7
+ templates: true;
8
+ generatedSpeech: boolean;
9
+ generatedVideo: boolean;
10
+ stockMedia: boolean;
11
+ transcription: boolean;
12
+ modes: VideoChatMode[];
13
+ }
14
+ interface VideoChatMedia {
15
+ url: string;
16
+ type: "image" | "video";
17
+ posterUrl?: string;
18
+ }
19
+ interface VideoChatSuggestion {
20
+ prompt: string;
21
+ /** Optional short hook that can start speaking the moment this suggestion is selected. */
22
+ opening?: string;
23
+ media: VideoChatMedia | null;
24
+ }
25
+ interface VideoChatAskOptions {
26
+ /** Reuse already-loaded suggestion footage while the answer is prepared. */
27
+ openingMedia?: VideoChatMedia | null;
28
+ /** A prewritten 6-9 word hook that can start immediately while the response streams. */
29
+ opening?: string;
30
+ }
31
+ interface VideoChatWelcome {
32
+ hero: VideoChatMedia | null;
33
+ cards: VideoChatSuggestion[];
34
+ }
35
+ interface VideoChatWelcomePrompt {
36
+ prompt: string;
37
+ /** A prewritten 6-9 word hook for an instant suggested-prompt response. */
38
+ opening?: string;
39
+ mediaQuery?: string;
40
+ }
41
+ interface VideoChatWelcomeOptions {
42
+ heroQuery?: string;
43
+ prompts?: readonly VideoChatWelcomePrompt[];
44
+ }
45
+
46
+ export type { VideoChatWelcomeOptions as V, VideoChatCapabilities as a, VideoChatConversationTurn as b, VideoChatMode as c, VideoChatWelcomePrompt as d, VideoChatAskOptions as e, VideoChatMedia as f, VideoChatSuggestion as g, VideoChatWelcome as h };
@@ -2,39 +2,63 @@
2
2
 
3
3
  # Agent integration
4
4
 
5
- Use the same public path a human developer uses. The optional repository skill
6
- packages these instructions for coding agents:
5
+ Coding agents should build the same canonical video chat as a human developer.
6
+ Install the repository skill when the agent supports skills:
7
7
 
8
8
  ```bash
9
9
  npx skills add VanillaSkyAi/video@vanillasky
10
10
  ```
11
11
 
12
- ## Build the first response
12
+ Then prompt: `Use $vanillasky to set up and verify a general-purpose video chat in this project.`
13
13
 
14
- 1. Install `@vanillaskyai/video`.
15
- 2. Choose and configure a current model separately; put its provider key in an
16
- ignored `.env.local` file.
17
- 3. Connect that app-owned model with `createVideoHandler` in an authenticated
18
- server route.
19
- 4. Pass grounded text or structured data as `input`.
20
- 5. Call `useVideo()` and render `VideoPlayer` in React.
21
- 6. Verify one complete response in a browser before adding optional features.
14
+ ## Set up the canonical chat
22
15
 
23
- The root README and `examples/nextjs-quickstart` are the canonical working
24
- reference. Built-in templates require no registry setup.
16
+ The skill follows this public path in an empty npm project:
25
17
 
26
- ## Keep responsibilities clear
18
+ ```bash
19
+ npx @vanillaskyai/video init
20
+ npx vanillasky doctor
21
+ npm run dev
22
+ ```
23
+
24
+ Init generates the thin application-owned shell around the SDK's complete
25
+ `VideoChat` experience. The default uses packaged templates + browser voice.
26
+ One text-provider key makes it answer; optional keys enable generated speech,
27
+ stock media, transcription, and generated video without client changes.
28
+
29
+ If doctor reports a missing key, add the named key to the ignored `.env.local`
30
+ yourself. Never read or print a secret value, and never paste one into the chat.
31
+ Doctor is the safe capability interface: it reports names and readiness only.
32
+
33
+ ## Verify, do not merely scaffold
34
+
35
+ The agent should leave the dev server running and open its reported localhost
36
+ URL in a real browser. Browser automation should use normal motion
37
+ (`reducedMotion: "no-preference"`) so playback advances.
38
+
39
+ 1. Confirm the welcome screen, suggestions, composer, and voice control load
40
+ without console or page errors.
41
+ 2. Ask one explanatory question and confirm the answer streams, speaks, reaches
42
+ its final frame, and returns to a usable composer.
43
+ 3. Ask one unrelated creative question in the same conversation and confirm it
44
+ produces a distinct response.
45
+ 4. If doctor reports generated video ready, choose that mode and verify one
46
+ suitable prompt without editing client code.
47
+ 5. Check failed network responses before reporting success.
48
+
49
+ The handoff should name the localhost URL and ready capabilities. It should
50
+ never include credential values.
51
+
52
+ ## Keep ownership clear
27
53
 
28
- VanillaSky owns the planning prompt, trusted templates, validation, streaming
29
- protocol, and player. The application owns its LLM, credentials,
30
- authentication, source retrieval, media licensing, persistence, and product
31
- UI.
54
+ VanillaSky owns the chat flow, planning prompts, templates, validation,
55
+ streaming, voice timing, and player. The application owns provider choices,
56
+ keys, authentication, persistence, branding, copy, and policy.
32
57
 
33
- Use `input` for facts the video may claim, `instructions` for presentation
34
- direction, and `personalization` for viewer or account context. Treat all three
35
- as untrusted application data. Add brand, media, audio, persistence, or custom
36
- templates only when the requested experience needs them.
58
+ Customize generated application files only after the default chat passes in the
59
+ browser. Do not inspect SDK internals, copy its template tree, or invent a
60
+ parallel integration path. Source-own a template with
61
+ `npx vanillasky templates ...` only when the product actually needs to edit it.
37
62
 
38
- If a required credential is missing, ask the developer to add it to the ignored
39
- environment file. Never invent another provider or request secret values in
40
- chat.
63
+ The root README and [Getting started](getting-started.md) are the canonical
64
+ human references. Evaluation-only package checks remain in the maintainer docs.
@@ -7,35 +7,38 @@ embedded video that starts playing while it is still being composed.
7
7
  ## The shortest mental model
8
8
 
9
9
  ```text
10
- application context
10
+ user message + conversation context
11
11
  → app-owned model
12
12
  → trusted scene plan
13
13
  → validation and streaming protocol
14
- embedded React player
14
+ synchronized voice-and-video response
15
15
  ```
16
16
 
17
- VanillaSky does not choose your model, retrieve your application context, or
18
- generate executable UI code. It supplies the video-planning prompt, trusted
19
- visual vocabulary, validation, streaming lifecycle, and player.
17
+ VanillaSky does not choose your model, retrieve private application context, or
18
+ own your product policy. It supplies the complete default chat, video-planning
19
+ prompts, trusted visual vocabulary, conversation and narration lifecycle,
20
+ validation, streaming, and player.
20
21
 
21
22
  ## Repository map
22
23
 
23
24
  | Location | Purpose |
24
25
  | --- | --- |
25
- | `src/server/create-video-handler.ts` | Public server integration and provider adapter boundary |
26
+ | `src/server/create-video-chat-handler.ts` | Complete chat endpoint and capability boundary |
27
+ | `src/server/create-video-handler.ts` | Lower-level video composition and provider adapter boundary |
26
28
  | `src/server/prompts/` | System and user prompts sent to the app-owned model |
27
29
  | `src/server/model/` | Converts provider text deltas into typed video plan parts |
28
30
  | `src/protocol/` | Shared request, event, validation, checksum, and SSE contract |
29
31
  | `src/player/` | Browser stream client, `useVideo`, timeline, and React player |
32
+ | `src/video-chat/` | Default `VideoChat` interface and headless conversation/session engine |
30
33
  | `src/visual-system/catalog/` | Template metadata, schemas, loading, and planner catalog |
31
34
  | `src/visual-system/scene-templates/` | Complete scenes the model may select |
32
35
  | `src/visual-system/primitives/` | Reusable visual components used inside scenes |
33
36
  | `src/visual-system/backgrounds/` | Standalone background renderers |
34
37
  | `src/visual-system/motion/` | Animation functions and timing behavior |
35
38
  | `src/visual-system/theme/` | Color and design tokens |
36
- | `src/cli/` | `vanillasky create`, `add`, `sync`, `check`, `list`, and `describe` for customer-owned templates |
39
+ | `src/cli/` | `vanillasky init` and `doctor`, plus `vanillasky templates create`, `add`, `sync`, `check`, `list`, and `describe` |
37
40
  | `registry/items/` | Generated distributable copies installed into customer projects |
38
- | `src/index.ts`, `src/server.ts`, `src/react.ts`, `src/templates.ts`, `src/template-catalog.ts`, `src/test.ts` | The six small public package entry points |
41
+ | `src/index.ts`, `src/server.ts`, `src/react.ts`, `src/templates.ts`, `src/template-catalog.ts`, `src/test.ts`, `styles/video-chat.css` | The six small code entry points and one scoped stylesheet |
39
42
 
40
43
  The source of truth for built-in visuals is `src/visual-system`. The JSON files
41
44
  in `registry/items` are distribution artifacts, kept flat so the CLI can address
@@ -44,25 +47,36 @@ every installable item by a stable name. Their `meta.vanillasky.layer` and
44
47
  support code. Run `npm run registry:sync` after changing canonical visual source.
45
48
 
46
49
  Customer applications do not edit those internal locations. Their source of
47
- truth is one file per visual under `vanillasky/templates/`; `vanillasky sync`
50
+ truth is one file per visual under `vanillasky/templates/`; `vanillasky templates sync`
48
51
  derives a browser registry in `vanillasky/index.ts` and a React-free
49
52
  prompt/validation registry in `vanillasky/server.ts`.
50
53
 
51
54
  ## Request flow
52
55
 
53
- 1. `useVideo().generate(...)` sends grounded input and live application context
54
- to the authenticated application route.
55
- 2. `createVideoHandler(...)` builds the prompts and calls the application's
56
- `streamText` adapter. This is where OpenAI, Anthropic, or another model is
57
- connected.
58
- 3. The system prompt combines the composition rules with the trusted template
56
+ 1. `VideoChat` uses `useVideoChat` to send the user's message. A clicked
57
+ suggestion can start its prewritten hook and existing media immediately.
58
+ 2. For a typed prompt, the model emits a short hook first and then continues
59
+ planning scenes in the same response stream. Its stock-search keyword is
60
+ resolved separately while the hook is spoken.
61
+ 3. `createVideoChatHandler(...)` owns chat actions, suggestions, narration,
62
+ capability discovery, and generated-video budgets. The application supplies
63
+ provider callbacks and policy.
64
+ 4. Video answers flow into `createVideoHandler(...)`, which calls the
65
+ application's `streamText` adapter. This is where Anthropic, OpenAI, or
66
+ another text model is connected.
67
+ 5. The system prompt combines the opening and composition rules with the trusted template
59
68
  catalog, including generated metadata for customer-owned templates. The user
60
69
  prompt serializes the factual input, instructions,
61
70
  personalization, brand, and approved media.
62
- 4. The model streams NDJSON plan parts. The server parses and validates complete
63
- scenes before emitting versioned video events.
64
- 5. The browser reduces those events into a deterministic `Video`; `VideoPlayer`
65
- starts as soon as its first playable scene arrives.
71
+ 6. The model streams one host-consumed opening object followed by NDJSON plan
72
+ parts. The server emits the opening event, then parses and validates complete
73
+ scenes before emitting them.
74
+ 7. The browser reduces those events into a deterministic `Video`. The opening
75
+ loops or holds until its voice ends and the first playable scene is ready;
76
+ the planned playback and narration then take over in one cut.
77
+
78
+ The lower-level `useVideo` and `VideoPlayer` path skips chat actions and remains
79
+ available for explicit one-shot video response integrations.
66
80
 
67
81
  ## Where to change common behavior
68
82
 
@@ -79,6 +93,7 @@ prompt/validation registry in `vanillasky/server.ts`.
79
93
 
80
94
  ## Public vocabulary
81
95
 
82
- Use `Video`, `VideoInput`, `useVideo`, and `VideoPlayer` for the product API.
83
- Use “video response” when describing the lifecycle or output category. Use
84
- “motion” only for animation behavior inside the visual system.
96
+ Use `VideoChat`, `useVideoChat`, `createVideoChatHandler`, `Video`, `VideoInput`,
97
+ `useVideo`, and `VideoPlayer` for the product API. Use “video response” when
98
+ describing the lifecycle or output category. Use “motion” only for animation
99
+ behavior inside the visual system.
@@ -1,4 +1,4 @@
1
- [← Documentation home](../README.md) · [Previous: Input and first scene](input-and-first-scene.md) · [Next: Media and audio →](media-and-audio.md)
1
+ [← Documentation home](../README.md) · [Previous: Prompt and conversation input](prompt-and-input.md) · [Next: Media and audio →](media-and-audio.md)
2
2
 
3
3
  # Branding and personalization
4
4
 
package/docs/concepts.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  # Core concepts
4
4
 
5
+ ## Video chat
6
+
7
+ The default product surface is a conversation whose answers are synchronized
8
+ voice-and-video responses. `VideoChat` supplies the complete interface;
9
+ `useVideoChat` supplies the same session, turn, suggestion, voice, and playback
10
+ lifecycle for custom interfaces; `createVideoChatHandler` connects app-owned
11
+ providers and reports their capabilities through one endpoint.
12
+
13
+ Packaged templates and browser voice are the base mode. A text model makes that
14
+ mode answer, while optional provider callbacks progressively add generated
15
+ speech, stock media, transcription, and generated video without changing the
16
+ client. Visual responses deliberately choose between templates and fully
17
+ generated video; there is no mixed mode.
18
+
5
19
  ## Video response
6
20
 
7
21
  A video response is a short, responsive animated experience assembled from