@mevdragon/vidfarm-devcli 0.2.14 → 0.3.1

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 (204) hide show
  1. package/README.md +11 -4
  2. package/SKILL.director.md +100 -0
  3. package/SKILL.platform.md +66 -6
  4. package/dist/src/cli.js +135 -1527
  5. package/package.json +5 -24
  6. package/.env.example +0 -60
  7. package/auto-create-hyperframe-templates/AUTO_CREATE_HYPERFRAME_TEMPLATES.md +0 -275
  8. package/auto-create-hyperframe-templates/extractor-system-prompt.md +0 -128
  9. package/auto-create-hyperframe-templates/input-manifest.schema.json +0 -56
  10. package/auto-create-hyperframe-templates/lambda-memory-estimator.md +0 -118
  11. package/auto-create-hyperframe-templates/production-graph.schema.json +0 -314
  12. package/auto-create-hyperframe-templates/runbook.md +0 -198
  13. package/auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs +0 -368
  14. package/auto-create-hyperframe-templates/template-plan.schema.json +0 -311
  15. package/auto-create-hyperframe-templates/template-planner-prompt.md +0 -144
  16. package/auto-create-templates/AUTO_CREATE_TEMPLATES.md +0 -599
  17. package/auto-create-templates/extractor-system-prompt.md +0 -119
  18. package/auto-create-templates/production-graph.schema.json +0 -276
  19. package/auto-create-templates/runbook.md +0 -140
  20. package/auto-create-templates/template-plan.schema.json +0 -301
  21. package/auto-create-templates/template-planner-prompt.md +0 -137
  22. package/dist/src/account-pages-legacy.js +0 -9338
  23. package/dist/src/account-pages-legacy.js.map +0 -1
  24. package/dist/src/account-pages.js +0 -52
  25. package/dist/src/account-pages.js.map +0 -1
  26. package/dist/src/app.js +0 -13711
  27. package/dist/src/app.js.map +0 -1
  28. package/dist/src/cli.js.map +0 -1
  29. package/dist/src/composition-runtime.js +0 -581
  30. package/dist/src/composition-runtime.js.map +0 -1
  31. package/dist/src/config.js +0 -140
  32. package/dist/src/config.js.map +0 -1
  33. package/dist/src/context.js +0 -492
  34. package/dist/src/context.js.map +0 -1
  35. package/dist/src/dev-app-legacy.js +0 -694
  36. package/dist/src/dev-app-legacy.js.map +0 -1
  37. package/dist/src/dev-app.js +0 -6
  38. package/dist/src/dev-app.js.map +0 -1
  39. package/dist/src/dev-serve.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 -312
  45. package/dist/src/editor-chat.js.map +0 -1
  46. package/dist/src/editor-dark-theme.js +0 -1128
  47. package/dist/src/editor-dark-theme.js.map +0 -1
  48. package/dist/src/frontend/flockposter-cache-store.js +0 -124
  49. package/dist/src/frontend/flockposter-cache-store.js.map +0 -1
  50. package/dist/src/frontend/homepage-client.js +0 -117
  51. package/dist/src/frontend/homepage-client.js.map +0 -1
  52. package/dist/src/frontend/homepage-shared.js +0 -4
  53. package/dist/src/frontend/homepage-shared.js.map +0 -1
  54. package/dist/src/frontend/homepage-store.js +0 -28
  55. package/dist/src/frontend/homepage-store.js.map +0 -1
  56. package/dist/src/frontend/homepage-view.js +0 -260
  57. package/dist/src/frontend/homepage-view.js.map +0 -1
  58. package/dist/src/frontend/page-runtime-client.js +0 -124
  59. package/dist/src/frontend/page-runtime-client.js.map +0 -1
  60. package/dist/src/frontend/page-runtime-store.js +0 -9
  61. package/dist/src/frontend/page-runtime-store.js.map +0 -1
  62. package/dist/src/frontend/sentry.js +0 -42
  63. package/dist/src/frontend/sentry.js.map +0 -1
  64. package/dist/src/frontend/template-editor-chat.js +0 -3760
  65. package/dist/src/frontend/template-editor-chat.js.map +0 -1
  66. package/dist/src/help-page.js +0 -333
  67. package/dist/src/help-page.js.map +0 -1
  68. package/dist/src/homepage.js +0 -919
  69. package/dist/src/homepage.js.map +0 -1
  70. package/dist/src/hyperframes/composition.js +0 -180
  71. package/dist/src/hyperframes/composition.js.map +0 -1
  72. package/dist/src/index.js +0 -16
  73. package/dist/src/index.js.map +0 -1
  74. package/dist/src/instrument.js +0 -30
  75. package/dist/src/instrument.js.map +0 -1
  76. package/dist/src/lib/crypto.js +0 -45
  77. package/dist/src/lib/crypto.js.map +0 -1
  78. package/dist/src/lib/dev-log.js +0 -54
  79. package/dist/src/lib/dev-log.js.map +0 -1
  80. package/dist/src/lib/display-name.js +0 -11
  81. package/dist/src/lib/display-name.js.map +0 -1
  82. package/dist/src/lib/ids.js +0 -24
  83. package/dist/src/lib/ids.js.map +0 -1
  84. package/dist/src/lib/images.js +0 -19
  85. package/dist/src/lib/images.js.map +0 -1
  86. package/dist/src/lib/json.js +0 -15
  87. package/dist/src/lib/json.js.map +0 -1
  88. package/dist/src/lib/template-dna.js +0 -543
  89. package/dist/src/lib/template-dna.js.map +0 -1
  90. package/dist/src/lib/template-paths.js +0 -28
  91. package/dist/src/lib/template-paths.js.map +0 -1
  92. package/dist/src/lib/template-style-options.js +0 -203
  93. package/dist/src/lib/template-style-options.js.map +0 -1
  94. package/dist/src/lib/time.js +0 -7
  95. package/dist/src/lib/time.js.map +0 -1
  96. package/dist/src/lib/video-quality-harness.js +0 -60
  97. package/dist/src/lib/video-quality-harness.js.map +0 -1
  98. package/dist/src/page-runtime.js +0 -2
  99. package/dist/src/page-runtime.js.map +0 -1
  100. package/dist/src/page-shell.js +0 -1315
  101. package/dist/src/page-shell.js.map +0 -1
  102. package/dist/src/primitive-context.js +0 -299
  103. package/dist/src/primitive-context.js.map +0 -1
  104. package/dist/src/primitive-registry.js +0 -2181
  105. package/dist/src/primitive-registry.js.map +0 -1
  106. package/dist/src/primitive-sdk.js +0 -4
  107. package/dist/src/primitive-sdk.js.map +0 -1
  108. package/dist/src/primitives/remotion/html-image.js +0 -30
  109. package/dist/src/primitives/remotion/html-image.js.map +0 -1
  110. package/dist/src/primitives/remotion/media-slideshow.js +0 -60
  111. package/dist/src/primitives/remotion/media-slideshow.js.map +0 -1
  112. package/dist/src/react-page-shell.js +0 -35
  113. package/dist/src/react-page-shell.js.map +0 -1
  114. package/dist/src/ready-post-schedule-component.js +0 -1515
  115. package/dist/src/ready-post-schedule-component.js.map +0 -1
  116. package/dist/src/registry.js +0 -296
  117. package/dist/src/registry.js.map +0 -1
  118. package/dist/src/runtime.js +0 -31
  119. package/dist/src/runtime.js.map +0 -1
  120. package/dist/src/services/api-call-history.js +0 -249
  121. package/dist/src/services/api-call-history.js.map +0 -1
  122. package/dist/src/services/auth.js +0 -152
  123. package/dist/src/services/auth.js.map +0 -1
  124. package/dist/src/services/billing.js +0 -231
  125. package/dist/src/services/billing.js.map +0 -1
  126. package/dist/src/services/chat-threads.js +0 -92
  127. package/dist/src/services/chat-threads.js.map +0 -1
  128. package/dist/src/services/fork-access.js +0 -93
  129. package/dist/src/services/fork-access.js.map +0 -1
  130. package/dist/src/services/fork-manifest.js +0 -43
  131. package/dist/src/services/fork-manifest.js.map +0 -1
  132. package/dist/src/services/ghostcut.js +0 -132
  133. package/dist/src/services/ghostcut.js.map +0 -1
  134. package/dist/src/services/hyperframes.js +0 -1014
  135. package/dist/src/services/hyperframes.js.map +0 -1
  136. package/dist/src/services/job-capacity.js +0 -14
  137. package/dist/src/services/job-capacity.js.map +0 -1
  138. package/dist/src/services/job-logs.js +0 -197
  139. package/dist/src/services/job-logs.js.map +0 -1
  140. package/dist/src/services/jobs.js +0 -136
  141. package/dist/src/services/jobs.js.map +0 -1
  142. package/dist/src/services/media-processing.js +0 -743
  143. package/dist/src/services/media-processing.js.map +0 -1
  144. package/dist/src/services/primitive-media-lambda.js +0 -280
  145. package/dist/src/services/primitive-media-lambda.js.map +0 -1
  146. package/dist/src/services/providers.js +0 -2870
  147. package/dist/src/services/providers.js.map +0 -1
  148. package/dist/src/services/rate-limits.js +0 -237
  149. package/dist/src/services/rate-limits.js.map +0 -1
  150. package/dist/src/services/remotion.js +0 -688
  151. package/dist/src/services/remotion.js.map +0 -1
  152. package/dist/src/services/serverless-auth.js +0 -374
  153. package/dist/src/services/serverless-auth.js.map +0 -1
  154. package/dist/src/services/serverless-jobs.js +0 -1074
  155. package/dist/src/services/serverless-jobs.js.map +0 -1
  156. package/dist/src/services/serverless-provider-keys.js +0 -401
  157. package/dist/src/services/serverless-provider-keys.js.map +0 -1
  158. package/dist/src/services/serverless-records.js +0 -1088
  159. package/dist/src/services/serverless-records.js.map +0 -1
  160. package/dist/src/services/serverless-template-configs.js +0 -67
  161. package/dist/src/services/serverless-template-configs.js.map +0 -1
  162. package/dist/src/services/storage.js +0 -383
  163. package/dist/src/services/storage.js.map +0 -1
  164. package/dist/src/services/template-certification.js +0 -475
  165. package/dist/src/services/template-certification.js.map +0 -1
  166. package/dist/src/services/template-loader.js +0 -99
  167. package/dist/src/services/template-loader.js.map +0 -1
  168. package/dist/src/services/template-runtime-bundles.js +0 -217
  169. package/dist/src/services/template-runtime-bundles.js.map +0 -1
  170. package/dist/src/services/template-sources.js +0 -1017
  171. package/dist/src/services/template-sources.js.map +0 -1
  172. package/dist/src/services/video-normalization.js +0 -2
  173. package/dist/src/services/video-normalization.js.map +0 -1
  174. package/dist/src/services/webhooks.js +0 -62
  175. package/dist/src/services/webhooks.js.map +0 -1
  176. package/dist/src/template-editor-pages.js +0 -2491
  177. package/dist/src/template-editor-pages.js.map +0 -1
  178. package/dist/src/template-editor-shell.js +0 -2702
  179. package/dist/src/template-editor-shell.js.map +0 -1
  180. package/dist/src/template-sdk.js +0 -4
  181. package/dist/src/template-sdk.js.map +0 -1
  182. package/dist/src/worker.js +0 -17
  183. package/dist/src/worker.js.map +0 -1
  184. package/public/assets/homepage-app.js +0 -54
  185. package/public/assets/homepage-client-app.js +0 -80
  186. package/public/assets/page-runtime-client-app.js +0 -94
  187. package/readme.secret.md +0 -89
  188. package/templates/vidfarm_template_0000/README.md +0 -106
  189. package/templates/vidfarm_template_0000/SKILL.md +0 -266
  190. package/templates/vidfarm_template_0000/assets/Abel-Regular.ttf +0 -0
  191. package/templates/vidfarm_template_0000/assets/DMSerifDisplay-Regular.ttf +0 -0
  192. package/templates/vidfarm_template_0000/assets/Montserrat[wght].ttf +0 -0
  193. package/templates/vidfarm_template_0000/assets/SourceCodePro[wght].ttf +0 -0
  194. package/templates/vidfarm_template_0000/assets/TikTokSans-SemiBold.ttf +0 -0
  195. package/templates/vidfarm_template_0000/assets/Yesteryear-Regular.ttf +0 -0
  196. package/templates/vidfarm_template_0000/composition.json +0 -11
  197. package/templates/vidfarm_template_0000/src/lib/images.js +0 -221
  198. package/templates/vidfarm_template_0000/src/remotion/Root.js +0 -33
  199. package/templates/vidfarm_template_0000/src/remotion/index.js +0 -3
  200. package/templates/vidfarm_template_0000/src/sdk.js +0 -3
  201. package/templates/vidfarm_template_0000/src/style-options.js +0 -200
  202. package/templates/vidfarm_template_0000/src/template-dna.js +0 -9
  203. package/templates/vidfarm_template_0000/src/template.js +0 -1566
  204. package/templates/vidfarm_template_0000/template.config.json +0 -21
package/package.json CHANGED
@@ -1,37 +1,18 @@
1
1
  {
2
2
  "name": "@mevdragon/vidfarm-devcli",
3
- "version": "0.2.14",
4
- "description": "DEPRECATED. Built for the old REST-API Vidfarm template model. Superseded by the browser-based Trackpad Editor at https://vidfarm.cc/editor/. No longer maintained.",
5
- "deprecated": "This CLI targeted the old REST-API template paradigm. Vidfarm now uses the Trackpad Editor (composition-based editing in the browser). See SKILL.platform.md.",
3
+ "version": "0.3.1",
4
+ "description": "Local bridge for the Vidfarm Trackpad Editor. Point it at a template id, edit composition.html on disk (Claude Code, Codex, etc.), preview live in the browser at https://vidfarm.cc/editor/.",
6
5
  "type": "module",
7
6
  "bin": {
8
7
  "vidfarm": "dist/src/cli.js",
9
8
  "vidfarm-devcli": "dist/src/cli.js"
10
9
  },
11
10
  "files": [
12
- "dist/src",
13
- "public/assets",
14
- "auto-create-templates/AUTO_CREATE_TEMPLATES.md",
15
- "auto-create-templates/extractor-system-prompt.md",
16
- "auto-create-templates/production-graph.schema.json",
17
- "auto-create-templates/runbook.md",
18
- "auto-create-templates/template-plan.schema.json",
19
- "auto-create-templates/template-planner-prompt.md",
20
- "auto-create-hyperframe-templates/AUTO_CREATE_HYPERFRAME_TEMPLATES.md",
21
- "auto-create-hyperframe-templates/extractor-system-prompt.md",
22
- "auto-create-hyperframe-templates/input-manifest.schema.json",
23
- "auto-create-hyperframe-templates/lambda-memory-estimator.md",
24
- "auto-create-hyperframe-templates/production-graph.schema.json",
25
- "auto-create-hyperframe-templates/runbook.md",
26
- "auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs",
27
- "auto-create-hyperframe-templates/template-plan.schema.json",
28
- "auto-create-hyperframe-templates/template-planner-prompt.md",
29
- "dist/templates/vidfarm_template_0000",
30
- "templates/vidfarm_template_0000",
11
+ "dist/src/cli.js",
12
+ "dist/src/dev-serve.js",
31
13
  "README.md",
32
14
  "SKILL.director.md",
33
15
  "SKILL.platform.md",
34
- ".env.example",
35
16
  "!readme.secret.md"
36
17
  ],
37
18
  "publishConfig": {
@@ -47,7 +28,7 @@
47
28
  "scripts": {
48
29
  "dev": "tsx --import ./src/instrument.ts watch src/index.ts",
49
30
  "dev:frontend": "node scripts/build-homepage-client.mjs --watch",
50
- "dev:cli": "tsx src/cli.ts dev",
31
+ "dev:cli": "tsx src/cli.ts --help",
51
32
  "build:frontend": "node scripts/build-homepage-client.mjs",
52
33
  "build:hyperframes-editor": "cd demo && node scripts/build.mjs",
53
34
  "operator:template-artifact": "node scripts/platform-operator-template-artifact.mjs",
package/.env.example DELETED
@@ -1,60 +0,0 @@
1
- NODE_ENV="development"
2
- PORT="3000"
3
- MOCK_PROVIDER_RESPONSES="false"
4
- MAX_ACTIVE_JOBS_PER_CUSTOMER="30"
5
- PROVIDER_LEASE_INLINE_WAIT_SECONDS="5"
6
- PROVIDER_LEASE_STEP_WAIT_SECONDS="60"
7
- PROVIDER_LEASE_MAX_STEP_WAIT_SECONDS="43200"
8
- MAX_JOB_WALL_CLOCK_SECONDS="86400"
9
-
10
- OPENAI_API_KEY=""
11
- OPENROUTER_API_KEY=""
12
- GEMINI_API_KEY=""
13
- PERPLEXITY_API_KEY=""
14
- GHOSTCUT_KEY=""
15
- GHOSTCUT_SECRET=""
16
-
17
- # Optional. Production CDK wires these automatically. Browser-facing Lambda calls still callback to PUBLIC_BASE_URL for auth.
18
- VIDFARM_ZIP_LAMBDA_URL=""
19
- VIDFARM_ZIP_LAMBDA_SECRET=""
20
- VIDFARM_BILLING_URL=""
21
- VIDFARM_BILLING_SECRET=""
22
- VIDFARM_RATE_LIMITS_TABLE_NAME=""
23
- # Optional production CDK overrides. Leave empty to use deterministic per-account/per-region names.
24
- VIDFARM_STORAGE_S3_BUCKET_NAME=""
25
-
26
- # Optional when calling a hosted Vidfarm API directly.
27
- VIDFARM_USER_ID=""
28
- VIDFARM_API_KEY=""
29
- # Optional director override for production debugging. Send as x-superagency-key.
30
- SUPERAGENCY_KEY=""
31
-
32
- # Optional local overrides. The CLI will choose sensible local defaults.
33
- PUBLIC_BASE_URL="http://localhost:3310"
34
- # Optional public browser-facing chat endpoint. Leave empty locally unless you want the UI to hit a separate chat host directly.
35
- PUBLIC_EDITOR_CHAT_URL=""
36
-
37
- # Optional Sentry setup. SENTRY_DSN powers the Hono Node backend.
38
- # SENTRY_LAMBDA_DSN powers the CDK-managed AWS Lambdas.
39
- # PUBLIC_SENTRY_DSN powers the browser React bundles and may be the same DSN or a separate browser project DSN.
40
- SENTRY_DSN=""
41
- SENTRY_ENVIRONMENT="development"
42
- SENTRY_RELEASE=""
43
- SENTRY_TRACES_SAMPLE_RATE=""
44
- SENTRY_ENABLE_LOGS="true"
45
- SENTRY_SEND_DEFAULT_PII="false"
46
- SENTRY_DEBUG_ROUTE="false"
47
- SENTRY_LAMBDA_DSN=""
48
- SENTRY_LAMBDA_TRACES_SAMPLE_RATE="1.0"
49
- PUBLIC_SENTRY_DSN=""
50
- PUBLIC_SENTRY_TRACES_SAMPLE_RATE=""
51
- PUBLIC_SENTRY_REPLAYS_SESSION_SAMPLE_RATE=""
52
- PUBLIC_SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE=""
53
- PUBLIC_SENTRY_ENABLE_LOGS="true"
54
- PUBLIC_SENTRY_SEND_DEFAULT_PII="true"
55
- PUBLIC_SENTRY_TRACE_PROPAGATION_TARGETS=""
56
- REMOTION_MODE="local"
57
-
58
-
59
- GHOSTCUT_KEY="_________"
60
- GHOSTCUT_SECRET="_________"
@@ -1,275 +0,0 @@
1
- # Auto-Create HyperFrame Templates Harness
2
-
3
- This harness turns a simple MP4, image, or PNG/JPG/WebP slideshow into an editable HyperFrames composition that can be rendered through the production AWS Lambda stack.
4
-
5
- Use this when the desired output is not a Vidfarm operation package, but a decomposed HyperFrames project:
6
-
7
- ```txt
8
- drafts/<format_slug>/
9
- source.md
10
- preview/
11
- source.mp4
12
- composition.html
13
- composition.json
14
- lambda-site.json
15
- ```
16
-
17
- The goal is to make the source editable in the HyperFrames editor while keeping publish behavior faithful. If a user deletes a source video scene, the final render must show a blank/background gap unless another timed layer covers that range. Do not rely on an always-on source video for publish output.
18
-
19
- ## Start Here
20
-
21
- Give a Codex agent these two things:
22
-
23
- 1. this entry file: `auto-create-hyperframe-templates/AUTO_CREATE_HYPERFRAME_TEMPLATES.md`
24
- 2. one source media folder, preferably shaped like:
25
-
26
- ```txt
27
- drafts/<format_slug>/
28
- source.md
29
- preview/
30
- source.mp4
31
- slide-01.png
32
- slide-02.png
33
- ```
34
-
35
- Then ask:
36
-
37
- ```txt
38
- Use auto-create-hyperframe-templates/AUTO_CREATE_HYPERFRAME_TEMPLATES.md as the harness. Analyze drafts/<format_slug>/, create the run artifacts, generate the HyperFrames production graph and template plan, then write composition.html, composition.json, and lambda-site.json.
39
- ```
40
-
41
- For the current local bridge, you can run:
42
-
43
- ```bash
44
- node auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs drafts/<format_slug>/preview/source.mp4
45
- ```
46
-
47
- For a slideshow, pass the folder containing the images:
48
-
49
- ```bash
50
- node auto-create-hyperframe-templates/scripts/create-hyperframe-template.mjs drafts/<format_slug>/preview
51
- ```
52
-
53
- Add `--stage-site` when you want the script to call the production HyperFrames Lambda site upload after writing the local artifacts.
54
-
55
- The source can be:
56
-
57
- - one MP4
58
- - a folder of PNG/JPG/WebP slides
59
- - a mixed folder with source video, screenshots, overlay images, audio, and notes
60
-
61
- If `source.md` is missing, create it with the source URL, adaptation goal, expected audience, and any constraints that can be inferred from the files.
62
-
63
- For programmatic runs, write an input manifest matching `input-manifest.schema.json`:
64
-
65
- ```json
66
- {
67
- "mode": "autocreate-hyperframe-template",
68
- "input_path": "drafts/my-format/preview/source.mp4",
69
- "output_path": "drafts/my-format",
70
- "slug_id": "my-format",
71
- "source_mode": "auto",
72
- "render_defaults": {
73
- "width": 720,
74
- "height": 1280,
75
- "fps": 30
76
- },
77
- "lambda": {
78
- "stack_name": "hyperframes-vidfarm-prod",
79
- "region": "us-east-1",
80
- "memory_strategy": "estimate"
81
- },
82
- "publish": {
83
- "prestage_site": false,
84
- "output_url_policy": "signed_https_final_output_only"
85
- }
86
- }
87
- ```
88
-
89
- ## Output Contract
90
-
91
- Every successful run should produce:
92
-
93
- - `composition.html`: a self-contained HyperFrames composition using deterministic HTML/CSS and timed media elements.
94
- - `composition.json`: the editable editor manifest: source assets, scene cuts, layers, caption geometry, viral/visual DNA, and Lambda estimate.
95
- - `lambda-site.json`: the production Lambda site/render metadata: stack, region, memory estimate, site id if pre-staged, and render defaults.
96
- - optional `frames/contact-sheet.jpg`, `source/ffprobe.json`, `transcripts/stt.json`, `ocr/frame_text.json`, and `motion/scene-cuts.json`.
97
-
98
- The `composition.json` should follow `template-plan.schema.json` after planning. The lower-level extraction artifact should follow `production-graph.schema.json`.
99
-
100
- ## Core Principle
101
-
102
- HyperFrames is the editor and deterministic renderer. The harness should decompose the source into layers that remain individually editable:
103
-
104
- - source video scene clips
105
- - source audio
106
- - images or slide frames
107
- - deterministic captions
108
- - deterministic HTML overlays
109
- - shapes, chips, arrows, circles, masks, UI shells, and stickers
110
- - generated assets only when the visual cannot be rebuilt deterministically
111
-
112
- Important readable text should not be baked into generated media unless the source format is explicitly poster/artifact-native and OCR validation is part of the quality harness.
113
-
114
- ## Timeline Rules
115
-
116
- Use absolute seconds in manifests and data attributes. Convert to frames only at render time.
117
-
118
- Required layer fields:
119
-
120
- - `id`
121
- - `kind`
122
- - `start`
123
- - `duration`
124
- - `track`
125
- - `z`
126
- - `mode`
127
- - `source_of_truth`
128
- - `geometry`
129
- - `viral_alignment`
130
-
131
- For video decomposition, split source video into scene layers:
132
-
133
- ```json
134
- {
135
- "id": "scene-2",
136
- "kind": "video",
137
- "start": 3.567,
138
- "duration": 3.033,
139
- "track": 0,
140
- "z": 0,
141
- "mode": "both",
142
- "media": {
143
- "src": "/drafts/example/source.mp4",
144
- "media_start": 3.567,
145
- "fit": "cover"
146
- }
147
- }
148
- ```
149
-
150
- For publish correctness, timed video scene layers should become real timed media layers or publish-time timeline proxies that are rewritten into real timed media. A preview-only playback source may exist for editor scrubbing, but it must be ignored or normalized out during publish.
151
-
152
- Blank gaps are valid. If no layer covers a time range, render the composition background for that range.
153
-
154
- ## Slideshow Rules
155
-
156
- For an image slideshow, create one timed image layer per slide:
157
-
158
- ```json
159
- {
160
- "id": "slide-01-image",
161
- "kind": "image",
162
- "start": 0,
163
- "duration": 3,
164
- "track": 0,
165
- "z": 0,
166
- "mode": "both",
167
- "media": {
168
- "src": "/drafts/example/slide-01.png",
169
- "fit": "cover"
170
- }
171
- }
172
- ```
173
-
174
- Caption text should be separate `caption` or `html` layers unless the source is intentionally a flattened image/poster template.
175
-
176
- ## Caption And Overlay Rules
177
-
178
- Captions are deterministic layout, not an afterthought. Record:
179
-
180
- - font family and fallback
181
- - font weight
182
- - font size in px at the target composition size
183
- - line height
184
- - max width
185
- - x/y/width/height in percentages
186
- - text alignment
187
- - safe-area constraints
188
- - outline, radial halo, shadow, or inline highlight chip behavior
189
- - whether text can wrap and how many lines are allowed
190
-
191
- Caption positions must account for TikTok/Reels unsafe zones. For vertical 9:16 output, preserve:
192
-
193
- - top 8-12 percent for app chrome risk
194
- - right 12-16 percent for action buttons
195
- - bottom 14-20 percent for username, caption, and scrubber risk
196
- - center subject-safe zone when faces/products matter
197
-
198
- Use inline chips that hug measured wrapped lines when the source has caption backgrounds. Do not turn inline chips into full-width bars or large paragraph washes.
199
-
200
- For white TikTok-native captions, prefer a radial halo or outline. Avoid a single directional web drop shadow when the source uses a native black glyph halo.
201
-
202
- For multiline captions, wrap once, choose one shared font size and line height, render one block, then measure per-line chips after layout. Do not render each wrapped line as an independently trimmed text image.
203
-
204
- ## Lambda Memory Estimate
205
-
206
- Each plan must include a `lambda_memory_estimate` with:
207
-
208
- - `recommended_memory_mb`
209
- - `confidence`
210
- - `complexity_scores`
211
- - `rationale`
212
- - `risk_flags`
213
- - `benchmark_override`
214
-
215
- Default to `3072` MB for ordinary 720x1280 or 1080x1920 social-video compositions with one active video stream and deterministic overlays. Use `2048` MB only for static/slideshow/simple 720p outputs or after local evidence that video decode is light. Use `4096` MB for 1080p video, multiple simultaneous videos, heavy DOM/caption effects, or long audio mixing. Reserve `6144+` MB for high-resolution or failure-prone compositions.
216
-
217
- Do not default to `10240` MB. Use it only after timeouts, Chromium memory failures, or a measured case that requires it.
218
-
219
- See `lambda-memory-estimator.md` for the scoring rubric.
220
-
221
- ## Production Lambda Site
222
-
223
- The generated plan should be ready for the deployed production Lambda stack:
224
-
225
- - stack: `hyperframes-vidfarm-prod`
226
- - default region: `us-east-1`
227
- - default memory: `3072`
228
- - output policy: frontend should show only the final downloadable/signed output URL, not AWS console links that require login
229
-
230
- For repeat publishing, pre-stage the project as a Lambda site and write `lambda-site.json`:
231
-
232
- ```json
233
- {
234
- "schema": "vidfarm.hyperframe.lambda-site.v1",
235
- "stack_name": "hyperframes-vidfarm-prod",
236
- "region": "us-east-1",
237
- "site_id": "content-addressed-site-id",
238
- "project_dir": "drafts/example",
239
- "composition_file": "composition.html",
240
- "memory_mb": 3072,
241
- "render_defaults": {
242
- "width": 720,
243
- "height": 1280,
244
- "fps": 30
245
- },
246
- "output_url_policy": "signed_https_final_output_only"
247
- }
248
- ```
249
-
250
- If the site has not been uploaded yet, set `site_id` to `null` and include `site_upload_command` or `site_upload_api`.
251
-
252
- ## Pipeline
253
-
254
- 1. Intake source media and notes.
255
- 2. Extract `ffprobe`, contact sheet, scene cuts, OCR, transcript, and simple layout/subject regions.
256
- 3. Generate `production_graph.json` with `extractor-system-prompt.md`.
257
- 4. Generate `template_plan.json` with `template-planner-prompt.md`.
258
- 5. Write `composition.html`, `composition.json`, and `lambda-site.json`.
259
- 6. Validate locally in the editor.
260
- 7. Stage the project with the production Lambda site flow.
261
- 8. Publish through Lambda and verify the final output URL.
262
-
263
- ## Required Validation
264
-
265
- Before publishing:
266
-
267
- - every timed layer has non-negative `start` and positive `duration`
268
- - no two editable layers overlap on the same track unless the track is intentionally composited
269
- - scene video layers use `media_start`/`playbackStart` rather than an always-on background dependency
270
- - deleting a scene removes that visual range from publish output
271
- - captions are legible at phone size
272
- - caption boxes avoid unsafe TikTok/Reels zones unless the source intentionally uses them
273
- - source audio and source video are separate layers when audio is reused continuously
274
- - Lambda memory estimate has a concrete rationale
275
- - `lambda-site.json` does not contain credentials
@@ -1,128 +0,0 @@
1
- # HyperFrames Production Graph Extractor Prompt
2
-
3
- You are a HyperFrames production analyst.
4
-
5
- Your job is to inspect one MP4, screenshot set, or PNG/JPG/WebP slideshow and extract the repeatable HyperFrames production process as structured JSON. Do not merely describe the media. Convert it into an editable composition graph that can become `composition.html`, `composition.json`, and a production Lambda site.
6
-
7
- Return only JSON matching `production-graph.schema.json`.
8
-
9
- ## Inputs You May Receive
10
-
11
- - source notes
12
- - source video or slides
13
- - contact sheet
14
- - representative frames
15
- - ffprobe metadata
16
- - scene cut list
17
- - STT transcript with word timestamps
18
- - OCR text from frames
19
- - layout analysis with bounding boxes
20
- - existing `composition.html` or `composition.json`
21
- - desired output dimensions and fps
22
-
23
- ## Extraction Rules
24
-
25
- - Treat all supplied media as one reusable HyperFrames format.
26
- - Separate source media, deterministic overlays, captions, audio, and generated assets.
27
- - Identify which visual surfaces are editable layers and which are source-media content.
28
- - Important readable text should default to deterministic HTML/caption layers, not baked generated media.
29
- - Extract exact or inferred timing for scenes, slides, captions, overlays, transitions, zooms, holds, and loop points.
30
- - Record source media slices with `media_start` when a layer uses a segment from a longer MP4.
31
- - Preserve blank gaps as intentional timeline ranges when no layer should be visible.
32
- - Do not depend on an always-on source video for publish correctness. Preview playback sources are allowed only as editor affordances.
33
- - Distinguish `mode: "both"`, `mode: "editor"`, and `mode: "publish"`.
34
- - Use percent geometry for layer placement: `x`, `y`, `width`, `height`.
35
- - Use seconds for `start`, `duration`, `media_start`, and `media_end`.
36
- - Track source audio separately from source video if audio should continue across scene cuts.
37
- - Keep one editable timeline track collision-free unless the track is explicitly marked as composited.
38
- - Identify caption safe areas and collisions with TikTok/Reels chrome.
39
- - Record Lambda memory estimate inputs: resolution, duration, active video streams, source resolution, layer count, DOM complexity, effects, audio mixing, and known risk flags.
40
-
41
- ## Required Analysis Dimensions
42
-
43
- Extract:
44
-
45
- - format summary and source mode
46
- - output dimensions, fps, and total duration
47
- - source asset inventory
48
- - scene or slide timeline
49
- - layer decomposition
50
- - deterministic caption and text surfaces
51
- - HTML overlay surfaces
52
- - media replacement slots
53
- - audio plan
54
- - safe areas and subject bounds
55
- - caption positioning and wrapping rules
56
- - visual rules that must survive adaptation
57
- - editable controls
58
- - generated asset needs, if any
59
- - Lambda memory estimate
60
- - production Lambda site readiness
61
- - validation checklist
62
-
63
- ## Layer Classification
64
-
65
- For every meaningful visual or audio element choose one kind:
66
-
67
- - `video`: timed video layer or scene slice
68
- - `image`: timed image/slide layer
69
- - `audio`: timed audio layer
70
- - `caption`: text intended as subtitle/creator caption
71
- - `html`: custom deterministic HTML overlay, UI card, comment, notification, or app shell
72
- - `shape`: non-text geometric layer
73
- - `effect`: deterministic transform/filter/mask/highlight
74
-
75
- For every layer choose one source of truth:
76
-
77
- - `source_media`: the original media asset is the visual/audio content
78
- - `deterministic_html`: HTML/CSS/text is the source of truth
79
- - `generated_asset`: AI/generated media is the source of truth
80
- - `user_asset`: caller-provided replacement asset is required
81
- - `computed_effect`: derived motion, mask, crop, zoom, or highlight
82
-
83
- ## Caption Rules
84
-
85
- Strongly identify typography:
86
-
87
- - font family match
88
- - fallback font stack
89
- - font weight
90
- - case
91
- - color
92
- - outline, stroke, radial halo, shadow
93
- - background chip style
94
- - line wrapping
95
- - line height
96
- - alignment
97
- - safe area
98
- - phone-size legibility
99
-
100
- When captions have colored backgrounds, classify them as inline highlight chips unless the source clearly uses a panel. Chips must hug measured wrapped lines.
101
-
102
- When captions are white TikTok-native captions, distinguish radial black halo/outline from a web-style directional shadow.
103
-
104
- For multiline captions, require one shared font size and line height for the block. Do not recommend per-line rendered images.
105
-
106
- ## Lambda Memory Estimate Rules
107
-
108
- Estimate memory from composition complexity, not vibes.
109
-
110
- Use these defaults:
111
-
112
- - `2048` MB for static/slideshow/simple image compositions with low DOM complexity.
113
- - `3072` MB for standard 720x1280 or 1080x1920 social video with one active video stream and deterministic overlays.
114
- - `4096` MB for 1080p video, multiple active videos, heavy captions, masks, filters, or long audio.
115
- - `6144` MB or higher only when high resolution, many simultaneous layers, or prior failures justify it.
116
-
117
- Return both a recommendation and a confidence. Include benchmark guidance only when the source sits near a threshold.
118
-
119
- ## Output Bias
120
-
121
- Be concrete. A production graph should be implementable.
122
-
123
- Bad: "Add captions around the video."
124
-
125
- Good: "Render a 2-line white TikTok Sans Semibold caption block at x=8, y=42, width=84, height=14, fontSize=46, lineHeight=1.08, black radial halo, max 18 chars per line, timed 0.0-2.4s."
126
-
127
- Publish correctness bias: if a source video is split into scenes, every scene must be its own timed layer or publish proxy. Deleting scene 2 must delete scene 2 from the final render.
128
-
@@ -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
-