@mevdragon/vidfarm-devcli 0.2.13 → 0.3.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 (200) hide show
  1. package/README.md +11 -4
  2. package/SKILL.director.md +97 -0
  3. package/SKILL.platform.md +66 -6
  4. package/dist/src/cli.js +137 -1524
  5. package/dist/src/dev-serve.js +169 -0
  6. package/package.json +5 -24
  7. package/.env.example +0 -60
  8. package/auto-create-hyperframe-templates/AUTO_CREATE_HYPERFRAME_TEMPLATES.md +0 -275
  9. package/auto-create-hyperframe-templates/extractor-system-prompt.md +0 -128
  10. package/auto-create-hyperframe-templates/input-manifest.schema.json +0 -56
  11. package/auto-create-hyperframe-templates/lambda-memory-estimator.md +0 -118
  12. package/auto-create-hyperframe-templates/production-graph.schema.json +0 -314
  13. package/auto-create-hyperframe-templates/runbook.md +0 -198
  14. package/auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs +0 -368
  15. package/auto-create-hyperframe-templates/template-plan.schema.json +0 -311
  16. package/auto-create-hyperframe-templates/template-planner-prompt.md +0 -144
  17. package/auto-create-templates/AUTO_CREATE_TEMPLATES.md +0 -599
  18. package/auto-create-templates/extractor-system-prompt.md +0 -119
  19. package/auto-create-templates/production-graph.schema.json +0 -276
  20. package/auto-create-templates/runbook.md +0 -140
  21. package/auto-create-templates/template-plan.schema.json +0 -301
  22. package/auto-create-templates/template-planner-prompt.md +0 -137
  23. package/dist/src/account-pages-legacy.js +0 -9336
  24. package/dist/src/account-pages-legacy.js.map +0 -1
  25. package/dist/src/account-pages.js +0 -61
  26. package/dist/src/account-pages.js.map +0 -1
  27. package/dist/src/app.js +0 -14023
  28. package/dist/src/app.js.map +0 -1
  29. package/dist/src/cli.js.map +0 -1
  30. package/dist/src/composition-runtime.js +0 -581
  31. package/dist/src/composition-runtime.js.map +0 -1
  32. package/dist/src/config.js +0 -140
  33. package/dist/src/config.js.map +0 -1
  34. package/dist/src/context.js +0 -492
  35. package/dist/src/context.js.map +0 -1
  36. package/dist/src/dev-app-legacy.js +0 -694
  37. package/dist/src/dev-app-legacy.js.map +0 -1
  38. package/dist/src/dev-app.js +0 -6
  39. package/dist/src/dev-app.js.map +0 -1
  40. package/dist/src/domain.js +0 -2
  41. package/dist/src/domain.js.map +0 -1
  42. package/dist/src/editor-chat-history.js +0 -82
  43. package/dist/src/editor-chat-history.js.map +0 -1
  44. package/dist/src/editor-chat.js +0 -311
  45. package/dist/src/editor-chat.js.map +0 -1
  46. package/dist/src/frontend/flockposter-cache-store.js +0 -124
  47. package/dist/src/frontend/flockposter-cache-store.js.map +0 -1
  48. package/dist/src/frontend/homepage-client.js +0 -117
  49. package/dist/src/frontend/homepage-client.js.map +0 -1
  50. package/dist/src/frontend/homepage-shared.js +0 -4
  51. package/dist/src/frontend/homepage-shared.js.map +0 -1
  52. package/dist/src/frontend/homepage-store.js +0 -28
  53. package/dist/src/frontend/homepage-store.js.map +0 -1
  54. package/dist/src/frontend/homepage-view.js +0 -260
  55. package/dist/src/frontend/homepage-view.js.map +0 -1
  56. package/dist/src/frontend/page-runtime-client.js +0 -103
  57. package/dist/src/frontend/page-runtime-client.js.map +0 -1
  58. package/dist/src/frontend/page-runtime-store.js +0 -9
  59. package/dist/src/frontend/page-runtime-store.js.map +0 -1
  60. package/dist/src/frontend/sentry.js +0 -42
  61. package/dist/src/frontend/sentry.js.map +0 -1
  62. package/dist/src/frontend/template-editor-chat.js +0 -3767
  63. package/dist/src/frontend/template-editor-chat.js.map +0 -1
  64. package/dist/src/help-page.js +0 -333
  65. package/dist/src/help-page.js.map +0 -1
  66. package/dist/src/homepage.js +0 -919
  67. package/dist/src/homepage.js.map +0 -1
  68. package/dist/src/hyperframes/composition.js +0 -180
  69. package/dist/src/hyperframes/composition.js.map +0 -1
  70. package/dist/src/index.js +0 -16
  71. package/dist/src/index.js.map +0 -1
  72. package/dist/src/instrument.js +0 -30
  73. package/dist/src/instrument.js.map +0 -1
  74. package/dist/src/lib/crypto.js +0 -45
  75. package/dist/src/lib/crypto.js.map +0 -1
  76. package/dist/src/lib/dev-log.js +0 -54
  77. package/dist/src/lib/dev-log.js.map +0 -1
  78. package/dist/src/lib/display-name.js +0 -11
  79. package/dist/src/lib/display-name.js.map +0 -1
  80. package/dist/src/lib/ids.js +0 -24
  81. package/dist/src/lib/ids.js.map +0 -1
  82. package/dist/src/lib/images.js +0 -19
  83. package/dist/src/lib/images.js.map +0 -1
  84. package/dist/src/lib/json.js +0 -15
  85. package/dist/src/lib/json.js.map +0 -1
  86. package/dist/src/lib/template-dna.js +0 -543
  87. package/dist/src/lib/template-dna.js.map +0 -1
  88. package/dist/src/lib/template-paths.js +0 -28
  89. package/dist/src/lib/template-paths.js.map +0 -1
  90. package/dist/src/lib/template-style-options.js +0 -203
  91. package/dist/src/lib/template-style-options.js.map +0 -1
  92. package/dist/src/lib/time.js +0 -7
  93. package/dist/src/lib/time.js.map +0 -1
  94. package/dist/src/lib/video-quality-harness.js +0 -60
  95. package/dist/src/lib/video-quality-harness.js.map +0 -1
  96. package/dist/src/page-runtime.js +0 -2
  97. package/dist/src/page-runtime.js.map +0 -1
  98. package/dist/src/page-shell.js +0 -2393
  99. package/dist/src/page-shell.js.map +0 -1
  100. package/dist/src/primitive-context.js +0 -299
  101. package/dist/src/primitive-context.js.map +0 -1
  102. package/dist/src/primitive-registry.js +0 -2181
  103. package/dist/src/primitive-registry.js.map +0 -1
  104. package/dist/src/primitive-sdk.js +0 -4
  105. package/dist/src/primitive-sdk.js.map +0 -1
  106. package/dist/src/primitives/remotion/html-image.js +0 -30
  107. package/dist/src/primitives/remotion/html-image.js.map +0 -1
  108. package/dist/src/primitives/remotion/media-slideshow.js +0 -60
  109. package/dist/src/primitives/remotion/media-slideshow.js.map +0 -1
  110. package/dist/src/react-page-shell.js +0 -35
  111. package/dist/src/react-page-shell.js.map +0 -1
  112. package/dist/src/ready-post-schedule-component.js +0 -1515
  113. package/dist/src/ready-post-schedule-component.js.map +0 -1
  114. package/dist/src/registry.js +0 -296
  115. package/dist/src/registry.js.map +0 -1
  116. package/dist/src/runtime.js +0 -31
  117. package/dist/src/runtime.js.map +0 -1
  118. package/dist/src/services/api-call-history.js +0 -249
  119. package/dist/src/services/api-call-history.js.map +0 -1
  120. package/dist/src/services/auth.js +0 -152
  121. package/dist/src/services/auth.js.map +0 -1
  122. package/dist/src/services/billing.js +0 -231
  123. package/dist/src/services/billing.js.map +0 -1
  124. package/dist/src/services/chat-threads.js +0 -92
  125. package/dist/src/services/chat-threads.js.map +0 -1
  126. package/dist/src/services/fork-access.js +0 -94
  127. package/dist/src/services/fork-access.js.map +0 -1
  128. package/dist/src/services/ghostcut.js +0 -132
  129. package/dist/src/services/ghostcut.js.map +0 -1
  130. package/dist/src/services/hyperframes.js +0 -1014
  131. package/dist/src/services/hyperframes.js.map +0 -1
  132. package/dist/src/services/job-capacity.js +0 -14
  133. package/dist/src/services/job-capacity.js.map +0 -1
  134. package/dist/src/services/job-logs.js +0 -197
  135. package/dist/src/services/job-logs.js.map +0 -1
  136. package/dist/src/services/jobs.js +0 -136
  137. package/dist/src/services/jobs.js.map +0 -1
  138. package/dist/src/services/media-processing.js +0 -743
  139. package/dist/src/services/media-processing.js.map +0 -1
  140. package/dist/src/services/primitive-media-lambda.js +0 -280
  141. package/dist/src/services/primitive-media-lambda.js.map +0 -1
  142. package/dist/src/services/providers.js +0 -2870
  143. package/dist/src/services/providers.js.map +0 -1
  144. package/dist/src/services/rate-limits.js +0 -237
  145. package/dist/src/services/rate-limits.js.map +0 -1
  146. package/dist/src/services/remotion.js +0 -688
  147. package/dist/src/services/remotion.js.map +0 -1
  148. package/dist/src/services/serverless-auth.js +0 -374
  149. package/dist/src/services/serverless-auth.js.map +0 -1
  150. package/dist/src/services/serverless-jobs.js +0 -1074
  151. package/dist/src/services/serverless-jobs.js.map +0 -1
  152. package/dist/src/services/serverless-provider-keys.js +0 -401
  153. package/dist/src/services/serverless-provider-keys.js.map +0 -1
  154. package/dist/src/services/serverless-records.js +0 -1086
  155. package/dist/src/services/serverless-records.js.map +0 -1
  156. package/dist/src/services/serverless-template-configs.js +0 -67
  157. package/dist/src/services/serverless-template-configs.js.map +0 -1
  158. package/dist/src/services/storage.js +0 -382
  159. package/dist/src/services/storage.js.map +0 -1
  160. package/dist/src/services/template-certification.js +0 -475
  161. package/dist/src/services/template-certification.js.map +0 -1
  162. package/dist/src/services/template-loader.js +0 -99
  163. package/dist/src/services/template-loader.js.map +0 -1
  164. package/dist/src/services/template-runtime-bundles.js +0 -217
  165. package/dist/src/services/template-runtime-bundles.js.map +0 -1
  166. package/dist/src/services/template-sources.js +0 -1017
  167. package/dist/src/services/template-sources.js.map +0 -1
  168. package/dist/src/services/video-normalization.js +0 -2
  169. package/dist/src/services/video-normalization.js.map +0 -1
  170. package/dist/src/services/webhooks.js +0 -62
  171. package/dist/src/services/webhooks.js.map +0 -1
  172. package/dist/src/template-editor-pages.js +0 -6624
  173. package/dist/src/template-editor-pages.js.map +0 -1
  174. package/dist/src/template-editor-shell.js +0 -2713
  175. package/dist/src/template-editor-shell.js.map +0 -1
  176. package/dist/src/template-sdk.js +0 -4
  177. package/dist/src/template-sdk.js.map +0 -1
  178. package/dist/src/worker.js +0 -17
  179. package/dist/src/worker.js.map +0 -1
  180. package/public/assets/homepage-app.js +0 -54
  181. package/public/assets/homepage-client-app.js +0 -80
  182. package/public/assets/page-runtime-client-app.js +0 -94
  183. package/readme.secret.md +0 -89
  184. package/templates/vidfarm_template_0000/README.md +0 -106
  185. package/templates/vidfarm_template_0000/SKILL.md +0 -266
  186. package/templates/vidfarm_template_0000/assets/Abel-Regular.ttf +0 -0
  187. package/templates/vidfarm_template_0000/assets/DMSerifDisplay-Regular.ttf +0 -0
  188. package/templates/vidfarm_template_0000/assets/Montserrat[wght].ttf +0 -0
  189. package/templates/vidfarm_template_0000/assets/SourceCodePro[wght].ttf +0 -0
  190. package/templates/vidfarm_template_0000/assets/TikTokSans-SemiBold.ttf +0 -0
  191. package/templates/vidfarm_template_0000/assets/Yesteryear-Regular.ttf +0 -0
  192. package/templates/vidfarm_template_0000/composition.json +0 -11
  193. package/templates/vidfarm_template_0000/src/lib/images.js +0 -221
  194. package/templates/vidfarm_template_0000/src/remotion/Root.js +0 -33
  195. package/templates/vidfarm_template_0000/src/remotion/index.js +0 -3
  196. package/templates/vidfarm_template_0000/src/sdk.js +0 -3
  197. package/templates/vidfarm_template_0000/src/style-options.js +0 -200
  198. package/templates/vidfarm_template_0000/src/template-dna.js +0 -9
  199. package/templates/vidfarm_template_0000/src/template.js +0 -1566
  200. package/templates/vidfarm_template_0000/template.config.json +0 -21
@@ -1,56 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "Auto-Create HyperFrame Input Manifest",
4
- "type": "object",
5
- "required": [
6
- "mode",
7
- "input_path",
8
- "output_path",
9
- "slug_id",
10
- "source_mode",
11
- "render_defaults",
12
- "lambda",
13
- "publish"
14
- ],
15
- "properties": {
16
- "mode": { "const": "autocreate-hyperframe-template" },
17
- "harness_entry": { "type": "string" },
18
- "input_path": { "type": "string" },
19
- "output_path": { "type": "string" },
20
- "slug_id": { "type": "string" },
21
- "source_mode": { "enum": ["auto", "single_video", "scene_split_video", "slideshow", "mixed_media"] },
22
- "source_notes_path": { "type": "string" },
23
- "render_defaults": {
24
- "type": "object",
25
- "required": ["width", "height", "fps"],
26
- "properties": {
27
- "width": { "type": "integer", "minimum": 1 },
28
- "height": { "type": "integer", "minimum": 1 },
29
- "fps": { "type": "number", "minimum": 1 }
30
- },
31
- "additionalProperties": false
32
- },
33
- "lambda": {
34
- "type": "object",
35
- "required": ["stack_name", "region", "memory_strategy"],
36
- "properties": {
37
- "stack_name": { "type": "string" },
38
- "region": { "type": "string" },
39
- "memory_strategy": { "enum": ["estimate", "fixed"] },
40
- "fixed_memory_mb": { "enum": [2048, 3072, 4096, 6144, 8192, 10240] }
41
- },
42
- "additionalProperties": false
43
- },
44
- "publish": {
45
- "type": "object",
46
- "required": ["prestage_site", "output_url_policy"],
47
- "properties": {
48
- "prestage_site": { "type": "boolean" },
49
- "output_url_policy": { "enum": ["signed_https_final_output_only"] }
50
- },
51
- "additionalProperties": false
52
- }
53
- },
54
- "additionalProperties": false
55
- }
56
-
@@ -1,118 +0,0 @@
1
- # HyperFrames Lambda Memory Estimator
2
-
3
- Use this rubric to estimate Lambda memory before benchmarking.
4
-
5
- The goal is not perfect prediction. The goal is a sane first render configuration that avoids the historical overpowered default while keeping publish reliable.
6
-
7
- ## Recommended Buckets
8
-
9
- | Memory | Use For |
10
- | --- | --- |
11
- | `2048` MB | Static image, simple slideshow, low DOM, no video decode pressure, 720p target. |
12
- | `3072` MB | Default vertical social video: one active video stream, 720x1280 or 1080x1920, deterministic captions/HTML overlays. |
13
- | `4096` MB | 1080p video with heavy overlays, multiple active video streams, masks/filters, large shadows, long audio, or >30s timelines. |
14
- | `6144` MB | High-resolution outputs, many simultaneous media layers, complex CSS filters/masks, prior 3GB/4GB failure, or large generated assets. |
15
- | `8192` MB+ | Exceptional cases only. Use after measured failure or very high complexity. |
16
- | `10240` MB | Last resort, not a default. |
17
-
18
- ## Scoring
19
-
20
- Start at `1536` MB.
21
-
22
- Add output pixel score:
23
-
24
- - `0` MB for <= 1.0 megapixel output
25
- - `512` MB for <= 2.1 megapixel output
26
- - `1024` MB for <= 4.0 megapixel output
27
- - `2048` MB for > 4.0 megapixel output
28
-
29
- Add media score:
30
-
31
- - `0` MB for no video layers
32
- - `768` MB for one active video stream
33
- - `512` MB for each additional simultaneous active video stream
34
- - `256` MB for each additional unique source video decoded across the timeline
35
- - `512` MB if source media is much larger than output resolution
36
-
37
- Add DOM/caption score:
38
-
39
- - `0` MB for <= 10 simple layers
40
- - `256` MB for 11-30 layers
41
- - `512` MB for > 30 layers
42
- - `256` MB for frequent timed captions
43
- - `512` MB for word-level caption highlighting or many HTML overlays
44
-
45
- Add effect score:
46
-
47
- - `256` MB for large text shadows, outlines, or chips on many layers
48
- - `512` MB for masks, blend modes, blur, filter chains, or large CSS transforms
49
- - `1024` MB for several effects active over video at once
50
-
51
- Add duration/audio score:
52
-
53
- - `0` MB for <= 30 seconds
54
- - `256` MB for 31-60 seconds
55
- - `512` MB for 61-180 seconds
56
- - `1024` MB for > 180 seconds
57
- - `256` MB for continuous audio mix
58
- - `512` MB for multiple audio streams or heavy audio processing
59
-
60
- Round up to the next bucket: `2048`, `3072`, `4096`, `6144`, `8192`, or `10240`.
61
-
62
- Clamp ordinary compositions to `2048`-`4096` unless risk flags justify more.
63
-
64
- ## Fast Rules
65
-
66
- - If there is no video and the output is <= 1080x1920, start at `2048`.
67
- - If there is exactly one active video stream and ordinary captions, start at `3072`.
68
- - If there are two or more simultaneous videos, start at `4096`.
69
- - If output is 4K or the source is 4K and actively decoded, start at `6144`.
70
- - If 3GB succeeds with similar wall time to 4GB, keep 3GB.
71
- - If 2GB succeeds but wall time grows enough to erase savings, keep 3GB.
72
-
73
- ## Output Shape
74
-
75
- ```json
76
- {
77
- "recommended_memory_mb": 3072,
78
- "confidence": "medium",
79
- "complexity_scores": {
80
- "output_pixels": 921600,
81
- "output_pixel_score_mb": 0,
82
- "max_simultaneous_video_streams": 1,
83
- "media_score_mb": 768,
84
- "layer_count": 8,
85
- "dom_caption_score_mb": 256,
86
- "effect_score_mb": 0,
87
- "duration_seconds": 12.7,
88
- "duration_audio_score_mb": 256,
89
- "raw_estimate_mb": 2816,
90
- "rounded_bucket_mb": 3072
91
- },
92
- "risk_flags": [
93
- "source_video_decode",
94
- "continuous_audio"
95
- ],
96
- "rationale": "One active 720x1280 video stream with a small deterministic HTML overlay and continuous source audio fits the 3GB baseline.",
97
- "benchmark_override": null
98
- }
99
- ```
100
-
101
- ## Cost Estimate
102
-
103
- Use this rough formula:
104
-
105
- ```txt
106
- lambda_cost = memory_gb * billed_seconds_total * 0.0000166667
107
- step_functions_cost = state_transitions * 0.000025
108
- estimated_cost = lambda_cost + step_functions_cost
109
- ```
110
-
111
- For planning, estimate billed seconds from similar templates:
112
-
113
- - static/slideshow: 20-60 billed seconds
114
- - 10-20s social video: 90-180 billed seconds at 3GB
115
- - 30-60s social video: 180-420 billed seconds at 3GB
116
-
117
- Record the estimate, but treat the first production render as the real calibration.
118
-
@@ -1,314 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "HyperFrames Production Graph",
4
- "type": "object",
5
- "required": [
6
- "format_summary",
7
- "input_contract",
8
- "visual_system",
9
- "timeline",
10
- "layer_decomposition",
11
- "caption_system",
12
- "lambda_memory_estimate",
13
- "deployment",
14
- "validation"
15
- ],
16
- "properties": {
17
- "format_summary": {
18
- "type": "object",
19
- "required": ["slug_id", "title", "source_type", "summary", "width", "height", "duration_seconds"],
20
- "properties": {
21
- "slug_id": { "type": "string" },
22
- "title": { "type": "string" },
23
- "source_type": { "enum": ["single_video", "scene_split_video", "slideshow", "mixed_media"] },
24
- "summary": { "type": "string" },
25
- "width": { "type": "integer", "minimum": 1 },
26
- "height": { "type": "integer", "minimum": 1 },
27
- "fps": { "type": "number", "minimum": 1 },
28
- "duration_seconds": { "type": "number", "minimum": 0 }
29
- },
30
- "additionalProperties": false
31
- },
32
- "input_contract": {
33
- "type": "object",
34
- "required": ["source_assets", "replaceable_slots"],
35
- "properties": {
36
- "source_assets": {
37
- "type": "array",
38
- "items": { "$ref": "#/$defs/sourceAsset" }
39
- },
40
- "replaceable_slots": {
41
- "type": "array",
42
- "items": {
43
- "type": "object",
44
- "required": ["name", "kind", "required", "description"],
45
- "properties": {
46
- "name": { "type": "string" },
47
- "kind": { "enum": ["text", "image", "video", "audio", "html", "style", "duration", "cta"] },
48
- "required": { "type": "boolean" },
49
- "description": { "type": "string" },
50
- "constraints": { "type": "array", "items": { "type": "string" } }
51
- },
52
- "additionalProperties": false
53
- }
54
- }
55
- },
56
- "additionalProperties": false
57
- },
58
- "viral_mechanics": {
59
- "type": "object",
60
- "properties": {
61
- "hook_mechanic": { "type": "string" },
62
- "retention_mechanic": { "type": "string" },
63
- "payoff": { "type": "string" },
64
- "must_preserve": { "type": "array", "items": { "type": "string" } },
65
- "must_not_dilute": { "type": "array", "items": { "type": "string" } }
66
- },
67
- "additionalProperties": false
68
- },
69
- "visual_system": {
70
- "type": "object",
71
- "required": ["safe_areas", "layout_rules", "style_rules"],
72
- "properties": {
73
- "safe_areas": { "$ref": "#/$defs/safeAreas" },
74
- "layout_rules": { "type": "array", "items": { "type": "string" } },
75
- "style_rules": { "type": "array", "items": { "type": "string" } },
76
- "subject_regions": {
77
- "type": "array",
78
- "items": {
79
- "type": "object",
80
- "required": ["id", "role", "geometry"],
81
- "properties": {
82
- "id": { "type": "string" },
83
- "role": { "type": "string" },
84
- "geometry": { "$ref": "#/$defs/geometry" }
85
- },
86
- "additionalProperties": false
87
- }
88
- }
89
- },
90
- "additionalProperties": false
91
- },
92
- "timeline": {
93
- "type": "object",
94
- "required": ["total_duration_seconds", "beats"],
95
- "properties": {
96
- "total_duration_seconds": { "type": "number", "minimum": 0 },
97
- "beats": {
98
- "type": "array",
99
- "items": {
100
- "type": "object",
101
- "required": ["id", "start", "duration", "role", "coverage"],
102
- "properties": {
103
- "id": { "type": "string" },
104
- "start": { "type": "number", "minimum": 0 },
105
- "duration": { "type": "number", "exclusiveMinimum": 0 },
106
- "role": { "type": "string" },
107
- "coverage": { "enum": ["media", "html_overlay", "caption_only", "blank_background", "audio_only"] },
108
- "notes": { "type": "string" }
109
- },
110
- "additionalProperties": false
111
- }
112
- }
113
- },
114
- "additionalProperties": false
115
- },
116
- "layer_decomposition": {
117
- "type": "object",
118
- "required": ["composition_id", "background_color", "layers"],
119
- "properties": {
120
- "composition_id": { "type": "string" },
121
- "background_color": { "type": "string" },
122
- "layers": {
123
- "type": "array",
124
- "items": { "$ref": "#/$defs/layer" }
125
- },
126
- "track_policy": {
127
- "type": "object",
128
- "properties": {
129
- "collision_free_by_default": { "type": "boolean" },
130
- "composited_tracks": { "type": "array", "items": { "type": "integer" } }
131
- },
132
- "additionalProperties": false
133
- }
134
- },
135
- "additionalProperties": false
136
- },
137
- "caption_system": {
138
- "type": "object",
139
- "required": ["surfaces", "default_style"],
140
- "properties": {
141
- "surfaces": {
142
- "type": "array",
143
- "items": {
144
- "type": "object",
145
- "required": ["id", "layer_ids", "placement", "safe_area_notes"],
146
- "properties": {
147
- "id": { "type": "string" },
148
- "layer_ids": { "type": "array", "items": { "type": "string" } },
149
- "placement": { "$ref": "#/$defs/geometry" },
150
- "safe_area_notes": { "type": "string" },
151
- "wrap_rules": { "type": "array", "items": { "type": "string" } }
152
- },
153
- "additionalProperties": false
154
- }
155
- },
156
- "default_style": { "$ref": "#/$defs/textStyle" }
157
- },
158
- "additionalProperties": false
159
- },
160
- "lambda_memory_estimate": { "$ref": "#/$defs/lambdaMemoryEstimate" },
161
- "deployment": {
162
- "type": "object",
163
- "required": ["stack_name", "region", "site_strategy", "output_url_policy"],
164
- "properties": {
165
- "stack_name": { "type": "string" },
166
- "region": { "type": "string" },
167
- "site_strategy": { "enum": ["pre_stage_site", "stage_on_publish", "manual"] },
168
- "output_url_policy": { "enum": ["signed_https_final_output_only"] },
169
- "render_defaults": {
170
- "type": "object",
171
- "properties": {
172
- "width": { "type": "integer", "minimum": 1 },
173
- "height": { "type": "integer", "minimum": 1 },
174
- "fps": { "type": "number", "minimum": 1 }
175
- },
176
- "additionalProperties": false
177
- }
178
- },
179
- "additionalProperties": false
180
- },
181
- "validation": {
182
- "type": "object",
183
- "required": ["checks"],
184
- "properties": {
185
- "checks": { "type": "array", "items": { "type": "string" } },
186
- "known_risks": { "type": "array", "items": { "type": "string" } }
187
- },
188
- "additionalProperties": false
189
- }
190
- },
191
- "additionalProperties": false,
192
- "$defs": {
193
- "sourceAsset": {
194
- "type": "object",
195
- "required": ["id", "type", "path"],
196
- "properties": {
197
- "id": { "type": "string" },
198
- "type": { "enum": ["video", "image", "audio", "font", "json", "html"] },
199
- "path": { "type": "string" },
200
- "width": { "type": "integer", "minimum": 0 },
201
- "height": { "type": "integer", "minimum": 0 },
202
- "duration_seconds": { "type": "number", "minimum": 0 },
203
- "role": { "type": "string" }
204
- },
205
- "additionalProperties": false
206
- },
207
- "geometry": {
208
- "type": "object",
209
- "required": ["x", "y", "width", "height"],
210
- "properties": {
211
- "x": { "type": "number" },
212
- "y": { "type": "number" },
213
- "width": { "type": "number", "exclusiveMinimum": 0 },
214
- "height": { "type": "number", "exclusiveMinimum": 0 },
215
- "unit": { "const": "percent" }
216
- },
217
- "additionalProperties": false
218
- },
219
- "safeAreas": {
220
- "type": "object",
221
- "properties": {
222
- "top_percent": { "type": "number", "minimum": 0 },
223
- "right_percent": { "type": "number", "minimum": 0 },
224
- "bottom_percent": { "type": "number", "minimum": 0 },
225
- "left_percent": { "type": "number", "minimum": 0 },
226
- "notes": { "type": "array", "items": { "type": "string" } }
227
- },
228
- "additionalProperties": false
229
- },
230
- "textStyle": {
231
- "type": "object",
232
- "properties": {
233
- "font_family": { "type": "string" },
234
- "font_weight": { "type": "integer" },
235
- "font_size_px": { "type": "number" },
236
- "line_height": { "type": "number" },
237
- "color": { "type": "string" },
238
- "background": { "type": "string" },
239
- "background_style": { "enum": ["plain", "outline", "radial_halo", "highlight_solid", "highlight_translucent", "panel"] },
240
- "text_align": { "enum": ["left", "center", "right"] },
241
- "max_lines": { "type": "integer", "minimum": 1 }
242
- },
243
- "additionalProperties": false
244
- },
245
- "layer": {
246
- "type": "object",
247
- "required": ["id", "kind", "start", "duration", "track", "z", "mode", "source_of_truth", "geometry", "viral_alignment"],
248
- "properties": {
249
- "id": { "type": "string" },
250
- "kind": { "enum": ["video", "image", "audio", "caption", "html", "shape", "effect"] },
251
- "start": { "type": "number", "minimum": 0 },
252
- "duration": { "type": "number", "exclusiveMinimum": 0 },
253
- "track": { "type": "integer", "minimum": 0 },
254
- "z": { "type": "integer" },
255
- "mode": { "enum": ["both", "editor", "publish"] },
256
- "source_of_truth": { "enum": ["source_media", "deterministic_html", "generated_asset", "user_asset", "computed_effect"] },
257
- "geometry": { "$ref": "#/$defs/geometry" },
258
- "media": {
259
- "type": "object",
260
- "properties": {
261
- "src": { "type": "string" },
262
- "asset_id": { "type": "string" },
263
- "media_start": { "type": "number", "minimum": 0 },
264
- "media_end": { "type": "number", "minimum": 0 },
265
- "fit": { "enum": ["cover", "contain", "fill", "none"] },
266
- "muted": { "type": "boolean" },
267
- "volume": { "type": "number", "minimum": 0 }
268
- },
269
- "additionalProperties": false
270
- },
271
- "text": {
272
- "type": "object",
273
- "properties": {
274
- "content": { "type": "string" },
275
- "style": { "$ref": "#/$defs/textStyle" }
276
- },
277
- "additionalProperties": false
278
- },
279
- "html_contract": {
280
- "type": "object",
281
- "properties": {
282
- "description": { "type": "string" },
283
- "required_classes": { "type": "array", "items": { "type": "string" } },
284
- "editable_fields": { "type": "array", "items": { "type": "string" } }
285
- },
286
- "additionalProperties": false
287
- },
288
- "viral_alignment": { "type": "string" },
289
- "publish_notes": { "type": "string" }
290
- },
291
- "additionalProperties": false
292
- },
293
- "lambdaMemoryEstimate": {
294
- "type": "object",
295
- "required": ["recommended_memory_mb", "confidence", "complexity_scores", "rationale", "risk_flags"],
296
- "properties": {
297
- "recommended_memory_mb": { "enum": [2048, 3072, 4096, 6144, 8192, 10240] },
298
- "confidence": { "enum": ["low", "medium", "high"] },
299
- "complexity_scores": { "type": "object", "additionalProperties": { "type": ["number", "integer", "string", "boolean"] } },
300
- "rationale": { "type": "string" },
301
- "risk_flags": { "type": "array", "items": { "type": "string" } },
302
- "benchmark_override": {
303
- "type": ["object", "null"],
304
- "properties": {
305
- "memory_mb": { "enum": [2048, 3072, 4096, 6144, 8192, 10240] },
306
- "reason": { "type": "string" }
307
- },
308
- "additionalProperties": false
309
- }
310
- },
311
- "additionalProperties": false
312
- }
313
- }
314
- }
@@ -1,198 +0,0 @@
1
- # Auto-Create HyperFrame Template Runbook
2
-
3
- Use this runbook when a simple MP4 or slideshow should become an editable HyperFrames composition and production Lambda site.
4
-
5
- ## 1. Create A Run Folder
6
-
7
- ```bash
8
- RUN_ID="<format-slug>-$(date -u +%Y%m%dT%H%M%SZ)"
9
- mkdir -p "auto-create-hyperframe-templates/runs/${RUN_ID}"/{source,frames,audio,transcripts,ocr,motion,extraction,plan,output}
10
- ```
11
-
12
- Copy source media and notes into `source/`.
13
-
14
- If running through automation, create `manifest.json` matching `input-manifest.schema.json` before copying media:
15
-
16
- ```json
17
- {
18
- "mode": "autocreate-hyperframe-template",
19
- "input_path": "drafts/example/preview/source.mp4",
20
- "output_path": "drafts/example",
21
- "slug_id": "example",
22
- "source_mode": "auto",
23
- "render_defaults": {
24
- "width": 720,
25
- "height": 1280,
26
- "fps": 30
27
- },
28
- "lambda": {
29
- "stack_name": "hyperframes-vidfarm-prod",
30
- "region": "us-east-1",
31
- "memory_strategy": "estimate"
32
- },
33
- "publish": {
34
- "prestage_site": false,
35
- "output_url_policy": "signed_https_final_output_only"
36
- }
37
- }
38
- ```
39
-
40
- ## 2. Extract Media Artifacts
41
-
42
- For MP4:
43
-
44
- ```bash
45
- ffprobe -v error -show_entries format=duration:stream=codec_type,width,height,avg_frame_rate -of json source/source.mp4 \
46
- > "auto-create-hyperframe-templates/runs/${RUN_ID}/source/ffprobe.json"
47
-
48
- ffmpeg -y -i source/source.mp4 \
49
- -vf "fps=1/2,scale=240:-1,tile=3x4" \
50
- -frames:v 1 "auto-create-hyperframe-templates/runs/${RUN_ID}/frames/contact-sheet.jpg"
51
-
52
- ffmpeg -y -i source/source.mp4 \
53
- -vn -ac 1 -ar 16000 "auto-create-hyperframe-templates/runs/${RUN_ID}/audio/source.wav"
54
- ```
55
-
56
- For slideshows, probe each image and create a contact sheet:
57
-
58
- ```bash
59
- ffprobe -v error -show_entries stream=width,height -of json source/slide-01.png \
60
- > "auto-create-hyperframe-templates/runs/${RUN_ID}/source/slide-01.ffprobe.json"
61
- ```
62
-
63
- Add scene detection, OCR, STT, and layout/subject-region detection with whichever local or provider tool is available. The important part is to write concrete timing, text, and bounding boxes into the run folder before planning.
64
-
65
- ## 3. Decide Source Mode
66
-
67
- Classify the input:
68
-
69
- - `single_video`: one MP4 drives the full timeline
70
- - `scene_split_video`: one MP4 should be split into editable timed scene clips
71
- - `slideshow`: images become timed slides
72
- - `mixed_media`: video, images, audio, and HTML overlays need explicit composition
73
-
74
- Record whether source media contains baked text that should be extracted as deterministic captions/HTML overlays.
75
-
76
- ## 4. Generate Production Graph
77
-
78
- Send `extractor-system-prompt.md`, source notes, artifacts, contact sheet, transcript, OCR, and scene cuts to a multimodal model.
79
-
80
- Write:
81
-
82
- ```txt
83
- auto-create-hyperframe-templates/runs/<run_id>/extraction/production_graph.json
84
- ```
85
-
86
- Validate against:
87
-
88
- ```txt
89
- auto-create-hyperframe-templates/production-graph.schema.json
90
- ```
91
-
92
- ## 5. Generate HyperFrame Template Plan
93
-
94
- Send `template-planner-prompt.md` plus `production_graph.json`.
95
-
96
- Write:
97
-
98
- ```txt
99
- auto-create-hyperframe-templates/runs/<run_id>/plan/template_plan.json
100
- ```
101
-
102
- Validate against:
103
-
104
- ```txt
105
- auto-create-hyperframe-templates/template-plan.schema.json
106
- ```
107
-
108
- ## 6. Write Composition Artifacts
109
-
110
- Create or update the target source folder:
111
-
112
- ```txt
113
- drafts/<format_slug>/
114
- composition.html
115
- composition.json
116
- lambda-site.json
117
- ```
118
-
119
- For simple MP4/slideshow inputs, the local bridge can do this step directly:
120
-
121
- ```bash
122
- node auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs drafts/<format_slug>/preview/source.mp4
123
- node auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs drafts/<format_slug>/preview --stage-site
124
- ```
125
-
126
- Implementation order:
127
-
128
- 1. write `composition.json` from `template_plan.layers`
129
- 2. write `composition.html` from the same layer manifest
130
- 3. include root `data-composition-id`, `data-width`, `data-height`, `data-duration`, and `data-source-folder`
131
- 4. write `lambda-site.json` with stack, region, memory, render defaults, and site upload status
132
- 5. run local editor smoke test
133
-
134
- ## 7. HyperFrames Layer Rules
135
-
136
- Use these data attributes in `composition.html`:
137
-
138
- - `data-hf-id`
139
- - `data-layer-kind`
140
- - `data-layer-mode`
141
- - `data-start`
142
- - `data-duration`
143
- - `data-track-index`
144
- - `data-label`
145
- - `data-media-start` for timed media slices
146
- - `data-playback-start` for editor/publish compatibility
147
- - `data-src` when using a timeline proxy
148
-
149
- For video scene clips, prefer timed real `<video>` elements or a timeline proxy that publish normalization rewrites into a real `<video>`. A preview-only `data-vf-playback-source` may help editor scrubbing, but it must not be the publish source of truth.
150
-
151
- ## 8. Estimate Lambda Memory
152
-
153
- Use `lambda-memory-estimator.md`.
154
-
155
- Recommended baseline:
156
-
157
- - `2048` MB: static images, simple slideshows, minimal HTML, no video decode pressure
158
- - `3072` MB: default for vertical social video with one decoded video stream and deterministic overlays
159
- - `4096` MB: 1080p video, multiple streams, heavy captions, large shadows, masks, or long audio
160
- - `6144+` MB: high-resolution, many active layers, complex filters, or measured failures
161
-
162
- Write both the recommendation and the reasoning into `composition.json` and `lambda-site.json`.
163
-
164
- ## 9. Stage Production Lambda Site
165
-
166
- After the project folder is valid, pre-stage it for repeat publishing:
167
-
168
- ```bash
169
- hyperframes lambda sites create drafts/<format_slug> \
170
- --stack-name hyperframes-vidfarm-prod \
171
- --region us-east-1
172
- ```
173
-
174
- If using the SDK or demo API instead of the CLI, write the returned content-addressed site id into `lambda-site.json`.
175
-
176
- The frontend should show the final signed output URL after publish. Do not expose S3 Console or Step Functions Console links as user-facing CTAs.
177
-
178
- ## 10. Validate Publish
179
-
180
- Run one local render and one Lambda publish:
181
-
182
- ```bash
183
- hyperframes lambda render drafts/<format_slug> \
184
- --stack-name hyperframes-vidfarm-prod \
185
- --region us-east-1 \
186
- --site-id <site_id> \
187
- --width 720 \
188
- --height 1280 \
189
- --wait
190
- ```
191
-
192
- Check:
193
-
194
- - final output reflects deleted/hidden scene layers
195
- - caption timing matches the editor timeline
196
- - blank gaps remain blank when no media layer covers them
197
- - audio does not silently disappear after scene splitting
198
- - output URL is accessible without AWS Console login when surfaced in the product