@cueframe/kernel 0.1.1 → 0.1.2
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/dist/_members/account-model/testing/conversationStoreContract.d.ts +0 -59
- package/dist/_members/account-model/testing/index.d.ts +0 -5
- package/dist/_members/account-model/testing/restorePointStoreContract.d.ts +0 -24
- package/dist/_members/account-model/validators/contextFile.d.ts +0 -6
- package/dist/_members/account-model/validators/conversation.d.ts +0 -96
- package/dist/_members/account-model/validators/dashboardInsight.d.ts +0 -6
- package/dist/_members/account-model/validators/sessionToken.d.ts +0 -29
- package/dist/_members/account-model/validators/uploadToken.d.ts +0 -4
- package/dist/_members/account-model/validators/userSettings.d.ts +0 -4
- package/dist/_members/account-model/validators/workingComposition.d.ts +0 -7
- package/dist/_members/animate/animations/Create.d.ts +0 -19
- package/dist/_members/animate/animations/FadeIn.d.ts +0 -17
- package/dist/_members/animate/animations/GrowArrow.d.ts +0 -19
- package/dist/_members/animate/animations/GrowFromCenter.d.ts +0 -12
- package/dist/_members/animate/animations/Indicate.d.ts +0 -17
- package/dist/_members/animate/animations/MoveAlongPath.d.ts +0 -18
- package/dist/_members/animate/animations/Transform.d.ts +0 -28
- package/dist/_members/animate/animations/Wiggle.d.ts +0 -18
- package/dist/_members/animate/animations/Write.d.ts +0 -20
- package/dist/_members/animate/composition/AnimationGroup.d.ts +0 -21
- package/dist/_members/animate/composition/LaggedStart.d.ts +0 -22
- package/dist/_members/animate/composition/Succession.d.ts +0 -17
- package/dist/_members/animate/easing/rush.d.ts +0 -14
- package/dist/_members/animate/easing/smooth.d.ts +0 -7
- package/dist/_members/animate/easing/smootherstep.d.ts +0 -6
- package/dist/_members/animate/index.d.ts +0 -2
- package/dist/_members/animate/mobjects/Arrow.d.ts +0 -25
- package/dist/_members/animate/mobjects/BrandBox.d.ts +0 -25
- package/dist/_members/animate/mobjects/DiGraph.d.ts +0 -18
- package/dist/_members/animate/mobjects/Graph.d.ts +0 -38
- package/dist/_members/animate/three/ThreeCanvas.d.ts +0 -23
- package/dist/_members/animate/three/drei.d.ts +0 -7
- package/dist/_members/authoring/agent/buildTools.d.ts +0 -37
- package/dist/_members/authoring/agent/contextManagement.d.ts +0 -65
- package/dist/_members/authoring/agent/errors.d.ts +0 -9
- package/dist/_members/authoring/agent/memoryTool.d.ts +0 -2
- package/dist/_members/authoring/agent/promptCache.d.ts +0 -31
- package/dist/_members/authoring/agent.d.ts +0 -34
- package/dist/_members/authoring/capabilities.d.ts +0 -145
- package/dist/_members/authoring/composer/scopes.d.ts +0 -19
- package/dist/_members/authoring/context/brand.d.ts +0 -4
- package/dist/_members/authoring/context/brandTokens.d.ts +0 -4
- package/dist/_members/authoring/context/index.d.ts +0 -1
- package/dist/_members/authoring/context/timeline.d.ts +0 -15
- package/dist/_members/authoring/context/transcript.d.ts +0 -11
- package/dist/_members/authoring/context/types.d.ts +0 -4
- package/dist/_members/authoring/decomposer.d.ts +0 -12
- package/dist/_members/authoring/evaluate.d.ts +0 -26
- package/dist/_members/authoring/evaluator.d.ts +0 -16
- package/dist/_members/authoring/models/modelFactory.d.ts +0 -77
- package/dist/_members/authoring/motion/applyMotionPreset.d.ts +0 -12
- package/dist/_members/authoring/motion/materializeMotionPresetOps.d.ts +0 -7
- package/dist/_members/authoring/motion/shell.d.ts +0 -20
- package/dist/_members/authoring/pipelineTrace.d.ts +0 -19
- package/dist/_members/authoring/prompts/decomposerPrompt.d.ts +0 -4
- package/dist/_members/authoring/prompts/designReviewerPrompt.d.ts +0 -16
- package/dist/_members/authoring/prompts/evaluatorPrompt.d.ts +0 -4
- package/dist/_members/authoring/prompts/graphics.d.ts +0 -5
- package/dist/_members/authoring/prompts/plannerPrompt.d.ts +0 -30
- package/dist/_members/authoring/providers/resourceApi.d.ts +1 -20
- package/dist/_members/authoring/resource-routing.d.ts +0 -121
- package/dist/_members/authoring/resources.d.ts +0 -34
- package/dist/_members/authoring/scope.d.ts +0 -24
- package/dist/_members/authoring/tools/brandTokens.d.ts +0 -22
- package/dist/_members/authoring/tools/composeRoleTools.d.ts +0 -79
- package/dist/_members/authoring/tools/index.d.ts +0 -1
- package/dist/_members/authoring/tools/toolSets.d.ts +0 -50
- package/dist/_members/authoring/transpileComponent.d.ts +0 -34
- package/dist/_members/authoring/transpileHelper.d.ts +0 -18
- package/dist/_members/authoring/types.d.ts +0 -149
- package/dist/_members/brand-derivation/constants.d.ts +0 -17
- package/dist/_members/brand-derivation/contrastSafe.d.ts +0 -23
- package/dist/_members/cloud-import/CloudImportService.d.ts +0 -15
- package/dist/_members/cloud-import/ImportProvider.d.ts +0 -45
- package/dist/_members/cloud-import/MediaItemPreprocessor.d.ts +0 -9
- package/dist/_members/cloud-import/cloudConfig.d.ts +0 -15
- package/dist/_members/compose/CompositionRenderer.d.ts +0 -6
- package/dist/_members/compose/primitiveRegistry.d.ts +0 -64
- package/dist/_members/compose/sceneToRenderInput.d.ts +0 -26
- package/dist/_members/compose/schema.d.ts +0 -15
- package/dist/_members/compose/tokenResolver.d.ts +0 -11
- package/dist/_members/composition/audio/audioMix.d.ts +0 -34
- package/dist/_members/composition/audio/mixStaging.d.ts +0 -81
- package/dist/_members/composition/audio/musicPack.d.ts +0 -35
- package/dist/_members/composition/audio/musicPack.generated.d.ts +0 -6
- package/dist/_members/composition/audio/pack.d.ts +0 -43
- package/dist/_members/composition/audio/pack.generated.d.ts +0 -6
- package/dist/_members/composition/audio/palette.d.ts +0 -36
- package/dist/_members/composition/autozoom/index.d.ts +0 -32
- package/dist/_members/composition/brand-kit.d.ts +0 -8
- package/dist/_members/composition/brief/contract.d.ts +0 -90
- package/dist/_members/composition/color-grade.d.ts +0 -11
- package/dist/_members/composition/depth.d.ts +0 -19
- package/dist/_members/composition/fixtures/agentErrored.d.ts +0 -23
- package/dist/_members/composition/fonts.d.ts +0 -62
- package/dist/_members/composition/graphics-plan/compile.d.ts +0 -29
- package/dist/_members/composition/graphics-plan/index.d.ts +0 -5
- package/dist/_members/composition/graphics-plan/instantiateMotif.d.ts +0 -17
- package/dist/_members/composition/graphics-plan/motion.d.ts +0 -17
- package/dist/_members/composition/graphics-plan/schemas.d.ts +0 -171
- package/dist/_members/composition/graphics-plan/solve.d.ts +0 -19
- package/dist/_members/composition/invariants/clipPlacement.d.ts +0 -59
- package/dist/_members/composition/invariants/composition.d.ts +0 -5
- package/dist/_members/composition/invariants/etag.d.ts +0 -7
- package/dist/_members/composition/invariants/ids.d.ts +0 -6
- package/dist/_members/composition/invariants/keyframes.d.ts +0 -19
- package/dist/_members/composition/invariants/markers.d.ts +0 -6
- package/dist/_members/composition/invariants/time.d.ts +0 -8
- package/dist/_members/composition/invariants/tracks.d.ts +0 -48
- package/dist/_members/composition/ops/compositionOps.d.ts +4 -71
- package/dist/_members/composition/ops/compositionOps.shared.d.ts +30 -0
- package/dist/_members/composition/ops/headlessStore.d.ts +0 -24
- package/dist/_members/composition/ops/selectors.d.ts +0 -66
- package/dist/_members/composition/ops/timeline-word.d.ts +0 -5
- package/dist/_members/composition/ops/transcript.d.ts +0 -27
- package/dist/_members/composition/ops/types.d.ts +0 -51
- package/dist/_members/composition/primitive-catalog/catalogQuery.d.ts +0 -32
- package/dist/_members/composition/primitive-catalog/disabled.d.ts +0 -1
- package/dist/_members/composition/primitive-catalog/index.d.ts +0 -11
- package/dist/_members/composition/primitive-catalog/paramValidation.d.ts +0 -50
- package/dist/_members/composition/primitive-catalog/projection.d.ts +0 -39
- package/dist/_members/composition/primitive-catalog/types.d.ts +0 -78
- package/dist/_members/composition/projection/behind-placement.d.ts +0 -40
- package/dist/_members/composition/projection/behind-readiness.d.ts +14 -89
- package/dist/_members/composition/projection/brandKit.d.ts +0 -142
- package/dist/_members/composition/projection/cardTokens.d.ts +0 -65
- package/dist/_members/composition/projection/composition-floor.d.ts +0 -179
- package/dist/_members/composition/projection/cropProjection.d.ts +0 -75
- package/dist/_members/composition/projection/occlusion-budget.d.ts +0 -37
- package/dist/_members/composition/projection/reframe-readiness.d.ts +4 -111
- package/dist/_members/composition/projection/safe-zones.d.ts +0 -29
- package/dist/_members/composition/reframe/aspectLoss.d.ts +12 -35
- package/dist/_members/composition/reframe/coverage.d.ts +0 -40
- package/dist/_members/composition/reframe/derive.d.ts +0 -21
- package/dist/_members/composition/reframe/index.d.ts +0 -60
- package/dist/_members/composition/reframe/kenBurns.d.ts +0 -37
- package/dist/_members/composition/reframe/shotScale.d.ts +0 -75
- package/dist/_members/composition/reframe/trajectory.d.ts +0 -65
- package/dist/_members/composition/timeline/compound.d.ts +0 -31
- package/dist/_members/composition/timeline/intent.d.ts +0 -29
- package/dist/_members/composition/timeline/keyframes.d.ts +0 -43
- package/dist/_members/composition/timeline/link.d.ts +0 -27
- package/dist/_members/composition/timeline/occupancy.d.ts +1 -42
- package/dist/_members/composition/timeline/placement.d.ts +5 -52
- package/dist/_members/composition/timeline/plan.d.ts +5 -53
- package/dist/_members/composition/timeline/resolve.d.ts +0 -36
- package/dist/_members/composition/timeline/trims.d.ts +0 -49
- package/dist/_members/composition/validators/brandKit.d.ts +0 -29
- package/dist/_members/composition/validators/composePlan.d.ts +0 -39
- package/dist/_members/composition/validators/composition.d.ts +30 -513
- package/dist/_members/composition/validators/graphicKinds.d.ts +0 -28
- package/dist/_members/composition/validators/render.d.ts +23 -23
- package/dist/_members/composition-ops/alphaLayers.d.ts +0 -56
- package/dist/_members/composition-ops/index.d.ts +27 -148
- package/dist/_members/composition-ops/materializeGrid.d.ts +0 -28
- package/dist/_members/composition-ops/opRecorder.d.ts +0 -34
- package/dist/_members/composition-ops/recordingStore.d.ts +0 -16
- package/dist/_members/composition-ops/replaceRegion.d.ts +0 -48
- package/dist/_members/composition-ops/testFixtures.d.ts +0 -14
- package/dist/_members/convex-api/api.d.ts +0 -3
- package/dist/_members/convex-api/dataModel.d.ts +0 -2
- package/dist/_members/core/index.d.ts +1 -1
- package/dist/_members/core/render/bookends.d.ts +0 -44
- package/dist/_members/core/render/captions.d.ts +0 -42
- package/dist/_members/core/render/compositionRender.d.ts +1 -180
- package/dist/_members/core/render/deriveTrajectory.d.ts +0 -140
- package/dist/_members/core/render/emphasis.d.ts +0 -6
- package/dist/_members/core/render/eval/cropBox.d.ts +0 -69
- package/dist/_members/core/render/eval/inclusion.d.ts +0 -39
- package/dist/_members/core/render/eval/index.d.ts +0 -58
- package/dist/_members/core/render/eval/metrics.d.ts +0 -36
- package/dist/_members/core/render/exportSettings.d.ts +4 -12
- package/dist/_members/core/render/index.d.ts +1 -1
- package/dist/_members/core/render/mapFaceToPerson.d.ts +0 -27
- package/dist/_members/core/render/types.d.ts +1 -184
- package/dist/_members/core/render/variantKeys.d.ts +1 -0
- package/dist/_members/core/render/vcam/cameraPath.d.ts +0 -44
- package/dist/_members/core/render/vcam/constants.d.ts +0 -93
- package/dist/_members/core/render/vcam/errorCodes.d.ts +0 -28
- package/dist/_members/core/render/vcam/framing.d.ts +0 -76
- package/dist/_members/core/render/vcam/requiredRegion.d.ts +0 -71
- package/dist/_members/core/render/vcam/shots.d.ts +0 -40
- package/dist/_members/core/render/vcam/subjectSet.d.ts +0 -85
- package/dist/_members/core/select/errorCodes.d.ts +0 -25
- package/dist/_members/core/select/index.d.ts +0 -20
- package/dist/_members/core/select/model.d.ts +0 -79
- package/dist/_members/core/select/select.d.ts +0 -49
- package/dist/_members/core/select/stabilize.d.ts +0 -102
- package/dist/_members/core/types.d.ts +0 -1
- package/dist/_members/director/ai-sdk/chunks.d.ts +14 -0
- package/dist/_members/director/ai-sdk/context.d.ts +6 -0
- package/dist/_members/director/ai-sdk/generationTool.d.ts +8 -0
- package/dist/_members/director/ai-sdk/index.d.ts +4 -0
- package/dist/_members/director/ai-sdk/messages.d.ts +292 -0
- package/dist/_members/director/domain/chat.d.ts +357 -0
- package/dist/_members/director/domain/generation.d.ts +1 -0
- package/dist/_members/director/domain/index.d.ts +3 -0
- package/dist/_members/director/domain/ports.d.ts +32 -0
- package/dist/_members/director/index.d.ts +2 -0
- package/dist/_members/director/testing/contract.d.ts +52 -0
- package/dist/_members/director/testing/index.d.ts +1 -0
- package/dist/_members/errors/registry.d.ts +0 -32
- package/dist/_members/foundation/codes/index.d.ts +0 -21
- package/dist/_members/mcp/adapter.d.ts +1 -84
- package/dist/_members/mcp/burnedNames.d.ts +0 -16
- package/dist/_members/mcp/core.d.ts +1 -81
- package/dist/_members/mcp/curation.d.ts +0 -112
- package/dist/_members/mcp/executor.d.ts +0 -49
- package/dist/_members/mcp/format.d.ts +0 -6
- package/dist/_members/mcp/generated/catalogPreviews.d.ts +0 -1
- package/dist/_members/mcp/generated/operations.d.ts +0 -23
- package/dist/_members/mcp/internalLoopTools.d.ts +0 -23
- package/dist/_members/mcp/prompts.d.ts +0 -16
- package/dist/_members/mcp/resources.d.ts +0 -13
- package/dist/_members/mcp/server.d.ts +0 -61
- package/dist/_members/mcp/wait.d.ts +0 -22
- package/dist/_members/mcp/x402Meta.d.ts +0 -44
- package/dist/_members/media-model/generation.d.ts +314 -0
- package/dist/_members/media-model/index.d.ts +1 -0
- package/dist/_members/media-model/media-kind.d.ts +0 -27
- package/dist/_members/media-model/transcriptSearch.d.ts +0 -42
- package/dist/_members/nle-export/fcpxml.d.ts +0 -13
- package/dist/_members/nle-export/index.d.ts +0 -6
- package/dist/_members/nle-export/types.d.ts +0 -26
- package/dist/_members/nle-export/xml/index.d.ts +0 -8
- package/dist/_members/nle-export/xml-utils.d.ts +0 -12
- package/dist/_members/perception/activeSpeaker.d.ts +0 -94
- package/dist/_members/perception/audioQuality.d.ts +0 -64
- package/dist/_members/perception/energyBeat.d.ts +0 -81
- package/dist/_members/perception/identityMatch.d.ts +0 -66
- package/dist/_members/perception/index.d.ts +0 -52
- package/dist/_members/perception/visualQuality.d.ts +0 -73
- package/dist/_members/plane/conformance.d.ts +0 -59
- package/dist/_members/plane/contract.d.ts +0 -29
- package/dist/_members/plane/index.d.ts +0 -15
- package/dist/_members/primitives/backgrounds/animated-bar-chart/index.d.ts +0 -13
- package/dist/_members/primitives/backgrounds/animated-line-chart/index.d.ts +0 -14
- package/dist/_members/primitives/backgrounds/dither-gradient-bg/index.d.ts +0 -14
- package/dist/_members/primitives/backgrounds/dynamic-grid/index.d.ts +0 -8
- package/dist/_members/primitives/backgrounds/ecosystem-constellation/index.d.ts +0 -8
- package/dist/_members/primitives/backgrounds/infinite-marquee/index.d.ts +0 -8
- package/dist/_members/primitives/backgrounds/mesh-gradient-bg/index.d.ts +0 -8
- package/dist/_members/primitives/backgrounds/perspective-marquee/index.d.ts +0 -8
- package/dist/_members/primitives/backgrounds/silk-flow-bg/index.d.ts +0 -17
- package/dist/_members/primitives/backgrounds/vector-field/index.d.ts +0 -14
- package/dist/_members/primitives/backgrounds/volumetric-rays/index.d.ts +0 -18
- package/dist/_members/primitives/captions/Captions.d.ts +0 -24
- package/dist/_members/primitives/captions/index.d.ts +0 -15
- package/dist/_members/primitives/captions/paginate.d.ts +0 -21
- package/dist/_members/primitives/captions/placement.d.ts +0 -30
- package/dist/_members/primitives/effects/blur/index.d.ts +0 -16
- package/dist/_members/primitives/effects/color-grade/index.d.ts +0 -20
- package/dist/_members/primitives/effects/grain/index.d.ts +0 -12
- package/dist/_members/primitives/effects/parallax/index.d.ts +0 -13
- package/dist/_members/primitives/effects/particles/index.d.ts +0 -16
- package/dist/_members/primitives/effects/pulsing-indicator/index.d.ts +0 -10
- package/dist/_members/primitives/effects/spotlight-card/index.d.ts +0 -8
- package/dist/_members/primitives/effects/spring-pop-in/index.d.ts +0 -10
- package/dist/_members/primitives/effects/success-confetti/index.d.ts +0 -8
- package/dist/_members/primitives/effects/vignette/index.d.ts +0 -12
- package/dist/_members/primitives/hero-text/HeroText.d.ts +0 -17
- package/dist/_members/primitives/hero-text/config.d.ts +0 -10
- package/dist/_members/primitives/hero-text/index.d.ts +0 -14
- package/dist/_members/primitives/index.d.ts +0 -8
- package/dist/_members/primitives/layouts/chat-to-preview-layout/index.d.ts +0 -8
- package/dist/_members/primitives/layouts/infinite-bento-pan/index.d.ts +0 -8
- package/dist/_members/primitives/layouts/letterbox/index.d.ts +0 -15
- package/dist/_members/primitives/layouts/photo-grid/index.d.ts +0 -17
- package/dist/_members/primitives/layouts/picture-in-picture/index.d.ts +0 -21
- package/dist/_members/primitives/layouts/split-screen/index.d.ts +0 -15
- package/dist/_members/primitives/layouts/staggered-bento-grid/index.d.ts +0 -8
- package/dist/_members/primitives/lib/easings.d.ts +0 -27
- package/dist/_members/primitives/lib/palette.d.ts +0 -22
- package/dist/_members/primitives/lib/preview.d.ts +0 -22
- package/dist/_members/primitives/lib/schema.d.ts +0 -36
- package/dist/_members/primitives/lib/seeded-random.d.ts +0 -23
- package/dist/_members/primitives/lib/text/contrast.d.ts +0 -17
- package/dist/_members/primitives/lib/text/fill.d.ts +0 -5
- package/dist/_members/primitives/lib/text/fitText.d.ts +0 -37
- package/dist/_members/primitives/lib/text/marker.d.ts +0 -10
- package/dist/_members/primitives/lib/text/motion.d.ts +0 -46
- package/dist/_members/primitives/lib/text/recolor.d.ts +0 -11
- package/dist/_members/primitives/lib/text/spec.d.ts +0 -39
- package/dist/_members/primitives/lib/text/stage.d.ts +0 -17
- package/dist/_members/primitives/lib/text/typeface.d.ts +0 -11
- package/dist/_members/primitives/lib/tokens.d.ts +0 -87
- package/dist/_members/primitives/lib/types.d.ts +0 -141
- package/dist/_members/primitives/scenes/changelog-bite/index.d.ts +0 -12
- package/dist/_members/primitives/scenes/hero-device-assemble/index.d.ts +0 -8
- package/dist/_members/primitives/scenes/landing-code-showcase/index.d.ts +0 -8
- package/dist/_members/primitives/scenes/live-code-compilation/index.d.ts +0 -8
- package/dist/_members/primitives/scenes/pricing-tier-focus/index.d.ts +0 -8
- package/dist/_members/primitives/scenes/product-launch-trailer/index.d.ts +0 -8
- package/dist/_members/primitives/scenes/terminal-to-browser-deploy/index.d.ts +0 -8
- package/dist/_members/primitives/subject-foreground/SubjectForeground.d.ts +0 -38
- package/dist/_members/primitives/subject-foreground/index.d.ts +0 -21
- package/dist/_members/primitives/text/blur-reveal/index.d.ts +0 -9
- package/dist/_members/primitives/text/cinematic-title/index.d.ts +0 -14
- package/dist/_members/primitives/text/inline-highlight/index.d.ts +0 -11
- package/dist/_members/primitives/text/karaoke/index.d.ts +0 -13
- package/dist/_members/primitives/text/kinetic-type/index.d.ts +0 -15
- package/dist/_members/primitives/text/lower-third/index.d.ts +0 -14
- package/dist/_members/primitives/text/marker-highlight/index.d.ts +0 -10
- package/dist/_members/primitives/text/masked-slide-reveal/index.d.ts +0 -8
- package/dist/_members/primitives/text/matrix-decode/index.d.ts +0 -9
- package/dist/_members/primitives/text/quote-card/index.d.ts +0 -9
- package/dist/_members/primitives/text/rgb-glitch-text/index.d.ts +0 -13
- package/dist/_members/primitives/text/shimmer-sweep/index.d.ts +0 -10
- package/dist/_members/primitives/text/slot-machine-roll/index.d.ts +0 -8
- package/dist/_members/primitives/text/staggered-fade-up/index.d.ts +0 -12
- package/dist/_members/primitives/text/stat-counter/index.d.ts +0 -13
- package/dist/_members/primitives/text/strikethrough-replace/index.d.ts +0 -9
- package/dist/_members/primitives/text/text-effect/index.d.ts +0 -17
- package/dist/_members/primitives/text/text-fade-replace/index.d.ts +0 -8
- package/dist/_members/primitives/text/token-stream/index.d.ts +0 -11
- package/dist/_members/primitives/text/tracking-in/index.d.ts +0 -8
- package/dist/_members/primitives/text/typewriter/index.d.ts +0 -12
- package/dist/_members/primitives/transitions/chromatic-aberration-wipe/index.d.ts +0 -11
- package/dist/_members/primitives/transitions/code-diff-wipe/index.d.ts +0 -8
- package/dist/_members/primitives/transitions/directional-wipe/index.d.ts +0 -10
- package/dist/_members/primitives/transitions/frosted-glass-wipe/index.d.ts +0 -10
- package/dist/_members/primitives/transitions/glitch-cut/index.d.ts +0 -3
- package/dist/_members/primitives/transitions/grid-pixelate-wipe/index.d.ts +0 -14
- package/dist/_members/primitives/transitions/ink-wipe/index.d.ts +0 -3
- package/dist/_members/primitives/transitions/kinetic-type-mask/index.d.ts +0 -12
- package/dist/_members/primitives/transitions/light-leak/index.d.ts +0 -3
- package/dist/_members/primitives/transitions/luma-matte/index.d.ts +0 -2
- package/dist/_members/primitives/transitions/morph/index.d.ts +0 -2
- package/dist/_members/primitives/transitions/spatial-push/index.d.ts +0 -10
- package/dist/_members/primitives/transitions/swipe-transition-wipe/index.d.ts +0 -13
- package/dist/_members/primitives/transitions/zoom-through/index.d.ts +0 -2
- package/dist/_members/primitives/transitions/zoom-through-transition/index.d.ts +0 -9
- package/dist/_members/primitives/ui-blocks/ai-generate-overlay/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/ai-generation-canvas/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/badge-pop/index.d.ts +0 -11
- package/dist/_members/primitives/ui-blocks/before-after-slider/index.d.ts +0 -11
- package/dist/_members/primitives/ui-blocks/benchmark-bars/index.d.ts +0 -11
- package/dist/_members/primitives/ui-blocks/bounding-box-selector/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/browser-flow/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/brush-stroke-simulator/index.d.ts +0 -18
- package/dist/_members/primitives/ui-blocks/chat-exchange/index.d.ts +0 -10
- package/dist/_members/primitives/ui-blocks/code-accordion/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/context-meter/index.d.ts +0 -11
- package/dist/_members/primitives/ui-blocks/cursor-flow/index.d.ts +0 -11
- package/dist/_members/primitives/ui-blocks/dashboard-populate/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/data-flow-pipes/index.d.ts +0 -9
- package/dist/_members/primitives/ui-blocks/device-mockup-zoom/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/drag-and-drop-flow/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/eval-scorecard/index.d.ts +0 -11
- package/dist/_members/primitives/ui-blocks/glass-code-block/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/image-expand-to-fullscreen/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/metric-gauge/index.d.ts +0 -12
- package/dist/_members/primitives/ui-blocks/morphing-modal/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/pipeline-journey/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/progress-steps/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/reasoning-trace/index.d.ts +0 -10
- package/dist/_members/primitives/ui-blocks/simulated-cursor/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/terminal-simulator/index.d.ts +0 -19
- package/dist/_members/primitives/ui-blocks/toast-notification/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/tool-call-stack/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/tool-menu-slide-in/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/visual-docs-snippet/index.d.ts +0 -8
- package/dist/_members/primitives/ui-blocks/voice-waveform/index.d.ts +0 -11
- package/dist/_members/primitives/workspace.d.ts +0 -29
- package/dist/_members/render-harness/browserOptions.d.ts +11 -0
- package/dist/_members/render-harness/browserOptions.d.ts.map +1 -0
- package/dist/_members/render-harness/cardRender.d.ts +0 -40
- package/dist/_members/render-harness/cardRender.d.ts.map +1 -1
- package/dist/_members/render-harness/contractRender.d.ts +0 -16
- package/dist/_members/render-harness/contractRender.d.ts.map +1 -1
- package/dist/_members/render-harness/extractSegments.d.ts +0 -37
- package/dist/_members/render-harness/extractSegments.d.ts.map +1 -1
- package/dist/_members/render-harness/index.d.ts +0 -12
- package/dist/_members/render-harness/index.d.ts.map +1 -1
- package/dist/_members/render-harness/localRender.d.ts +1 -110
- package/dist/_members/render-harness/localRender.d.ts.map +1 -1
- package/dist/_members/render-harness/materializeSources.d.ts +0 -22
- package/dist/_members/render-harness/materializeSources.d.ts.map +1 -1
- package/dist/_members/render-harness/mediaServer.d.ts +0 -16
- package/dist/_members/render-harness/mediaServer.d.ts.map +1 -1
- package/dist/_members/render-harness/renderInputAssets.d.ts +0 -45
- package/dist/_members/render-harness/renderInputAssets.d.ts.map +1 -1
- package/dist/_members/render-harness/resolveAssets.d.ts +0 -24
- package/dist/_members/render-harness/resolveAssets.d.ts.map +1 -1
- package/dist/_members/render-harness/sandboxGlobalSpecs.d.ts +0 -14
- package/dist/_members/render-harness/sandboxGlobalSpecs.d.ts.map +1 -1
- package/dist/account-model/validators.js +1 -1
- package/dist/account-model.js +1 -1
- package/dist/animate.js +0 -15
- package/dist/authoring/build-tools.js +8 -8
- package/dist/authoring/composer.js +0 -20
- package/dist/authoring/context.js +6 -6
- package/dist/authoring/pipelineTrace.js +1 -1
- package/dist/authoring/prompts.js +1 -1
- package/dist/authoring/resource-routing.js +1 -1
- package/dist/authoring/resources.js +1 -1
- package/dist/authoring/tools.js +7 -7
- package/dist/authoring.js +14 -80
- package/dist/{chunk-TWQOKKAF.js → chunk-23HFEKV7.js} +0 -6
- package/dist/{chunk-EA6MYCYW.js → chunk-2B5VJZHL.js} +14 -25
- package/dist/chunk-73DQTUWY.js +131 -0
- package/dist/{chunk-HI4UTTPS.js → chunk-AO744WIK.js} +1 -43
- package/dist/chunk-BADZHXLR.js +0 -0
- package/dist/{chunk-GA23TRNR.js → chunk-BKHGL4MB.js} +5 -13
- package/dist/{chunk-PDYO3DOJ.js → chunk-BZZTVOGG.js} +6 -55
- package/dist/{chunk-AP6ZIVAV.js → chunk-CAJQ7H5A.js} +17 -17
- package/dist/{chunk-7FO3ZJ43.js → chunk-DCVJWGIA.js} +1 -9
- package/dist/{chunk-AQBREB5O.js → chunk-DWLNPNC4.js} +1 -4
- package/dist/{chunk-SW336CJP.js → chunk-DYZE7JZA.js} +3 -26
- package/dist/{chunk-HCCBDJLW.js → chunk-EP2Y6M2J.js} +0 -4
- package/dist/{chunk-ZE76SSRT.js → chunk-FMODQD5P.js} +0 -6
- package/dist/chunk-FTVZF4GO.js +0 -0
- package/dist/{chunk-PMY24FUD.js → chunk-G5BFI32U.js} +1 -1
- package/dist/{chunk-LD5ZOUFT.js → chunk-GF52TW4I.js} +0 -4
- package/dist/{chunk-ABL557OT.js → chunk-GMD33ZD7.js} +1 -8
- package/dist/{chunk-ZWMV6DD2.js → chunk-ICSZF37W.js} +10 -162
- package/dist/chunk-IEXAKOEX.js +113 -0
- package/dist/{chunk-UY4SWJVE.js → chunk-K2IUBCND.js} +0 -12
- package/dist/chunk-LJ5W4ZBU.js +146 -0
- package/dist/chunk-LLUW26BS.js +255 -0
- package/dist/{chunk-JJ6XD7NG.js → chunk-PIURX6IZ.js} +70 -2
- package/dist/{chunk-MMEJ3Y7E.js → chunk-QETYXKQQ.js} +1 -10
- package/dist/{chunk-YX2GSJK7.js → chunk-RP4SXXLJ.js} +1 -1
- package/dist/{chunk-P727GZVO.js → chunk-SAMQUUO5.js} +3 -5
- package/dist/{chunk-RF7U3SCL.js → chunk-TD347SSX.js} +3 -11
- package/dist/{chunk-TOJEXFXL.js → chunk-TFGKUWHY.js} +1 -88
- package/dist/{chunk-UHGSZZDI.js → chunk-TPA6PYN2.js} +1 -11
- package/dist/{chunk-OLFOPQCA.js → chunk-UQSOS726.js} +4 -18
- package/dist/{chunk-GBRNYH7W.js → chunk-V24L35GM.js} +0 -11
- package/dist/{chunk-MBCXCJOE.js → chunk-VFMW3JUY.js} +1 -1
- package/dist/{chunk-DK2ODBNT.js → chunk-VHF66LCQ.js} +16 -98
- package/dist/{chunk-JMURQODM.js → chunk-VZ7TYX6Z.js} +0 -1
- package/dist/{chunk-SIGGQRY2.js → chunk-W3SIWT7J.js} +5030 -4412
- package/dist/{chunk-W35ZMOXB.js → chunk-WPZKOVYF.js} +0 -5
- package/dist/chunk-WZH57M53.js +494 -0
- package/dist/{chunk-AYVJXDLB.js → chunk-XHGZ2E77.js} +0 -2
- package/dist/{chunk-HY3RIEZW.js → chunk-XQ72DZKJ.js} +1 -1
- package/dist/{chunk-7DHP4ESU.js → chunk-YLDMAZZE.js} +0 -10
- package/dist/{chunk-FYZVH3MC.js → chunk-YQ7FFW3G.js} +0 -11
- package/dist/chunk-ZPLJ24OV.js +93 -0
- package/dist/cloud-import/multipart.js +1 -1
- package/dist/cloud-import.js +9 -16
- package/dist/compose/renderer.js +18 -18
- package/dist/compose.js +21 -21
- package/dist/composition/audio.js +1 -1
- package/dist/composition/brand-kit.js +0 -5
- package/dist/composition/graphics-plan.js +4 -4
- package/dist/composition/ops.js +5 -5
- package/dist/composition/primitive-catalog.js +1 -1
- package/dist/composition/projection.js +11 -3
- package/dist/composition/reframe/kenBurns.js +0 -4
- package/dist/composition/reframe.js +4 -2
- package/dist/composition/timeline.js +1 -1
- package/dist/composition/validators/graphic-kinds.js +1 -1
- package/dist/composition/validators.js +4 -4
- package/dist/composition-ops.js +16 -135
- package/dist/composition.js +15 -7
- package/dist/context-JLLU3MYD.js +14 -0
- package/dist/core/render.js +9 -7
- package/dist/core/select.js +2 -6
- package/dist/core.js +5 -7
- package/dist/director/ai-sdk.d.ts +1 -0
- package/dist/director/ai-sdk.js +33 -0
- package/dist/director/domain.d.ts +1 -0
- package/dist/director/domain.js +62 -0
- package/dist/director/testing.d.ts +1 -0
- package/dist/director/testing.js +22 -0
- package/dist/director.d.ts +1 -0
- package/dist/director.js +86 -0
- package/dist/errors.js +1 -1
- package/dist/foundation.js +1 -0
- package/dist/mcp/adapter.js +4 -64
- package/dist/mcp/core.js +1 -1
- package/dist/mcp/curation.js +1 -1
- package/dist/mcp/server.js +4 -4
- package/dist/mcp.js +4 -4
- package/dist/media-model/generation.d.ts +1 -0
- package/dist/media-model/generation.js +40 -0
- package/dist/media-model.js +38 -6
- package/dist/nle-export.js +21 -21
- package/dist/plane/contract.js +0 -3
- package/dist/primitives/backgrounds.js +2 -2
- package/dist/primitives/captions.js +0 -5
- package/dist/primitives/effects.js +2 -2
- package/dist/primitives/hero-text.js +2 -2
- package/dist/primitives/layouts.js +2 -2
- package/dist/primitives/lib/index.js +17 -17
- package/dist/primitives/lib/text/fitText.js +1 -1
- package/dist/primitives/lib/tokens.js +1 -1
- package/dist/primitives/lib.js +17 -17
- package/dist/primitives/scenes.js +2 -2
- package/dist/primitives/text.js +2 -2
- package/dist/primitives/ui-blocks.js +4 -4
- package/dist/primitives.js +21 -21
- package/dist/render-harness/sandboxGlobalSpecs.js +1 -1
- package/dist/render-harness.js +24 -41
- package/package.json +37 -21
- package/dist/chunk-6EQXLEP6.js +0 -194
- package/dist/chunk-OCFDUCF4.js +0 -504
- package/dist/chunk-PODIYN2K.js +0 -742
- package/dist/context-YWUZDG5X.js +0 -14
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDirectorContext
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-DWLNPNC4.js";
|
|
4
|
+
import "../chunk-ICSZF37W.js";
|
|
5
5
|
import "../chunk-KYRDKK2D.js";
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-TFGKUWHY.js";
|
|
7
|
+
import "../chunk-WZH57M53.js";
|
|
8
|
+
import "../chunk-WPZKOVYF.js";
|
|
9
|
+
import "../chunk-2B5VJZHL.js";
|
|
10
10
|
import "../chunk-WREYUH2E.js";
|
|
11
11
|
import "../chunk-2ESYSVXG.js";
|
|
12
12
|
export {
|
package/dist/authoring/tools.js
CHANGED
|
@@ -6,16 +6,16 @@ import {
|
|
|
6
6
|
COMPOSE_ROLE_TOOLS,
|
|
7
7
|
COMPOSE_ROLE_TOOL_NAMES,
|
|
8
8
|
dispatchComposeRoleTool
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-BZZTVOGG.js";
|
|
10
10
|
import "../chunk-JOURGVOR.js";
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
11
|
+
import "../chunk-DCVJWGIA.js";
|
|
12
|
+
import "../chunk-ICSZF37W.js";
|
|
13
13
|
import "../chunk-7PA7FGLD.js";
|
|
14
14
|
import "../chunk-KYRDKK2D.js";
|
|
15
|
-
import "../chunk-
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
15
|
+
import "../chunk-TFGKUWHY.js";
|
|
16
|
+
import "../chunk-WZH57M53.js";
|
|
17
|
+
import "../chunk-WPZKOVYF.js";
|
|
18
|
+
import "../chunk-2B5VJZHL.js";
|
|
19
19
|
import "../chunk-WREYUH2E.js";
|
|
20
20
|
import "../chunk-2ESYSVXG.js";
|
|
21
21
|
export {
|
package/dist/authoring.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildDirectorContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DWLNPNC4.js";
|
|
4
4
|
import {
|
|
5
5
|
buildFastModel,
|
|
6
6
|
buildModel,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "./chunk-ZT7MHRQU.js";
|
|
9
9
|
import {
|
|
10
10
|
PipelineTrace
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GF52TW4I.js";
|
|
12
12
|
import {
|
|
13
13
|
CODE_GEN_FEW_SHOT_EXAMPLES,
|
|
14
14
|
COMPONENT_CONTRACT,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
buildPlannerUserMessage,
|
|
23
23
|
formatPlanSteps,
|
|
24
24
|
initCodeGenPrompts
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-K2IUBCND.js";
|
|
26
26
|
import {
|
|
27
27
|
ZERO_USAGE,
|
|
28
28
|
buildDirectorTools,
|
|
29
29
|
buildPlannerTools,
|
|
30
30
|
buildToolsFromSchemas,
|
|
31
31
|
extractProviderError
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-TPA6PYN2.js";
|
|
33
33
|
import {
|
|
34
34
|
COMPOSE_MOTION_TOOLS,
|
|
35
35
|
COMPOSE_MOTION_VERIFY_TOOLS,
|
|
@@ -38,27 +38,27 @@ import {
|
|
|
38
38
|
COMPOSE_ROLE_TOOLS,
|
|
39
39
|
COMPOSE_ROLE_TOOL_NAMES,
|
|
40
40
|
dispatchComposeRoleTool
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-BZZTVOGG.js";
|
|
42
42
|
import {
|
|
43
43
|
AgentFixableCaptureError,
|
|
44
44
|
getExcludedTools
|
|
45
45
|
} from "./chunk-JOURGVOR.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-DCVJWGIA.js";
|
|
47
|
+
import "./chunk-ICSZF37W.js";
|
|
48
48
|
import "./chunk-7PA7FGLD.js";
|
|
49
49
|
import "./chunk-KYRDKK2D.js";
|
|
50
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-PIURX6IZ.js";
|
|
51
51
|
import {
|
|
52
52
|
cssLayoutVars
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-YQ7FFW3G.js";
|
|
54
54
|
import "./chunk-DSMLHYJ4.js";
|
|
55
55
|
import "./chunk-JF4JJAFP.js";
|
|
56
|
-
import "./chunk-
|
|
57
|
-
import "./chunk-
|
|
58
|
-
import "./chunk-
|
|
59
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-TFGKUWHY.js";
|
|
57
|
+
import "./chunk-WZH57M53.js";
|
|
58
|
+
import "./chunk-WPZKOVYF.js";
|
|
59
|
+
import "./chunk-2B5VJZHL.js";
|
|
60
60
|
import "./chunk-WREYUH2E.js";
|
|
61
|
-
import "./chunk-
|
|
61
|
+
import "./chunk-LLUW26BS.js";
|
|
62
62
|
import "./chunk-2ESYSVXG.js";
|
|
63
63
|
|
|
64
64
|
// ../authoring/src/agent.ts
|
|
@@ -102,7 +102,6 @@ function buildPrepareStep(policy) {
|
|
|
102
102
|
return {
|
|
103
103
|
messages: pruneMessages({
|
|
104
104
|
messages: withStubs,
|
|
105
|
-
// Effectively "never" — tool calls/results are managed above.
|
|
106
105
|
toolCalls: `before-last-${99999}-messages`,
|
|
107
106
|
reasoning: "before-last-message",
|
|
108
107
|
emptyMessages: "remove"
|
|
@@ -115,9 +114,6 @@ function buildPrepareStep(policy) {
|
|
|
115
114
|
messages: pruneMessages({
|
|
116
115
|
messages,
|
|
117
116
|
toolCalls,
|
|
118
|
-
// Coupled to tool-call pruning, never 'none': see pruneReasoning above —
|
|
119
|
-
// older turns lose thinking WHOLESALE (valid) instead of keeping a
|
|
120
|
-
// signed thinking block on a message whose tool_use was pruned (400).
|
|
121
117
|
reasoning: "before-last-message",
|
|
122
118
|
emptyMessages: "remove"
|
|
123
119
|
})
|
|
@@ -208,8 +204,6 @@ Above are ${frames.length} captured frames. Use them to evaluate visual criteria
|
|
|
208
204
|
schema: CriteriaEvaluationSchema,
|
|
209
205
|
instructions: CRITERIA_EVALUATOR_PROMPT,
|
|
210
206
|
messages: [{ role: "user", content: contentParts }],
|
|
211
|
-
// One verbose feedback string per criterion; an 8-9 criterion evaluation
|
|
212
|
-
// runs ~2.5-4k tokens. A tighter cap truncates the JSON mid-string.
|
|
213
207
|
maxOutputTokens: 8e3
|
|
214
208
|
});
|
|
215
209
|
const criterionNames = Object.keys(criteria);
|
|
@@ -298,7 +292,6 @@ ${dimensionsText}${criteriaText}
|
|
|
298
292
|
|
|
299
293
|
ARTIFACT TO EVALUATE:
|
|
300
294
|
${artifact}`,
|
|
301
|
-
// critique + evidence run long; a tighter cap truncates the JSON mid-string.
|
|
302
295
|
maxOutputTokens: 8e3
|
|
303
296
|
});
|
|
304
297
|
return toEvaluationResult(object, rubric);
|
|
@@ -328,7 +321,6 @@ Above are ${capturedFrames.length} captured frames. Inspect for visual quality,
|
|
|
328
321
|
schema: EvaluationSchema,
|
|
329
322
|
instructions: EVALUATOR_PROMPT,
|
|
330
323
|
messages: [{ role: "user", content: contentParts }],
|
|
331
|
-
// critique + evidence run long; a tighter cap truncates the JSON mid-string.
|
|
332
324
|
maxOutputTokens: 8e3
|
|
333
325
|
});
|
|
334
326
|
return toEvaluationResult(object, rubric);
|
|
@@ -365,7 +357,6 @@ var Agent = class {
|
|
|
365
357
|
messages = [];
|
|
366
358
|
excludedTools;
|
|
367
359
|
log;
|
|
368
|
-
/** Monotonic step index for onStepMetrics; reset per run(). */
|
|
369
360
|
stepCounter = 0;
|
|
370
361
|
constructor(config) {
|
|
371
362
|
this.config = config;
|
|
@@ -382,17 +373,9 @@ var Agent = class {
|
|
|
382
373
|
}
|
|
383
374
|
};
|
|
384
375
|
}
|
|
385
|
-
/** Reset conversation history (new session). */
|
|
386
376
|
reset() {
|
|
387
377
|
this.messages = [];
|
|
388
378
|
}
|
|
389
|
-
/**
|
|
390
|
-
* Run the agent with a prompt.
|
|
391
|
-
*
|
|
392
|
-
* Without criteria/rubric: single generation pass.
|
|
393
|
-
* With criteria + maxAttempts > 1: generate → evaluate → refine loop (criteria mode).
|
|
394
|
-
* With rubric + maxAttempts > 1: generate → evaluate → refine loop (rubric mode).
|
|
395
|
-
*/
|
|
396
379
|
async run(prompt, opts = {}) {
|
|
397
380
|
this.stepCounter = 0;
|
|
398
381
|
const { criteria, rubric, maxAttempts = 1 } = opts;
|
|
@@ -407,7 +390,6 @@ var Agent = class {
|
|
|
407
390
|
}
|
|
408
391
|
return this.runWithCriteria(prompt, opts);
|
|
409
392
|
}
|
|
410
|
-
// ── Quality loop: criteria mode (pass/fail per criterion) ──
|
|
411
393
|
async runWithCriteria(prompt, opts) {
|
|
412
394
|
const { criteria, maxAttempts = 1 } = opts;
|
|
413
395
|
let bestResult;
|
|
@@ -459,7 +441,6 @@ var Agent = class {
|
|
|
459
441
|
}
|
|
460
442
|
return bestResult;
|
|
461
443
|
}
|
|
462
|
-
// ── Quality loop: rubric mode (weighted numeric scoring) ──
|
|
463
444
|
async runWithRubric(prompt, opts) {
|
|
464
445
|
const { rubric, verificationCriteria = [], maxAttempts = 1 } = opts;
|
|
465
446
|
let bestResult;
|
|
@@ -509,7 +490,6 @@ var Agent = class {
|
|
|
509
490
|
}
|
|
510
491
|
return bestResult;
|
|
511
492
|
}
|
|
512
|
-
// ── Private: single execution pass ──
|
|
513
493
|
async executeOnce(prompt, opts) {
|
|
514
494
|
this.messages.push({ role: "user", content: prompt });
|
|
515
495
|
const hasTools = !!this.capabilities;
|
|
@@ -518,7 +498,6 @@ var Agent = class {
|
|
|
518
498
|
}
|
|
519
499
|
return this.executeWithTools(prompt, opts);
|
|
520
500
|
}
|
|
521
|
-
// ── Text-only execution (no capabilities) ──
|
|
522
501
|
async executeText(_prompt, opts) {
|
|
523
502
|
try {
|
|
524
503
|
const cacheBreakpoint = {
|
|
@@ -558,7 +537,6 @@ var Agent = class {
|
|
|
558
537
|
return { success: false, text: errMsg, attempts: 1, usage: ZERO_USAGE };
|
|
559
538
|
}
|
|
560
539
|
}
|
|
561
|
-
// ── Tool-based execution ──
|
|
562
540
|
async executeWithTools(_prompt, opts) {
|
|
563
541
|
const capabilities = this.capabilities;
|
|
564
542
|
const context = buildDirectorContext(capabilities, { maxChars: 32e3 });
|
|
@@ -597,9 +575,6 @@ ${contextJson}
|
|
|
597
575
|
const agent = new ToolLoopAgent({
|
|
598
576
|
model: this.config.model,
|
|
599
577
|
maxOutputTokens,
|
|
600
|
-
// Config uses a structural per-provider record (the nominal
|
|
601
|
-
// ProviderOptions type isn't re-exported by every ai@6 minor); derive
|
|
602
|
-
// the SDK's own type from the constructor so the cast tracks upgrades.
|
|
603
578
|
...this.config.providerOptions ? {
|
|
604
579
|
providerOptions: this.config.providerOptions
|
|
605
580
|
} : {},
|
|
@@ -611,17 +586,10 @@ ${contextJson}
|
|
|
611
586
|
}
|
|
612
587
|
},
|
|
613
588
|
tools: wrappedTools,
|
|
614
|
-
// B6: halt on an infra-sentinel tool-error step (second condition) — the
|
|
615
|
-
// model cannot fix a dead scratch/session, so further steps are waste.
|
|
616
589
|
stopWhen: [
|
|
617
590
|
isStepCount(maxSteps),
|
|
618
591
|
({ steps }) => infraErrorFromSteps(steps) !== null
|
|
619
592
|
],
|
|
620
|
-
// Observability: log each step's tool calls so the agent's craft
|
|
621
|
-
// behaviour — which tools it invokes vs SKIPS — is visible in the worker
|
|
622
|
-
// logs instead of a ~100s black box between phases. Names only (args are
|
|
623
|
-
// verbose); enough to see the tool sequence (e.g. did it call
|
|
624
|
-
// set_crop_intents / enable_captions_behind_speaker / capture_frames).
|
|
625
593
|
onStepEnd: (step) => {
|
|
626
594
|
const names = (step.toolCalls ?? []).map((t) => t.toolName);
|
|
627
595
|
this.log.info(`[agent] step tools=[${names.join(", ") || "none"}] finish=${step.finishReason ?? "?"}`);
|
|
@@ -646,16 +614,6 @@ ${contextJson}
|
|
|
646
614
|
});
|
|
647
615
|
}
|
|
648
616
|
},
|
|
649
|
-
// Context management: evict stale tool content between steps so a long
|
|
650
|
-
// tool-heavy run (accumulating tool-results + base64 capture images)
|
|
651
|
-
// stays under the model's window. Off unless the caller sets a policy.
|
|
652
|
-
// The moving cache breakpoint applies only when eviction is OFF: the
|
|
653
|
-
// sliding prune window rewrites messages BEFORE the prior step's
|
|
654
|
-
// breakpoint each step, so stamped tail entries would be written at
|
|
655
|
-
// 1.25x and never read back — strictly worse than no stamp. (Possible
|
|
656
|
-
// follow-up: stamp the eviction boundary instead, whose pruned prefix
|
|
657
|
-
// is stable step-over-step.) See promptCache.ts for why the
|
|
658
|
-
// system-only breakpoint leaves image tool-results uncached.
|
|
659
617
|
prepareStep: this.config.finalStepTools ? reserveFinalStep(
|
|
660
618
|
this.config.contextManagement ? buildPrepareStep(this.config.contextManagement) : cachePrepareStep,
|
|
661
619
|
maxSteps,
|
|
@@ -726,7 +684,6 @@ ${contextJson}
|
|
|
726
684
|
return { success: false, text: errMsg, attempts: 1, usage: ZERO_USAGE };
|
|
727
685
|
}
|
|
728
686
|
}
|
|
729
|
-
// ── Hook wiring ──
|
|
730
687
|
wrapToolsWithHooks(tools, beforeHook, afterHook) {
|
|
731
688
|
if (!beforeHook && !afterHook) return tools;
|
|
732
689
|
const wrapped = {};
|
|
@@ -768,7 +725,6 @@ ${contextJson}
|
|
|
768
725
|
}
|
|
769
726
|
return wrapped;
|
|
770
727
|
}
|
|
771
|
-
// ── Evaluation ──
|
|
772
728
|
async evaluateResult(result, task, criteria, _opts) {
|
|
773
729
|
const evalModel = this.config.evaluationModel ?? this.config.model;
|
|
774
730
|
const capabilities = this.capabilities;
|
|
@@ -810,7 +766,6 @@ ${contextJson}
|
|
|
810
766
|
artifact: result.text
|
|
811
767
|
});
|
|
812
768
|
}
|
|
813
|
-
// ── Rubric-based evaluation ──
|
|
814
769
|
async evaluateWithRubric(result, task, rubric, verificationCriteria, _opts) {
|
|
815
770
|
const evalModel = this.config.evaluationModel ?? this.config.model;
|
|
816
771
|
const capabilities = this.capabilities;
|
|
@@ -830,7 +785,6 @@ ${contextJson}
|
|
|
830
785
|
}
|
|
831
786
|
return evaluateArtifact(evalModel, result.text ?? "", task, rubric, verificationCriteria);
|
|
832
787
|
}
|
|
833
|
-
// ── Refinement prompts ──
|
|
834
788
|
buildRefinementPrompt(originalTask, evaluation, criteria) {
|
|
835
789
|
const failedCriteria = evaluation.criteria.filter((c) => !c.passed).map((c) => {
|
|
836
790
|
const desc = criteria[c.name] ?? "";
|
|
@@ -1097,21 +1051,11 @@ function generateMotionShell(cardHtml, opts) {
|
|
|
1097
1051
|
const sustain = PRESET_SUSTAIN[opts.preset];
|
|
1098
1052
|
const tokenVars = cssLayoutVars(opts.tokens, void 0);
|
|
1099
1053
|
const staggerBlock = opts.preset === "stagger-reveal" ? `
|
|
1100
|
-
// Per-child reveal + sustained breathing: values are computed from the
|
|
1101
|
-
// CURRENT frame and emitted as static nth-child rules \u2014 legal under
|
|
1102
|
-
// Remotion's seek-and-freeze (this is per-frame static CSS, not a CSS
|
|
1103
|
-
// animation). Children live inside the verbatim markup's [data-stagger]
|
|
1104
|
-
// container; extra rules no-op. Breathing gives each tile a phase-offset
|
|
1105
|
-
// \xB1${STAGGER_BREATHE.amp}px float for the whole hold, so a revealed mosaic never freezes.
|
|
1106
1054
|
const staggerF = Math.max(1, Math.round((${staggerMs} / 1000) * fps));
|
|
1107
1055
|
const staggerRules = Array.from({ length: ${MAX_STAGGER_CHILDREN} }, (_, i) => {
|
|
1108
1056
|
const s = enterF + i * staggerF;
|
|
1109
1057
|
const o = interpolate(frame, [s, s + enterF], [0, 1], { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
|
|
1110
1058
|
const breathe = ${STAGGER_BREATHE.amp} * Math.sin((tSec / ${STAGGER_BREATHE.periodS}) * Math.PI * 2 + i * ${STAGGER_BREATHE.phase});
|
|
1111
|
-
// 'translate' (the independent CSS property), NOT 'transform': this rule
|
|
1112
|
-
// out-specifies any author class (0,2,0), so a transform here would
|
|
1113
|
-
// clobber an author rotate/scale on the tile; the independent property
|
|
1114
|
-
// composes with the author transform in Chromium.
|
|
1115
1059
|
return '[data-stagger] > *:nth-child(' + (i + 1) + ') { opacity: ' + o + '; translate: 0 ' + breathe.toFixed(3) + 'px; }';
|
|
1116
1060
|
}).join('\\n');` : "";
|
|
1117
1061
|
const staggerStyleEl = opts.preset === "stagger-reveal" ? `<style>{staggerRules}</style>` : "";
|
|
@@ -1128,10 +1072,6 @@ export default function CardMotionShell({ durationInFrames, params }) {
|
|
|
1128
1072
|
[Math.max(enterF + 1, durationInFrames - exitF), durationInFrames], [1, 0],
|
|
1129
1073
|
{ easing: Easing.in(Easing.cubic), extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
|
|
1130
1074
|
const opacity = Math.min(enter, exit);
|
|
1131
|
-
// SUSTAIN: post-entrance micro-motion for the full remaining clip. 'hold'
|
|
1132
|
-
// runs 0\u21921 linearly from entrance-end to the last frame (linear on purpose \u2014
|
|
1133
|
-
// constant perceived velocity = ambient life); tSec is seconds since the
|
|
1134
|
-
// entrance completed (drives the settle wobble / breathing phases).
|
|
1135
1075
|
const hold = interpolate(frame, [enterF, durationInFrames], [0, 1],
|
|
1136
1076
|
{ extrapolateLeft: 'clamp', extrapolateRight: 'clamp' });
|
|
1137
1077
|
const tSec = Math.max(0, frame - enterF) / fps;
|
|
@@ -1187,13 +1127,7 @@ function resolveMotionPresetCard(composition, input) {
|
|
|
1187
1127
|
}
|
|
1188
1128
|
return {
|
|
1189
1129
|
cardHtml: clip.source.html,
|
|
1190
|
-
// The card's token layer rides with the markup — generateMotionShell bakes
|
|
1191
|
-
// it as `--cf-*` vars so the shelled card keeps the values it was authored
|
|
1192
|
-
// against (the custom render lane applies no token vars).
|
|
1193
1130
|
...clip.source.tokens !== void 0 ? { tokens: clip.source.tokens } : {},
|
|
1194
|
-
// Depth rides through the shell: a behind-subject card must stay behind
|
|
1195
|
-
// after the source swap, or the preset silently pops it in front of the
|
|
1196
|
-
// subject (2026-08-10 issue — the sink's whole-source replace dropped it).
|
|
1197
1131
|
...clip.source.zPlane !== void 0 ? { zPlane: clip.source.zPlane } : {}
|
|
1198
1132
|
};
|
|
1199
1133
|
}
|
|
@@ -411,8 +411,6 @@ function projectChild(child, compound, source) {
|
|
|
411
411
|
duration,
|
|
412
412
|
source: windowedSource(clip, headDelta, duration),
|
|
413
413
|
...clip.animate ? { animate: windowedAnimate(clip, headDelta, duration) } : {},
|
|
414
|
-
// A child's link group must not merge with an identically-named one in
|
|
415
|
-
// the host or a sibling instance — scope it like the ids.
|
|
416
414
|
...clip.linkGroupId ? { linkGroupId: `${compound.id}:${clip.linkGroupId}` } : {}
|
|
417
415
|
};
|
|
418
416
|
contents.push(projected);
|
|
@@ -480,8 +478,6 @@ function planSlip(composition, clipId, deltaSeconds, sourceDuration) {
|
|
|
480
478
|
clipId,
|
|
481
479
|
trackKind: ctx.trackKind,
|
|
482
480
|
patch: {
|
|
483
|
-
// startTime and duration are DELIBERATELY absent: that is what makes this
|
|
484
|
-
// a slip rather than a move.
|
|
485
481
|
source: { ...source, trim: { ...source.trim, start, end } }
|
|
486
482
|
}
|
|
487
483
|
});
|
|
@@ -592,7 +588,6 @@ function planSlide(composition, clipId, deltaSeconds, sourceDurations) {
|
|
|
592
588
|
op: "updateClip",
|
|
593
589
|
clipId,
|
|
594
590
|
trackKind: ctx.trackKind,
|
|
595
|
-
// Content untouched — only where it sits.
|
|
596
591
|
patch: { startTime: ctx.clip.startTime + deltaSeconds }
|
|
597
592
|
},
|
|
598
593
|
{
|
|
@@ -703,7 +698,6 @@ function expandMovesToLinkGroups(composition, moves, clipsById) {
|
|
|
703
698
|
named.add(partnerId);
|
|
704
699
|
out.push({
|
|
705
700
|
clipId: partnerId,
|
|
706
|
-
// The partner keeps its own lane — linking couples TIME, not track.
|
|
707
701
|
toTrackId: trackIdOf(composition, partnerId) ?? move.toTrackId,
|
|
708
702
|
startTime: Math.max(0, partner.startTime + delta),
|
|
709
703
|
duration: partner.duration
|
|
@@ -14,20 +14,21 @@ function collectMediaClips(value, nearestId, out) {
|
|
|
14
14
|
}
|
|
15
15
|
if (value === null || typeof value !== "object") return;
|
|
16
16
|
const obj = value;
|
|
17
|
+
if (obj.enabled === false && Array.isArray(obj.contents)) return;
|
|
17
18
|
const id = typeof obj.id === "string" ? obj.id : nearestId;
|
|
18
19
|
if (obj.kind === "media" && typeof obj.mediaId === "string") {
|
|
19
20
|
const reframe = obj.reframe;
|
|
20
21
|
const hasReframe = Array.isArray(reframe?.segments) && reframe.segments.length > 0;
|
|
21
22
|
out.push({
|
|
22
23
|
mediaId: obj.mediaId,
|
|
23
|
-
hasCamera: hasReframe || obj.kenBurns != null,
|
|
24
|
+
hasCamera: hasReframe || obj.kenBurns != null && obj.kenBurns !== "none",
|
|
24
25
|
...id !== void 0 ? { clipId: id } : {}
|
|
25
26
|
});
|
|
26
27
|
return;
|
|
27
28
|
}
|
|
28
29
|
for (const v of Object.values(obj)) collectMediaClips(v, id, out);
|
|
29
30
|
}
|
|
30
|
-
function
|
|
31
|
+
function findAspectCropLosses(composition, dimensionsByMediaId, target) {
|
|
31
32
|
const placed = [];
|
|
32
33
|
collectMediaClips(composition, void 0, placed);
|
|
33
34
|
if (placed.length === 0) return [];
|
|
@@ -42,11 +43,19 @@ function detectAspectCropLoss(composition, dimensionsByMediaId, target) {
|
|
|
42
43
|
const label = clip.clipId ?? clip.mediaId;
|
|
43
44
|
if (seen.has(label)) continue;
|
|
44
45
|
seen.add(label);
|
|
45
|
-
offenders.push({
|
|
46
|
+
offenders.push({
|
|
47
|
+
...clip.clipId ? { clipId: clip.clipId } : {},
|
|
48
|
+
mediaId: clip.mediaId,
|
|
49
|
+
lostPct: Math.round((1 - visible) * 100)
|
|
50
|
+
});
|
|
46
51
|
}
|
|
52
|
+
return offenders;
|
|
53
|
+
}
|
|
54
|
+
function detectAspectCropLoss(composition, dimensionsByMediaId, target) {
|
|
55
|
+
const offenders = findAspectCropLosses(composition, dimensionsByMediaId, target);
|
|
47
56
|
if (offenders.length === 0) return [];
|
|
48
57
|
const worst = offenders.reduce((a, b) => b.lostPct > a.lostPct ? b : a);
|
|
49
|
-
const shown = offenders.slice(0, MAX_NAMED).map((o) => `${o.
|
|
58
|
+
const shown = offenders.slice(0, MAX_NAMED).map((o) => `${o.clipId ?? o.mediaId} (\u2212${o.lostPct}%)`).join(", ");
|
|
50
59
|
const elided = offenders.length > MAX_NAMED ? ` (+${offenders.length - MAX_NAMED} more)` : "";
|
|
51
60
|
return [
|
|
52
61
|
`aspect_crop_loss \u2014 ${offenders.length} clip${offenders.length === 1 ? "" : "s"} ${offenders.length === 1 ? "is" : "are"} shaped very differently from the ${target.width}\xD7${target.height} output and author no camera, so each is centre-cropped to fill \u2014 discarding up to ${worst.lostPct}% of the picture with faces and subjects as likely to fall outside the crop as inside it: ${shown}${elided}. Author a \`reframe\` (focus a face, a point, or all-faces) or a \`kenBurns\` move on these clips, or render a format closer to their shape. Note \`fit:"contain"\` does NOT avoid this for stills \u2014 images are cropped by the still trajectory, which centres when it has no focus.`
|
|
@@ -73,32 +82,21 @@ var ReframeSegmentFields = z.object({
|
|
|
73
82
|
endSec: z.number().positive().describe(
|
|
74
83
|
"Segment END in seconds, clip-relative. The span (endSec \u2212 startSec) is this segment's duration \u2014 the window `ease` ramps over."
|
|
75
84
|
),
|
|
76
|
-
/** WHO/WHAT the camera tracks — see the `.describe()` for per-mode guidance. */
|
|
77
85
|
focus: Focus.describe(
|
|
78
86
|
"WHO/WHAT the camera tracks this segment (the reframe center), selected by `mode`: `frame-center` = no tracking, hold the geometric center (static/graphic footage, or a pure zoom); `point` = lock to a fixed source-normalized {x,y} (a non-moving on-screen element); `face` = track a detected face by `faceId` (from get_media_context), with optional `shotScale` close|standard|wide for tightness; `all-faces` = frame the bounding box of every detected face (group/ensemble shots); `active-speaker` = follow whoever is speaking (diarized talking-head / podcast). Pick by what the beat is about; pair with `zoom` for how tight."
|
|
79
87
|
),
|
|
80
|
-
/** Editorial language for diff/log readability ("speaker-tight",
|
|
81
|
-
* "wide-context", "interviewer-reaction"). Not honored by the derive math
|
|
82
|
-
* — a relabel must not bust the variant cache, so it is EXCLUDED from
|
|
83
|
-
* `hashReframe`. */
|
|
84
88
|
intent: z.string().optional().describe(
|
|
85
89
|
"Optional editorial LABEL for diff/log readability (e.g. 'speaker-tight', 'wide-context'). Cosmetic \u2014 NOT honored by the derive math and excluded from the variant cache key."
|
|
86
90
|
),
|
|
87
|
-
/** <1 punches in; 1 = full frame. Omitted when `focus.shotScale` governs — the
|
|
88
|
-
* two are MUTUALLY EXCLUSIVE (see the refine below). Absent = 1 (full frame),
|
|
89
|
-
* which is how `hashReframe` has always canonicalized it. */
|
|
90
91
|
zoom: z.number().min(0.1).max(1).optional().describe(
|
|
91
92
|
"How TIGHT the framing is \u2014 the fraction of the source the output viewport shows. <1 punches IN (a smaller source fraction, magnified to fill the frame); 1 = the full frame (no crop). ~0.6\u20130.8 is a moderate push-in, ~0.5 a tight close-up, 0.1 the maximum zoom. There is NO zoom-OUT past the full frame (max 1). Omit for the full frame. MUTUALLY EXCLUSIVE with `focus.shotScale`: a face-tracked shot is sized EITHER by the editorial scale (shotScale, calibrated to the detected face) OR by an explicit zoom \u2014 never both."
|
|
92
93
|
),
|
|
93
|
-
/** Ease-in / ease-out durations (seconds) for the zoom ramp at this segment's
|
|
94
|
-
* edges. Honored at derive time (baked into the per-frame channel). */
|
|
95
94
|
ease: z.object({
|
|
96
95
|
in: z.number().nonnegative().describe("Ease-IN ramp DURATION in seconds at the segment START."),
|
|
97
96
|
out: z.number().nonnegative().describe("Ease-OUT ramp DURATION in seconds at the segment END.")
|
|
98
97
|
}).optional().describe(
|
|
99
98
|
"Zoom/center ramp DURATIONS in SECONDS at this segment's edges \u2014 NOT a unitless 0\u20131 curve. ~0.3\u20130.6s reads as a snappy push; >1s reads sluggish. Keep `in` + `out` \u2264 the segment's duration (endSec \u2212 startSec): the two edges share the span, so to ramp across the WHOLE segment set one edge to the full duration and the other to 0. Omit for an instant cut to this framing."
|
|
100
99
|
),
|
|
101
|
-
/** Optional fine framing nudge, source-normalized [-0.3,0.3]. */
|
|
102
100
|
bias: z.object({
|
|
103
101
|
x: z.number().min(-0.3).max(0.3).describe("Horizontal nudge, source-normalized (+ = right)."),
|
|
104
102
|
y: z.number().min(-0.3).max(0.3).describe("Vertical nudge, source-normalized (+ = down).")
|
|
@@ -107,16 +105,6 @@ var ReframeSegmentFields = z.object({
|
|
|
107
105
|
)
|
|
108
106
|
});
|
|
109
107
|
var ReframeSegment = ReframeSegmentFields.refine(
|
|
110
|
-
// ONE knob sizes the crop. `shotScale` and `zoom` both do, and the bake gives
|
|
111
|
-
// shotScale precedence (calibrateShotScale takes zoom only as a FALLBACK) — so a
|
|
112
|
-
// segment carrying both SILENTLY discards the zoom. That is how a stored
|
|
113
|
-
// composition came to claim `zoom: 1` (full frame) on a segment the renderer
|
|
114
|
-
// punched in to 0.55: reading the artifact said "no zoom" while the render
|
|
115
|
-
// plainly zoomed (2026-07-13). The state is incoherent, so make it
|
|
116
|
-
// unrepresentable — here, at the wire shape, not just at the authoring tools.
|
|
117
|
-
//
|
|
118
|
-
// Rows written before compile stopped stamping `zoom: 1` are MIGRATED (convex
|
|
119
|
-
// migrations: dropZoomUnderShotScale), not tolerated.
|
|
120
108
|
(s) => !(s.focus.mode === "face" && s.focus.shotScale !== void 0 && s.zoom !== void 0),
|
|
121
109
|
{
|
|
122
110
|
message: "a face segment takes EITHER focus.shotScale (editorial scale, calibrated to the detected face) OR an explicit zoom \u2014 never both; shotScale wins at bake time and the zoom would be silently discarded",
|
|
@@ -127,6 +115,7 @@ var Reframe = z.object({ segments: z.array(ReframeSegment).min(1) });
|
|
|
127
115
|
|
|
128
116
|
export {
|
|
129
117
|
coverVisibleFraction,
|
|
118
|
+
findAspectCropLosses,
|
|
130
119
|
detectAspectCropLoss,
|
|
131
120
|
Focus,
|
|
132
121
|
ReframeSegmentFields,
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EntityId
|
|
3
|
+
} from "./chunk-XELS2BGA.js";
|
|
4
|
+
|
|
5
|
+
// ../data-models/media-model/src/generation.ts
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
var MediaId = EntityId("media");
|
|
8
|
+
var GenerationId = EntityId("generation");
|
|
9
|
+
var GenerationGroupId = EntityId("generationGroup");
|
|
10
|
+
var ClientRequestId = EntityId("generationRequest");
|
|
11
|
+
var ProjectHome = z.enum(["local", "cloud"]);
|
|
12
|
+
var MediaKind = z.enum(["image", "video", "audio"]);
|
|
13
|
+
var MediaGenerator = z.enum([
|
|
14
|
+
"text-to-video",
|
|
15
|
+
"text-to-image",
|
|
16
|
+
"image-to-video",
|
|
17
|
+
"text-to-music",
|
|
18
|
+
"text-to-speech",
|
|
19
|
+
"text-to-sfx",
|
|
20
|
+
"auto"
|
|
21
|
+
]);
|
|
22
|
+
var GenerationReference = z.object({
|
|
23
|
+
role: z.enum(["first-frame", "last-frame", "image", "source"]),
|
|
24
|
+
mediaId: MediaId
|
|
25
|
+
});
|
|
26
|
+
var GenerateMediaCommand = z.object({
|
|
27
|
+
clientRequestId: ClientRequestId,
|
|
28
|
+
generator: MediaGenerator,
|
|
29
|
+
prompt: z.string().trim().min(1).max(1e4),
|
|
30
|
+
style: z.record(z.string(), z.unknown()).optional(),
|
|
31
|
+
references: z.array(GenerationReference).max(8).default([]),
|
|
32
|
+
generationGroupId: GenerationGroupId.optional(),
|
|
33
|
+
parentMediaId: MediaId.optional(),
|
|
34
|
+
variationNonce: z.string().min(1).optional()
|
|
35
|
+
});
|
|
36
|
+
var GenerationReceipt = z.object({
|
|
37
|
+
clientRequestId: ClientRequestId,
|
|
38
|
+
generationId: GenerationId,
|
|
39
|
+
mediaId: MediaId,
|
|
40
|
+
generationGroupId: GenerationGroupId,
|
|
41
|
+
version: z.number().int().positive(),
|
|
42
|
+
providerJobId: z.string().min(1).optional(),
|
|
43
|
+
estimateUsd: z.number().nonnegative().optional()
|
|
44
|
+
});
|
|
45
|
+
var GenerationStatus = z.enum([
|
|
46
|
+
"draft",
|
|
47
|
+
"submitting",
|
|
48
|
+
"queued",
|
|
49
|
+
"generating",
|
|
50
|
+
"provider_complete",
|
|
51
|
+
"materialising",
|
|
52
|
+
"processing",
|
|
53
|
+
"ready",
|
|
54
|
+
"cancelling",
|
|
55
|
+
"cancelled",
|
|
56
|
+
"failed"
|
|
57
|
+
]);
|
|
58
|
+
var GenerationFailure = z.object({
|
|
59
|
+
code: z.string().min(1),
|
|
60
|
+
title: z.string().min(1),
|
|
61
|
+
recovery: z.string().optional(),
|
|
62
|
+
retryable: z.boolean(),
|
|
63
|
+
correlationId: z.string().optional()
|
|
64
|
+
});
|
|
65
|
+
var GenerationArtifact = z.object({
|
|
66
|
+
artifactVersion: z.literal(1),
|
|
67
|
+
clientRequestId: ClientRequestId,
|
|
68
|
+
generationId: GenerationId,
|
|
69
|
+
mediaId: MediaId,
|
|
70
|
+
generationGroupId: GenerationGroupId,
|
|
71
|
+
version: z.number().int().positive(),
|
|
72
|
+
kind: MediaKind,
|
|
73
|
+
requestSummary: z.string().min(1).max(500),
|
|
74
|
+
status: GenerationStatus,
|
|
75
|
+
progress: z.number().min(0).max(1).optional(),
|
|
76
|
+
placementReady: z.boolean().default(false),
|
|
77
|
+
parentMediaId: MediaId.optional(),
|
|
78
|
+
estimateUsd: z.number().nonnegative().optional(),
|
|
79
|
+
failure: GenerationFailure.optional(),
|
|
80
|
+
createdAt: z.number().int().nonnegative(),
|
|
81
|
+
updatedAt: z.number().int().nonnegative()
|
|
82
|
+
});
|
|
83
|
+
var GenerationCapability = z.object({
|
|
84
|
+
generator: MediaGenerator,
|
|
85
|
+
outputKind: MediaKind,
|
|
86
|
+
referenceRoles: z.array(GenerationReference.shape.role),
|
|
87
|
+
durationSec: z.object({ min: z.number().positive(), max: z.number().positive() }).optional(),
|
|
88
|
+
aspectRatios: z.array(z.string()).optional(),
|
|
89
|
+
supportsCancellation: z.boolean(),
|
|
90
|
+
supportsParallelAttempts: z.boolean(),
|
|
91
|
+
supportsQuote: z.boolean()
|
|
92
|
+
});
|
|
93
|
+
var GenerationCapabilities = z.array(GenerationCapability);
|
|
94
|
+
function deriveGenerationStatus(sources) {
|
|
95
|
+
const { attempt, resource, materialisation } = sources;
|
|
96
|
+
if (attempt.status === "failed") {
|
|
97
|
+
return { status: "failed", placementReady: false, ...attempt.failure ? { failure: attempt.failure } : {} };
|
|
98
|
+
}
|
|
99
|
+
if (attempt.status === "cancelled") return { status: "cancelled", placementReady: false };
|
|
100
|
+
if (attempt.status === "cancelling") return { status: "cancelling", placementReady: false };
|
|
101
|
+
if (materialisation.status === "failed") {
|
|
102
|
+
return { status: "failed", placementReady: false, ...materialisation.failure ? { failure: materialisation.failure } : {} };
|
|
103
|
+
}
|
|
104
|
+
if (!resource.durable) return { status: attempt.status, placementReady: false };
|
|
105
|
+
if (materialisation.required && (!materialisation.verifiedBytes || materialisation.status !== "complete")) {
|
|
106
|
+
return { status: "materialising", placementReady: false };
|
|
107
|
+
}
|
|
108
|
+
if (!resource.decodable || !resource.metadataReady) {
|
|
109
|
+
return { status: "processing", placementReady: false };
|
|
110
|
+
}
|
|
111
|
+
return { status: "ready", placementReady: resource.placementReady };
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export {
|
|
115
|
+
MediaId,
|
|
116
|
+
GenerationId,
|
|
117
|
+
GenerationGroupId,
|
|
118
|
+
ClientRequestId,
|
|
119
|
+
ProjectHome,
|
|
120
|
+
MediaKind,
|
|
121
|
+
MediaGenerator,
|
|
122
|
+
GenerationReference,
|
|
123
|
+
GenerateMediaCommand,
|
|
124
|
+
GenerationReceipt,
|
|
125
|
+
GenerationStatus,
|
|
126
|
+
GenerationFailure,
|
|
127
|
+
GenerationArtifact,
|
|
128
|
+
GenerationCapability,
|
|
129
|
+
GenerationCapabilities,
|
|
130
|
+
deriveGenerationStatus
|
|
131
|
+
};
|