stillmade-sdk 0.1.42 → 0.1.44

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 (262) hide show
  1. package/.stillmade/sdk-baseline.json +6 -8
  2. package/AGENTS.md +15 -10
  3. package/FRAME_VIEWS.md +113 -0
  4. package/INTERFACE_DESIGN.md +62 -22
  5. package/MOBILE_UI.md +4 -2
  6. package/MODULES.md +152 -6
  7. package/PASTE_TO_LLM.md +35 -25
  8. package/README.md +3 -2
  9. package/SDK.md +994 -550
  10. package/UI_AESTHETIC.md +22 -2
  11. package/blocks/generate/package.js +1 -0
  12. package/blocks/generate/versions/1.0.0/package.js +463 -0
  13. package/docs/build/audio-to-editor.md +36 -0
  14. package/docs/build/block-builder-contract.md +150 -0
  15. package/docs/build/comfyui.md +227 -0
  16. package/docs/build/concepts.md +40 -0
  17. package/docs/build/context.md +159 -0
  18. package/docs/build/cookbook.md +57 -0
  19. package/docs/build/custom-interface.md +617 -0
  20. package/docs/build/data-types.md +83 -0
  21. package/docs/build/frame-views.md +259 -0
  22. package/docs/build/generate-media.md +59 -0
  23. package/docs/build/github-applications.md +314 -0
  24. package/docs/build/hosted-images.md +214 -0
  25. package/docs/build/hosted-music.md +39 -0
  26. package/docs/build/hosted-speech.md +157 -0
  27. package/docs/build/hosted-text.md +246 -0
  28. package/docs/build/image-description.md +49 -0
  29. package/docs/build/interface-design.md +343 -0
  30. package/docs/build/javascript.md +63 -0
  31. package/docs/build/local-preview.md +61 -0
  32. package/docs/build/media-analysis.md +27 -0
  33. package/docs/build/media.md +400 -0
  34. package/docs/build/mobile-ui.md +106 -0
  35. package/docs/build/modules.md +487 -0
  36. package/docs/build/original-blocks.md +70 -0
  37. package/docs/build/outside-apis.md +128 -0
  38. package/docs/build/production-context-templates.md +12 -0
  39. package/docs/build/project-storage.md +94 -0
  40. package/docs/build/quickstart.md +48 -0
  41. package/docs/build/recipes.md +103 -0
  42. package/docs/build/script-handoff.md +45 -0
  43. package/docs/build/script-writer.md +34 -0
  44. package/docs/build/state.md +223 -0
  45. package/docs/build/testing.md +112 -0
  46. package/docs/build/timeline-edits.md +116 -0
  47. package/docs/build/timeline-proposals.md +76 -0
  48. package/docs/build/transcription.md +59 -0
  49. package/docs/build/triggers.md +59 -0
  50. package/docs/build/tutorial.md +52 -0
  51. package/docs/build/typescript.md +34 -0
  52. package/docs/build/video-generation.md +61 -0
  53. package/docs/build/web-reading.md +37 -0
  54. package/docs/build/with-your-ai.md +27 -0
  55. package/docs/changelog.md +9 -0
  56. package/docs/creators.md +21 -0
  57. package/docs/distribute/discovery.md +43 -0
  58. package/docs/distribute/imports.md +58 -0
  59. package/docs/distribute/publishing.md +29 -0
  60. package/docs/distribute/sdk-versions.md +36 -0
  61. package/docs/distribute/selling.md +14 -0
  62. package/docs/distribute/teams.md +60 -0
  63. package/docs/distribute/versioning.md +28 -0
  64. package/docs/examples.md +23 -0
  65. package/docs/gallery.md +26 -0
  66. package/docs/index.md +50 -0
  67. package/docs/native-mcp.md +307 -0
  68. package/docs/project-types/automation.md +43 -0
  69. package/docs/project-types/batches.md +50 -0
  70. package/docs/project-types/build.md +42 -0
  71. package/docs/project-types/completion.md +15 -0
  72. package/docs/project-types/conditions.md +21 -0
  73. package/docs/project-types/hosted-review.md +115 -0
  74. package/docs/project-types/onboarding.md +75 -0
  75. package/docs/project-types/running.md +309 -0
  76. package/docs/project-types/testing.md +72 -0
  77. package/docs/reference/application-artifacts.md +87 -0
  78. package/docs/reference/authoring-guide.md +134 -0
  79. package/docs/reference/browser-applications.md +267 -0
  80. package/docs/reference/capabilities.md +45 -0
  81. package/docs/reference/cli.md +71 -0
  82. package/docs/reference/connection-api.md +59 -0
  83. package/docs/reference/cooperative-jobs.md +13 -0
  84. package/docs/reference/desktop-capabilities.md +172 -0
  85. package/docs/reference/desktop-execution.md +77 -0
  86. package/docs/reference/errors.md +233 -0
  87. package/docs/reference/execution.md +800 -0
  88. package/docs/reference/first-party-blocks.md +40 -0
  89. package/docs/reference/generation-models.md +59 -0
  90. package/docs/reference/limits.md +306 -0
  91. package/docs/reference/manifest-kinds-controls.md +36 -0
  92. package/docs/reference/manifest.md +181 -0
  93. package/docs/reference/operations.md +36 -0
  94. package/docs/reference/package-jobs.md +35 -0
  95. package/docs/reference/parity.md +55 -0
  96. package/docs/reference/permissions.md +86 -0
  97. package/docs/reference/ports.md +26 -0
  98. package/docs/reference/types.md +268 -0
  99. package/docs/reference/universal-resolver.md +303 -0
  100. package/docs/reference/view-bridge.md +60 -0
  101. package/docs/reference/view-rules.md +15 -0
  102. package/docs/reference/workspace-sync.md +25 -0
  103. package/docs/sdk.md +34 -0
  104. package/docs/tools/block-remix.md +211 -0
  105. package/docs/tools/llm.md +2213 -0
  106. package/docs/tools/repository-adaptation.md +613 -0
  107. package/examples/check-clip.stillmade.json +4 -1
  108. package/examples/generate-video.stillmade.json +6 -2
  109. package/examples/research-topic.stillmade.json +5 -1
  110. package/examples/text-workflow.stillmade.json +3 -32
  111. package/examples/timeline-polish.stillmade.json +11 -3
  112. package/examples/transcribe-audio.stillmade.json +11 -3
  113. package/package.json +1 -1
  114. package/packages/block-cli/cli.js +13 -6
  115. package/packages/block-cli/dev-host/assets/host.js +76 -38
  116. package/packages/block-cli/dev-host/assets/index.css +1 -1
  117. package/packages/block-cli/format.js +1 -1
  118. package/packages/block-cli/templates.js +31 -13
  119. package/packages/block-cli/type-packages.js +119 -0
  120. package/packages/block-platform/block-readiness.js +5 -0
  121. package/packages/block-platform/canvas.js +2 -1
  122. package/packages/block-platform/catalog.js +27 -48
  123. package/packages/block-platform/native-host-inventory.js +0 -226
  124. package/packages/block-platform/plain-descriptions.js +1 -25
  125. package/packages/block-platform/project-type-starters.js +13 -53
  126. package/packages/block-platform/script-handoff.js +2 -4
  127. package/packages/block-platform/type-workspace.js +2 -0
  128. package/packages/block-sdk/appearance.js +3 -1
  129. package/packages/block-sdk/block-tier.js +1 -1
  130. package/packages/block-sdk/builder-contract.js +10 -8
  131. package/packages/block-sdk/capabilities.js +1 -1
  132. package/packages/block-sdk/contracts.js +6 -2
  133. package/packages/block-sdk/first-party-identities.js +1 -84
  134. package/packages/block-sdk/first-party-packages.js +3 -85
  135. package/packages/block-sdk/generation-catalog.js +15 -3
  136. package/packages/block-sdk/index.d.ts +2 -1
  137. package/packages/block-sdk/media-analysis-example.js +1 -1
  138. package/packages/block-sdk/mock-host.js +7 -1
  139. package/packages/block-sdk/module-host-calls.js +35 -10
  140. package/packages/block-sdk/module-hosted.js +15 -2
  141. package/packages/block-sdk/module-media-access.js +71 -0
  142. package/packages/block-sdk/module-node.js +1 -1
  143. package/packages/block-sdk/portable-media-actions.js +1 -1
  144. package/packages/block-sdk/runtime.js +1 -1
  145. package/packages/block-sdk/timeline-proposal-example.js +1 -1
  146. package/packages/block-sdk/transcription-example.js +1 -1
  147. package/packages/block-sdk/video-generation-example.js +1 -1
  148. package/packages/block-sdk/view-bridge.js +4 -1
  149. package/packages/block-sdk/view-design.js +17 -14
  150. package/packages/block-sdk/web-example.js +1 -1
  151. package/packages/design-system/block-kit.css +48 -12
  152. package/packages/design-system/block-kit.html +3 -2
  153. package/blocks/mcp-motion-planner/versions/1.1.0/package.js +0 -97
  154. package/blocks/motion-designer/versions/1.0.1/package.js +0 -173318
  155. package/blocks/motion-designer/versions/1.0.2/package.js +0 -173318
  156. package/blocks/motion-frame-review/versions/1.1.1/package.js +0 -465
  157. package/blocks/motion-frame-review/versions/1.1.2/package.snapshot.js +0 -572
  158. package/blocks/narration/package.js +0 -1
  159. package/blocks/narration/versions/1.0.0/package.js +0 -221
  160. package/blocks/narration/versions/1.0.1/package.js +0 -221
  161. package/blocks/native/sm.animated-scene/versions/2.0.0/package.js +0 -475
  162. package/blocks/native/sm.animated-scene/versions/2.1.0/package.js +0 -498
  163. package/blocks/native/sm.animated-scene/versions/2.2.0/package.js +0 -524
  164. package/blocks/native/sm.animated-scene/versions/2.3.0/package.js +0 -618
  165. package/blocks/native/sm.animated-scene/versions/2.3.1/package.js +0 -618
  166. package/blocks/native/sm.animated-scene/versions/2.3.2/package.js +0 -723
  167. package/blocks/native/sm.animated-scene/versions/2.3.3/package.js +0 -723
  168. package/blocks/native/sm.animated-scene/versions/2.3.4/package.js +0 -676
  169. package/blocks/native/sm.animated-scene/versions/2.3.5/package.js +0 -693
  170. package/blocks/native/sm.animated-scene/versions/2.3.6/package.js +0 -700
  171. package/blocks/native/sm.animated-scene/versions/2.3.7/package.js +0 -747
  172. package/blocks/native/sm.animated-scene/versions/2.3.8/package.js +0 -769
  173. package/blocks/native/sm.animated-scene/versions/2.3.9/package.js +0 -769
  174. package/blocks/native/sm.animated-scene-assistant/versions/1.0.0/package.js +0 -183
  175. package/blocks/native/sm.blueprint/versions/2.0.0/package.js +0 -358
  176. package/blocks/native/sm.blueprint/versions/2.1.0/package.js +0 -358
  177. package/blocks/native/sm.blueprint/versions/2.1.1/package.js +0 -358
  178. package/blocks/native/sm.blueprint/versions/2.1.2/package.js +0 -358
  179. package/blocks/native/sm.blueprint/versions/2.1.3/package.js +0 -381
  180. package/blocks/native/sm.blueprint/versions/2.1.4/package.js +0 -381
  181. package/blocks/native/sm.blueprint/versions/2.1.5/package.js +0 -339
  182. package/blocks/native/sm.blueprint/versions/2.1.6/package.js +0 -356
  183. package/blocks/native/sm.blueprint/versions/2.1.7/package.js +0 -363
  184. package/blocks/native/sm.blueprint/versions/2.1.8/package.js +0 -410
  185. package/blocks/native/sm.blueprint/versions/2.1.9/package.js +0 -422
  186. package/blocks/native/sm.blueprint-assistant/versions/1.0.0/package.js +0 -172
  187. package/blocks/native/sm.chat/versions/2.0.0/package.js +0 -144
  188. package/blocks/native/sm.chat/versions/2.0.1/package.js +0 -97
  189. package/blocks/native/sm.chat/versions/2.0.2/package.js +0 -100
  190. package/blocks/native/sm.chat/versions/2.0.3/package.js +0 -100
  191. package/blocks/native/sm.continue-if/versions/1.0.0/package.js +0 -168
  192. package/blocks/native/sm.describe-media/versions/2.0.0/package.js +0 -153
  193. package/blocks/native/sm.describe-media/versions/2.0.1/package.js +0 -156
  194. package/blocks/native/sm.describe-media/versions/2.1.0/package.js +0 -140
  195. package/blocks/native/sm.image-editor/versions/2.0.0/package.js +0 -183
  196. package/blocks/native/sm.image-editor/versions/2.0.1/package.js +0 -190
  197. package/blocks/native/sm.new-items/versions/1.0.0/package.js +0 -191
  198. package/blocks/native/sm.pick-photos/versions/1.0.0/package.js +0 -334
  199. package/blocks/native/sm.quality-audit/versions/1.0.0/package.js +0 -192
  200. package/blocks/native/sm.quality-audit/versions/1.0.1/package.js +0 -192
  201. package/blocks/native/sm.quality-audit/versions/1.0.2/package.js +0 -195
  202. package/blocks/native/sm.research/versions/2.0.0/package.js +0 -175
  203. package/blocks/native/sm.research/versions/2.0.1/package.js +0 -184
  204. package/blocks/native/sm.research/versions/2.0.2/package.js +0 -187
  205. package/blocks/native/sm.script/versions/2.0.0/package.js +0 -144
  206. package/blocks/native/sm.script/versions/2.1.0/package.js +0 -144
  207. package/blocks/native/sm.script/versions/2.1.1/package.js +0 -144
  208. package/blocks/native/sm.script/versions/2.1.2/package.js +0 -105
  209. package/blocks/native/sm.script/versions/2.1.3/package.js +0 -152
  210. package/blocks/native/sm.script/versions/2.1.4/package.js +0 -156
  211. package/blocks/native/sm.script/versions/2.1.5/package.js +0 -156
  212. package/blocks/native/sm.shot-plan/versions/2.0.0/package.js +0 -301
  213. package/blocks/native/sm.shot-plan/versions/2.1.0/package.js +0 -528
  214. package/blocks/native/sm.shot-plan/versions/2.1.1/package.js +0 -528
  215. package/blocks/native/sm.shot-plan/versions/2.1.2/package.js +0 -528
  216. package/blocks/native/sm.shot-plan/versions/2.1.3/package.js +0 -536
  217. package/blocks/native/sm.shot-plan/versions/2.2.0/package.js +0 -800
  218. package/blocks/native/sm.shot-plan/versions/2.2.1/package.js +0 -920
  219. package/blocks/native/sm.shot-plan-assistant/versions/1.0.0/package.js +0 -173
  220. package/blocks/native/sm.stock-search/versions/2.0.0/package.js +0 -174
  221. package/blocks/native/sm.thumbnail/versions/2.0.0/package.js +0 -137
  222. package/blocks/native/sm.thumbnail/versions/2.0.1/package.js +0 -140
  223. package/blocks/native/sm.transcribe/versions/2.0.0/package.js +0 -163
  224. package/blocks/native/sm.transcribe/versions/2.0.1/package.js +0 -168
  225. package/blocks/native/sm.whiteboard-assistant/versions/1.0.0/package.js +0 -175
  226. package/blocks/native/sm.youtube/versions/2.0.0/package.js +0 -217
  227. package/blocks/occasion-story/package.js +0 -1
  228. package/blocks/occasion-story/versions/1.0.0/package.js +0 -1658
  229. package/blocks/occasion-story/versions/1.0.1/package.js +0 -1699
  230. package/blocks/occasion-story/versions/1.0.2/package.js +0 -1682
  231. package/blocks/photo-reel-composer/versions/1.0.0/package.js +0 -3043
  232. package/blocks/photo-reel-composer/versions/1.0.1/package.js +0 -3026
  233. package/blocks/photo-reel-composer/versions/1.0.2/package.js +0 -4149
  234. package/blocks/product-ad-variants/versions/1.0.0/package.js +0 -2911
  235. package/blocks/product-launch-director/versions/1.0.0/package.js +0 -103
  236. package/blocks/release-visuals/package.js +0 -1
  237. package/blocks/release-visuals/versions/1.0.0/package.js +0 -1492
  238. package/blocks/release-visuals/versions/1.0.1/package.js +0 -1517
  239. package/blocks/release-visuals/versions/1.0.2/package.js +0 -1500
  240. package/blocks/screen-recorder/package.js +0 -1
  241. package/blocks/screen-recorder/versions/1.0.0/package.js +0 -223
  242. package/blocks/screen-recorder/versions/1.0.1/package.js +0 -223
  243. package/blocks/short-form-finish/package.js +0 -1
  244. package/blocks/short-form-finish/versions/1.0.0/package.js +0 -1043
  245. package/blocks/short-form-finish/versions/1.0.1/package.js +0 -1043
  246. package/blocks/short-form-finish/versions/1.0.2/package.js +0 -1043
  247. package/blocks/short-form-finish/versions/1.0.3/package.js +0 -1026
  248. package/examples/saas-product-launch-reviewed-source.stillmade.json +0 -383
  249. package/examples/saas-product-launch.stillmade.json +0 -304
  250. package/packages/block-platform/dealer-inventory-video-project-type.js +0 -38
  251. package/packages/block-platform/first-revenue-project-types.js +0 -46
  252. package/packages/block-platform/fixture-starters.js +0 -13
  253. package/packages/block-platform/launch-project-source.js +0 -10
  254. package/packages/block-platform/launch-project.js +0 -30
  255. package/packages/block-platform/motion-project-types.js +0 -55
  256. package/packages/block-platform/motion-starters.js +0 -14
  257. package/packages/block-platform/product-ad-variants-project-type.js +0 -30
  258. package/packages/block-platform/product-launch-updated.js +0 -90
  259. package/packages/block-platform/revenue-review-project-types.js +0 -36
  260. package/packages/block-platform/revenue-review-starters.js +0 -13
  261. package/packages/block-platform/script-writer.js +0 -29
  262. package/packages/block-platform/website-source-block.js +0 -14
@@ -1,339 +0,0 @@
1
- // Generated by scripts/build-owned-blocks.mjs. Edit the owned source files.
2
- export default {
3
- "manifest": {
4
- "schemaVersion": 1,
5
- "sdkVersion": "0.1.0",
6
- "id": "sm.blueprint",
7
- "version": "2.1.5",
8
- "name": "Blueprint",
9
- "description": "Edit, structure, lock, and review assisted changes to the complete production Blueprint before exact save and downstream handoff.",
10
- "kind": "workspace",
11
- "runtime": "javascript",
12
- "entry": "src/run.js",
13
- "license": "MIT",
14
- "provenance": {
15
- "notice": "MIT License\n\nCopyright (c) 2026 StillMade contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n"
16
- },
17
- "inputs": {
18
- "blueprint": {
19
- "type": "bible",
20
- "context": "blueprint",
21
- "primary": true,
22
- "required": false,
23
- "default": {
24
- "schemaVersion": 1
25
- },
26
- "description": "The complete current project blueprint. Unknown and future fields are retained unchanged."
27
- },
28
- "updatedBlueprint": {
29
- "type": "bible",
30
- "required": false,
31
- "default": {
32
- "schemaVersion": 1
33
- },
34
- "description": "The complete edited blueprint prepared by this Block's workspace."
35
- },
36
- "commit": {
37
- "type": "boolean",
38
- "default": false,
39
- "description": "Prepare the edited document for StillMade review and Apply."
40
- },
41
- "assistantEdit": {
42
- "type": "workspace-edit",
43
- "required": false,
44
- "description": "An exact Blueprint proposal from a connected workspace.propose assistant Block. It remains reviewable before local adoption and final Apply."
45
- }
46
- },
47
- "outputs": {
48
- "blueprint": {
49
- "type": "bible",
50
- "primary": true,
51
- "role": "production_blueprint",
52
- "description": "The complete edited blueprint for the next Step."
53
- },
54
- "edit": {
55
- "type": "workspace-edit",
56
- "description": "An exact before/after Blueprint change reviewed before it updates the project."
57
- },
58
- "shotPlan": {
59
- "type": "shot-plan",
60
- "role": "shot_plan_handoff",
61
- "description": "A deterministic Shots document derived from the edited Blueprint scenes and shot lists for a downstream Shots or Animated Scene Step."
62
- }
63
- },
64
- "permissions": {
65
- "project": [
66
- "context.blueprint.read",
67
- "workspace.blueprint.propose"
68
- ],
69
- "network": [],
70
- "filesystem": [],
71
- "secrets": []
72
- },
73
- "ui": [],
74
- "platforms": {
75
- "phone": {
76
- "supported": true
77
- },
78
- "browser": {
79
- "supported": true
80
- },
81
- "desktop": {
82
- "supported": true
83
- }
84
- }
85
- },
86
- "code": "const copy = value => JSON.parse(JSON.stringify(value));\nconst source = copy(input.blueprint || {schemaVersion: 1});\nconst candidate = input.commit ? copy(input.updatedBlueprint) : copy(source);\nif (!candidate || Array.isArray(candidate) || candidate.schemaVersion !== 1) {\n throw new Error('Keep the complete version 1 Blueprint document.');\n}\nconst title = typeof candidate.title === 'string' && candidate.title.trim()\n ? `Update Blueprint: ${candidate.title.trim().slice(0, 160)}`\n : 'Update production Blueprint';\nconst seconds = value => {\n const number = Number(value);\n if (Number.isFinite(number) && number > 0) return number;\n const match = String(value || '').match(/\\d+(?:\\.\\d+)?/);\n return match ? Math.max(.001, Number(match[0])) : 4;\n};\nlet cursor = 0;\nconst shots = [];\nfor (const [sceneIndex, scene] of (Array.isArray(candidate.scenes) ? candidate.scenes : []).entries()) {\n const narration = (Array.isArray(candidate.voiceover) ? candidate.voiceover : []).find(line => line?.sceneId && line.sceneId === scene?.id)?.text || '';\n for (const [shotIndex, sourceShot] of (Array.isArray(scene?.shotList) ? scene.shotList : []).entries()) {\n const shot = copy(sourceShot || {});\n const start = Number.isFinite(Number(shot.startTime)) ? Number(shot.startTime) : cursor;\n const duration = Number.isFinite(Number(shot.endTime)) && Number(shot.endTime) > start\n ? Number(shot.endTime) - start\n : seconds(shot.intendedDuration || shot.generationLength);\n const end = start + duration;\n shots.push({...shot,id:String(shot.id || `scene-${sceneIndex + 1}-shot-${shotIndex + 1}`),sceneId:String(scene?.id || scene?.sceneId || `scene-${sceneIndex + 1}`),sceneTitle:String(scene?.title || ''),startTime:start,endTime:end,voiceoverText:String(shot.voiceoverText || narration)});\n cursor = Math.max(cursor, end);\n }\n}\nreturn {\n blueprint: candidate,\n shotPlan: {schemaVersion: 1, shots},\n edit: {schemaVersion: 1, title, field: 'blueprint', before: source, after: candidate}\n};\n",
87
- "view": {
88
- "html": "<main class=\"blueprint-workspace\">\n <header>\n <div><small>Production workspace</small><h1>Blueprint</h1></div>\n <div class=\"actions\"><button id=\"undo\" type=\"button\" class=\"secondary\">Undo</button><button id=\"redo\" type=\"button\" class=\"secondary\">Redo</button><button id=\"tidy\" type=\"button\" class=\"secondary\">Tidy structure</button><button id=\"lock\" type=\"button\" class=\"secondary\">Lock editing</button><button id=\"reset\" type=\"button\" class=\"secondary\">Reset changes</button><button id=\"save\" type=\"button\" data-stillmade-action=\"run\">Review changes</button></div>\n </header>\n <output id=\"status\" role=\"status\" aria-live=\"polite\">Loading the project Blueprint…</output>\n <section><div class=\"section-title\"><h2>Assistant proposal</h2><button id=\"applyAssistant\" type=\"button\" class=\"secondary\">Apply proposal locally</button></div><div id=\"assistantProposal\"></div></section>\n <section class=\"handoff\"><h2>Shots handoff</h2><p id=\"handoffSummary\">Scene shot lists become a typed Shots document for the next Step.</p><button id=\"prepareShots\" type=\"button\" class=\"secondary\">Prepare Shots handoff</button></section>\n\n <section>\n <h2>Project overview</h2>\n <div class=\"grid two\">\n <label>Title<input id=\"title\" type=\"text\"></label>\n <label>Video type<input id=\"videoType\" type=\"text\"></label>\n <label>Target length<input id=\"targetLength\" type=\"text\"></label>\n <label>Tone<input id=\"tone\" type=\"text\"></label>\n <label>Aspect ratio<input id=\"aspectRatio\" type=\"text\"></label>\n </div>\n <label>Description<textarea id=\"description\"></textarea></label>\n <label>Extra information<textarea id=\"extraInfo\"></textarea></label>\n </section>\n\n <section>\n <h2>Emotional arc</h2>\n <div class=\"grid two\">\n <label>Beginning<textarea id=\"arcBeginning\"></textarea></label>\n <label>Escalation<textarea id=\"arcEscalation\"></textarea></label>\n <label>Climax<textarea id=\"arcClimax\"></textarea></label>\n <label>Resolution<textarea id=\"arcResolution\"></textarea></label>\n </div>\n </section>\n\n <section>\n <h2>Visual style guide</h2>\n <div class=\"grid two\">\n <label>Color palette<textarea id=\"styleColor\"></textarea></label>\n <label>Lighting tone<textarea id=\"styleLighting\"></textarea></label>\n <label>Camera language<textarea id=\"styleCamera\"></textarea></label>\n <label>Overall aesthetic<textarea id=\"styleAesthetic\"></textarea></label>\n </div>\n </section>\n\n <section><div class=\"section-title\"><h2>Voiceover</h2><button id=\"addVoiceover\" type=\"button\" class=\"secondary\">Add narration</button></div><div id=\"voiceover\" class=\"cards\"></div></section>\n <section><div class=\"section-title\"><h2>Characters</h2><button id=\"addCharacter\" type=\"button\" class=\"secondary\">Add character</button></div><div id=\"characters\" class=\"cards\"></div></section>\n <section><div class=\"section-title\"><h2>Locations</h2><button id=\"addLocation\" type=\"button\" class=\"secondary\">Add location</button></div><div id=\"locations\" class=\"cards\"></div></section>\n <section><div class=\"section-title\"><h2>Scenes and shots</h2><button id=\"addScene\" type=\"button\" class=\"secondary\">Add scene</button></div><div id=\"scenes\" class=\"cards\"></div></section>\n\n <details id=\"advanced\"><summary>Complete Blueprint data</summary><p>All fields are retained. Edit this JSON for fields a custom Blueprint adds beyond the standard workspace.</p><label for=\"raw\">Complete Blueprint JSON</label><textarea id=\"raw\" class=\"raw\" spellcheck=\"false\"></textarea><button id=\"applyRaw\" type=\"button\" class=\"secondary\">Apply JSON to workspace</button></details>\n</main>\n",
89
- "css": ".blueprint-workspace{max-width:1100px;margin:0 auto;padding:8px;color:var(--fg)}\nheader,.section-title,.actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}header{justify-content:space-between;margin-bottom:14px}header h1{margin:2px 0}header small,output,p{color:var(--fg-muted)}\nsection,details{margin:14px 0;padding:16px;border:1px solid var(--border-tok);border-radius:var(--r-3);background:var(--bg-elev-1)}\nh2{margin:0 0 12px;font-size:22px}.section-title{justify-content:space-between}.section-title h2{margin:0}\n.grid{display:grid;gap:12px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}label{display:grid;gap:6px;margin:10px 0;font-size:13px;font-weight:600}textarea{min-height:88px;resize:vertical}input,textarea{width:100%;background:var(--bg)}\n.cards{display:grid;gap:12px}.card{padding:14px;border:1px solid var(--border-tok);border-radius:var(--r-3);background:var(--bg)}.card-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.card h3{margin:0;font-size:16px}.secondary{background:transparent;color:var(--fg)}.danger{background:transparent;color:var(--signal)}\n.shot-list{display:grid;gap:10px;margin-top:12px}.shot{padding:12px;border-left:3px solid var(--border-strong);background:var(--bg-elev-1)}.shot .grid{margin-top:4px}button,input,textarea,summary{min-height:44px}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}\n.raw{min-height:320px;font-family:var(--font-mono);font-size:12px}summary{font-weight:700}output{display:block;min-height:24px;margin:8px 2px}\n@media(max-width:680px){.blueprint-workspace{padding:0}.grid.two{grid-template-columns:1fr}section,details{padding:12px}.actions{width:100%}.actions button{flex:1}}\n",
90
- "javascript": "const fields = {\n title: document.getElementById('title'), description: document.getElementById('description'), videoType: document.getElementById('videoType'),\n targetLength: document.getElementById('targetLength'), tone: document.getElementById('tone'), aspectRatio: document.getElementById('aspectRatio'), extraInfo: document.getElementById('extraInfo')\n};\nconst arc = {beginning:document.getElementById('arcBeginning'),escalation:document.getElementById('arcEscalation'),climax:document.getElementById('arcClimax'),resolution:document.getElementById('arcResolution')};\nconst visual = {colorPalette:document.getElementById('styleColor'),lightingTone:document.getElementById('styleLighting'),cameraLanguage:document.getElementById('styleCamera'),overallAesthetic:document.getElementById('styleAesthetic')};\nconst status = document.getElementById('status'), raw = document.getElementById('raw'), save = document.getElementById('save');\nlet source = {schemaVersion:1}, draft = {schemaVersion:1}, busy = false, dirty = false, locked=false, revision = 0, revisions=[], revisionIndex=-1, assistantEdit=null;\nconst clone = value => JSON.parse(JSON.stringify(value));\nconst text = value => Array.isArray(value) ? value.join(', ') : value === undefined || value === null ? '' : String(value);\nconst control = (label,action,value,multiline=true) => ({tag:'label',text:undefined,children:[{tag:'span',text:label},multiline?{tag:'textarea',action,value:text(value),disabled:busy||locked,label}:{tag:'input',type:'text',action,value:text(value),disabled:busy||locked,label}]});\nconst remove = (action,label) => ({tag:'button',action,text:label,className:'danger',disabled:busy||locked});\nconst card = (title,children,action) => ({tag:'article',className:'card',children:[{tag:'div',className:'card-head',children:[{tag:'h3',text:title},remove(action,'Remove')]},...children]});\nconst actionButton = (action,label) => ({tag:'button',action,text:label,className:'secondary',disabled:busy||locked});\nconst nextId = (prefix,items) => prefix+'-'+String(items.reduce((number,item)=>Math.max(number,Number(String(item && item.id || '').replace(prefix+'-',''))||0),0)+1);\nconst shotCard = (shot,sceneIndex,shotIndex) => ({tag:'article',className:'shot',children:[\n {tag:'div',className:'card-head',children:[{tag:'h3',text:text(shot.id)||'Shot '+String(shotIndex+1)},remove('remove-shot:'+String(sceneIndex)+':'+String(shotIndex),'Remove shot')]},\n {tag:'div',className:'grid two',children:[control('Shot ID','shot-id:'+sceneIndex+':'+shotIndex,shot.id,false),control('Type','shot-type:'+sceneIndex+':'+shotIndex,shot.type,false),control('Camera size','shot-size:'+sceneIndex+':'+shotIndex,shot.cameraSize,false),control('Camera angle','shot-angle:'+sceneIndex+':'+shotIndex,shot.cameraAngle,false),control('Camera movement','shot-movement:'+sceneIndex+':'+shotIndex,shot.cameraMovement || shot.movement,false),control('Duration','shot-duration:'+sceneIndex+':'+shotIndex,shot.intendedDuration,false),control('Generation length','shot-generation:'+sceneIndex+':'+shotIndex,shot.generationLength,false),control('Fulfillment','shot-fulfillment:'+sceneIndex+':'+shotIndex,shot.fulfillmentType,false)]},\n control('Description','shot-description:'+sceneIndex+':'+shotIndex,shot.description),control('Image prompt','shot-image:'+sceneIndex+':'+shotIndex,shot.imagePromptReadable),control('Video prompt','shot-video:'+sceneIndex+':'+shotIndex,shot.videoPromptReadable)\n]});\nconst ensure = () => {\n if(!draft.emotionalArc || Array.isArray(draft.emotionalArc)) draft.emotionalArc={};\n if(!draft.visualStyleGuide || Array.isArray(draft.visualStyleGuide)) draft.visualStyleGuide=clone(draft.visualStyle && !Array.isArray(draft.visualStyle) ? draft.visualStyle : {});\n if(!Array.isArray(draft.voiceover)) draft.voiceover=[];\n if(!Array.isArray(draft.characters)) draft.characters=[];\n if(!Array.isArray(draft.locations)) draft.locations=[];\n if(!Array.isArray(draft.scenes)) draft.scenes=[];\n};\nconst draw = () => {\n ensure();\n fields.title.value=text(draft.title);fields.description.value=text(draft.description);fields.videoType.value=text(draft.videoType);fields.targetLength.value=text(draft.targetLength);fields.tone.value=text(draft.tone);fields.aspectRatio.value=text(draft.aspectRatio);fields.extraInfo.value=text(draft.extraInfo);\n arc.beginning.value=text(draft.emotionalArc.beginning);arc.escalation.value=text(draft.emotionalArc.escalation);arc.climax.value=text(draft.emotionalArc.climax);arc.resolution.value=text(draft.emotionalArc.resolution);\n visual.colorPalette.value=text(draft.visualStyleGuide.colorPalette);visual.lightingTone.value=text(draft.visualStyleGuide.lightingTone);visual.cameraLanguage.value=text(draft.visualStyleGuide.cameraLanguage);visual.overallAesthetic.value=text(draft.visualStyleGuide.overallAesthetic || draft.visualStyleGuide.aesthetic);\n StillMade.render('voiceover',draft.voiceover.map((line,index)=>card(text(line.sceneId)||'Voiceover '+String(index+1),[control('Scene ID','voiceover-scene:'+String(index),line.sceneId,false),control('Speaker','voiceover-speaker:'+String(index),line.characterSpeaking,false),control('Narration','voiceover:'+String(index),line.text)],'remove-voiceover:'+String(index))));\n StillMade.render('characters',draft.characters.map((item,index)=>card(text(item.name)||'Character '+String(index+1),[control('Name','character-name:'+String(index),item.name,false),control('Role','character-role:'+String(index),item.role,false),control('Physical description','character-physical:'+String(index),item.physicalDescription),control('Personality','character-personality:'+String(index),item.personality),control('Notes','character-notes:'+String(index),item.notes)],'remove-character:'+String(index))));\n StillMade.render('locations',draft.locations.map((item,index)=>card(text(item.name)||'Location '+String(index+1),[control('Name','location-name:'+String(index),item.name,false),control('Time of day','location-time:'+String(index),item.timeOfDay,false),control('Visual description','location-visual:'+String(index),item.visualDescription),control('Atmosphere','location-atmosphere:'+String(index),item.atmosphere || item.emotionalAtmosphere)],'remove-location:'+String(index))));\n StillMade.render('scenes',draft.scenes.map((item,index)=>card(text(item.title)||'Scene '+text(item.sceneNumber || index+1),[control('Scene number','scene-number:'+String(index),item.sceneNumber,false),control('Title','scene-title:'+String(index),item.title,false),control('Time of day','scene-time:'+String(index),item.timeOfDay,false),control('Emotional tone','scene-tone:'+String(index),item.emotionalTone,false),control('What happens','scene-action:'+String(index),item.whatHappens || item.action),control('Key visual moment','scene-visual:'+String(index),item.keyVisualMoment),control('Characters','scene-characters:'+String(index),item.charactersPresent),{tag:'div',className:'card-head',children:[{tag:'h3',text:String(item.shotList.length)+' shots'},actionButton('add-shot:'+String(index),'Add shot')]},{tag:'div',className:'shot-list',children:item.shotList.map((shot,shotIndex)=>shotCard(shot,index,shotIndex))}], 'remove-scene:'+String(index))));\n StillMade.render('assistantProposal',assistantEdit?[{tag:'p',text:text(assistantEdit.title||'Blueprint proposal')},{tag:'p',text:assistantEdit.field==='blueprint'?'Ready for local review. Nothing changes until you apply it here, then use Review changes.':'This proposal targets another workspace and cannot be applied here.'}]:[{tag:'p',text:'Connect a Blueprint Assistant workspace proposal to review assisted changes here.'}]);raw.value=JSON.stringify(draft,null,2);const lock=document.getElementById('lock');lock.textContent=locked?'Unlock editing':'Lock editing';document.querySelectorAll('input,textarea,select,button').forEach(node=>{if(node!==lock)node.disabled=busy||locked});document.getElementById('undo').disabled=busy||locked||revisionIndex<=0;document.getElementById('redo').disabled=busy||locked||revisionIndex>=revisions.length-1;\n};\nconst changed = () => {dirty=true;revision+=1;const encoded=JSON.stringify(draft);if(JSON.stringify(revisions.find((item,position)=>position===revisionIndex))!==encoded){revisions=revisions.slice(0,revisionIndex+1);revisions.push(clone(draft));if(revisions.length>50)revisions.shift();revisionIndex=revisions.length-1}status.textContent='Changes are local until you choose Review changes.';raw.value=JSON.stringify(draft,null,2)};\nfields.title.addEventListener('input',()=>{draft.title=fields.title.value;changed()});fields.description.addEventListener('input',()=>{draft.description=fields.description.value;changed()});fields.videoType.addEventListener('input',()=>{draft.videoType=fields.videoType.value;changed()});fields.targetLength.addEventListener('input',()=>{draft.targetLength=fields.targetLength.value;changed()});fields.tone.addEventListener('input',()=>{draft.tone=fields.tone.value;changed()});fields.aspectRatio.addEventListener('input',()=>{draft.aspectRatio=fields.aspectRatio.value;changed()});fields.extraInfo.addEventListener('input',()=>{draft.extraInfo=fields.extraInfo.value;changed()});\narc.beginning.addEventListener('input',()=>{ensure();draft.emotionalArc.beginning=arc.beginning.value;changed()});arc.escalation.addEventListener('input',()=>{ensure();draft.emotionalArc.escalation=arc.escalation.value;changed()});arc.climax.addEventListener('input',()=>{ensure();draft.emotionalArc.climax=arc.climax.value;changed()});arc.resolution.addEventListener('input',()=>{ensure();draft.emotionalArc.resolution=arc.resolution.value;changed()});\nvisual.colorPalette.addEventListener('input',()=>{ensure();draft.visualStyleGuide.colorPalette=visual.colorPalette.value;changed()});visual.lightingTone.addEventListener('input',()=>{ensure();draft.visualStyleGuide.lightingTone=visual.lightingTone.value;changed()});visual.cameraLanguage.addEventListener('input',()=>{ensure();draft.visualStyleGuide.cameraLanguage=visual.cameraLanguage.value;changed()});visual.overallAesthetic.addEventListener('input',()=>{ensure();draft.visualStyleGuide.overallAesthetic=visual.overallAesthetic.value;changed()});\nStillMade.onAction(event=>{\n if(busy||locked)return;const parts=event.action.split(':'),index=Number(parts[1]),kind=parts[0];ensure();\n const character=draft.characters.find((item,position)=>position===index),place=draft.locations.find((item,position)=>position===index),scene=draft.scenes.find((item,position)=>position===index),voice=draft.voiceover.find((item,position)=>position===index);\n if(kind==='voiceover'&&voice)voice.text=event.value;if(kind==='voiceover-scene'&&voice)voice.sceneId=event.value;if(kind==='voiceover-speaker'&&voice)voice.characterSpeaking=event.value;\n if(kind==='character-name'&&character)character.name=event.value;if(kind==='character-role'&&character)character.role=event.value;if(kind==='character-physical'&&character)character.physicalDescription=event.value;if(kind==='character-personality'&&character)character.personality=event.value;if(kind==='character-notes'&&character)character.notes=event.value;\n if(kind==='location-name'&&place)place.name=event.value;if(kind==='location-time'&&place)place.timeOfDay=event.value;if(kind==='location-visual'&&place)place.visualDescription=event.value;if(kind==='location-atmosphere'&&place)place.atmosphere=event.value;\n if(kind==='scene-number'&&scene)scene.sceneNumber=event.value;if(kind==='scene-title'&&scene)scene.title=event.value;if(kind==='scene-time'&&scene)scene.timeOfDay=event.value;if(kind==='scene-tone'&&scene)scene.emotionalTone=event.value;if(kind==='scene-action'&&scene)scene.whatHappens=event.value;if(kind==='scene-visual'&&scene)scene.keyVisualMoment=event.value;if(kind==='scene-characters'&&scene)scene.charactersPresent=event.value.split(',').map(value=>value.trim()).filter(Boolean);\n const shotIndex=Number(parts[2]),shot=scene && scene.shotList.find((item,position)=>position===shotIndex);\n if(kind==='shot-id'&&shot)shot.id=event.value;if(kind==='shot-type'&&shot)shot.type=event.value;if(kind==='shot-size'&&shot)shot.cameraSize=event.value;if(kind==='shot-angle'&&shot)shot.cameraAngle=event.value;if(kind==='shot-movement'&&shot)shot.cameraMovement=event.value;if(kind==='shot-duration'&&shot)shot.intendedDuration=event.value;if(kind==='shot-generation'&&shot)shot.generationLength=event.value;if(kind==='shot-fulfillment'&&shot)shot.fulfillmentType=event.value;if(kind==='shot-description'&&shot)shot.description=event.value;if(kind==='shot-image'&&shot)shot.imagePromptReadable=event.value;if(kind==='shot-video'&&shot)shot.videoPromptReadable=event.value;\n if(kind==='add-shot'&&scene)scene.shotList=[...scene.shotList,{id:nextId('shot',scene.shotList),type:'',description:'',cameraSize:'',cameraAngle:'',cameraMovement:'',intendedDuration:'',generationLength:'',fulfillmentType:'',imagePromptReadable:'',videoPromptReadable:''}];\n if(kind==='remove-shot'&&scene)scene.shotList=scene.shotList.filter((item,position)=>position!==shotIndex);if(kind==='remove-voiceover')draft.voiceover=draft.voiceover.filter((item,position)=>position!==index);if(kind==='remove-character')draft.characters=draft.characters.filter((item,position)=>position!==index);if(kind==='remove-location')draft.locations=draft.locations.filter((item,position)=>position!==index);if(kind==='remove-scene')draft.scenes=draft.scenes.filter((item,position)=>position!==index);\n changed();if(kind.startsWith('remove-')||kind==='add-shot')draw();\n});\ndocument.getElementById('addVoiceover').addEventListener('click',()=>{if(!busy&&!locked){ensure();draft.voiceover=[...draft.voiceover,{sceneId:'scene-'+String(draft.voiceover.length+1),characterSpeaking:'',text:''}];changed();draw()}});\ndocument.getElementById('addCharacter').addEventListener('click',()=>{if(!busy&&!locked){ensure();draft.characters=[...draft.characters,{id:nextId('character',draft.characters),name:'New character',role:'',physicalDescription:'',personality:'',notes:''}];changed();draw()}});\ndocument.getElementById('addLocation').addEventListener('click',()=>{if(!busy&&!locked){ensure();draft.locations=[...draft.locations,{id:nextId('location',draft.locations),name:'New location',timeOfDay:'',visualDescription:'',atmosphere:''}];changed();draw()}});\ndocument.getElementById('addScene').addEventListener('click',()=>{if(!busy&&!locked){ensure();draft.scenes=[...draft.scenes,{id:nextId('scene',draft.scenes),sceneNumber:draft.scenes.length+1,title:'New scene',timeOfDay:'',emotionalTone:'',whatHappens:'',keyVisualMoment:'',charactersPresent:[],shotList:[]}];changed();draw()}});\ndocument.getElementById('applyRaw').addEventListener('click',()=>{if(busy||locked)return;try{const value=JSON.parse(raw.value);if(!value||Array.isArray(value)||value.schemaVersion!==1)throw Error('Blueprint JSON must be a version 1 object.');draft=clone(value);changed();draw();status.textContent='Complete Blueprint data applied to this workspace.'}catch(error){status.textContent=error.message}});\ndocument.getElementById('reset').addEventListener('click',()=>{if(!busy&&!locked){draft=clone(source);dirty=false;revision+=1;draw();status.textContent='Changes reset to the current project Blueprint.'}});\nsave.addEventListener('click',async()=>{if(busy||locked)return;const started=revision;busy=true;draw();status.textContent='Checking the complete Blueprint…';try{const result=await StillMade.run({blueprint:source,updatedBlueprint:dirty?draft:source,commit:true});if(started===revision)status.textContent='Blueprint is ready below. Review the before and after, then choose Apply.';draft=clone(result.blueprint)}catch(error){status.textContent=error.message||'The Blueprint could not be prepared.'}finally{busy=false;draw()}});\nStillMade.onInput(values=>{source=clone(values.blueprint||{schemaVersion:1});draft=clone(source);assistantEdit=values.assistantEdit?clone(values.assistantEdit):null;dirty=false;locked=false;revisions=[clone(draft)];revisionIndex=0;revision+=1;draw();status.textContent='Edit any section. Every unshown project field is retained.'});\n\ndocument.getElementById('prepareShots').addEventListener('click',async()=>{if(busy||locked)return;busy=true;draw();status.textContent='Preparing the exact shot sequence…';try{const result=await StillMade.run({blueprint:source,updatedBlueprint:draft,commit:true});document.getElementById('handoffSummary').textContent=String(result.shotPlan.shots.length)+' shots are ready for a connected Shots or Animated Scene Step.';status.textContent='Shots handoff is ready below. Review Blueprint changes before Apply.'}catch(error){status.textContent=error.message||'The Shots handoff could not be prepared.'}finally{busy=false;draw()}});\n\nconst restoreHistory=index=>{if(busy||locked||index<0||index>=revisions.length)return;revisionIndex=index;draft=clone(revisions.find((item,position)=>position===index));dirty=JSON.stringify(draft)!==JSON.stringify(source);revision+=1;draw();status.textContent='Restored local Blueprint revision '+String(index+1)+' of '+String(revisions.length)+'.'};document.getElementById('undo').addEventListener('click',()=>restoreHistory(revisionIndex-1));document.getElementById('redo').addEventListener('click',()=>restoreHistory(revisionIndex+1));document.getElementById('lock').addEventListener('click',()=>{if(busy)return;locked=!locked;draw();status.textContent=locked?'Blueprint editing locked. Unlock to make changes.':'Blueprint editing unlocked.'});document.getElementById('tidy').addEventListener('click',()=>{if(busy||locked)return;const tidy=value=>typeof value==='string'?value.trim().replace(/\\s+/g,' '):value;draft={...draft,title:tidy(draft.title),description:tidy(draft.description),videoType:tidy(draft.videoType),targetLength:tidy(draft.targetLength),tone:tidy(draft.tone),aspectRatio:tidy(draft.aspectRatio),extraInfo:tidy(draft.extraInfo)};ensure();draft.voiceover=draft.voiceover.map((item,index)=>({...item,sceneId:tidy(item.sceneId)||'scene-'+String(index+1),characterSpeaking:tidy(item.characterSpeaking),text:tidy(item.text)}));draft.characters=draft.characters.map((item,index)=>({...item,id:item.id||'character-'+String(index+1),name:tidy(item.name),role:tidy(item.role),physicalDescription:tidy(item.physicalDescription),personality:tidy(item.personality),notes:tidy(item.notes)}));draft.locations=draft.locations.map((item,index)=>({...item,id:item.id||'location-'+String(index+1),name:tidy(item.name),timeOfDay:tidy(item.timeOfDay),visualDescription:tidy(item.visualDescription),atmosphere:tidy(item.atmosphere)}));draft.scenes=draft.scenes.map((scene,index)=>({...scene,id:scene.id||'scene-'+String(index+1),title:tidy(scene.title),whatHappens:tidy(scene.whatHappens),keyVisualMoment:tidy(scene.keyVisualMoment),shotList:scene.shotList.map((shot,shotIndex)=>({...shot,id:shot.id||'scene-'+String(index+1)+'-shot-'+String(shotIndex+1),description:tidy(shot.description),imagePromptReadable:tidy(shot.imagePromptReadable),videoPromptReadable:tidy(shot.videoPromptReadable)}))}));changed();draw();status.textContent='Structure assistant trimmed standard text and filled missing stable IDs. Undo is available.'});\n\ndocument.getElementById('applyAssistant').addEventListener('click',()=>{if(busy||locked||!assistantEdit)return;if(assistantEdit.field!=='blueprint'||JSON.stringify(assistantEdit.before)!==JSON.stringify(source)){status.textContent='Assistant proposal is stale or targets another workspace. Request a new proposal from the current Blueprint.';return}draft=clone(assistantEdit.after);changed();draw();status.textContent='Assistant proposal applied locally. Review the fields, undo if needed, then choose Review changes.'});\n"
91
- },
92
- "tests": [
93
- {
94
- "name": "Retain the complete existing Blueprint without edits",
95
- "input": {
96
- "blueprint": {
97
- "schemaVersion": 1,
98
- "title": "Keep me",
99
- "characters": [
100
- {
101
- "id": "hero",
102
- "name": "Ari",
103
- "portrait": {
104
- "assetId": "portrait-1",
105
- "versionId": "v3"
106
- }
107
- }
108
- ],
109
- "customWorkflow": {
110
- "keep": true
111
- }
112
- },
113
- "updatedBlueprint": {
114
- "schemaVersion": 1
115
- },
116
- "commit": false
117
- },
118
- "expected": {
119
- "blueprint": {
120
- "schemaVersion": 1,
121
- "title": "Keep me",
122
- "characters": [
123
- {
124
- "id": "hero",
125
- "name": "Ari",
126
- "portrait": {
127
- "assetId": "portrait-1",
128
- "versionId": "v3"
129
- }
130
- }
131
- ],
132
- "customWorkflow": {
133
- "keep": true
134
- }
135
- },
136
- "shotPlan": {
137
- "schemaVersion": 1,
138
- "shots": []
139
- },
140
- "edit": {
141
- "schemaVersion": 1,
142
- "title": "Update Blueprint: Keep me",
143
- "field": "blueprint",
144
- "before": {
145
- "schemaVersion": 1,
146
- "title": "Keep me",
147
- "characters": [
148
- {
149
- "id": "hero",
150
- "name": "Ari",
151
- "portrait": {
152
- "assetId": "portrait-1",
153
- "versionId": "v3"
154
- }
155
- }
156
- ],
157
- "customWorkflow": {
158
- "keep": true
159
- }
160
- },
161
- "after": {
162
- "schemaVersion": 1,
163
- "title": "Keep me",
164
- "characters": [
165
- {
166
- "id": "hero",
167
- "name": "Ari",
168
- "portrait": {
169
- "assetId": "portrait-1",
170
- "versionId": "v3"
171
- }
172
- }
173
- ],
174
- "customWorkflow": {
175
- "keep": true
176
- }
177
- }
178
- }
179
- }
180
- },
181
- {
182
- "name": "Prepare one complete exact Blueprint update",
183
- "input": {
184
- "blueprint": {
185
- "schemaVersion": 1,
186
- "title": "Original",
187
- "characters": [
188
- {
189
- "id": "hero",
190
- "name": "Ari",
191
- "portrait": {
192
- "assetId": "portrait-1",
193
- "versionId": "v3"
194
- }
195
- }
196
- ],
197
- "scenes": [
198
- {
199
- "id": "scene-1",
200
- "title": "Opening",
201
- "shotList": [
202
- {
203
- "id": "shot-1",
204
- "prompt": "Keep this"
205
- }
206
- ]
207
- }
208
- ]
209
- },
210
- "updatedBlueprint": {
211
- "schemaVersion": 1,
212
- "title": "Revised",
213
- "characters": [
214
- {
215
- "id": "hero",
216
- "name": "Ari",
217
- "portrait": {
218
- "assetId": "portrait-1",
219
- "versionId": "v3"
220
- }
221
- }
222
- ],
223
- "scenes": [
224
- {
225
- "id": "scene-1",
226
- "title": "New opening",
227
- "shotList": [
228
- {
229
- "id": "shot-1",
230
- "prompt": "Keep this"
231
- }
232
- ]
233
- }
234
- ]
235
- },
236
- "commit": true
237
- },
238
- "expected": {
239
- "blueprint": {
240
- "schemaVersion": 1,
241
- "title": "Revised",
242
- "characters": [
243
- {
244
- "id": "hero",
245
- "name": "Ari",
246
- "portrait": {
247
- "assetId": "portrait-1",
248
- "versionId": "v3"
249
- }
250
- }
251
- ],
252
- "scenes": [
253
- {
254
- "id": "scene-1",
255
- "title": "New opening",
256
- "shotList": [
257
- {
258
- "id": "shot-1",
259
- "prompt": "Keep this"
260
- }
261
- ]
262
- }
263
- ]
264
- },
265
- "shotPlan": {
266
- "schemaVersion": 1,
267
- "shots": [
268
- {
269
- "id": "shot-1",
270
- "prompt": "Keep this",
271
- "sceneId": "scene-1",
272
- "sceneTitle": "New opening",
273
- "startTime": 0,
274
- "endTime": 4,
275
- "voiceoverText": ""
276
- }
277
- ]
278
- },
279
- "edit": {
280
- "schemaVersion": 1,
281
- "title": "Update Blueprint: Revised",
282
- "field": "blueprint",
283
- "before": {
284
- "schemaVersion": 1,
285
- "title": "Original",
286
- "characters": [
287
- {
288
- "id": "hero",
289
- "name": "Ari",
290
- "portrait": {
291
- "assetId": "portrait-1",
292
- "versionId": "v3"
293
- }
294
- }
295
- ],
296
- "scenes": [
297
- {
298
- "id": "scene-1",
299
- "title": "Opening",
300
- "shotList": [
301
- {
302
- "id": "shot-1",
303
- "prompt": "Keep this"
304
- }
305
- ]
306
- }
307
- ]
308
- },
309
- "after": {
310
- "schemaVersion": 1,
311
- "title": "Revised",
312
- "characters": [
313
- {
314
- "id": "hero",
315
- "name": "Ari",
316
- "portrait": {
317
- "assetId": "portrait-1",
318
- "versionId": "v3"
319
- }
320
- }
321
- ],
322
- "scenes": [
323
- {
324
- "id": "scene-1",
325
- "title": "New opening",
326
- "shotList": [
327
- {
328
- "id": "shot-1",
329
- "prompt": "Keep this"
330
- }
331
- ]
332
- }
333
- ]
334
- }
335
- }
336
- }
337
- }
338
- ]
339
- };