stillmade-sdk 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +103 -0
- package/AGENT_CONTROL.md +293 -0
- package/BROWSER_APPLICATIONS.md +140 -0
- package/BROWSER_APPLICATION_ARTIFACT_REFERENCES.md +85 -0
- package/CLAUDE.md +1 -0
- package/COOPERATIVE_GUEST_JOBS.md +11 -0
- package/DEFINE_BLOCK.md +39 -0
- package/DESKTOP_CAPABILITIES.md +85 -0
- package/DESKTOP_EXECUTION.md +75 -0
- package/FRAME_VIEWS.md +98 -0
- package/GITHUB_APPLICATIONS.md +129 -0
- package/IMAGE_DESCRIPTION.md +45 -0
- package/INTERACTION_VALUES.md +27 -0
- package/INTERFACE_DESIGN.md +85 -0
- package/IN_SESSION_PACKAGE_JOBS.md +33 -0
- package/JAVASCRIPT_RESULTS.md +118 -0
- package/LICENSE +101 -0
- package/MOBILE_UI.md +100 -0
- package/MODULES.md +168 -0
- package/NATIVE_MCP.md +276 -0
- package/PASTE_TO_LLM.md +1917 -0
- package/PORTABLE.md +606 -0
- package/REMIX.md +183 -0
- package/SDK.md +11476 -0
- package/SEMANTIC_ADAPTERS.md +85 -0
- package/TRANSCRIPTION.md +55 -0
- package/UI_AESTHETIC.md +180 -0
- package/UNIVERSAL_RESOLVER.md +301 -0
- package/WORKFLOW_APPROVALS.md +16 -0
- package/WORKFLOW_EVENTS.md +42 -0
- package/acceptance/README.md +195 -0
- package/api-index.json +885 -0
- package/blocks/connected-app/versions/1.0.0/view.js +16 -0
- package/blocks/connected-app/versions/1.2.0/task-selection.js +18 -0
- package/blocks/connected-app/versions/1.4.0/view.js +16 -0
- package/blocks/gmail/versions/1.0.0/workspace.js +6 -0
- package/blocks/mcp-motion-planner/versions/1.1.0/package.js +97 -0
- package/blocks/meta-ads/versions/1.0.0/workspace.js +20 -0
- package/blocks/meta-ads/versions/1.1.0/workspace.js +18 -0
- package/blocks/meta-ads/versions/1.2.0/workspace.js +19 -0
- package/blocks/motion-designer/versions/1.0.1/package.js +173318 -0
- package/blocks/motion-designer/versions/1.0.2/package.js +173318 -0
- package/blocks/motion-frame-review/versions/1.1.1/package.js +465 -0
- package/blocks/motion-frame-review/versions/1.1.2/package.snapshot.js +572 -0
- package/blocks/native/sm.animated-scene/versions/2.0.0/package.js +475 -0
- package/blocks/native/sm.animated-scene/versions/2.1.0/package.js +498 -0
- package/blocks/native/sm.animated-scene/versions/2.2.0/package.js +524 -0
- package/blocks/native/sm.animated-scene/versions/2.3.0/package.js +618 -0
- package/blocks/native/sm.animated-scene/versions/2.3.1/package.js +618 -0
- package/blocks/native/sm.animated-scene/versions/2.3.2/package.js +723 -0
- package/blocks/native/sm.animated-scene/versions/2.3.3/package.js +723 -0
- package/blocks/native/sm.animated-scene/versions/2.3.4/package.js +676 -0
- package/blocks/native/sm.animated-scene/versions/2.3.5/package.js +693 -0
- package/blocks/native/sm.animated-scene/versions/2.3.6/package.js +700 -0
- package/blocks/native/sm.animated-scene/versions/2.3.7/package.js +747 -0
- package/blocks/native/sm.animated-scene/versions/2.3.8/package.js +769 -0
- package/blocks/native/sm.animated-scene-assistant/versions/1.0.0/package.js +183 -0
- package/blocks/native/sm.blueprint/versions/2.0.0/package.js +358 -0
- package/blocks/native/sm.blueprint/versions/2.1.0/package.js +358 -0
- package/blocks/native/sm.blueprint/versions/2.1.1/package.js +358 -0
- package/blocks/native/sm.blueprint/versions/2.1.2/package.js +358 -0
- package/blocks/native/sm.blueprint/versions/2.1.3/package.js +381 -0
- package/blocks/native/sm.blueprint/versions/2.1.4/package.js +381 -0
- package/blocks/native/sm.blueprint/versions/2.1.5/package.js +339 -0
- package/blocks/native/sm.blueprint/versions/2.1.6/package.js +356 -0
- package/blocks/native/sm.blueprint/versions/2.1.7/package.js +363 -0
- package/blocks/native/sm.blueprint/versions/2.1.8/package.js +410 -0
- package/blocks/native/sm.blueprint/versions/2.1.9/package.js +422 -0
- package/blocks/native/sm.blueprint-assistant/versions/1.0.0/package.js +172 -0
- package/blocks/native/sm.board-editor/versions/2.0.0/package.js +386 -0
- package/blocks/native/sm.board-editor/versions/2.1.0/package.js +430 -0
- package/blocks/native/sm.board-editor/versions/2.2.0/package.js +430 -0
- package/blocks/native/sm.board-editor/versions/2.2.1/package.js +430 -0
- package/blocks/native/sm.board-editor/versions/2.2.10/package.js +551 -0
- package/blocks/native/sm.board-editor/versions/2.2.2/package.js +430 -0
- package/blocks/native/sm.board-editor/versions/2.2.3/package.js +501 -0
- package/blocks/native/sm.board-editor/versions/2.2.4/package.js +501 -0
- package/blocks/native/sm.board-editor/versions/2.2.5/package.js +501 -0
- package/blocks/native/sm.board-editor/versions/2.2.6/package.js +460 -0
- package/blocks/native/sm.board-editor/versions/2.2.7/package.js +477 -0
- package/blocks/native/sm.board-editor/versions/2.2.8/package.js +484 -0
- package/blocks/native/sm.board-editor/versions/2.2.9/package.js +531 -0
- package/blocks/native/sm.captions/versions/2.0.0/package.js +406 -0
- package/blocks/native/sm.character/versions/2.0.0/package.js +169 -0
- package/blocks/native/sm.character/versions/2.0.1/package.js +180 -0
- package/blocks/native/sm.chat/versions/2.0.0/package.js +144 -0
- package/blocks/native/sm.chat/versions/2.0.1/package.js +97 -0
- package/blocks/native/sm.chat/versions/2.0.2/package.js +100 -0
- package/blocks/native/sm.chat/versions/2.0.3/package.js +100 -0
- package/blocks/native/sm.compare/versions/2.0.0/package.js +159 -0
- package/blocks/native/sm.compare/versions/2.0.1/package.js +159 -0
- package/blocks/native/sm.compare/versions/2.0.2/package.js +296 -0
- package/blocks/native/sm.describe-media/versions/2.0.0/package.js +153 -0
- package/blocks/native/sm.describe-media/versions/2.0.1/package.js +156 -0
- package/blocks/native/sm.edit-assistant/versions/2.0.0/package.js +214 -0
- package/blocks/native/sm.edit-assistant/versions/2.0.1/package.js +214 -0
- package/blocks/native/sm.edit-assistant/versions/2.0.2/package.js +221 -0
- package/blocks/native/sm.editor/versions/2.0.0/package.js +752 -0
- package/blocks/native/sm.editor/versions/2.1.0/package.js +767 -0
- package/blocks/native/sm.editor/versions/2.2.0/package.js +987 -0
- package/blocks/native/sm.editor/versions/2.2.1/package.js +987 -0
- package/blocks/native/sm.editor/versions/2.2.10/package.js +1146 -0
- package/blocks/native/sm.editor/versions/2.2.11/package.js +1391 -0
- package/blocks/native/sm.editor/versions/2.2.12/package.js +1391 -0
- package/blocks/native/sm.editor/versions/2.2.2/package.js +1006 -0
- package/blocks/native/sm.editor/versions/2.2.3/package.js +1006 -0
- package/blocks/native/sm.editor/versions/2.2.4/package.js +1006 -0
- package/blocks/native/sm.editor/versions/2.2.5/package.js +1006 -0
- package/blocks/native/sm.editor/versions/2.2.6/package.js +1006 -0
- package/blocks/native/sm.editor/versions/2.2.7/package.js +1006 -0
- package/blocks/native/sm.editor/versions/2.2.8/package.js +1099 -0
- package/blocks/native/sm.editor/versions/2.2.9/package.js +1145 -0
- package/blocks/native/sm.export-audio/versions/2.0.0/package.js +376 -0
- package/blocks/native/sm.export-timeline/versions/2.0.0/package.js +271 -0
- package/blocks/native/sm.export-video/versions/2.0.0/package.js +376 -0
- package/blocks/native/sm.final-edit/versions/2.0.0/package.js +194 -0
- package/blocks/native/sm.final-edit/versions/2.0.1/package.js +194 -0
- package/blocks/native/sm.final-edit/versions/2.0.2/package.js +199 -0
- package/blocks/native/sm.generate-image/versions/2.0.0/package.js +130 -0
- package/blocks/native/sm.generate-video/versions/2.0.0/package.js +145 -0
- package/blocks/native/sm.generate-video/versions/2.0.1/package.js +148 -0
- package/blocks/native/sm.grade/versions/2.0.0/package.js +150 -0
- package/blocks/native/sm.grade/versions/2.0.1/package.js +150 -0
- package/blocks/native/sm.grade/versions/2.0.2/package.js +397 -0
- package/blocks/native/sm.image-editor/versions/2.0.0/package.js +183 -0
- package/blocks/native/sm.image-editor/versions/2.0.1/package.js +190 -0
- package/blocks/native/sm.import-media/versions/2.0.0/package.js +285 -0
- package/blocks/native/sm.import-media/versions/2.0.1/package.js +307 -0
- package/blocks/native/sm.import-media/versions/2.0.2/package.js +428 -0
- package/blocks/native/sm.location/versions/2.0.0/package.js +169 -0
- package/blocks/native/sm.location/versions/2.0.1/package.js +180 -0
- package/blocks/native/sm.motion-graphics/versions/2.0.0/package.js +643 -0
- package/blocks/native/sm.panel-strip/versions/2.0.0/package.js +405 -0
- package/blocks/native/sm.panel-strip/versions/2.1.0/package.js +422 -0
- package/blocks/native/sm.panel-strip/versions/2.2.0/package.js +467 -0
- package/blocks/native/sm.panel-strip/versions/2.3.0/package.js +632 -0
- package/blocks/native/sm.panel-strip/versions/2.3.1/package.js +632 -0
- package/blocks/native/sm.panel-strip/versions/2.3.2/package.js +637 -0
- package/blocks/native/sm.panel-strip/versions/2.3.3/package.js +652 -0
- package/blocks/native/sm.panel-strip/versions/2.3.4/package.js +664 -0
- package/blocks/native/sm.panel-strip/versions/2.3.5/package.js +683 -0
- package/blocks/native/sm.panel-strip/versions/2.3.6/package.js +825 -0
- package/blocks/native/sm.panel-strip/versions/2.3.7/package.js +852 -0
- package/blocks/native/sm.pipeline/versions/2.0.0/package.js +528 -0
- package/blocks/native/sm.pipeline/versions/2.1.0/package.js +545 -0
- package/blocks/native/sm.pipeline/versions/2.2.0/package.js +819 -0
- package/blocks/native/sm.pipeline/versions/2.2.1/package.js +819 -0
- package/blocks/native/sm.pipeline/versions/2.2.2/package.js +787 -0
- package/blocks/native/sm.pipeline/versions/2.2.3/package.js +834 -0
- package/blocks/native/sm.pipeline/versions/2.2.4/package.js +854 -0
- package/blocks/native/sm.pipeline/versions/2.2.5/package.js +1095 -0
- package/blocks/native/sm.quality-audit/versions/1.0.0/package.js +192 -0
- package/blocks/native/sm.quality-audit/versions/1.0.1/package.js +192 -0
- package/blocks/native/sm.quality-audit/versions/1.0.2/package.js +195 -0
- package/blocks/native/sm.research/versions/2.0.0/package.js +175 -0
- package/blocks/native/sm.research/versions/2.0.1/package.js +184 -0
- package/blocks/native/sm.research/versions/2.0.2/package.js +187 -0
- package/blocks/native/sm.rough-cut/versions/2.0.0/package.js +248 -0
- package/blocks/native/sm.rough-cut/versions/2.0.1/package.js +248 -0
- package/blocks/native/sm.rough-cut/versions/2.0.2/package.js +257 -0
- package/blocks/native/sm.score/versions/2.0.0/package.js +513 -0
- package/blocks/native/sm.script/versions/2.0.0/package.js +144 -0
- package/blocks/native/sm.script/versions/2.1.0/package.js +144 -0
- package/blocks/native/sm.script/versions/2.1.1/package.js +144 -0
- package/blocks/native/sm.script/versions/2.1.2/package.js +105 -0
- package/blocks/native/sm.script/versions/2.1.3/package.js +152 -0
- package/blocks/native/sm.script/versions/2.1.4/package.js +156 -0
- package/blocks/native/sm.shot-plan/versions/2.0.0/package.js +301 -0
- package/blocks/native/sm.shot-plan/versions/2.1.0/package.js +528 -0
- package/blocks/native/sm.shot-plan/versions/2.1.1/package.js +528 -0
- package/blocks/native/sm.shot-plan/versions/2.1.2/package.js +528 -0
- package/blocks/native/sm.shot-plan/versions/2.1.3/package.js +536 -0
- package/blocks/native/sm.shot-plan-assistant/versions/1.0.0/package.js +173 -0
- package/blocks/native/sm.stock-search/versions/2.0.0/package.js +174 -0
- package/blocks/native/sm.style/versions/2.0.0/package.js +173 -0
- package/blocks/native/sm.style/versions/2.0.1/package.js +184 -0
- package/blocks/native/sm.thumbnail/versions/2.0.0/package.js +137 -0
- package/blocks/native/sm.thumbnail/versions/2.0.1/package.js +140 -0
- package/blocks/native/sm.transcribe/versions/2.0.0/package.js +163 -0
- package/blocks/native/sm.transcribe/versions/2.0.1/package.js +168 -0
- package/blocks/native/sm.transition/versions/2.0.0/package.js +143 -0
- package/blocks/native/sm.transition/versions/2.0.1/package.js +143 -0
- package/blocks/native/sm.transition/versions/2.0.2/package.js +354 -0
- package/blocks/native/sm.video-assets/versions/2.0.0/package.js +198 -0
- package/blocks/native/sm.video-assets/versions/2.1.0/package.js +273 -0
- package/blocks/native/sm.video-assets/versions/2.1.1/package.js +273 -0
- package/blocks/native/sm.video-assets/versions/2.1.2/package.js +239 -0
- package/blocks/native/sm.video-assets/versions/2.1.3/package.js +239 -0
- package/blocks/native/sm.video-assets/versions/2.1.4/package.js +249 -0
- package/blocks/native/sm.voiceover/versions/2.0.0/package.js +137 -0
- package/blocks/native/sm.voiceover/versions/2.1.0/package.js +149 -0
- package/blocks/native/sm.voiceover/versions/2.1.1/package.js +149 -0
- package/blocks/native/sm.voiceover/versions/2.1.2/package.js +126 -0
- package/blocks/native/sm.voiceover/versions/2.1.3/package.js +126 -0
- package/blocks/native/sm.voiceover/versions/2.1.4/package.js +179 -0
- package/blocks/native/sm.whiteboard-assistant/versions/1.0.0/package.js +175 -0
- package/blocks/native/sm.youtube/versions/2.0.0/package.js +217 -0
- package/blocks/occasion-story/package.js +1 -0
- package/blocks/occasion-story/versions/1.0.0/package.js +1658 -0
- package/blocks/occasion-story/versions/1.0.1/package.js +1699 -0
- package/blocks/photo-reel-composer/versions/1.0.0/package.js +3043 -0
- package/blocks/product-ad-variants/versions/1.0.0/package.js +2911 -0
- package/blocks/product-launch-director/versions/1.0.0/package.js +103 -0
- package/blocks/release-visuals/package.js +1 -0
- package/blocks/release-visuals/versions/1.0.0/package.js +1492 -0
- package/blocks/release-visuals/versions/1.0.1/package.js +1517 -0
- package/blocks/short-form-finish/package.js +1 -0
- package/blocks/short-form-finish/versions/1.0.0/package.js +1043 -0
- package/blocks/short-form-finish/versions/1.0.1/package.js +1043 -0
- package/blocks/short-form-finish/versions/1.0.2/package.js +1043 -0
- package/examples/asset-metadata.stillmade.json +84 -0
- package/examples/camera-recorder.stillmade.json +77 -0
- package/examples/caption-from-text.stillmade.json +117 -0
- package/examples/captions.stillmade-block +0 -0
- package/examples/check-clip.stillmade.json +109 -0
- package/examples/clean-text.stillmade.json +73 -0
- package/examples/comfy-invert.stillmade.json +117 -0
- package/examples/comfy-text-to-image.stillmade.json +165 -0
- package/examples/custom-interface.stillmade.json +78 -0
- package/examples/describe-image.stillmade.json +87 -0
- package/examples/docs-only-campfire-narrator.stillmade.json +92 -0
- package/examples/docs-only-custom-ui.stillmade.json +98 -0
- package/examples/docs-only-gentle-trailer.stillmade.json +106 -0
- package/examples/docs-only-grayscale-original.stillmade.json +212 -0
- package/examples/docs-only-grayscale.stillmade.json +218 -0
- package/examples/docs-only-image-studio.stillmade.json +327 -0
- package/examples/docs-only-retained-versions.stillmade.json +183 -0
- package/examples/docs-only-storybook-cover.stillmade.json +91 -0
- package/examples/export-timeline.stillmade-block +0 -0
- package/examples/foley-cue.stillmade.json +73 -0
- package/examples/generate-image.stillmade.json +75 -0
- package/examples/generate-video.stillmade.json +75 -0
- package/examples/grayscale.stillmade.json +220 -0
- package/examples/import-media.stillmade-block +0 -0
- package/examples/javascript-cloze-quiz/README.md +9 -0
- package/examples/javascript-cloze-quiz/package.json +11 -0
- package/examples/javascript-cloze-quiz/src/run.js +22 -0
- package/examples/javascript-cloze-quiz/stillmade.block.json +75 -0
- package/examples/javascript-cloze-quiz/tests/fixtures.json +44 -0
- package/examples/javascript-invoice/README.md +9 -0
- package/examples/javascript-invoice/package.json +11 -0
- package/examples/javascript-invoice/src/run.js +16 -0
- package/examples/javascript-invoice/stillmade.block.json +90 -0
- package/examples/javascript-invoice/tests/fixtures.json +44 -0
- package/examples/microphone-recorder.stillmade.json +77 -0
- package/examples/module-action-items/README.md +9 -0
- package/examples/module-action-items/module/main.js +29 -0
- package/examples/module-action-items/package.json +11 -0
- package/examples/module-action-items/stillmade.block.json +55 -0
- package/examples/module-action-items/tests/fixtures.json +37 -0
- package/examples/module-action-items/tests/mocks.json +11 -0
- package/examples/module-audio-extract/README.md +9 -0
- package/examples/module-audio-extract/package.json +10 -0
- package/examples/module-audio-extract/src/main.js +9 -0
- package/examples/module-audio-extract/stillmade.block.json +20 -0
- package/examples/module-audio-extract/tests/fixtures.json +3 -0
- package/examples/module-brand-kit/README.md +34 -0
- package/examples/module-brand-kit/package.json +14 -0
- package/examples/module-brand-kit/src/main.js +72 -0
- package/examples/module-brand-kit/stillmade.block.json +30 -0
- package/examples/module-brand-kit/tests/fixtures.json +3 -0
- package/examples/module-csv-summary/README.md +9 -0
- package/examples/module-csv-summary/fixtures/sales.csv +6 -0
- package/examples/module-csv-summary/module/main.js +55 -0
- package/examples/module-csv-summary/package.json +11 -0
- package/examples/module-csv-summary/stillmade.block.json +56 -0
- package/examples/module-csv-summary/tests/fixtures.json +72 -0
- package/examples/module-csv-summary/tests/mocks.json +3 -0
- package/examples/module-notion-to-airtable/README.md +28 -0
- package/examples/module-notion-to-airtable/notion-pages.openapi.json +21 -0
- package/examples/module-notion-to-airtable/package.json +14 -0
- package/examples/module-notion-to-airtable/src/main.js +30 -0
- package/examples/module-notion-to-airtable/stillmade.block.json +31 -0
- package/examples/module-notion-to-airtable/tests/fixtures.json +3 -0
- package/examples/module-opencv/README.md +23 -0
- package/examples/module-opencv/package.json +17 -0
- package/examples/module-opencv/src/main.js +35 -0
- package/examples/module-opencv/stillmade.block.json +20 -0
- package/examples/module-opencv/tests/fixtures.json +3 -0
- package/examples/module-pdf-shot-list/README.md +25 -0
- package/examples/module-pdf-shot-list/package.json +18 -0
- package/examples/module-pdf-shot-list/src/main.js +89 -0
- package/examples/module-pdf-shot-list/stillmade.block.json +28 -0
- package/examples/module-pdf-shot-list/tests/fixtures.json +3 -0
- package/examples/module-silence-trimmer/README.md +23 -0
- package/examples/module-silence-trimmer/package.json +17 -0
- package/examples/module-silence-trimmer/src/main.js +18 -0
- package/examples/module-silence-trimmer/stillmade.block.json +23 -0
- package/examples/module-silence-trimmer/tests/fixtures.json +3 -0
- package/examples/module-tempo/README.md +9 -0
- package/examples/module-tempo/fixtures/click-120.wav +0 -0
- package/examples/module-tempo/module/main.js +27 -0
- package/examples/module-tempo/package.json +11 -0
- package/examples/module-tempo/stillmade.block.json +65 -0
- package/examples/module-tempo/tests/fixtures.json +29 -0
- package/examples/module-tempo/tests/mocks.json +3 -0
- package/examples/module-word-stats/module/main.js +8 -0
- package/examples/module-word-stats/stillmade.block.json +48 -0
- package/examples/module-word-stats/tests/fixtures.json +12 -0
- package/examples/narrate-script.stillmade.json +73 -0
- package/examples/numbered-takes.stillmade.json +90 -0
- package/examples/original-photo-editor/src/run.js +22 -0
- package/examples/original-photo-editor/src/view.css +1 -0
- package/examples/original-photo-editor/src/view.html +1 -0
- package/examples/original-photo-editor/src/view.js +57 -0
- package/examples/original-photo-editor/stillmade.block.json +91 -0
- package/examples/original-photo-editor/tests/fixtures.json +102 -0
- package/examples/original-photo-editor.stillmade-block +0 -0
- package/examples/portable-regexp.stillmade-block +0 -0
- package/examples/portable-regexp.stillmade.json +116 -0
- package/examples/quieter-clips.stillmade.json +104 -0
- package/examples/research-topic.stillmade.json +73 -0
- package/examples/saas-product-launch-reviewed-source.stillmade.json +383 -0
- package/examples/saas-product-launch.stillmade.json +304 -0
- package/examples/scene-shots.stillmade.json +96 -0
- package/examples/score-a-scene.stillmade.json +76 -0
- package/examples/screen-recorder.stillmade.json +77 -0
- package/examples/script-draft.stillmade.json +74 -0
- package/examples/shot-readiness.stillmade.json +94 -0
- package/examples/summarize-page.stillmade.json +73 -0
- package/examples/text-workflow.stillmade.json +126 -0
- package/examples/thicken-lines.stillmade.json +318 -0
- package/examples/timeline-mixer.stillmade.json +126 -0
- package/examples/timeline-polish.stillmade.json +101 -0
- package/examples/transcribe-audio.stillmade.json +97 -0
- package/examples/view-react-chart/README.md +16 -0
- package/examples/view-react-chart/package.json +18 -0
- package/examples/view-react-chart/src/run.js +3 -0
- package/examples/view-react-chart/src/view.config.json +1 -0
- package/examples/view-react-chart/src/view.css +12 -0
- package/examples/view-react-chart/src/view.html +1 -0
- package/examples/view-react-chart/src/view.jsx +68 -0
- package/examples/view-react-chart/stillmade.block.json +42 -0
- package/examples/view-react-chart/tests/fixtures.json +3 -0
- package/examples/word-count.stillmade.json +71 -0
- package/node_modules/@jitl/quickjs-ffi-types/LICENSE +21 -0
- package/node_modules/@jitl/quickjs-ffi-types/README.md +5 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.d.mts +549 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.d.ts +549 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.js +2 -0
- package/node_modules/@jitl/quickjs-ffi-types/dist/index.mjs +2 -0
- package/node_modules/@jitl/quickjs-ffi-types/package.json +36 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/LICENSE +47 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/README.md +82 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.browser.mjs +22 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cjs +21 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.cjs +21 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.cloudflare.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.d.ts +11 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.mjs +25 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/emscripten-module.wasm +0 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.mts +85 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.d.ts +85 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/ffi.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.mts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.d.ts +20 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.js +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/dist/index.mjs +2 -0
- package/node_modules/@jitl/quickjs-wasmfile-release-sync/package.json +61 -0
- package/node_modules/acorn/CHANGELOG.md +998 -0
- package/node_modules/acorn/LICENSE +21 -0
- package/node_modules/acorn/README.md +309 -0
- package/node_modules/acorn/bin/acorn +4 -0
- package/node_modules/acorn/dist/acorn.d.mts +897 -0
- package/node_modules/acorn/dist/acorn.d.ts +897 -0
- package/node_modules/acorn/dist/acorn.js +6342 -0
- package/node_modules/acorn/dist/acorn.mjs +6313 -0
- package/node_modules/acorn/dist/bin.js +90 -0
- package/node_modules/acorn/package.json +50 -0
- package/node_modules/fflate/CHANGELOG.md +50 -0
- package/node_modules/fflate/LICENSE +21 -0
- package/node_modules/fflate/README.md +372 -0
- package/node_modules/fflate/esm/browser.js +1805 -0
- package/node_modules/fflate/esm/index.mjs +1827 -0
- package/node_modules/fflate/lib/index.d.ts +746 -0
- package/node_modules/fflate/lib/index.js +1819 -0
- package/node_modules/fflate/lib/node-worker.js +33 -0
- package/node_modules/fflate/lib/worker.js +11 -0
- package/node_modules/fflate/package.json +86 -0
- package/node_modules/fflate/umd/index.js +1 -0
- package/node_modules/quickjs-emscripten-core/LICENSE +21 -0
- package/node_modules/quickjs-emscripten-core/README.md +341 -0
- package/node_modules/quickjs-emscripten-core/README.template.md +70 -0
- package/node_modules/quickjs-emscripten-core/dist/chunk-TAV5CUKK.mjs +2 -0
- package/node_modules/quickjs-emscripten-core/dist/chunk-V2S4ZYJR.mjs +7 -0
- package/node_modules/quickjs-emscripten-core/dist/index.d.mts +2033 -0
- package/node_modules/quickjs-emscripten-core/dist/index.d.ts +2033 -0
- package/node_modules/quickjs-emscripten-core/dist/index.js +7 -0
- package/node_modules/quickjs-emscripten-core/dist/index.mjs +2 -0
- package/node_modules/quickjs-emscripten-core/dist/module-ES6BEMUI.mjs +2 -0
- package/node_modules/quickjs-emscripten-core/dist/module-asyncify-2EFITU5U.mjs +2 -0
- package/node_modules/quickjs-emscripten-core/package.json +49 -0
- package/package.json +25 -4
- package/packages/block-cli/cli.js +353 -0
- package/packages/block-cli/dev-host/assets/host.js +1387 -0
- package/packages/block-cli/dev-host/assets/index.css +1 -0
- package/packages/block-cli/dev-host/block-ui-sandbox.html +2 -0
- package/packages/block-cli/dev-host/fonts/HankenGrotesk-Italic-Variable.ttf +0 -0
- package/packages/block-cli/dev-host/fonts/HankenGrotesk-OFL.txt +94 -0
- package/packages/block-cli/dev-host/fonts/HankenGrotesk-Variable.ttf +0 -0
- package/packages/block-cli/dev-host/fonts/JetBrainsMono-Italic-Variable.ttf +0 -0
- package/packages/block-cli/dev-host/fonts/JetBrainsMono-OFL.txt +93 -0
- package/packages/block-cli/dev-host/fonts/JetBrainsMono-Variable.ttf +0 -0
- package/packages/block-cli/dev-host/index.html +14 -0
- package/packages/block-cli/dev-host/policies.json +4 -0
- package/packages/block-cli/dev-host/stillmade-block-view.js +19 -0
- package/packages/block-cli/dev-server.js +152 -0
- package/packages/block-cli/format.js +89 -0
- package/packages/block-cli/templates.js +260 -0
- package/packages/block-platform/affected-updates.js +38 -0
- package/packages/block-platform/automation-inputs.js +53 -0
- package/packages/block-platform/automation-result.js +56 -0
- package/packages/block-platform/automation.js +44 -0
- package/packages/block-platform/batch-inventory-sources.js +49 -0
- package/packages/block-platform/batch-semantic-values.js +7 -0
- package/packages/block-platform/batch.js +31 -0
- package/packages/block-platform/block-readiness.js +246 -0
- package/packages/block-platform/block-remix-differences.js +19 -0
- package/packages/block-platform/block-remix.js +69 -0
- package/packages/block-platform/block-starters.js +54 -0
- package/packages/block-platform/canvas-semantics.js +7 -0
- package/packages/block-platform/canvas.js +149 -0
- package/packages/block-platform/catalog.js +160 -0
- package/packages/block-platform/chat-requirements.js +42 -0
- package/packages/block-platform/collaboration.js +187 -0
- package/packages/block-platform/conditions.js +61 -0
- package/packages/block-platform/current-semantic-source.js +45 -0
- package/packages/block-platform/experimental-browser-context.js +137 -0
- package/packages/block-platform/failure-policy.js +129 -0
- package/packages/block-platform/first-revenue-project-types.js +46 -0
- package/packages/block-platform/flow-agent-pages.js +28 -0
- package/packages/block-platform/flow-inspection.js +299 -0
- package/packages/block-platform/flow-loop-retained-records.js +57 -0
- package/packages/block-platform/flow-native-output.js +19 -0
- package/packages/block-platform/flow-receipt-input-page.js +22 -0
- package/packages/block-platform/flow-retained-result-page.js +57 -0
- package/packages/block-platform/github-listing-source.js +26 -0
- package/packages/block-platform/goal-source-inputs.js +23 -0
- package/packages/block-platform/goal-source-materials.js +9 -0
- package/packages/block-platform/history.js +35 -0
- package/packages/block-platform/host-release-manifests.js +504 -0
- package/packages/block-platform/hosted-type-reviews.js +43 -0
- package/packages/block-platform/import-eligibility.js +18 -0
- package/packages/block-platform/launch-project-source.js +10 -0
- package/packages/block-platform/launch-project.js +30 -0
- package/packages/block-platform/listing-identity.js +44 -0
- package/packages/block-platform/listings.js +28 -0
- package/packages/block-platform/marketplace-selection.js +29 -0
- package/packages/block-platform/marketplace.js +20 -0
- package/packages/block-platform/motion-project-types.js +55 -0
- package/packages/block-platform/native-host-inventory.js +629 -0
- package/packages/block-platform/native-hosts.js +9 -0
- package/packages/block-platform/node-defaults.js +103 -0
- package/packages/block-platform/pinned-media-value.js +31 -0
- package/packages/block-platform/placement-state.js +35 -0
- package/packages/block-platform/preview-media.js +64 -0
- package/packages/block-platform/product-ad-variants-project-type.js +27 -0
- package/packages/block-platform/product-launch-updated.js +90 -0
- package/packages/block-platform/project-context.js +350 -0
- package/packages/block-platform/project-flow-input-override.js +37 -0
- package/packages/block-platform/project-input-samples.js +21 -0
- package/packages/block-platform/project-inputs.js +63 -0
- package/packages/block-platform/project-onboarding.js +29 -0
- package/packages/block-platform/project-outcome.js +18 -0
- package/packages/block-platform/project-start-input.js +34 -0
- package/packages/block-platform/project-type-composer.js +694 -0
- package/packages/block-platform/project-type-connection-checks.js +19 -0
- package/packages/block-platform/project-type-draft.js +23 -0
- package/packages/block-platform/project-type-events.js +15 -0
- package/packages/block-platform/project-type-loops.js +40 -0
- package/packages/block-platform/project-type-recommendations.js +316 -0
- package/packages/block-platform/project-type-rules.js +51 -0
- package/packages/block-platform/project-type-starters.js +73 -0
- package/packages/block-platform/project-types.js +91 -0
- package/packages/block-platform/release-migration-plan.js +41 -0
- package/packages/block-platform/revenue-review-project-types.js +32 -0
- package/packages/block-platform/run-input-evidence.js +33 -0
- package/packages/block-platform/script-handoff.js +46 -0
- package/packages/block-platform/script-writer.js +29 -0
- package/packages/block-platform/segment-context.js +59 -0
- package/packages/block-platform/segment-results.js +56 -0
- package/packages/block-platform/segment-runner.js +469 -0
- package/packages/block-platform/selected-asset-workspace-sources.js +53 -0
- package/packages/block-platform/semantic-adapters.js +13 -0
- package/packages/block-platform/semantic-context.js +109 -0
- package/packages/block-platform/semantic-inputs.js +82 -0
- package/packages/block-platform/semantic-results.js +136 -0
- package/packages/block-platform/stage-package.js +18 -0
- package/packages/block-platform/steps.js +144 -0
- package/packages/block-platform/type-preview.js +108 -0
- package/packages/block-platform/type-testing.js +43 -0
- package/packages/block-platform/type-workspace.js +95 -0
- package/packages/block-platform/unattended.js +5 -0
- package/packages/block-platform/universal-resolver.js +1 -0
- package/packages/block-platform/video-assets.js +13 -0
- package/packages/block-platform/voiceover-transcript.js +10 -0
- package/packages/block-platform/voiceover.js +47 -0
- package/packages/block-platform/website-source-block.js +14 -0
- package/packages/block-platform/workflow-dependency-order.js +17 -0
- package/packages/block-platform/workflow-event-context.js +31 -0
- package/packages/block-platform/workflow-loop-iteration.js +39 -0
- package/packages/block-platform/workflow-loop-provenance.js +8 -0
- package/packages/block-platform/workflow-loop-retention.js +48 -0
- package/packages/block-platform/workflow-loop-workspace-sources.js +64 -0
- package/packages/block-platform/workflow-loop.js +85 -0
- package/packages/block-platform/workspace-batch-lineage.js +20 -0
- package/packages/block-platform/workspace-canvas-source-projection.js +10 -0
- package/packages/block-platform/workspace-canvas.js +5 -0
- package/packages/block-platform/workspace-collection-outputs.js +40 -0
- package/packages/block-platform/workspace-collection-sources.js +44 -0
- package/packages/block-platform/workspace-derived-context-sources.js +24 -0
- package/packages/block-platform/workspace-input-readset.js +107 -0
- package/packages/block-platform/workspace-output-sources.js +49 -0
- package/packages/block-platform/workspace-source-precondition.js +43 -0
- package/packages/block-platform/workspace-state-sources.js +77 -0
- package/packages/block-sdk/adapter-registry.d.ts +28 -0
- package/packages/block-sdk/adapter-registry.js +119 -0
- package/packages/block-sdk/admission.js +149 -0
- package/packages/block-sdk/agent-inputs.js +49 -0
- package/packages/block-sdk/agent-inspection.js +112 -0
- package/packages/block-sdk/animated-assets-host.d.ts +25 -0
- package/packages/block-sdk/animated-assets-host.js +16 -0
- package/packages/block-sdk/appearance.js +46 -0
- package/packages/block-sdk/asset-generation-host.d.ts +4 -0
- package/packages/block-sdk/asset-generation-host.js +11 -0
- package/packages/block-sdk/audio-generation-example.js +14 -0
- package/packages/block-sdk/audio-score-host.d.ts +11 -0
- package/packages/block-sdk/audio-score-host.js +28 -0
- package/packages/block-sdk/block-storage.d.ts +8 -0
- package/packages/block-sdk/block-storage.js +13 -0
- package/packages/block-sdk/blueprint-host-services.d.ts +11 -0
- package/packages/block-sdk/blueprint-host-services.js +5 -0
- package/packages/block-sdk/blueprint-workspace-host.d.ts +13 -0
- package/packages/block-sdk/blueprint-workspace-host.js +8 -0
- package/packages/block-sdk/board-editor-host.d.ts +18 -0
- package/packages/block-sdk/board-editor-host.js +14 -0
- package/packages/block-sdk/browser-application-artifacts.d.ts +45 -0
- package/packages/block-sdk/browser-application-artifacts.js +144 -0
- package/packages/block-sdk/browser-application-execution.d.ts +40 -0
- package/packages/block-sdk/browser-application-execution.js +106 -0
- package/packages/block-sdk/browser-application-guest.d.ts +32 -0
- package/packages/block-sdk/browser-application-guest.js +126 -0
- package/packages/block-sdk/browser-application.d.ts +22 -0
- package/packages/block-sdk/browser-application.js +102 -0
- package/packages/block-sdk/builder-contract.js +133 -0
- package/packages/block-sdk/byok-payment-host.d.ts +9 -0
- package/packages/block-sdk/byok-payment-host.js +20 -0
- package/packages/block-sdk/canvas-chat-build-broker.d.ts +2 -0
- package/packages/block-sdk/canvas-chat-build-broker.js +2 -0
- package/packages/block-sdk/canvas-chat-descriptor-broker.d.ts +2 -0
- package/packages/block-sdk/canvas-chat-descriptor-broker.js +2 -0
- package/packages/block-sdk/canvas-chat-edit-broker.d.ts +2 -0
- package/packages/block-sdk/canvas-chat-edit-broker.js +2 -0
- package/packages/block-sdk/canvas-chat-host.d.ts +30 -0
- package/packages/block-sdk/canvas-chat-host.js +19 -0
- package/packages/block-sdk/canvas-generation-host.d.ts +8 -0
- package/packages/block-sdk/canvas-generation-host.js +12 -0
- package/packages/block-sdk/canvas-node-host.d.ts +7 -0
- package/packages/block-sdk/canvas-node-host.js +38 -0
- package/packages/block-sdk/canvas-timing.d.ts +2 -0
- package/packages/block-sdk/canvas-timing.js +2 -0
- package/packages/block-sdk/canvas-workspace-host.d.ts +5 -0
- package/packages/block-sdk/canvas-workspace-host.js +19 -0
- package/packages/block-sdk/capabilities.js +675 -0
- package/packages/block-sdk/capability-example.js +8 -0
- package/packages/block-sdk/cloud-storage.d.ts +33 -0
- package/packages/block-sdk/cloud-storage.js +103 -0
- package/packages/block-sdk/collaboration-admission.js +55 -0
- package/packages/block-sdk/comfyui-example.js +25 -0
- package/packages/block-sdk/comfyui-import.js +107 -0
- package/packages/block-sdk/comfyui-models.js +17 -0
- package/packages/block-sdk/comfyui.js +273 -0
- package/packages/block-sdk/configured-connection.js +17 -0
- package/packages/block-sdk/connected-app-view.js +8 -0
- package/packages/block-sdk/connected-app.js +66 -0
- package/packages/block-sdk/connection-adapters.js +173 -0
- package/packages/block-sdk/connection-client.js +16 -0
- package/packages/block-sdk/context.js +53 -0
- package/packages/block-sdk/contracts.js +329 -0
- package/packages/block-sdk/csv-table.js +32 -0
- package/packages/block-sdk/cursor-anchor.js +26 -0
- package/packages/block-sdk/data-values.d.ts +31 -0
- package/packages/block-sdk/data-values.js +92 -0
- package/packages/block-sdk/define-block.d.ts +3 -0
- package/packages/block-sdk/define-block.js +21 -0
- package/packages/block-sdk/desktop-example.js +41 -0
- package/packages/block-sdk/desktop-execution.js +109 -0
- package/packages/block-sdk/desktop-permissions.js +2 -0
- package/packages/block-sdk/desktop-tools.js +35 -0
- package/packages/block-sdk/document-drafts.d.ts +18 -0
- package/packages/block-sdk/document-drafts.js +45 -0
- package/packages/block-sdk/document-identity.d.ts +39 -0
- package/packages/block-sdk/document-identity.js +113 -0
- package/packages/block-sdk/document-operations.js +90 -0
- package/packages/block-sdk/document-store-binding.d.ts +10 -0
- package/packages/block-sdk/document-store-binding.js +74 -0
- package/packages/block-sdk/document-store.d.ts +57 -0
- package/packages/block-sdk/document-store.js +222 -0
- package/packages/block-sdk/editor-execution-host.d.ts +26 -0
- package/packages/block-sdk/editor-execution-host.js +8 -0
- package/packages/block-sdk/example-license.js +6 -0
- package/packages/block-sdk/examples.js +29 -0
- package/packages/block-sdk/export-admission.js +27 -0
- package/packages/block-sdk/export-policy.d.ts +35 -0
- package/packages/block-sdk/export-policy.js +24 -0
- package/packages/block-sdk/file-bundle.js +22 -0
- package/packages/block-sdk/first-party-packages.js +168 -0
- package/packages/block-sdk/generation-catalog.js +115 -0
- package/packages/block-sdk/guest-project-patches.js +23 -0
- package/packages/block-sdk/guest-requirements.js +30 -0
- package/packages/block-sdk/guest-results.js +19 -0
- package/packages/block-sdk/image-description-example.js +9 -0
- package/packages/block-sdk/image-generation-example.js +8 -0
- package/packages/block-sdk/index.d.ts +673 -0
- package/packages/block-sdk/index.js +166 -0
- package/packages/block-sdk/input-source-policy.js +21 -0
- package/packages/block-sdk/interaction-values.d.ts +7 -0
- package/packages/block-sdk/interaction-values.js +13 -0
- package/packages/block-sdk/interactive-requirements.js +33 -0
- package/packages/block-sdk/javascript.js +97 -0
- package/packages/block-sdk/job-continuations.js +10 -0
- package/packages/block-sdk/json-schema.js +104 -0
- package/packages/block-sdk/license-fingerprint.js +41 -0
- package/packages/block-sdk/license-texts.js +9 -0
- package/packages/block-sdk/local-admission.js +30 -0
- package/packages/block-sdk/local-edit-host.d.ts +8 -0
- package/packages/block-sdk/local-edit-host.js +7 -0
- package/packages/block-sdk/media-analysis-example.js +11 -0
- package/packages/block-sdk/media-description-host.d.ts +9 -0
- package/packages/block-sdk/media-description-host.js +19 -0
- package/packages/block-sdk/media-export-host.js +8 -0
- package/packages/block-sdk/media-import-formats.js +31 -0
- package/packages/block-sdk/media-reference-url.d.ts +2 -0
- package/packages/block-sdk/media-reference-url.js +7 -0
- package/packages/block-sdk/media-transform.d.ts +4 -0
- package/packages/block-sdk/media-transform.js +186 -0
- package/packages/block-sdk/media-upload-host.d.ts +10 -0
- package/packages/block-sdk/media-upload-host.js +6 -0
- package/packages/block-sdk/mock-host.d.ts +42 -0
- package/packages/block-sdk/mock-host.js +208 -0
- package/packages/block-sdk/mock-media.d.ts +5 -0
- package/packages/block-sdk/mock-media.js +59 -0
- package/packages/block-sdk/model-portability.js +41 -0
- package/packages/block-sdk/module-bundle.js +71 -0
- package/packages/block-sdk/module-example.js +20 -0
- package/packages/block-sdk/module-hosted.js +82 -0
- package/packages/block-sdk/module-node.js +75 -0
- package/packages/block-sdk/module-runtime.js +105 -0
- package/packages/block-sdk/module-worker.js +100 -0
- package/packages/block-sdk/native-agent-contract.d.ts +15 -0
- package/packages/block-sdk/native-agent-contract.js +32 -0
- package/packages/block-sdk/native-application-execution.js +108 -0
- package/packages/block-sdk/native-application.js +23 -0
- package/packages/block-sdk/native-host-providers.d.ts +3 -0
- package/packages/block-sdk/native-host-providers.js +19 -0
- package/packages/block-sdk/native-preview-contract.d.ts +11 -0
- package/packages/block-sdk/native-preview-contract.js +18 -0
- package/packages/block-sdk/native-workspace-contract.d.ts +20 -0
- package/packages/block-sdk/native-workspace-contract.js +108 -0
- package/packages/block-sdk/network.js +117 -0
- package/packages/block-sdk/package-jobs.js +105 -0
- package/packages/block-sdk/package-semantics.d.ts +2 -0
- package/packages/block-sdk/package-semantics.js +21 -0
- package/packages/block-sdk/package.json +39 -0
- package/packages/block-sdk/panel-crop-host.d.ts +8 -0
- package/packages/block-sdk/panel-crop-host.js +10 -0
- package/packages/block-sdk/panel-generation-host.d.ts +12 -0
- package/packages/block-sdk/panel-generation-host.js +15 -0
- package/packages/block-sdk/panel-prompt-edit-host.d.ts +9 -0
- package/packages/block-sdk/panel-prompt-edit-host.js +8 -0
- package/packages/block-sdk/panel-settings-host.d.ts +7 -0
- package/packages/block-sdk/panel-settings-host.js +8 -0
- package/packages/block-sdk/panel-workflow-host.d.ts +23 -0
- package/packages/block-sdk/panel-workflow-host.js +38 -0
- package/packages/block-sdk/pipeline-asset-host.d.ts +4 -0
- package/packages/block-sdk/pipeline-asset-host.js +4 -0
- package/packages/block-sdk/pipeline-execution-host.d.ts +19 -0
- package/packages/block-sdk/pipeline-execution-host.js +5 -0
- package/packages/block-sdk/pipeline-node-generation-host.d.ts +9 -0
- package/packages/block-sdk/pipeline-node-generation-host.js +9 -0
- package/packages/block-sdk/pipeline-runtime-host.d.ts +7 -0
- package/packages/block-sdk/pipeline-runtime-host.js +29 -0
- package/packages/block-sdk/platform-checks.js +135 -0
- package/packages/block-sdk/port-types.d.ts +8 -0
- package/packages/block-sdk/port-types.js +102 -0
- package/packages/block-sdk/portable-archive.js +47 -0
- package/packages/block-sdk/portable-github.js +43 -0
- package/packages/block-sdk/portable-media-actions.d.ts +4 -0
- package/packages/block-sdk/portable-media-actions.js +69 -0
- package/packages/block-sdk/portable-media-contracts.d.ts +15 -0
- package/packages/block-sdk/portable-media-contracts.js +96 -0
- package/packages/block-sdk/portable.js +219 -0
- package/packages/block-sdk/portable.schema.json +185 -0
- package/packages/block-sdk/presenter-build-broker.d.ts +3 -0
- package/packages/block-sdk/presenter-build-broker.js +2 -0
- package/packages/block-sdk/presenter-gap-broker.d.ts +2 -0
- package/packages/block-sdk/presenter-gap-broker.js +2 -0
- package/packages/block-sdk/presenter-host.d.ts +26 -0
- package/packages/block-sdk/presenter-host.js +13 -0
- package/packages/block-sdk/presenter-insertion-broker.d.ts +2 -0
- package/packages/block-sdk/presenter-insertion-broker.js +2 -0
- package/packages/block-sdk/presenter-placement-broker.d.ts +3 -0
- package/packages/block-sdk/presenter-placement-broker.js +2 -0
- package/packages/block-sdk/presenter-provision-broker.d.ts +2 -0
- package/packages/block-sdk/presenter-provision-broker.js +2 -0
- package/packages/block-sdk/production-context-examples.js +19 -0
- package/packages/block-sdk/project-flow-contract.js +99 -0
- package/packages/block-sdk/python-connection.js +17 -0
- package/packages/block-sdk/recipe.js +100 -0
- package/packages/block-sdk/reference-source.js +39 -0
- package/packages/block-sdk/remix-policy.d.ts +4 -0
- package/packages/block-sdk/remix-policy.js +32 -0
- package/packages/block-sdk/repository-application.d.ts +41 -0
- package/packages/block-sdk/repository-application.js +126 -0
- package/packages/block-sdk/requirement-suggestions.js +5 -0
- package/packages/block-sdk/runtime.js +74 -0
- package/packages/block-sdk/sandbox-node.js +61 -0
- package/packages/block-sdk/sandbox-node.worker.js +18 -0
- package/packages/block-sdk/schema-fields.js +60 -0
- package/packages/block-sdk/script-collaboration.d.ts +3 -0
- package/packages/block-sdk/script-collaboration.js +4 -0
- package/packages/block-sdk/script-host-services.js +8 -0
- package/packages/block-sdk/script-presentation.d.ts +13 -0
- package/packages/block-sdk/script-presentation.js +9 -0
- package/packages/block-sdk/script-project-browser.d.ts +3 -0
- package/packages/block-sdk/script-project-browser.js +5 -0
- package/packages/block-sdk/script-server-services.d.ts +3 -0
- package/packages/block-sdk/script-server-services.js +6 -0
- package/packages/block-sdk/sdk-compatibility.js +30 -0
- package/packages/block-sdk/semantic-contracts.d.ts +37 -0
- package/packages/block-sdk/semantic-contracts.js +84 -0
- package/packages/block-sdk/semantic-declarations.js +25 -0
- package/packages/block-sdk/semantic-freshness.js +7 -0
- package/packages/block-sdk/semantic-relationships.js +15 -0
- package/packages/block-sdk/semantic-schema.js +93 -0
- package/packages/block-sdk/shared-agent-controls.js +53 -0
- package/packages/block-sdk/shared-controls.js +153 -0
- package/packages/block-sdk/shared-view.js +117 -0
- package/packages/block-sdk/shared-work.js +18 -0
- package/packages/block-sdk/shot-planning-host-services.d.ts +26 -0
- package/packages/block-sdk/shot-planning-host-services.js +17 -0
- package/packages/block-sdk/shot-planning-sandbox-host.d.ts +2 -0
- package/packages/block-sdk/shot-planning-sandbox-host.js +2 -0
- package/packages/block-sdk/source-rights.js +22 -0
- package/packages/block-sdk/speech-example.js +8 -0
- package/packages/block-sdk/state-example.js +6 -0
- package/packages/block-sdk/state-migrations.js +49 -0
- package/packages/block-sdk/state.js +13 -0
- package/packages/block-sdk/testing.js +94 -0
- package/packages/block-sdk/timeline-edits.js +37 -0
- package/packages/block-sdk/timeline-example.js +14 -0
- package/packages/block-sdk/timeline-mixer.js +50 -0
- package/packages/block-sdk/timeline-proposal-example.js +7 -0
- package/packages/block-sdk/transcription-example.js +7 -0
- package/packages/block-sdk/transition-settings.js +7 -0
- package/packages/block-sdk/trigger-examples.d.ts +5 -0
- package/packages/block-sdk/trigger-examples.js +29 -0
- package/packages/block-sdk/triggers.d.ts +19 -0
- package/packages/block-sdk/triggers.js +85 -0
- package/packages/block-sdk/two-link-workflow.js +47 -0
- package/packages/block-sdk/universal-resolver.d.ts +87 -0
- package/packages/block-sdk/universal-resolver.js +134 -0
- package/packages/block-sdk/video-assets-host.d.ts +6 -0
- package/packages/block-sdk/video-assets-host.js +35 -0
- package/packages/block-sdk/video-generation-example.js +8 -0
- package/packages/block-sdk/view-bridge.d.ts +6 -0
- package/packages/block-sdk/view-bridge.js +51 -0
- package/packages/block-sdk/view-design.js +41 -0
- package/packages/block-sdk/view-renderer.js +156 -0
- package/packages/block-sdk/view-source.js +24 -0
- package/packages/block-sdk/view.js +224 -0
- package/packages/block-sdk/voiceover-host-services.d.ts +26 -0
- package/packages/block-sdk/voiceover-host-services.js +10 -0
- package/packages/block-sdk/voiceover-workspace-host.d.ts +29 -0
- package/packages/block-sdk/voiceover-workspace-host.js +8 -0
- package/packages/block-sdk/web-example.js +14 -0
- package/packages/block-sdk/workflow-approvals.d.ts +6 -0
- package/packages/block-sdk/workflow-approvals.js +15 -0
- package/packages/block-sdk/workflow-events.d.ts +13 -0
- package/packages/block-sdk/workflow-events.js +16 -0
- package/packages/block-sdk/workspace-application.d.ts +10 -0
- package/packages/block-sdk/workspace-application.js +58 -0
- package/packages/block-sdk/workspace-edits.js +5 -0
- package/packages/block-sdk/workspace-navigation.d.ts +2 -0
- package/packages/block-sdk/workspace-navigation.js +18 -0
- package/packages/block-sdk/workspace-sync.d.ts +8 -0
- package/packages/block-sdk/workspace-sync.js +47 -0
- package/packages/block-sdk/youtube-connection-host.d.ts +3 -0
- package/packages/block-sdk/youtube-connection-host.js +3 -0
- package/packages/block-sdk/youtube-host.d.ts +4 -0
- package/packages/block-sdk/youtube-host.js +6 -0
- package/packages/design-system/theme.css +259 -0
- package/portable.schema.json +185 -0
- package/README.md +0 -3
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import {REVENUE_REVIEW_PROJECT_TYPES} from './revenue-review-project-types.js';
|
|
2
|
+
import {PRODUCT_AD_VARIANTS_PROJECT_TYPE,PRIOR_PRODUCT_AD_VARIANTS_PROJECT_TYPE,PREVIOUS_PRODUCT_AD_VARIANTS_PROJECT_TYPE} from './product-ad-variants-project-type.js';
|
|
3
|
+
import {FIRST_PARTY_SDK_PACKAGES} from '../block-sdk/first-party-packages.js';
|
|
4
|
+
import {FIRST_REVENUE_PROJECT_TYPES} from './first-revenue-project-types.js';
|
|
5
|
+
import { SDK_VERSION, ROOT_CHAT_ID } from '../block-sdk/contracts.js';
|
|
6
|
+
import {SCRIPT_WRITER_BLOCK} from './script-writer.js';
|
|
7
|
+
import {VIDEO_ASSETS_BLOCK} from './video-assets.js';
|
|
8
|
+
import {HOST_RELEASE_MANIFEST_SNAPSHOTS} from './host-release-manifests.js';
|
|
9
|
+
// Host releases stay available for saved projects until their complete UI and
|
|
10
|
+
// behavior exist behind portable SDK contracts. Read their manifests from the
|
|
11
|
+
// release directories so an old pin never inherits a newer release's metadata.
|
|
12
|
+
const HOST_RELEASE_MANIFESTS=new Map(HOST_RELEASE_MANIFEST_SNAPSHOTS.map(manifest=>[`${manifest.id}@${manifest.version}`,manifest]));
|
|
13
|
+
const hostReleaseManifest=(id,version)=>{
|
|
14
|
+
const manifest=HOST_RELEASE_MANIFESTS.get(`${id}@${version}`);
|
|
15
|
+
if(!manifest)throw new Error(`Missing native host version manifest: ${id}@${version}`);
|
|
16
|
+
return structuredClone(manifest);
|
|
17
|
+
};
|
|
18
|
+
const definitions = [
|
|
19
|
+
['chat', 'Production chat', 'workspace', 'brief', 'script', 'Develop a script or production decision in a scoped conversation after the protected starting chat.', 'ProductionWorkspaceNode.jsx'],
|
|
20
|
+
['research', 'Research', 'task', 'text', 'research', 'Find supporting material for a topic and return a research dossier with citations.', 'ProductionWorkspaceNode.jsx'],
|
|
21
|
+
['script', 'Script', 'workspace', 'brief', 'script', 'Develop and review a script from the project brief.', 'NarrativeCompiler.jsx'],
|
|
22
|
+
['voiceover', 'Voiceover', 'workspace', 'script', 'audio', 'Generate, record, or import narration and prepare it for timed visuals.', 'VoiceoverStep.jsx'],
|
|
23
|
+
['transcribe', 'Transcription', 'task', 'audio', 'transcript', 'Turn audio into editable timed words for captions and shot planning.', 'TranscriptionEditor.jsx'],
|
|
24
|
+
['shot-plan', 'Shot planning', 'workspace', 'transcript', 'shot-plan', 'Break narration into reviewed shots with visual intent and timing.', 'ShotMapReview.jsx'],
|
|
25
|
+
['blueprint', 'Blueprint', 'workspace', 'brief', 'bible', 'Organize the story, cast, locations, and visual style into a reusable production guide.', 'BibleEditor.jsx'],
|
|
26
|
+
['character', 'Character reference', 'workspace', 'text', 'character', 'Build a consistent character identity with reusable visual references.', 'CharacterReferenceNode.jsx'],
|
|
27
|
+
['location', 'Location reference', 'workspace', 'text', 'location', 'Build a location identity and reference images for consistent settings.', 'LocationReferenceNode.jsx'],
|
|
28
|
+
['style', 'Style reference', 'workspace', 'text', 'style', 'Create a reusable art direction and its visual examples.', 'StyleNode.jsx'],
|
|
29
|
+
['pipeline', 'Production canvas', 'workspace', 'bible', 'pipeline', 'Arrange production Blocks and generate assets in the Canvas workspace.', 'WorkflowCanvas.jsx'],
|
|
30
|
+
['import-media', 'Import media', 'task', null, 'asset[]', 'Bring selected images, video, and audio into the project media library.', 'MediaUploadNode.jsx'],
|
|
31
|
+
['generate-image', 'Generate image', 'task', 'text', 'image', 'Generate a new image using a prompt and selected identity or style references.', 'ImageGenNode.jsx'],
|
|
32
|
+
['generate-video', 'Generate video', 'task', 'image', 'video', 'Generate a video clip from an image, prompt, and motion settings.', 'VideoGenNode.jsx'],
|
|
33
|
+
['thumbnail', 'Thumbnail', 'task', 'text', 'image', 'Create a thumbnail image for the finished video.', 'ThumbnailNode.jsx'],
|
|
34
|
+
['describe-media', 'Describe media', 'task', 'image', 'text', 'Describe the visible content of an image for production planning.', 'ImageDescriberNode.jsx'],
|
|
35
|
+
['image-editor', 'Image editor', 'workspace', 'image', 'image', 'Crop, adjust, and composite an image while retaining its original version.', 'ProductionWorkspaceNode.jsx'],
|
|
36
|
+
['compare', 'Compare assets', 'workspace', 'asset[]', 'asset', 'Review candidate assets and choose a version for the next step.', 'CompareNode.jsx'],
|
|
37
|
+
['stock-search', 'Stock media', 'workspace', 'text', 'asset[]', 'Search real-world media and import selected licensed assets.', 'ProductionWorkspaceNode.jsx'],
|
|
38
|
+
['panel-strip', 'Image panels', 'workspace', 'audio', 'panel-document', 'Build a timed sequence of consistent images and diagrams around narration.', 'StripStep.jsx'],
|
|
39
|
+
['board-editor', 'White Board Motion', 'workspace', 'audio', 'board-document', 'Arrange and animate editable boards with text, media, and narration.', 'CanvasEditorStep.jsx'],
|
|
40
|
+
['animated-scene', 'Animated scene', 'workspace', 'shot-plan', 'scene-document', 'Compose animated scenes with object motion and camera direction.', 'AnimatedV2AssetStep.jsx'],
|
|
41
|
+
['editor', 'Video editor', 'workspace', 'asset[]', 'timeline', 'Assemble and edit video, audio, captions, and effects on a shared timeline.', 'VideoEditor.jsx'],
|
|
42
|
+
['captions', 'Captions', 'editor-extension', 'transcript', 'timeline', 'Place timed editable captions on the selected timeline.', 'editorAI.js'],
|
|
43
|
+
['grade', 'Color grade', 'editor-extension', 'timeline-range', 'timeline', 'Adjust the color and tone of selected clips without replacing originals.', 'editorAdds.js'],
|
|
44
|
+
['transition', 'Transition', 'editor-extension', 'timeline-range', 'timeline', 'Add a configurable transition at a clip boundary.', 'TransitionNode.jsx'],
|
|
45
|
+
['motion-graphics', 'Motion graphics', 'editor-extension', 'timeline-range', 'timeline', 'Add editable titles, figures, graphs, and motion accents to a sequence.', 'FinalEditPanel.jsx'],
|
|
46
|
+
['rough-cut', 'AI Rough Cut', 'task', 'timeline', 'timeline', 'Propose a rough cut that aligns available footage with narration.', 'RoughCutPanel.jsx'],
|
|
47
|
+
['final-edit', 'AI Final Edit', 'task', 'timeline', 'timeline', 'Propose a polish pass for an existing cut while keeping edits reviewable.', 'FinalEditPanel.jsx'],
|
|
48
|
+
['edit-assistant', 'Edit assistant', 'workspace', 'timeline-range', 'timeline', 'Turn a request about a selected range into a reviewable edit proposal.', 'VibeRegionSlider.jsx'],
|
|
49
|
+
['score', 'Audio scoring', 'workspace', 'timeline', 'timeline', 'Create and position music and sound effects around the video.', 'AudioScorePanel.jsx'],
|
|
50
|
+
['export-video', 'Export video', 'task', 'timeline', 'video', 'Render an accepted timeline to a video file using available device capabilities.', 'exportRender/index.js'],
|
|
51
|
+
['export-audio', 'Export audio', 'task', 'timeline', 'audio', 'Mix and export the timeline audio to a standalone file.', 'exportRender/index.js'],
|
|
52
|
+
['export-timeline', 'Export timeline', 'task', 'timeline', 'json', 'Export the timeline structure for another editing application.', 'fcpxml.js'],
|
|
53
|
+
['youtube', 'YouTube hub', 'workspace', 'video', 'json', 'Analyze channel performance and manage an authorized video upload.', 'YouTubeScreen.jsx'],
|
|
54
|
+
];
|
|
55
|
+
const LEGACY_BLOCKS = definitions.map(([key, name, kind, input, output, description, source]) => ({
|
|
56
|
+
manifest: { schemaVersion: 1, sdkVersion: SDK_VERSION, id: `sm.${key}`, name, version: '1.0.0', kind, runtime: 'host', description, inputs: input ? { input: { type: input } } : {}, outputs: { output: { type: output } }, permissions: { project: [], network: [], filesystem: [], secrets: [] } },
|
|
57
|
+
source, summary: { text: description, origin: 'llm', generation: 'build-time', generator: 'Codex', status: 'ready' }, adapterStatus: 'legacy',
|
|
58
|
+
}));
|
|
59
|
+
const types = [
|
|
60
|
+
['guided', 'Guided', 'Plan a video from an idea, build references and footage, then edit and export.', ['script', 'voiceover', 'shot-plan', 'blueprint', 'pipeline', 'editor', 'export-video']],
|
|
61
|
+
['blank', 'Blank Canvas', 'Start with your own media and production canvas, then assemble a video.', ['import-media', 'pipeline', 'editor', 'export-video']],
|
|
62
|
+
['imagePanel', 'Image Panels', 'Turn narration into a timed visual sequence, refine the cut, and export.', ['voiceover', 'panel-strip', 'editor', 'export-video']],
|
|
63
|
+
['whiteboard', 'White Board Motion', 'Build animated boards around narration, then refine and export the video.', ['voiceover', 'board-editor', 'editor', 'export-video']],
|
|
64
|
+
['animated', 'Animated Studio', 'Plan and compose animated scenes, then assemble and export the sequence.', ['voiceover', 'shot-plan', 'animated-scene', 'editor', 'export-video']],
|
|
65
|
+
];
|
|
66
|
+
const LEGACY_TYPES = types.map(([legacyMode, name, description, stages]) => ({ schemaVersion: 1, id: `sm.${legacyMode.toLowerCase()}`, version: '1.0.0', name, description, legacyMode, stages: stages.map((id, i) => ({ id: `stage-${i + 1}`, blockId: `sm.${id}`, version: '1.0.0', label: LEGACY_BLOCKS.find(b => b.manifest.id === `sm.${id}`).manifest.name })), summary: { text: description, origin: 'llm', generation: 'build-time', generator: 'Codex', status: 'ready' } }));
|
|
67
|
+
|
|
68
|
+
// The public catalog describes whole production screens. Old component-level
|
|
69
|
+
// adapters remain version-addressable solely for saved workflow compatibility.
|
|
70
|
+
const screens = [
|
|
71
|
+
['voiceover','Voiceover','voiceover','VoiceoverStep.jsx','Turn your script into speech, or record your own voice.',['Narration and voices','Recording and import','Transcript and timing']],
|
|
72
|
+
['shot-plan','Shots','shotMap','ShotMapReview.jsx','Plan each shot and match it to the voice.',['Shot sequence','Visual directions','Timing and versions']],
|
|
73
|
+
['blueprint','Blueprint','bible','BibleEditor.jsx','Keep your story, characters, places, and art style in one place.',['Story and scenes','Characters and locations','Visual direction']],
|
|
74
|
+
['pipeline','Canvas','canvas','WorkflowCanvas.jsx','Make images and videos, and keep your characters looking the same.',['Persistent references','Media generation','Assets and versions']],
|
|
75
|
+
['editor','Editor','editor','VideoEditor.jsx','Cut clips, add sound and text, then save your video.',['Video and audio timeline','Captions and effects','Export']],
|
|
76
|
+
['panel-strip','Image Panels','shotMap','StripStep.jsx','Turn your script into pictures that play with the voice.',['Scenes and panels','Consistent artwork','Timing and editor handoff']],
|
|
77
|
+
['board-editor','White Board Motion','canvasEditor','CanvasEditorStep.jsx','Make text and pictures move on a board with a voice.',['Boards and media','Editable animation','Narration and handoff']],
|
|
78
|
+
['animated-scene','Assets','assetGen','AnimatedV2AssetStep.jsx','Prepare pictures, objects, and camera moves for your scenes.',['Scenes and assets','Object and camera motion','Editor handoff']],
|
|
79
|
+
];
|
|
80
|
+
const HOST_WORKSPACE_BLOCKS = [SCRIPT_WRITER_BLOCK,...screens.map(([key,name,phase,source,description,features])=>{
|
|
81
|
+
const legacy=LEGACY_BLOCKS.find(block=>block.manifest.id===`sm.${key}`);
|
|
82
|
+
const version=key==='editor'?'1.5.0':key==='pipeline'?'1.2.0':'1.1.0';
|
|
83
|
+
return {...legacy,manifest:hostReleaseManifest(legacy.manifest.id,version),source,workspace:{phase,features},summary:{...legacy.summary,text:description},adapterStatus:'workspace'};
|
|
84
|
+
})];
|
|
85
|
+
HOST_WORKSPACE_BLOCKS.splice(HOST_WORKSPACE_BLOCKS.findIndex(block=>block.manifest.id==='sm.pipeline')+1,0,VIDEO_ASSETS_BLOCK);
|
|
86
|
+
// Promote a portable workspace after its accepted production MVP and rendered
|
|
87
|
+
// acceptance are complete; advanced host extensions can remain on old exact pins. Exact portable releases remain usable as normal
|
|
88
|
+
// Steps before promotion; this map only controls the default production route.
|
|
89
|
+
export const CURRENT_PORTABLE_WORKSPACE_VERSIONS=Object.freeze({'sm.chat':'2.0.3','sm.script':'2.1.4','sm.voiceover':'2.1.4','sm.shot-plan':'2.1.3','sm.blueprint':'2.1.9','sm.pipeline':'2.2.5','sm.video-assets':'2.1.4','sm.panel-strip':'2.3.7','sm.board-editor':'2.2.10','sm.animated-scene':'2.3.8','sm.editor':'2.2.11'});
|
|
90
|
+
export const WORKSPACE_BLOCKS=HOST_WORKSPACE_BLOCKS.map(block=>{
|
|
91
|
+
const version=CURRENT_PORTABLE_WORKSPACE_VERSIONS[block.manifest.id];
|
|
92
|
+
if(!version)return block;
|
|
93
|
+
const portable=FIRST_PARTY_SDK_PACKAGES.find(pkg=>pkg.manifest.id===block.manifest.id&&pkg.manifest.version===version);
|
|
94
|
+
if(!portable)throw Error(`Missing accepted portable workspace ${block.manifest.id}@${version}`);
|
|
95
|
+
return portable;
|
|
96
|
+
});
|
|
97
|
+
// Listed for explanation and source access, never installable or placeable.
|
|
98
|
+
export const STARTING_CHAT_BLOCK = {
|
|
99
|
+
manifest:{schemaVersion:1,sdkVersion:SDK_VERSION,id:ROOT_CHAT_ID,name:'Chat',version:'1.0.0',kind:'workspace',runtime:'host',description:'Plan your video and write the script with AI.',inputs:{},outputs:{},permissions:{project:[],network:[],filesystem:[],secrets:[]}},
|
|
100
|
+
source:'ChatInterface.jsx',protected:true,workspace:{phase:'chat',features:['Production conversation','Script and planning','Shared project context']},adapterStatus:'protected',
|
|
101
|
+
};
|
|
102
|
+
export const SDK_BUILTIN_BLOCKS = FIRST_PARTY_SDK_PACKAGES;
|
|
103
|
+
// Keep exact host-workspace pins available for saved projects and published
|
|
104
|
+
// Project Types after the current discoverable workspace advances a version.
|
|
105
|
+
const historicalWorkspaceBlock=(id,version)=>{
|
|
106
|
+
const current=HOST_WORKSPACE_BLOCKS.find(block=>block.manifest.id===id);
|
|
107
|
+
return {...current,manifest:hostReleaseManifest(id,version)};
|
|
108
|
+
};
|
|
109
|
+
const HISTORICAL_WORKSPACE_BLOCKS = Object.freeze([SCRIPT_WRITER_BLOCK,historicalWorkspaceBlock('sm.script','1.1.0'),historicalWorkspaceBlock('sm.voiceover','1.1.0'),historicalWorkspaceBlock('sm.shot-plan','1.1.0'),historicalWorkspaceBlock('sm.blueprint','1.1.0'),historicalWorkspaceBlock('sm.panel-strip','1.1.0'),historicalWorkspaceBlock('sm.board-editor','1.1.0'),historicalWorkspaceBlock('sm.animated-scene','1.1.0'),historicalWorkspaceBlock('sm.editor','1.1.0'),historicalWorkspaceBlock('sm.editor','1.2.0'),historicalWorkspaceBlock('sm.editor','1.3.0'),historicalWorkspaceBlock('sm.editor','1.4.0'),historicalWorkspaceBlock('sm.editor','1.5.0'),historicalWorkspaceBlock('sm.pipeline','1.1.0'),historicalWorkspaceBlock('sm.pipeline','1.2.0'),VIDEO_ASSETS_BLOCK,historicalWorkspaceBlock('sm.video-assets','1.0.0'),historicalWorkspaceBlock('sm.video-assets','1.1.0')]);
|
|
110
|
+
const DESCRIBE_MEDIA_HOST_1_1=(()=>{const legacy=LEGACY_BLOCKS.find(block=>block.manifest.id==='sm.describe-media');return {...legacy,manifest:{...legacy.manifest,version:'1.1.0'},adapterStatus:'module'};})();
|
|
111
|
+
const YOUTUBE_HOST_1_1=(()=>{const legacy=LEGACY_BLOCKS.find(block=>block.manifest.id==='sm.youtube');return {...legacy,manifest:{...legacy.manifest,version:'1.1.0',description:'Review channel performance and upload an account-owned saved MP4 through a retained authorized session.'},adapterStatus:'workspace'};})();
|
|
112
|
+
const GENERATION_HOST_RELEASES=Object.freeze(['sm.generate-image','sm.generate-video','sm.thumbnail','sm.compare'].flatMap(id=>{
|
|
113
|
+
const legacy=LEGACY_BLOCKS.find(block=>block.manifest.id===id);
|
|
114
|
+
return ['1.1.0','1.2.0'].map(version=>({...legacy,manifest:{...legacy.manifest,version},adapterStatus:'module'}));
|
|
115
|
+
}));
|
|
116
|
+
// Every independently executable first-party release is visible in the
|
|
117
|
+
// Marketplace. Workspace releases remain the full-screen creation experience;
|
|
118
|
+
// SDK releases remain removable, version-pinned building blocks.
|
|
119
|
+
// Publish one current portable release per Block identity. Older portable
|
|
120
|
+
// releases remain in BUILTIN_BLOCKS for exact installed/project pins and their
|
|
121
|
+
// version pages, but do not compete with their successor in current discovery.
|
|
122
|
+
const semverParts=version=>String(version).split(/[.-]/).slice(0,3).map(value=>Number(value)||0);
|
|
123
|
+
const newer=(left,right)=>{const a=semverParts(left),b=semverParts(right);for(let i=0;i<3;i++){if(a[i]!==b[i])return a[i]>b[i];}return false;};
|
|
124
|
+
const currentPortableById=new Map();
|
|
125
|
+
for(const block of SDK_BUILTIN_BLOCKS){const prior=currentPortableById.get(block.manifest.id);if(!prior||newer(block.manifest.version,prior.manifest.version))currentPortableById.set(block.manifest.id,block);}
|
|
126
|
+
export const DISCOVERABLE_SDK_BUILTIN_BLOCKS = Object.freeze([...currentPortableById.values()]);
|
|
127
|
+
export const DISCOVERABLE_BLOCKS = [STARTING_CHAT_BLOCK,...WORKSPACE_BLOCKS,...DISCOVERABLE_SDK_BUILTIN_BLOCKS.filter(block=>!WORKSPACE_BLOCKS.some(current=>current.manifest.id===block.manifest.id&¤t.manifest.version===block.manifest.version))];
|
|
128
|
+
export const BUILTIN_BLOCKS = [STARTING_CHAT_BLOCK,...WORKSPACE_BLOCKS,...HISTORICAL_WORKSPACE_BLOCKS,DESCRIBE_MEDIA_HOST_1_1,YOUTUBE_HOST_1_1,...GENERATION_HOST_RELEASES,...SDK_BUILTIN_BLOCKS.filter(block=>!WORKSPACE_BLOCKS.some(current=>current.manifest.id===block.manifest.id&¤t.manifest.version===block.manifest.version)),...LEGACY_BLOCKS];
|
|
129
|
+
const flows={guided:['voiceover','shot-plan','blueprint','pipeline','editor'],blank:['pipeline','editor'],imagePanel:['voiceover','panel-strip','editor'],whiteboard:['voiceover','board-editor','editor'],animated:['voiceover','shot-plan','animated-scene','editor']};
|
|
130
|
+
const typeDescriptions={
|
|
131
|
+
guided:'Turn an idea into a video, from the script to the final cut.',
|
|
132
|
+
blank:'Start with your own pictures and clips, then make a video.',
|
|
133
|
+
imagePanel:'Make a video with still pictures and a voice.',
|
|
134
|
+
whiteboard:'Make a video with moving text, pictures, and a voice.',
|
|
135
|
+
animated:'Build scenes with moving objects, then put them into a video.',
|
|
136
|
+
};
|
|
137
|
+
// Freeze the actual pre-collaboration-release catalog fallback. Historical type
|
|
138
|
+
// definitions must not follow future changes to the discoverable Block map.
|
|
139
|
+
const PINNED_TYPE_WORKSPACE_VERSIONS=Object.freeze({'voiceover':'2.1.3','shot-plan':'2.1.2','blueprint':'2.1.7','pipeline':'2.2.2','editor':'2.2.7','panel-strip':'2.3.5','board-editor':'2.2.8','animated-scene':'2.3.6'});
|
|
140
|
+
const currentBuiltinTypes=(version,pipelineVersion,scriptVersion=SCRIPT_WRITER_BLOCK.manifest.version,versions={})=>LEGACY_TYPES.map(type=>({...type,description:typeDescriptions[type.legacyMode],summary:{...type.summary,text:typeDescriptions[type.legacyMode]},version,stages:flows[type.legacyMode].map((key,i)=>{const block=WORKSPACE_BLOCKS.find(block=>block.manifest.id===`sm.${key}`);return {id:`stage-${i+1}`,blockId:block.manifest.id,version:versions[key]||(key==='pipeline'?pipelineVersion:key==='script'?scriptVersion:PINNED_TYPE_WORKSPACE_VERSIONS[key]),label:block.manifest.name};})}));
|
|
141
|
+
const PRIOR_HOST_WORKSPACE_VERSIONS={'shot-plan':'1.1.0','blueprint':'1.1.0','panel-strip':'2.3.4','board-editor':'1.1.0','animated-scene':'1.1.0'};
|
|
142
|
+
const PREVIOUS_BUILTIN_TYPES=currentBuiltinTypes('1.2.0','1.2.0',SCRIPT_WRITER_BLOCK.manifest.version,PRIOR_HOST_WORKSPACE_VERSIONS);
|
|
143
|
+
const SHOTS_MIGRATED_TYPES=currentBuiltinTypes('1.3.0','1.2.0',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'1.1.0','board-editor':'1.1.0','animated-scene':'1.1.0'});
|
|
144
|
+
const PRE_PROMOTION_CURRENT_TYPES = PREVIOUS_BUILTIN_TYPES.map(type=>flows[type.legacyMode].includes('shot-plan')?SHOTS_MIGRATED_TYPES.find(next=>next.id===type.id):type);
|
|
145
|
+
const PORTABLE_MVP_TYPES = currentBuiltinTypes('1.4.0','2.2.2',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.5','panel-strip':'2.3.4','board-editor':'2.2.6','animated-scene':'2.3.4'});
|
|
146
|
+
const ADVANCED_PORTABLE_TYPES = currentBuiltinTypes('1.5.0','2.2.2',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.6','panel-strip':'2.3.4','board-editor':'2.2.7','animated-scene':'2.3.5','editor':'2.2.4'});
|
|
147
|
+
const PLAYABLE_EDITOR_TYPES = currentBuiltinTypes('1.6.0','2.2.2',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.6','panel-strip':'2.3.4','board-editor':'2.2.7','animated-scene':'2.3.5','editor':'2.2.5'});
|
|
148
|
+
const EDITOR_AUDIO_TYPES = currentBuiltinTypes('1.7.0','2.2.2',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.6','panel-strip':'2.3.4','board-editor':'2.2.7','animated-scene':'2.3.5','editor':'2.2.6'});
|
|
149
|
+
const MEDIA_LIBRARY_TYPES = currentBuiltinTypes('1.8.0','2.2.2',SCRIPT_WRITER_BLOCK.manifest.version,{'panel-strip':'2.3.4'});
|
|
150
|
+
const PRIOR_SHARED_TYPES = currentBuiltinTypes('1.9.0','2.2.2');
|
|
151
|
+
const SHARED_BLUEPRINT_TYPES = currentBuiltinTypes('1.10.0','2.2.2',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.8'});
|
|
152
|
+
const SHARED_CANVAS_TYPES = currentBuiltinTypes('1.11.0','2.2.3',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.8'});
|
|
153
|
+
const SHARED_WORKSPACE_TYPES = currentBuiltinTypes('1.12.0','2.2.3',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.8','panel-strip':'2.3.6','board-editor':'2.2.9','animated-scene':'2.3.7'});
|
|
154
|
+
const PRIOR_CURRENT_TYPES = currentBuiltinTypes('1.13.0','2.2.3',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.8','panel-strip':'2.3.6','board-editor':'2.2.9','animated-scene':'2.3.7','editor':'2.2.8'});
|
|
155
|
+
const PREVIOUS_PORTABLE_TYPES=currentBuiltinTypes('1.14.0','2.2.4',SCRIPT_WRITER_BLOCK.manifest.version,{'blueprint':'2.1.8','panel-strip':'2.3.6','board-editor':'2.2.9','animated-scene':'2.3.7','editor':'2.2.8'});
|
|
156
|
+
export const CURRENT_BUILTIN_TYPES = [...currentBuiltinTypes('1.15.0','2.2.4','2.1.4',{'voiceover':'2.1.4','shot-plan':'2.1.3','blueprint':'2.1.9','panel-strip':'2.3.7','board-editor':'2.2.10','animated-scene':'2.3.8','editor':'2.2.9'}),...REVENUE_REVIEW_PROJECT_TYPES,PRODUCT_AD_VARIANTS_PROJECT_TYPE,...FIRST_REVENUE_PROJECT_TYPES];
|
|
157
|
+
const HISTORICAL_CURRENT_TYPES=[PRIOR_PRODUCT_AD_VARIANTS_PROJECT_TYPE,PREVIOUS_PRODUCT_AD_VARIANTS_PROJECT_TYPE,...PREVIOUS_PORTABLE_TYPES,...PRIOR_CURRENT_TYPES,...SHARED_WORKSPACE_TYPES,...SHARED_CANVAS_TYPES,...SHARED_BLUEPRINT_TYPES,...PRIOR_SHARED_TYPES,...MEDIA_LIBRARY_TYPES,...EDITOR_AUDIO_TYPES,...PLAYABLE_EDITOR_TYPES,...ADVANCED_PORTABLE_TYPES,...PORTABLE_MVP_TYPES,...PRE_PROMOTION_CURRENT_TYPES,...PREVIOUS_BUILTIN_TYPES.filter(type=>flows[type.legacyMode].includes('shot-plan')),...currentBuiltinTypes('1.1.0','1.1.0','1.1.0',PRIOR_HOST_WORKSPACE_VERSIONS)];
|
|
158
|
+
export const BUILTIN_TYPES = [...CURRENT_BUILTIN_TYPES,...HISTORICAL_CURRENT_TYPES,...LEGACY_TYPES];
|
|
159
|
+
export const workspaceBlock = (id,version)=>DISCOVERABLE_BLOCKS.find(block=>block.manifest.id===id && (!version || block.manifest.version===version));
|
|
160
|
+
export const discoverableBuiltin = item=>!!workspaceBlock((item.manifest || item).id,(item.manifest || item).version);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import {auditProjectTypeConnections} from './project-type-composer.js';
|
|
2
|
+
|
|
3
|
+
export function projectTypeRequirementsForChat(type,catalog=[],{currentStage,contextValues=[]}={}) {
|
|
4
|
+
if(!type)return undefined;
|
|
5
|
+
const values=contextValues.map(value=>value.source?.kind==='block'?{...value,source:{...value.source,stageId:value.source.stepId || value.source.stageId}}:value);
|
|
6
|
+
const audit=auditProjectTypeConnections(type,catalog,{contextValues:values}),enabled=audit.stages.filter(step=>!step.paused),steps=[];
|
|
7
|
+
const currentIndex=enabled.findIndex(step=>step.id===currentStage);
|
|
8
|
+
const relevant=currentIndex<0?enabled:[...enabled.slice(currentIndex),...enabled.slice(0,currentIndex).reverse()];
|
|
9
|
+
const projectContext=[],availableAdapters=[],seenValues=new Set(),seenAdapters=new Set();
|
|
10
|
+
const candidatesFor=decision=>decision.resolverCandidates || decision.candidates;
|
|
11
|
+
const summarizeSource=candidate=>candidate?{kind:String(candidate.kind || candidate.record?.source?.kind || 'unknown').slice(0,40),stepId:candidate.record?.source?.stageId?String(candidate.record.source.stageId).slice(0,160):null,port:candidate.record?.source?.port?String(candidate.record.source.port).slice(0,160):null,materialized:!!candidate.record && Object.hasOwn(candidate.record,'value'),adapter:candidate.adapter?{id:String(candidate.adapter.id).slice(0,160),version:String(candidate.adapter.version).slice(0,80)}:null,...(candidate.conversionBlock?{converter:{id:String(candidate.conversionBlock.id).slice(0,160),version:String(candidate.conversionBlock.version).slice(0,80),input:String(candidate.conversionBlock.input).slice(0,160),output:String(candidate.conversionBlock.output).slice(0,160)}}:{})}:null;
|
|
12
|
+
const blocking=audit.issues.filter(issue=>issue.state!=='needs-user-input');
|
|
13
|
+
const issues=blocking.slice(0,10).map(issue=>({stageId:issue.stageId?String(issue.stageId).slice(0,160):null,message:String(issue.reason || issue.message).slice(0,240)}));
|
|
14
|
+
let size=4500+JSON.stringify(issues).length,metadataSize=0,truncated=blocking.length>issues.length || blocking.some(issue=>String(issue.reason || issue.message).length>240 || String(issue.stageId || '').length>160);
|
|
15
|
+
for(const step of relevant) {
|
|
16
|
+
const row={id:String(step.id).slice(0,160),label:String(step.label).slice(0,160),upcoming:currentIndex<0 || enabled.indexOf(step)>=currentIndex,requirements:step.requirements.slice(0,12).map(decision=>({key:String(decision.key || decision.requirement.key).slice(0,160),description:String(decision.requirement.description || '').slice(0,200),semantic:String(decision.requirement.semantic || '').slice(0,160),type:decision.requirement.type,required:decision.requirement.required,state:decision.state,reason:String(decision.reason || '').slice(0,240),source:summarizeSource(decision.selected),candidates:candidatesFor(decision).slice(0,3).map(summarizeSource)}))};
|
|
17
|
+
row.state=step.state;
|
|
18
|
+
const issue=step.contractIssue?.message || step.connectionIssues?.[0]?.message;
|
|
19
|
+
if(issue)row.issue=String(issue).slice(0,240);
|
|
20
|
+
let length=JSON.stringify(row).length;
|
|
21
|
+
while(size+length>16000 && row.requirements.length>1){row.requirements.pop();length=JSON.stringify(row).length;truncated=true;}
|
|
22
|
+
if(steps.length>=20 || size+length>16000){truncated=true;break;}
|
|
23
|
+
if(step.requirements.length>12 || step.requirements.some(decision=>candidatesFor(decision).length>3))truncated=true;
|
|
24
|
+
steps.push(row);size+=length;
|
|
25
|
+
for(const decision of step.requirements.slice(0,row.requirements.length))for(const candidate of [decision.selected,...candidatesFor(decision)].filter(Boolean)) {
|
|
26
|
+
const record=candidate.record;
|
|
27
|
+
if(record?.id && Object.hasOwn(record,'value') && !seenValues.has(record.id)) {
|
|
28
|
+
seenValues.add(record.id);
|
|
29
|
+
const entry={id:String(record.id).slice(0,160),type:String(record.type || '').slice(0,80),semantic:String(record.semantic || record.role || '').slice(0,160),source:summarizeSource(candidate)};
|
|
30
|
+
const length=JSON.stringify(entry).length;
|
|
31
|
+
if(projectContext.length<20 && metadataSize+length<=4000){projectContext.push(entry);metadataSize+=length;}else truncated=true;
|
|
32
|
+
}
|
|
33
|
+
if(candidate.adapter) {
|
|
34
|
+
const entry={id:String(candidate.adapter.id).slice(0,160),version:String(candidate.adapter.version).slice(0,80),stepId:row.id,requirement:String(decision.key || decision.requirement.key).slice(0,160)},identity=JSON.stringify(entry);
|
|
35
|
+
if(seenAdapters.has(identity))continue;
|
|
36
|
+
seenAdapters.add(identity);
|
|
37
|
+
if(availableAdapters.length<20 && metadataSize+identity.length<=4000){availableAdapters.push(entry);metadataSize+=identity.length;}else truncated=true;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return {schemaVersion:1,projectType:{id:String(type.id || 'draft').slice(0,160),name:String(type.name || 'Project Type').slice(0,160)},currentStage:currentIndex<0?null:String(currentStage).slice(0,160),steps,issues,projectContext,availableAdapters,acceptanceCriteria:(type.acceptanceCriteria||[]).slice(0,24).map(item=>({...item,verified:false})),totalSteps:enabled.length,truncated};
|
|
42
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import {validateVoiceoverDocument} from './voiceover.js';
|
|
2
|
+
import {isKeyed} from '../block-sdk/document-operations.js';
|
|
3
|
+
import { assert, plain, safeDocument, stableStringify } from '../block-sdk/contracts.js';
|
|
4
|
+
import {validateProjectType} from './project-types.js';
|
|
5
|
+
import {BUILTIN_BLOCKS} from './catalog.js';
|
|
6
|
+
import {compileTypeWorkspace} from './type-workspace.js';
|
|
7
|
+
import {createSemanticContext} from './semantic-context.js';
|
|
8
|
+
const EPHEMERAL = new Set(['playhead', 'selection', 'timelineSettings', 'panelState', 'selectedClipId', 'selectedIds', 'playing', 'isPlaying']);
|
|
9
|
+
export function readOnlyEditorUpdate(previous, candidate) {
|
|
10
|
+
let next = previous;
|
|
11
|
+
for (const key of EPHEMERAL) {
|
|
12
|
+
if (Object.hasOwn(candidate, key) && !Object.is(previous[key], candidate[key])) {
|
|
13
|
+
if (next === previous) next = { ...previous };
|
|
14
|
+
next[key] = candidate[key];
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return next;
|
|
18
|
+
}
|
|
19
|
+
export function sharedEditor(editor, scope = 'editor') {
|
|
20
|
+
if(scope === 'chat')return {messages:structuredClone(editor?.messages || [])};
|
|
21
|
+
if(scope === 'animation')return {scenes:(editor?.scenes || []).map(scene=>({...JSON.parse(JSON.stringify(scene)),id:scene.shotId}))};
|
|
22
|
+
if(scope === 'shots')return {shots:structuredClone(editor?.shots || [])};
|
|
23
|
+
if(scope === 'script')return {script:typeof editor?.script === 'string' ? editor.script : ''};
|
|
24
|
+
if(scope === 'blueprint')return {bible:structuredClone(editor?.bible || {})};
|
|
25
|
+
if ((scope === 'board' || scope === 'panels')) {
|
|
26
|
+
const clean = JSON.parse(JSON.stringify(editor || {}));
|
|
27
|
+
assert(plain(clean) && Array.isArray(clean.strip || []), 'DOCUMENT', 'Board document needs a strip array');
|
|
28
|
+
return { ...clean, strip: (clean.strip || []).map(panel => { assert(plain(panel) && typeof panel.panelId === 'string', 'DOCUMENT', 'Board needs a panel ID'); return { ...panel, id: panel.panelId }; }) };
|
|
29
|
+
}
|
|
30
|
+
if (scope === 'canvas') return { ...(editor?.semanticContext !== undefined ? {semanticContext:structuredClone(editor.semanticContext)} : {}), ...(editor?.projectType !== undefined ? {projectType:structuredClone(editor.projectType)} : {}), ...(editor?.projectScanDismissals !== undefined ? {projectScanDismissals:structuredClone(editor.projectScanDismissals)} : {}), workflowArchive:JSON.parse(JSON.stringify(editor?.workflowArchive || [])), nodes: (editor?.nodes || []).map(({ selected, dragging, measured, resizing, ...node }) => JSON.parse(JSON.stringify(node))), edges: (editor?.edges || []).map(({ selected, ...edge }) => JSON.parse(JSON.stringify(edge))) };
|
|
31
|
+
return Object.fromEntries(Object.entries(editor || {}).filter(([k, v]) => !EPHEMERAL.has(k) && v !== undefined).map(([k, v]) => [k, structuredClone(v)]));
|
|
32
|
+
}
|
|
33
|
+
export {diffDocument,applyOperations} from '../block-sdk/document-operations.js';
|
|
34
|
+
|
|
35
|
+
// Retain React identities for untouched values when a remote document arrives.
|
|
36
|
+
// This work runs at synchronization boundaries, never in pointer handlers.
|
|
37
|
+
export function reconcileShared(previous, incoming) {
|
|
38
|
+
if (Object.is(previous, incoming)) return previous;
|
|
39
|
+
if (Array.isArray(previous) && Array.isArray(incoming)) {
|
|
40
|
+
const keyed = isKeyed(previous) && isKeyed(incoming);
|
|
41
|
+
const byId = keyed ? new Map(previous.map(value => [value.id, value])) : null;
|
|
42
|
+
const next = incoming.map((value, i) => reconcileShared(keyed ? byId.get(value.id) : previous[i], value));
|
|
43
|
+
return next.length === previous.length && next.every((value, i) => value === previous[i]) ? previous : next;
|
|
44
|
+
}
|
|
45
|
+
if (plain(previous) && plain(incoming)) {
|
|
46
|
+
const next = Object.fromEntries(Object.entries(incoming).map(([key, value]) => [key, reconcileShared(previous[key], value)]));
|
|
47
|
+
return Object.keys(previous).length === Object.keys(next).length && Object.entries(next).every(([key, value]) => Object.hasOwn(previous, key) && value === previous[key]) ? previous : next;
|
|
48
|
+
}
|
|
49
|
+
return incoming;
|
|
50
|
+
}
|
|
51
|
+
export function mergeLiveDocument(local, remote, scope = 'editor') {
|
|
52
|
+
if(scope === 'animation')return reconcileShared(local,{scenes:remote.scenes.map(({id,...scene})=>scene)});
|
|
53
|
+
if ((scope === 'board' || scope === 'panels')) return reconcileShared(local, { ...remote, strip: remote.strip.map(({ id, ...panel }) => panel) });
|
|
54
|
+
if (scope === 'canvas') {
|
|
55
|
+
const selected = new Map((local.nodes || []).map(n => [n.id, n]));
|
|
56
|
+
const edges = new Map((local.edges || []).map(e => [e.id, e]));
|
|
57
|
+
return reconcileShared(local, { ...local, ...(remote.semanticContext !== undefined ? {semanticContext:remote.semanticContext} : {}), ...(remote.projectType !== undefined ? {projectType:remote.projectType} : {}), ...(remote.projectScanDismissals !== undefined ? {projectScanDismissals:remote.projectScanDismissals} : {}), ...(remote.workflowArchive ? {workflowArchive:remote.workflowArchive} : {}), nodes: remote.nodes.map(n => ({ ...n, selected: !!selected.get(n.id)?.selected, ...(selected.get(n.id)?.dragging ? { dragging: true } : {}), ...(selected.get(n.id)?.resizing ? { resizing: true } : {}), ...(selected.get(n.id)?.measured ? { measured: selected.get(n.id).measured } : {}) })), edges: remote.edges.map(e => ({ ...e, selected: !!edges.get(e.id)?.selected })) });
|
|
58
|
+
}
|
|
59
|
+
const result = { ...local, ...remote };
|
|
60
|
+
for (const key of Object.keys(sharedEditor(local))) if (!Object.hasOwn(remote, key)) delete result[key];
|
|
61
|
+
return reconcileShared(local, result);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function validateLiveDocument(document, scope = 'editor', {experimentalBrowser} = {}) {
|
|
65
|
+
safeDocument(document);
|
|
66
|
+
assert(plain(document), 'DOCUMENT', 'Shared workspace must be an object');
|
|
67
|
+
const collection = (items, name, maximum) => {
|
|
68
|
+
assert(Array.isArray(items) && items.length <= maximum && isKeyed(items) && items.every(item => item.id.length > 0 && item.id.length <= 200), 'DOCUMENT', `Invalid ${name} collection`);
|
|
69
|
+
};
|
|
70
|
+
if(scope === 'chat') {
|
|
71
|
+
assert(Object.keys(document).length===1&&Array.isArray(document.messages)&&document.messages.length<=2000,'DOCUMENT','Chat scope accepts up to 2,000 messages');
|
|
72
|
+
for(const message of document.messages)assert(plain(message)&&['user','assistant','system'].includes(message.role)&&typeof message.content==='string'&&message.content.length<=200000,'DOCUMENT','Chat messages need a role and text');
|
|
73
|
+
} else if(scope === 'animation') {
|
|
74
|
+
assert(Object.keys(document).length===1,'DOCUMENT','Animation scope accepts only its scene collection');
|
|
75
|
+
collection(document.scenes,'animated scenes',1000);
|
|
76
|
+
for(const item of document.scenes){
|
|
77
|
+
assert(item.id===item.shotId && plain(item.scene),'DOCUMENT','Animated scenes need a shot identity and scene document');
|
|
78
|
+
assert(Number.isFinite(item.start)&&Number.isFinite(item.end)&&item.start>=0&&item.end>item.start&&item.end<=86400,'DOCUMENT','Animated scenes need valid start and end times');
|
|
79
|
+
assert(item.versions===undefined||Array.isArray(item.versions),'DOCUMENT','Scene versions must be an array');
|
|
80
|
+
}
|
|
81
|
+
} else if(scope === 'voiceover') {
|
|
82
|
+
validateVoiceoverDocument(document);
|
|
83
|
+
} else if(scope === 'shots') {
|
|
84
|
+
assert(Object.keys(document).length === 1,'DOCUMENT','Shot planning scope accepts only its shot collection');
|
|
85
|
+
collection(document.shots,'shots',2000);
|
|
86
|
+
} else if(scope === 'script') {
|
|
87
|
+
assert(Object.keys(document).length === 1 && typeof document.script === 'string' && document.script.length <= 200000,'DOCUMENT','Script scope accepts only narration text up to 200,000 characters');
|
|
88
|
+
} else if(scope === 'blueprint') {
|
|
89
|
+
assert(Object.keys(document).length === 1 && plain(document.bible),'DOCUMENT','Blueprint scope accepts only its production bible');
|
|
90
|
+
} else if ((scope === 'board' || scope === 'panels')) {
|
|
91
|
+
collection(document.strip, 'boards', 1000);
|
|
92
|
+
for (const panel of document.strip) assert(panel.panelId === panel.id && (scope === 'panels' || typeof panel.type === 'string'), 'DOCUMENT', 'Board identity must match its panel ID');
|
|
93
|
+
} else if (scope === 'canvas') {
|
|
94
|
+
assert(Object.keys(document).every(key => ['nodes','edges','workflowArchive','projectType','semanticContext','projectScanDismissals'].includes(key)), 'DOCUMENT', 'Invalid shared canvas field');
|
|
95
|
+
if(document.projectScanDismissals!==undefined){
|
|
96
|
+
assert(Array.isArray(document.projectScanDismissals)&&document.projectScanDismissals.length<=100,'DOCUMENT','Too many dismissed project suggestions');
|
|
97
|
+
const keys=new Set();
|
|
98
|
+
for(const item of document.projectScanDismissals){
|
|
99
|
+
assert(plain(item)&&Object.keys(item).every(key=>['id','signature'].includes(key))&&typeof item.id==='string'&&item.id.length<=500&&typeof item.signature==='string'&&item.signature.length<=20000,'DOCUMENT','Invalid dismissed project suggestion');
|
|
100
|
+
const key=`${item.signature}:${item.id}`;assert(!keys.has(key),'DOCUMENT','Duplicate dismissed project suggestion');keys.add(key);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (document.projectType !== undefined) {
|
|
104
|
+
const result=validateProjectType(document.projectType,BUILTIN_BLOCKS,{experimentalBrowser});
|
|
105
|
+
assert(result.valid,'DOCUMENT',`Invalid shared Project Type: ${result.errors.map(error=>error.message).join(' ')}`);
|
|
106
|
+
}
|
|
107
|
+
collection(document.nodes,'nodes',5000); collection(document.edges,'edges',10000);
|
|
108
|
+
if(document.semanticContext !== undefined) {
|
|
109
|
+
const context=document.semanticContext;
|
|
110
|
+
assert(plain(context) && context.schemaVersion===1 && Array.isArray(context.values) && context.values.length<=2000,'DOCUMENT','Invalid shared project information');
|
|
111
|
+
const values=[...context.values];
|
|
112
|
+
for(const node of document.nodes)for(const key of ['blockSemanticResults','blockSemanticAnswers']) {
|
|
113
|
+
if(node.data?.[key]===undefined)continue;
|
|
114
|
+
assert(Array.isArray(node.data[key]) && values.length+node.data[key].length<=10000,'DOCUMENT','Invalid or oversized Block information collection');
|
|
115
|
+
values.push(...node.data[key]);
|
|
116
|
+
}
|
|
117
|
+
assert(values.length<=10000,'DOCUMENT','Too many shared project values');
|
|
118
|
+
createSemanticContext({schemaVersion:1,values});
|
|
119
|
+
}
|
|
120
|
+
// Removed/replaced placements are data-only history, outside the runnable
|
|
121
|
+
// graph. Synchronize by entry ID so different teammates' appends coexist.
|
|
122
|
+
if (document.workflowArchive !== undefined) {
|
|
123
|
+
collection(document.workflowArchive, 'workflow history', 2000);
|
|
124
|
+
for (const item of document.workflowArchive) {
|
|
125
|
+
assert(['removed','disabled','replaced','configured','reordered','connections'].includes(item.reason) && typeof item.at === 'string' && Number.isFinite(Date.parse(item.at)), 'DOCUMENT', 'Workflow history needs a reason and timestamp');
|
|
126
|
+
assert(plain(item.step) && typeof item.step.id === 'string' && item.step.id.length > 0 && typeof item.step.blockId === 'string' && typeof item.step.version === 'string' && Number.isInteger(item.index) && item.index >= 0, 'DOCUMENT', 'Workflow history needs its previous placement');
|
|
127
|
+
assert(item.node === null || plain(item.node) && typeof item.node.id === 'string' && plain(item.node.data), 'DOCUMENT', 'Workflow history needs a saved instance');
|
|
128
|
+
collection(item.edges, 'workflow history connections', 10000);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
const ids=new Set(document.nodes.map(node => node.id));
|
|
132
|
+
for (const node of document.nodes) assert(typeof node.type === 'string' && node.type.length <= 100 && plain(node.data) && plain(node.position) && Number.isFinite(node.position.x) && Number.isFinite(node.position.y), 'DOCUMENT', 'Node needs a type, data and finite position');
|
|
133
|
+
for (const edge of document.edges) assert(ids.has(edge.source) && ids.has(edge.target), 'CONFLICT', 'Connected node was removed; reload the shared canvas');
|
|
134
|
+
} else {
|
|
135
|
+
const editorCollections=['clips','audioItems','captions','stickers','textOverlays','zooms','effects','markers','fxEvents','liveOverlays','mediaItems','tracks','timelineVersions'];
|
|
136
|
+
for (const key of editorCollections) if (Object.hasOwn(document,key)) collection(document[key],key,10000);
|
|
137
|
+
if(scope==='editor')assert(typeof document.activeTimelineId==='string'&&document.activeTimelineId.length>0&&document.activeTimelineId.length<=200,'DOCUMENT','Editor needs an active timeline identity');
|
|
138
|
+
}
|
|
139
|
+
return document;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Runs at trusted synchronization boundaries, never executes package code.
|
|
143
|
+
// Ordinary Canvas edits may remove an item; an explicit workflow handoff must
|
|
144
|
+
// contain every required instance so its definition and graph form one commit.
|
|
145
|
+
// The optional application context is an opaque trusted-host capability. It
|
|
146
|
+
// validates already hydrated exact source only; no serializable document flag
|
|
147
|
+
// opens admission, reads artifacts, verifies retained records or grants access.
|
|
148
|
+
// Existing server save routes do not supply it and remain closed to this runtime.
|
|
149
|
+
export async function validateCanvasWorkflowPair(document,{previous,complete=false,experimentalBrowser}={}) {
|
|
150
|
+
validateLiveDocument(document,'canvas',{experimentalBrowser});
|
|
151
|
+
if(document.projectType === undefined) {assert(!complete,'DOCUMENT','A workflow handoff requires its Project Type');return document;}
|
|
152
|
+
const type=document.projectType;
|
|
153
|
+
for(const [index,old] of (previous?.projectType?.packages||[]).entries())
|
|
154
|
+
assert(stableStringify(type.packages?.[index])===stableStringify(old),'VERSION','A saved package changed or moved. Keep existing package slots unchanged and append any newly reviewed release.');
|
|
155
|
+
const {canvas}=await compileTypeWorkspace(type,{experimentalBrowser}),expected=new Map(canvas.nodes.map(node=>[node.id,node])),actual=new Map(document.nodes.map(node=>[node.id,node]));
|
|
156
|
+
for(const [id,node] of expected) {
|
|
157
|
+
const current=actual.get(id);
|
|
158
|
+
assert(current || !complete,'CONFLICT','The workflow is missing a required Block instance. Reload the project before applying it.');
|
|
159
|
+
if(!current)continue;
|
|
160
|
+
const sourceMatches=current.type===node.type && (node.type==='programmableBlockNode'
|
|
161
|
+
? current.data.blockDigest===node.data.blockDigest && stableStringify(current.data.blockPackage ?? null)===stableStringify(node.data.blockPackage)
|
|
162
|
+
: stableStringify(current.data.hostBlock ?? null)===stableStringify(node.data.hostBlock));
|
|
163
|
+
assert(sourceMatches,'CONFLICT','The workflow and Canvas contain different pinned Block source. Reload the project before applying it.');
|
|
164
|
+
}
|
|
165
|
+
if(complete)for(const node of document.nodes)assert(!node.id.startsWith('type-stage-') || !(node.type==='programmableBlockNode' || node.data.hostBlock?.stageId) || expected.has(node.id),'CONFLICT','The Canvas still contains a removed workflow Block. Reload the project before applying it.');
|
|
166
|
+
if(complete)for(const edge of canvas.edges) {
|
|
167
|
+
const producers=document.edges.filter(item=>item.target===edge.target && item.targetHandle===edge.targetHandle);
|
|
168
|
+
assert(producers.length===1 && producers[0].source===edge.source && producers[0].sourceHandle===edge.sourceHandle && stableStringify(producers[0].data?.stillmadeAdapter ?? null)===stableStringify(edge.data?.stillmadeAdapter ?? null),'CONFLICT','The Canvas connections and conversion versions do not match the workflow. Reload the project before applying it.');
|
|
169
|
+
}
|
|
170
|
+
return document;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
// Viewers may select and measure existing graph items, but cannot mutate shared
|
|
174
|
+
// fields, insert/remove items or change their order. Preserve untouched identity.
|
|
175
|
+
export function readOnlyCanvasItems(previous, candidate) {
|
|
176
|
+
const incoming = new Map((Array.isArray(candidate) ? candidate : []).map(item => [item.id,item]));
|
|
177
|
+
let changed = false;
|
|
178
|
+
const next = previous.map(item => {
|
|
179
|
+
const update = incoming.get(item.id);
|
|
180
|
+
if (!update) return item;
|
|
181
|
+
const patch = {};
|
|
182
|
+
for (const key of ['selected','measured']) if (Object.hasOwn(update,key) && update[key] !== item[key]) patch[key] = update[key];
|
|
183
|
+
if (!Object.keys(patch).length) return item;
|
|
184
|
+
changed = true; return {...item,...patch};
|
|
185
|
+
});
|
|
186
|
+
return changed ? next : previous;
|
|
187
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import {assert,plain,compatible,valueMatches,validateValues,stableStringify} from '../block-sdk/contracts.js';
|
|
2
|
+
export const NUMERIC_CONDITION_OPERATORS=Object.freeze(['greater-than','at-least','less-than','at-most']);
|
|
3
|
+
export function conditionOmitsOutputs(manifest){
|
|
4
|
+
const outputs=Object.values(manifest.outputs || {});
|
|
5
|
+
return ['recipe','javascript'].includes(manifest.runtime) && outputs.length>0 && outputs.every(port=>port.required===false && !Object.hasOwn(port,'default'));
|
|
6
|
+
}
|
|
7
|
+
export function inactiveConditionInputs(condition,manifest,inputs){
|
|
8
|
+
if(!condition || !conditionOmitsOutputs(manifest))return null;
|
|
9
|
+
validateCondition(condition,manifest);
|
|
10
|
+
const partial=validateValues(Object.fromEntries(Object.entries(manifest.inputs).map(([key,port])=>[key,{...port,required:false}])),inputs);
|
|
11
|
+
if(!Object.hasOwn(partial,condition.input) && manifest.inputs[condition.input].required!==false)return null;
|
|
12
|
+
return conditionalBypass(condition,manifest,partial)?partial:null;
|
|
13
|
+
}
|
|
14
|
+
export function validateConditionalResult(condition,manifest,input,record){
|
|
15
|
+
const bypass=conditionalBypass(condition || undefined,manifest,input);
|
|
16
|
+
if(bypass){
|
|
17
|
+
assert(record.skipped===true && record.failureRecovery===undefined && record.state===undefined && record.mediaReceipts===undefined && stableStringify(record.outputs)===stableStringify(bypass.outputs),'CONDITION','The saved result does not match this skipped branch.');
|
|
18
|
+
}else assert(!record.skipped || record.failureRecovery!==undefined,'CONDITION','An active Block cannot be marked skipped without a reviewed recovery result.');
|
|
19
|
+
}
|
|
20
|
+
// Bounded data predicates only. No expression language, eval or imported code.
|
|
21
|
+
export function validateDataPredicate(condition,fields) {
|
|
22
|
+
assert(plain(condition) && Object.keys(condition).every(key=>['input','path','operator','value'].includes(key)),'CONDITION','Use an input, field path and supported condition');
|
|
23
|
+
assert(Object.hasOwn(fields,condition.input),'CONDITION','Condition input is unavailable');
|
|
24
|
+
assert(Array.isArray(condition.path) && condition.path.length<=8 && condition.path.every(key=>typeof key === 'string' && /^[a-zA-Z0-9_-]{1,80}$/.test(key) && !['__proto__','prototype','constructor'].includes(key)),'CONDITION','Choose up to eight safe field names');
|
|
25
|
+
assert(['present','equals','not-equals',...NUMERIC_CONDITION_OPERATORS].includes(condition.operator),'CONDITION','Unsupported condition operator');
|
|
26
|
+
if(NUMERIC_CONDITION_OPERATORS.includes(condition.operator))assert(typeof condition.value==='number' && Number.isFinite(condition.value),'CONDITION','Compare with a finite number');
|
|
27
|
+
else if(condition.operator !== 'present')assert(condition.value === null || ['string','boolean'].includes(typeof condition.value) || typeof condition.value==='number' && Number.isFinite(condition.value),'CONDITION','Compare a simple value');
|
|
28
|
+
}
|
|
29
|
+
export function validateCondition(condition,manifest) {
|
|
30
|
+
if(condition === undefined)return;
|
|
31
|
+
assert(manifest.runtime !== 'host','CONDITION','Conditional execution is available for SDK blocks; host workspaces retain their existing controls');
|
|
32
|
+
validateDataPredicate(condition,manifest.inputs);
|
|
33
|
+
const entries=Object.entries(manifest.inputs),primary=entries.find(([,port])=>port.primary) || (entries.length===1 ? entries[0] : null),outputs=Object.entries(manifest.outputs);
|
|
34
|
+
assert(conditionOmitsOutputs(manifest) || primary && outputs.length===1 && compatible(primary[1],outputs[0][1]).compatible,'CONDITION','Conditional steps need compatible pass-through data or only optional outputs without defaults');
|
|
35
|
+
}
|
|
36
|
+
export function conditionMatches(condition,input) {
|
|
37
|
+
if(!condition)return true;
|
|
38
|
+
let value=input[condition.input];
|
|
39
|
+
for(const key of condition.path){value=value!==null && value!==undefined && Object.hasOwn(value,key) ? value[key] : undefined;}
|
|
40
|
+
if(condition.operator === 'present')return value !== undefined && value !== null && value !== false && value !== '' && (!Array.isArray(value) || value.length>0);
|
|
41
|
+
if(NUMERIC_CONDITION_OPERATORS.includes(condition.operator)) {
|
|
42
|
+
if(typeof value!=='number' || !Number.isFinite(value) || typeof condition.value!=='number' || !Number.isFinite(condition.value))return false;
|
|
43
|
+
if(condition.operator==='greater-than')return value>condition.value;
|
|
44
|
+
if(condition.operator==='at-least')return value>=condition.value;
|
|
45
|
+
if(condition.operator==='less-than')return value<condition.value;
|
|
46
|
+
return value<=condition.value;
|
|
47
|
+
}
|
|
48
|
+
return condition.operator === 'equals' ? value === condition.value : value !== condition.value;
|
|
49
|
+
}
|
|
50
|
+
export function conditionalBypass(condition,manifest,input) {
|
|
51
|
+
validateCondition(condition,manifest);if(!condition)return null;
|
|
52
|
+
// Predicate controls use the same declared defaults as normal SDK execution.
|
|
53
|
+
// An explicitly supplied null/undefined must not be replaced by a default.
|
|
54
|
+
const predicate=manifest.inputs[condition.input];
|
|
55
|
+
const conditioned=Object.hasOwn(input,condition.input) ? input : {...input,[condition.input]:!predicate.sources || predicate.sources.includes('default')?predicate.default:undefined};
|
|
56
|
+
if(conditionMatches(condition,conditioned))return null;
|
|
57
|
+
if(conditionOmitsOutputs(manifest))return {outputs:{},skipped:true};
|
|
58
|
+
const entries=Object.entries(manifest.inputs),primary=entries.find(([,port])=>port.primary) || entries[0],output=Object.entries(manifest.outputs)[0],value=Object.hasOwn(input,primary[0]) ? input[primary[0]] : !primary[1].sources || primary[1].sources.includes('default')?primary[1].default:undefined;
|
|
59
|
+
assert(valueMatches(value,output[1]),'CONDITION','The skipped step has no compatible input to pass through');
|
|
60
|
+
return {outputs:{[output[0]]:structuredClone(value)},skipped:true};
|
|
61
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import {assert,digest} from '../block-sdk/contracts.js';
|
|
2
|
+
import {semanticValueIsFresh} from '../block-sdk/semantic-freshness.js';
|
|
3
|
+
import {readCanvasSemanticContext} from './semantic-results.js';
|
|
4
|
+
|
|
5
|
+
const transientMediaKeys=new Set(['url','previewUrl','imageUrl','thumbnailUrl','posterUrl','src','data']);
|
|
6
|
+
function pinnedValueIdentity(value){
|
|
7
|
+
if(Array.isArray(value))return value.map(pinnedValueIdentity);
|
|
8
|
+
if(!value||typeof value!=='object')return value;
|
|
9
|
+
if(['image','video','audio'].includes(value.kind)){
|
|
10
|
+
assert(typeof value.assetId==='string' && value.assetId && typeof value.versionId==='string' && value.versionId && typeof value.url==='string' && value.url && !Object.keys(value).some(key=>transientMediaKeys.has(key)&&key!=='url'),'SEGMENT_SOURCE','The pinned media reference must resolve to one current accessible version.');
|
|
11
|
+
return Object.fromEntries(Object.entries(value).filter(([key])=>key!=='url').map(([key,child])=>[key,pinnedValueIdentity(child)]));
|
|
12
|
+
}
|
|
13
|
+
const wrapped=['image','video','audio'].includes(value.asset?.kind)&&typeof value.url==='string'&&value.url===value.asset.url;
|
|
14
|
+
assert(!Object.keys(value).some(key=>transientMediaKeys.has(key)&&!(key==='url'&&wrapped)),'SEGMENT_SOURCE','The pinned media reference must resolve to one current accessible version.');
|
|
15
|
+
return Object.fromEntries(Object.entries(value).filter(([key])=>key!=='url'||!wrapped).map(([key,child])=>[key,pinnedValueIdentity(child)]));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function pinExplicitFlowSource(pin,edge,sourceNode,canvasEdge,requirement){
|
|
19
|
+
assert(pin?.sourceNodeId===sourceNode?.id && pin?.sourceStageId===edge.from.stage && pin?.outputName===edge.from.port && pin?.sourceHandle===canvasEdge?.sourceHandle && pin?.targetHandle===canvasEdge?.targetHandle && canvasEdge?.source===sourceNode.id && typeof pin.runId==='string' && pin.runId.length>0 && pin.runId.length<=200 && /^[a-f0-9]{64}$/.test(pin.sourceDigest||'') && Object.hasOwn(pin,'value') && pin.outputContract?.type,'SEGMENT_SOURCE','The selected result pin no longer matches this connection. Review it in Flow.');
|
|
20
|
+
assert(!requirement.freshnessPolicy,'SEGMENT_SOURCE','This time-sensitive input needs a fresh producer result. Review the pinned version before updating.');
|
|
21
|
+
return {id:`block:${edge.from.stage}:${edge.from.port}:pin:${pin.runId}`,revision:pin.sourceDigest,valueDigest:await digest(pin.value),sourceRunId:pin.runId,pinnedValue:true};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export async function pinCurrentSemanticSource(canvas,stage,node,port,requirement,permissions=[]) {
|
|
25
|
+
const record=readCanvasSemanticContext(canvas).snapshot().values.find(value=>value.source.kind==='block' && value.source.stepId===stage.id && value.source.port===port);
|
|
26
|
+
assert(record && !node.data.blockStale && semanticValueIsFresh(record,requirement),'SEGMENT_SOURCE','Update the source Block before reusing its result.');
|
|
27
|
+
const missingPermissions=(record.permissions||[]).filter(permission=>!permissions.includes(permission));
|
|
28
|
+
assert(!missingPermissions.length,'SEGMENT_SOURCE',`The receiving Block cannot reuse this saved result: its pinned permission contract lacks ${missingPermissions.slice(0,5).join(', ')}${missingPermissions.length>5?' and more':''}. Review a compatible Block release or route; the retained result was not applied.`);
|
|
29
|
+
assert(Object.hasOwn(node.data.blockOutputs || {},port),'SEGMENT_SOURCE','The source Block has no current saved result.');
|
|
30
|
+
const valueDigest=await digest(node.data.blockOutputs[port]);
|
|
31
|
+
assert(valueDigest===await digest(record.value),'SEGMENT_SOURCE','The saved result changed. Update its source before continuing.');
|
|
32
|
+
assert(semanticValueIsFresh(record,requirement),'SEGMENT_SOURCE','The source expired while preparing the update. Refresh it first.');
|
|
33
|
+
return {id:record.id,revision:record.revision,valueDigest,sourceRunId:record.source.runId,...(record.updatedAt!==undefined?{updatedAt:record.updatedAt}:{}),...(record.expiresAt!==undefined?{expiresAt:record.expiresAt}:{})};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export async function assertCurrentSemanticSource(pin,value,requirement) {
|
|
37
|
+
if(pin.pinnedValue){
|
|
38
|
+
assert(!requirement.freshnessPolicy,'SEGMENT_SOURCE','This time-sensitive input needs a fresh producer result.');
|
|
39
|
+
assert(await digest(pinnedValueIdentity(value))===pin.valueDigest,'SEGMENT_SOURCE','The selected result pin changed. Review the affected update again.');
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
assert(semanticValueIsFresh(pin,requirement),'SEGMENT_SOURCE','The saved source expired. Update it before continuing.');
|
|
43
|
+
assert(await digest(value)===pin.valueDigest,'SEGMENT_SOURCE','The saved source changed. Review the affected update again.');
|
|
44
|
+
assert(semanticValueIsFresh(pin,requirement),'SEGMENT_SOURCE','The saved source expired. Update it before continuing.');
|
|
45
|
+
}
|