vidspotai-shared 1.0.55 → 1.0.56
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/lib/services/aiGen/providers/google/google.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/google.service.js +35 -0
- package/lib/utils/errors.d.ts +24 -2
- package/lib/utils/errors.d.ts.map +1 -1
- package/lib/utils/errors.js +23 -3
- package/package.json +1 -1
- package/lib/globals/aiModels/providers/alibaba.d.ts +0 -4
- package/lib/globals/aiModels/providers/alibaba.d.ts.map +0 -1
- package/lib/globals/aiModels/providers/alibaba.js +0 -183
- package/lib/globals/aiModels/providers/elevenlabs.d.ts +0 -13
- package/lib/globals/aiModels/providers/elevenlabs.d.ts.map +0 -1
- package/lib/globals/aiModels/providers/elevenlabs.js +0 -25
- package/lib/globals/aiModels/providers/pixverseTemplates.d.ts +0 -36
- package/lib/globals/aiModels/providers/pixverseTemplates.d.ts.map +0 -1
- package/lib/globals/aiModels/providers/pixverseTemplates.js +0 -42
- package/lib/globals/aiModels/tierHelpers.d.ts +0 -27
- package/lib/globals/aiModels/tierHelpers.d.ts.map +0 -1
- package/lib/globals/aiModels/tierHelpers.js +0 -73
- package/lib/globals/ttsModels/providers/minimax.d.ts +0 -8
- package/lib/globals/ttsModels/providers/minimax.d.ts.map +0 -1
- package/lib/globals/ttsModels/providers/minimax.js +0 -18
- package/lib/globals/ttsModels/providers/openai.d.ts +0 -8
- package/lib/globals/ttsModels/providers/openai.d.ts.map +0 -1
- package/lib/globals/ttsModels/providers/openai.js +0 -18
- package/lib/models/agent.model.d.ts +0 -117
- package/lib/models/agent.model.d.ts.map +0 -1
- package/lib/models/agent.model.js +0 -13
- package/lib/models/cachedAsset.model.d.ts +0 -18
- package/lib/models/cachedAsset.model.d.ts.map +0 -1
- package/lib/models/cachedAsset.model.js +0 -2
- package/lib/models/cachedRawAsset.model.d.ts +0 -20
- package/lib/models/cachedRawAsset.model.d.ts.map +0 -1
- package/lib/models/cachedRawAsset.model.js +0 -2
- package/lib/schemas/agentPersona.schema.d.ts +0 -10
- package/lib/schemas/agentPersona.schema.d.ts.map +0 -1
- package/lib/schemas/agentPersona.schema.js +0 -11
- package/lib/schemas/brandKit.schema.d.ts +0 -101
- package/lib/schemas/brandKit.schema.d.ts.map +0 -1
- package/lib/schemas/brandKit.schema.js +0 -46
- package/lib/schemas/brief.schema.d.ts +0 -216
- package/lib/schemas/brief.schema.d.ts.map +0 -1
- package/lib/schemas/brief.schema.js +0 -118
- package/lib/schemas/index.d.ts +0 -6
- package/lib/schemas/index.d.ts.map +0 -1
- package/lib/schemas/index.js +0 -21
- package/lib/schemas/project.schema.d.ts +0 -1005
- package/lib/schemas/project.schema.d.ts.map +0 -1
- package/lib/schemas/project.schema.js +0 -238
- package/lib/schemas/videoPlan.schema.d.ts +0 -145
- package/lib/schemas/videoPlan.schema.d.ts.map +0 -1
- package/lib/schemas/videoPlan.schema.js +0 -109
- package/lib/services/agent/beatSnap.d.ts +0 -10
- package/lib/services/agent/beatSnap.d.ts.map +0 -1
- package/lib/services/agent/beatSnap.js +0 -128
- package/lib/services/agent/costPreflight.d.ts +0 -22
- package/lib/services/agent/costPreflight.d.ts.map +0 -1
- package/lib/services/agent/costPreflight.js +0 -75
- package/lib/services/agent/critic.d.ts +0 -103
- package/lib/services/agent/critic.d.ts.map +0 -1
- package/lib/services/agent/critic.js +0 -132
- package/lib/services/agent/eval/index.d.ts +0 -5
- package/lib/services/agent/eval/index.d.ts.map +0 -1
- package/lib/services/agent/eval/index.js +0 -20
- package/lib/services/agent/eval/judge.d.ts +0 -14
- package/lib/services/agent/eval/judge.d.ts.map +0 -1
- package/lib/services/agent/eval/judge.js +0 -95
- package/lib/services/agent/eval/recorder.d.ts +0 -17
- package/lib/services/agent/eval/recorder.d.ts.map +0 -1
- package/lib/services/agent/eval/recorder.js +0 -65
- package/lib/services/agent/eval/seedBriefs.d.ts +0 -16
- package/lib/services/agent/eval/seedBriefs.d.ts.map +0 -1
- package/lib/services/agent/eval/seedBriefs.js +0 -1188
- package/lib/services/agent/eval/types.d.ts +0 -196
- package/lib/services/agent/eval/types.d.ts.map +0 -1
- package/lib/services/agent/eval/types.js +0 -65
- package/lib/services/agent/executor.d.ts +0 -50
- package/lib/services/agent/executor.d.ts.map +0 -1
- package/lib/services/agent/executor.js +0 -188
- package/lib/services/agent/index.d.ts +0 -15
- package/lib/services/agent/index.d.ts.map +0 -1
- package/lib/services/agent/index.js +0 -30
- package/lib/services/agent/llmCaller.d.ts +0 -77
- package/lib/services/agent/llmCaller.d.ts.map +0 -1
- package/lib/services/agent/llmCaller.js +0 -16
- package/lib/services/agent/llmCallerGateway.d.ts +0 -39
- package/lib/services/agent/llmCallerGateway.d.ts.map +0 -1
- package/lib/services/agent/llmCallerGateway.js +0 -246
- package/lib/services/agent/llmCallerRegistry.d.ts +0 -4
- package/lib/services/agent/llmCallerRegistry.d.ts.map +0 -1
- package/lib/services/agent/llmCallerRegistry.js +0 -19
- package/lib/services/agent/modelRouter.d.ts +0 -41
- package/lib/services/agent/modelRouter.d.ts.map +0 -1
- package/lib/services/agent/modelRouter.js +0 -57
- package/lib/services/agent/musicSelect.d.ts +0 -23
- package/lib/services/agent/musicSelect.d.ts.map +0 -1
- package/lib/services/agent/musicSelect.js +0 -65
- package/lib/services/agent/personas.d.ts +0 -60
- package/lib/services/agent/personas.d.ts.map +0 -1
- package/lib/services/agent/personas.js +0 -156
- package/lib/services/agent/planner.d.ts +0 -56
- package/lib/services/agent/planner.d.ts.map +0 -1
- package/lib/services/agent/planner.js +0 -237
- package/lib/services/agent/toolRegistry.d.ts +0 -64
- package/lib/services/agent/toolRegistry.d.ts.map +0 -1
- package/lib/services/agent/toolRegistry.js +0 -78
- package/lib/services/agent/tools/analyzeReference.tool.d.ts +0 -36
- package/lib/services/agent/tools/analyzeReference.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/analyzeReference.tool.js +0 -44
- package/lib/services/agent/tools/animateImage.tool.d.ts +0 -23
- package/lib/services/agent/tools/animateImage.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/animateImage.tool.js +0 -58
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts +0 -30
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/animateImageWithMotionBrush.tool.js +0 -90
- package/lib/services/agent/tools/composeScene.tool.d.ts +0 -948
- package/lib/services/agent/tools/composeScene.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/composeScene.tool.js +0 -90
- package/lib/services/agent/tools/estimateCost.tool.d.ts +0 -342
- package/lib/services/agent/tools/estimateCost.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/estimateCost.tool.js +0 -62
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts +0 -32
- package/lib/services/agent/tools/generateAvatarVideo.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateAvatarVideo.tool.js +0 -112
- package/lib/services/agent/tools/generateImage.tool.d.ts +0 -28
- package/lib/services/agent/tools/generateImage.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateImage.tool.js +0 -97
- package/lib/services/agent/tools/generateVideo.tool.d.ts +0 -30
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateVideo.tool.js +0 -84
- package/lib/services/agent/tools/generateVoiceover.tool.d.ts +0 -18
- package/lib/services/agent/tools/generateVoiceover.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/generateVoiceover.tool.js +0 -72
- package/lib/services/agent/tools/index.d.ts +0 -19
- package/lib/services/agent/tools/index.d.ts.map +0 -1
- package/lib/services/agent/tools/index.js +0 -34
- package/lib/services/agent/tools/planVideo.tool.d.ts +0 -191
- package/lib/services/agent/tools/planVideo.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/planVideo.tool.js +0 -46
- package/lib/services/agent/tools/render.tool.d.ts +0 -357
- package/lib/services/agent/tools/render.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/render.tool.js +0 -48
- package/lib/services/agent/tools/searchMusic.tool.d.ts +0 -49
- package/lib/services/agent/tools/searchMusic.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/searchMusic.tool.js +0 -74
- package/lib/services/agent/tools/searchStock.tool.d.ts +0 -37
- package/lib/services/agent/tools/searchStock.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/searchStock.tool.js +0 -101
- package/lib/services/agent/tools/searchUserLibrary.tool.d.ts +0 -59
- package/lib/services/agent/tools/searchUserLibrary.tool.d.ts.map +0 -1
- package/lib/services/agent/tools/searchUserLibrary.tool.js +0 -58
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts +0 -31
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.d.ts.map +0 -1
- package/lib/services/aiGen/canonicalAdapters/cameraControl.types.js +0 -2
- package/lib/services/aiGen/canonicalAdapters/index.d.ts +0 -3
- package/lib/services/aiGen/canonicalAdapters/index.d.ts.map +0 -1
- package/lib/services/aiGen/canonicalAdapters/index.js +0 -18
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts +0 -23
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.d.ts.map +0 -1
- package/lib/services/aiGen/canonicalAdapters/multiShot.types.js +0 -12
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.d.ts +0 -18
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/elevenlabs/elevenlabs.service.js +0 -100
- package/lib/services/aiGen/providers/fal/falImage.service.d.ts +0 -9
- package/lib/services/aiGen/providers/fal/falImage.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/fal/falImage.service.js +0 -102
- package/lib/services/aiGen/providers/fal/index.d.ts +0 -2
- package/lib/services/aiGen/providers/fal/index.d.ts.map +0 -1
- package/lib/services/aiGen/providers/fal/index.js +0 -17
- package/lib/services/aiGen/providers/kling/cameraAdapter.d.ts +0 -4
- package/lib/services/aiGen/providers/kling/cameraAdapter.d.ts.map +0 -1
- package/lib/services/aiGen/providers/kling/cameraAdapter.js +0 -53
- package/lib/services/aiGen/providers/pexels/index.d.ts +0 -2
- package/lib/services/aiGen/providers/pexels/index.d.ts.map +0 -1
- package/lib/services/aiGen/providers/pexels/index.js +0 -17
- package/lib/services/aiGen/providers/pexels/pexels.service.d.ts +0 -11
- package/lib/services/aiGen/providers/pexels/pexels.service.d.ts.map +0 -1
- package/lib/services/aiGen/providers/pexels/pexels.service.js +0 -118
- package/lib/services/aiGen/providers/runway/cameraAdapter.d.ts +0 -3
- package/lib/services/aiGen/providers/runway/cameraAdapter.d.ts.map +0 -1
- package/lib/services/aiGen/providers/runway/cameraAdapter.js +0 -46
- package/lib/services/asr/assemblyai.service.d.ts +0 -72
- package/lib/services/asr/assemblyai.service.d.ts.map +0 -1
- package/lib/services/asr/assemblyai.service.js +0 -89
- package/lib/services/asr/index.d.ts +0 -2
- package/lib/services/asr/index.d.ts.map +0 -1
- package/lib/services/asr/index.js +0 -17
- package/lib/services/assetCache.service.d.ts +0 -54
- package/lib/services/assetCache.service.d.ts.map +0 -1
- package/lib/services/assetCache.service.js +0 -96
- package/lib/services/audioAnalysis/index.d.ts +0 -2
- package/lib/services/audioAnalysis/index.d.ts.map +0 -1
- package/lib/services/audioAnalysis/index.js +0 -17
- package/lib/services/audioAnalysis/onsetDetection.service.d.ts +0 -50
- package/lib/services/audioAnalysis/onsetDetection.service.d.ts.map +0 -1
- package/lib/services/audioAnalysis/onsetDetection.service.js +0 -136
- package/lib/services/editor/designToProject.d.ts +0 -60
- package/lib/services/editor/designToProject.d.ts.map +0 -1
- package/lib/services/editor/designToProject.js +0 -194
- package/lib/services/musicGen/index.d.ts +0 -6
- package/lib/services/musicGen/index.d.ts.map +0 -1
- package/lib/services/musicGen/index.js +0 -26
- package/lib/services/musicGen/musicSearchFactory.service.d.ts +0 -14
- package/lib/services/musicGen/musicSearchFactory.service.d.ts.map +0 -1
- package/lib/services/musicGen/musicSearchFactory.service.js +0 -59
- package/lib/services/musicGen/providers/curated.service.d.ts +0 -22
- package/lib/services/musicGen/providers/curated.service.d.ts.map +0 -1
- package/lib/services/musicGen/providers/curated.service.js +0 -171
- package/lib/services/musicGen/providers/jamendo.service.d.ts +0 -8
- package/lib/services/musicGen/providers/jamendo.service.d.ts.map +0 -1
- package/lib/services/musicGen/providers/jamendo.service.js +0 -93
- package/lib/services/musicGen/providers/mubert.service.d.ts +0 -9
- package/lib/services/musicGen/providers/mubert.service.d.ts.map +0 -1
- package/lib/services/musicGen/providers/mubert.service.js +0 -113
- package/lib/services/musicGen/types.d.ts +0 -42
- package/lib/services/musicGen/types.d.ts.map +0 -1
- package/lib/services/musicGen/types.js +0 -10
- package/lib/services/tts/providers/minimax.service.d.ts +0 -14
- package/lib/services/tts/providers/minimax.service.d.ts.map +0 -1
- package/lib/services/tts/providers/minimax.service.js +0 -78
- package/lib/services/tts/providers/openai.service.d.ts +0 -14
- package/lib/services/tts/providers/openai.service.d.ts.map +0 -1
- package/lib/services/tts/providers/openai.service.js +0 -71
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"project.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/project.schema.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProjectSchema = exports.ProjectBackgroundSchema = exports.TrackSchema = exports.TrackKindSchema = exports.ClipSchema = exports.CaptionClipSchema = exports.TextClipSchema = exports.AudioClipSchema = exports.ImageClipSchema = exports.VideoClipSchema = exports.CaptionWordSchema = exports.TransitionSchema = exports.EffectSchema = exports.ProvenanceSchema = exports.TierSchema = exports.ColorGradeSchema = exports.TransformSchema = exports.TrimSchema = exports.TimeRangeSchema = exports.AspectSchema = exports.SizeSchema = exports.PROJECT_SCHEMA_VERSION = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
/**
|
|
6
|
-
* Canonical Project JSON schema.
|
|
7
|
-
*
|
|
8
|
-
* This is the persistent, agent-facing representation of a video project.
|
|
9
|
-
* It is the single contract shared by:
|
|
10
|
-
* - the editor (loads/edits this; runtime adds scale/scroll/selection on top)
|
|
11
|
-
* - the agent tool layer (produces and patches this via compose_scene etc.)
|
|
12
|
-
* - the headless renderer (consumes this to produce MP4)
|
|
13
|
-
*
|
|
14
|
-
* What this schema deliberately does NOT include:
|
|
15
|
-
* - editor runtime state (zoom, scroll, active selection, undo history)
|
|
16
|
-
* - browser-only handles (Blob, ReadableStream)
|
|
17
|
-
* - rich-effect details that aren't yet renderable end-to-end
|
|
18
|
-
*
|
|
19
|
-
* Fields evolve forward only. Add new optional fields; never repurpose existing ones.
|
|
20
|
-
* Bump PROJECT_SCHEMA_VERSION on any breaking change.
|
|
21
|
-
*/
|
|
22
|
-
exports.PROJECT_SCHEMA_VERSION = 1;
|
|
23
|
-
// ─── primitives ───────────────────────────────────────────────────────────
|
|
24
|
-
exports.SizeSchema = zod_1.z.object({
|
|
25
|
-
width: zod_1.z.number().int().positive(),
|
|
26
|
-
height: zod_1.z.number().int().positive(),
|
|
27
|
-
});
|
|
28
|
-
exports.AspectSchema = zod_1.z.enum(["9:16", "1:1", "4:5", "16:9"]);
|
|
29
|
-
exports.TimeRangeSchema = zod_1.z.object({
|
|
30
|
-
/** Inclusive start, in milliseconds from project t=0. */
|
|
31
|
-
from: zod_1.z.number().nonnegative(),
|
|
32
|
-
/** Exclusive end, in milliseconds. Must be > from. */
|
|
33
|
-
to: zod_1.z.number().positive(),
|
|
34
|
-
});
|
|
35
|
-
exports.TrimSchema = zod_1.z.object({
|
|
36
|
-
/** Inclusive start within the source asset, in milliseconds. */
|
|
37
|
-
from: zod_1.z.number().nonnegative(),
|
|
38
|
-
to: zod_1.z.number().positive(),
|
|
39
|
-
});
|
|
40
|
-
exports.TransformSchema = zod_1.z.object({
|
|
41
|
-
x: zod_1.z.number().default(0),
|
|
42
|
-
y: zod_1.z.number().default(0),
|
|
43
|
-
scaleX: zod_1.z.number().default(1),
|
|
44
|
-
scaleY: zod_1.z.number().default(1),
|
|
45
|
-
rotation: zod_1.z.number().default(0),
|
|
46
|
-
opacity: zod_1.z.number().min(0).max(1).default(1),
|
|
47
|
-
});
|
|
48
|
-
exports.ColorGradeSchema = zod_1.z.object({
|
|
49
|
-
exposure: zod_1.z.number().min(-100).max(100).default(0),
|
|
50
|
-
contrast: zod_1.z.number().min(-100).max(100).default(0),
|
|
51
|
-
saturation: zod_1.z.number().min(-100).max(100).default(0),
|
|
52
|
-
warmth: zod_1.z.number().min(-100).max(100).default(0),
|
|
53
|
-
});
|
|
54
|
-
// ─── agent provenance ────────────────────────────────────────────────────
|
|
55
|
-
/** Generation tier per the cheap-bulk strategy. */
|
|
56
|
-
exports.TierSchema = zod_1.z.enum(["T0", "T1", "T2", "T3"]);
|
|
57
|
-
/** Provenance attached to every clip whose asset was generated or sourced by the agent. */
|
|
58
|
-
exports.ProvenanceSchema = zod_1.z.object({
|
|
59
|
-
tier: exports.TierSchema,
|
|
60
|
-
/** Provider key as registered in aiModels.ts, or "pexels", "user-upload", etc. */
|
|
61
|
-
source: zod_1.z.string(),
|
|
62
|
-
modelKey: zod_1.z.string().optional(),
|
|
63
|
-
prompt: zod_1.z.string().optional(),
|
|
64
|
-
/** Content-hash of the underlying asset, for cache dedupe. */
|
|
65
|
-
assetHash: zod_1.z.string().optional(),
|
|
66
|
-
/** Credits actually spent producing this asset. */
|
|
67
|
-
creditsSpent: zod_1.z.number().nonnegative().optional(),
|
|
68
|
-
/** Idempotency key used when calling the provider. */
|
|
69
|
-
generationId: zod_1.z.string().optional(),
|
|
70
|
-
});
|
|
71
|
-
// ─── effects & transitions ───────────────────────────────────────────────
|
|
72
|
-
exports.EffectSchema = zod_1.z.object({
|
|
73
|
-
id: zod_1.z.string(),
|
|
74
|
-
/** e.g. "lut", "vignette", "stabilize", "blur", "chroma". */
|
|
75
|
-
kind: zod_1.z.string(),
|
|
76
|
-
enabled: zod_1.z.boolean().default(true),
|
|
77
|
-
/** Free-form effect-specific params; validated per-effect at the renderer. */
|
|
78
|
-
params: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).default({}),
|
|
79
|
-
});
|
|
80
|
-
exports.TransitionSchema = zod_1.z.object({
|
|
81
|
-
id: zod_1.z.string(),
|
|
82
|
-
fromClipId: zod_1.z.string(),
|
|
83
|
-
toClipId: zod_1.z.string(),
|
|
84
|
-
/** Restricted to renderable kinds. */
|
|
85
|
-
kind: zod_1.z.enum([
|
|
86
|
-
"none",
|
|
87
|
-
"fade",
|
|
88
|
-
"crossfade",
|
|
89
|
-
"wipe",
|
|
90
|
-
"slide",
|
|
91
|
-
"whipPan",
|
|
92
|
-
"dipToBlack",
|
|
93
|
-
"dipToWhite",
|
|
94
|
-
]),
|
|
95
|
-
durationMs: zod_1.z.number().positive(),
|
|
96
|
-
});
|
|
97
|
-
// ─── caption sub-shape ───────────────────────────────────────────────────
|
|
98
|
-
exports.CaptionWordSchema = zod_1.z.object({
|
|
99
|
-
word: zod_1.z.string(),
|
|
100
|
-
/** ms from clip start. */
|
|
101
|
-
start: zod_1.z.number().nonnegative(),
|
|
102
|
-
end: zod_1.z.number().nonnegative(),
|
|
103
|
-
});
|
|
104
|
-
// ─── clips (discriminated union) ─────────────────────────────────────────
|
|
105
|
-
const ClipBase = {
|
|
106
|
-
id: zod_1.z.string(),
|
|
107
|
-
trackId: zod_1.z.string(),
|
|
108
|
-
display: exports.TimeRangeSchema,
|
|
109
|
-
name: zod_1.z.string().optional(),
|
|
110
|
-
/** True if this clip carries a generated/sourced asset the agent placed. */
|
|
111
|
-
provenance: exports.ProvenanceSchema.optional(),
|
|
112
|
-
effects: zod_1.z.array(exports.EffectSchema).default([]),
|
|
113
|
-
transform: exports.TransformSchema.default({}),
|
|
114
|
-
/** Locked clips can't be moved/trimmed by the agent or user. */
|
|
115
|
-
locked: zod_1.z.boolean().default(false),
|
|
116
|
-
/** Opaque per-app metadata (UI hints, etc.). Renderer ignores. */
|
|
117
|
-
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).default({}),
|
|
118
|
-
};
|
|
119
|
-
exports.VideoClipSchema = zod_1.z.object({
|
|
120
|
-
...ClipBase,
|
|
121
|
-
type: zod_1.z.literal("video"),
|
|
122
|
-
src: zod_1.z.string().url(),
|
|
123
|
-
trim: exports.TrimSchema.optional(),
|
|
124
|
-
volume: zod_1.z.number().min(0).max(2).default(1),
|
|
125
|
-
playbackRate: zod_1.z.number().positive().default(1),
|
|
126
|
-
colorGrade: exports.ColorGradeSchema.optional(),
|
|
127
|
-
/** Optional cropping in source pixels. */
|
|
128
|
-
crop: zod_1.z
|
|
129
|
-
.object({
|
|
130
|
-
x: zod_1.z.number(),
|
|
131
|
-
y: zod_1.z.number(),
|
|
132
|
-
width: zod_1.z.number().positive(),
|
|
133
|
-
height: zod_1.z.number().positive(),
|
|
134
|
-
})
|
|
135
|
-
.optional(),
|
|
136
|
-
});
|
|
137
|
-
exports.ImageClipSchema = zod_1.z.object({
|
|
138
|
-
...ClipBase,
|
|
139
|
-
type: zod_1.z.literal("image"),
|
|
140
|
-
src: zod_1.z.string().url(),
|
|
141
|
-
/** Ken-Burns / parallax motion hint resolved by renderer for T1 image+motion clips. */
|
|
142
|
-
motion: zod_1.z
|
|
143
|
-
.object({
|
|
144
|
-
kind: zod_1.z.enum(["kenBurnsIn", "kenBurnsOut", "panLeft", "panRight", "parallax"]),
|
|
145
|
-
intensity: zod_1.z.number().min(0).max(1).default(0.5),
|
|
146
|
-
})
|
|
147
|
-
.optional(),
|
|
148
|
-
colorGrade: exports.ColorGradeSchema.optional(),
|
|
149
|
-
});
|
|
150
|
-
exports.AudioClipSchema = zod_1.z.object({
|
|
151
|
-
...ClipBase,
|
|
152
|
-
type: zod_1.z.literal("audio"),
|
|
153
|
-
src: zod_1.z.string().url(),
|
|
154
|
-
trim: exports.TrimSchema.optional(),
|
|
155
|
-
volume: zod_1.z.number().min(0).max(2).default(1),
|
|
156
|
-
/** Sidechain-duck this audio against another track id (e.g. music ducked under VO). */
|
|
157
|
-
duckAgainstTrackId: zod_1.z.string().optional(),
|
|
158
|
-
fadeInMs: zod_1.z.number().nonnegative().default(0),
|
|
159
|
-
fadeOutMs: zod_1.z.number().nonnegative().default(0),
|
|
160
|
-
});
|
|
161
|
-
exports.TextClipSchema = zod_1.z.object({
|
|
162
|
-
...ClipBase,
|
|
163
|
-
type: zod_1.z.literal("text"),
|
|
164
|
-
text: zod_1.z.string(),
|
|
165
|
-
fontFamily: zod_1.z.string().default("Poppins"),
|
|
166
|
-
fontSize: zod_1.z.number().positive().default(48),
|
|
167
|
-
fontWeight: zod_1.z.number().int().min(100).max(900).default(700),
|
|
168
|
-
color: zod_1.z.string().default("#ffffff"),
|
|
169
|
-
align: zod_1.z.enum(["left", "center", "right"]).default("center"),
|
|
170
|
-
backgroundColor: zod_1.z.string().optional(),
|
|
171
|
-
shadow: zod_1.z.string().optional(),
|
|
172
|
-
});
|
|
173
|
-
exports.CaptionClipSchema = zod_1.z.object({
|
|
174
|
-
...ClipBase,
|
|
175
|
-
type: zod_1.z.literal("caption"),
|
|
176
|
-
text: zod_1.z.string(),
|
|
177
|
-
words: zod_1.z.array(exports.CaptionWordSchema).default([]),
|
|
178
|
-
fontFamily: zod_1.z.string().default("Poppins"),
|
|
179
|
-
fontSize: zod_1.z.number().positive().default(48),
|
|
180
|
-
color: zod_1.z.string().default("#ffffff"),
|
|
181
|
-
highlightColor: zod_1.z.string().optional(),
|
|
182
|
-
language: zod_1.z.string().default("en"),
|
|
183
|
-
});
|
|
184
|
-
exports.ClipSchema = zod_1.z.discriminatedUnion("type", [
|
|
185
|
-
exports.VideoClipSchema,
|
|
186
|
-
exports.ImageClipSchema,
|
|
187
|
-
exports.AudioClipSchema,
|
|
188
|
-
exports.TextClipSchema,
|
|
189
|
-
exports.CaptionClipSchema,
|
|
190
|
-
]);
|
|
191
|
-
// ─── tracks & project ────────────────────────────────────────────────────
|
|
192
|
-
exports.TrackKindSchema = zod_1.z.enum([
|
|
193
|
-
"video",
|
|
194
|
-
"audio",
|
|
195
|
-
"text",
|
|
196
|
-
"caption",
|
|
197
|
-
"fx",
|
|
198
|
-
]);
|
|
199
|
-
exports.TrackSchema = zod_1.z.object({
|
|
200
|
-
id: zod_1.z.string(),
|
|
201
|
-
kind: exports.TrackKindSchema,
|
|
202
|
-
name: zod_1.z.string().optional(),
|
|
203
|
-
/** Track stacking order; lower = behind. */
|
|
204
|
-
index: zod_1.z.number().int().nonnegative(),
|
|
205
|
-
muted: zod_1.z.boolean().default(false),
|
|
206
|
-
hidden: zod_1.z.boolean().default(false),
|
|
207
|
-
locked: zod_1.z.boolean().default(false),
|
|
208
|
-
/** Track-level gain for audio tracks, in dB. Ignored on visual tracks. */
|
|
209
|
-
gainDb: zod_1.z.number().default(0),
|
|
210
|
-
});
|
|
211
|
-
exports.ProjectBackgroundSchema = zod_1.z.discriminatedUnion("type", [
|
|
212
|
-
zod_1.z.object({ type: zod_1.z.literal("color"), value: zod_1.z.string() }),
|
|
213
|
-
zod_1.z.object({ type: zod_1.z.literal("image"), src: zod_1.z.string().url() }),
|
|
214
|
-
zod_1.z.object({ type: zod_1.z.literal("transparent") }),
|
|
215
|
-
]);
|
|
216
|
-
exports.ProjectSchema = zod_1.z.object({
|
|
217
|
-
schemaVersion: zod_1.z.literal(exports.PROJECT_SCHEMA_VERSION),
|
|
218
|
-
id: zod_1.z.string(),
|
|
219
|
-
name: zod_1.z.string(),
|
|
220
|
-
/** Total project duration in ms. Renderer uses this; agent edits keep it in sync. */
|
|
221
|
-
durationMs: zod_1.z.number().positive(),
|
|
222
|
-
fps: zod_1.z.number().int().positive().default(30),
|
|
223
|
-
size: exports.SizeSchema,
|
|
224
|
-
aspect: exports.AspectSchema,
|
|
225
|
-
background: exports.ProjectBackgroundSchema.default({
|
|
226
|
-
type: "color",
|
|
227
|
-
value: "#000000",
|
|
228
|
-
}),
|
|
229
|
-
tracks: zod_1.z.array(exports.TrackSchema),
|
|
230
|
-
clips: zod_1.z.array(exports.ClipSchema),
|
|
231
|
-
transitions: zod_1.z.array(exports.TransitionSchema).default([]),
|
|
232
|
-
/** Top-level provenance: which agent run produced this project, if any. */
|
|
233
|
-
agentRunId: zod_1.z.string().optional(),
|
|
234
|
-
/** Free-form per-app metadata. Renderer ignores. */
|
|
235
|
-
metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).default({}),
|
|
236
|
-
createdAt: zod_1.z.string().datetime(),
|
|
237
|
-
updatedAt: zod_1.z.string().datetime(),
|
|
238
|
-
});
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
/**
|
|
3
|
-
* VideoPlan — the planner LLM's structured output. Reviewed by the user as a
|
|
4
|
-
* storyboard BEFORE any generation spend. Once approved, the executor walks
|
|
5
|
-
* the scenes in order and runs the prescribed tools per scene.
|
|
6
|
-
*
|
|
7
|
-
* Validated against this Zod schema; if validation fails, the planner is
|
|
8
|
-
* retried up to N=2 with the validation errors fed back as correction context.
|
|
9
|
-
*/
|
|
10
|
-
export declare const SceneAssetStrategySchema: z.ZodEnum<{
|
|
11
|
-
"stock-video": "stock-video";
|
|
12
|
-
"stock-image-ken-burns": "stock-image-ken-burns";
|
|
13
|
-
"ai-image-static": "ai-image-static";
|
|
14
|
-
"ai-image-motion": "ai-image-motion";
|
|
15
|
-
"ai-image-to-video": "ai-image-to-video";
|
|
16
|
-
"ai-text-to-video": "ai-text-to-video";
|
|
17
|
-
"user-asset": "user-asset";
|
|
18
|
-
"talking-head-avatar": "talking-head-avatar";
|
|
19
|
-
}>;
|
|
20
|
-
export declare const TransitionKindSchema: z.ZodEnum<{
|
|
21
|
-
none: "none";
|
|
22
|
-
fade: "fade";
|
|
23
|
-
crossfade: "crossfade";
|
|
24
|
-
wipe: "wipe";
|
|
25
|
-
whipPan: "whipPan";
|
|
26
|
-
dipToBlack: "dipToBlack";
|
|
27
|
-
dipToWhite: "dipToWhite";
|
|
28
|
-
cut: "cut";
|
|
29
|
-
}>;
|
|
30
|
-
export declare const PlannedSceneSchema: z.ZodObject<{
|
|
31
|
-
sceneIndex: z.ZodNumber;
|
|
32
|
-
intent: z.ZodString;
|
|
33
|
-
strategy: z.ZodEnum<{
|
|
34
|
-
"stock-video": "stock-video";
|
|
35
|
-
"stock-image-ken-burns": "stock-image-ken-burns";
|
|
36
|
-
"ai-image-static": "ai-image-static";
|
|
37
|
-
"ai-image-motion": "ai-image-motion";
|
|
38
|
-
"ai-image-to-video": "ai-image-to-video";
|
|
39
|
-
"ai-text-to-video": "ai-text-to-video";
|
|
40
|
-
"user-asset": "user-asset";
|
|
41
|
-
"talking-head-avatar": "talking-head-avatar";
|
|
42
|
-
}>;
|
|
43
|
-
tier: z.ZodEnum<{
|
|
44
|
-
T0: "T0";
|
|
45
|
-
T1: "T1";
|
|
46
|
-
T2: "T2";
|
|
47
|
-
T3: "T3";
|
|
48
|
-
}>;
|
|
49
|
-
preferredProvider: z.ZodOptional<z.ZodString>;
|
|
50
|
-
preferredModel: z.ZodOptional<z.ZodString>;
|
|
51
|
-
prompt: z.ZodString;
|
|
52
|
-
durationMs: z.ZodNumber;
|
|
53
|
-
voiceoverLine: z.ZodOptional<z.ZodString>;
|
|
54
|
-
onScreenText: z.ZodOptional<z.ZodString>;
|
|
55
|
-
transitionIn: z.ZodDefault<z.ZodEnum<{
|
|
56
|
-
none: "none";
|
|
57
|
-
fade: "fade";
|
|
58
|
-
crossfade: "crossfade";
|
|
59
|
-
wipe: "wipe";
|
|
60
|
-
whipPan: "whipPan";
|
|
61
|
-
dipToBlack: "dipToBlack";
|
|
62
|
-
dipToWhite: "dipToWhite";
|
|
63
|
-
cut: "cut";
|
|
64
|
-
}>>;
|
|
65
|
-
estimatedCredits: z.ZodNumber;
|
|
66
|
-
avatarFaceUrl: z.ZodOptional<z.ZodString>;
|
|
67
|
-
}, z.core.$strip>;
|
|
68
|
-
export declare const VideoPlanSchema: z.ZodObject<{
|
|
69
|
-
briefId: z.ZodOptional<z.ZodString>;
|
|
70
|
-
persona: z.ZodEnum<{
|
|
71
|
-
"ugc-ad": "ugc-ad";
|
|
72
|
-
"faceless-yt": "faceless-yt";
|
|
73
|
-
"product-demo": "product-demo";
|
|
74
|
-
"talking-head": "talking-head";
|
|
75
|
-
"social-recap": "social-recap";
|
|
76
|
-
}>;
|
|
77
|
-
aspect: z.ZodEnum<{
|
|
78
|
-
"9:16": "9:16";
|
|
79
|
-
"16:9": "16:9";
|
|
80
|
-
"1:1": "1:1";
|
|
81
|
-
"4:5": "4:5";
|
|
82
|
-
}>;
|
|
83
|
-
totalDurationMs: z.ZodNumber;
|
|
84
|
-
totalEstimatedCredits: z.ZodNumber;
|
|
85
|
-
scenes: z.ZodArray<z.ZodObject<{
|
|
86
|
-
sceneIndex: z.ZodNumber;
|
|
87
|
-
intent: z.ZodString;
|
|
88
|
-
strategy: z.ZodEnum<{
|
|
89
|
-
"stock-video": "stock-video";
|
|
90
|
-
"stock-image-ken-burns": "stock-image-ken-burns";
|
|
91
|
-
"ai-image-static": "ai-image-static";
|
|
92
|
-
"ai-image-motion": "ai-image-motion";
|
|
93
|
-
"ai-image-to-video": "ai-image-to-video";
|
|
94
|
-
"ai-text-to-video": "ai-text-to-video";
|
|
95
|
-
"user-asset": "user-asset";
|
|
96
|
-
"talking-head-avatar": "talking-head-avatar";
|
|
97
|
-
}>;
|
|
98
|
-
tier: z.ZodEnum<{
|
|
99
|
-
T0: "T0";
|
|
100
|
-
T1: "T1";
|
|
101
|
-
T2: "T2";
|
|
102
|
-
T3: "T3";
|
|
103
|
-
}>;
|
|
104
|
-
preferredProvider: z.ZodOptional<z.ZodString>;
|
|
105
|
-
preferredModel: z.ZodOptional<z.ZodString>;
|
|
106
|
-
prompt: z.ZodString;
|
|
107
|
-
durationMs: z.ZodNumber;
|
|
108
|
-
voiceoverLine: z.ZodOptional<z.ZodString>;
|
|
109
|
-
onScreenText: z.ZodOptional<z.ZodString>;
|
|
110
|
-
transitionIn: z.ZodDefault<z.ZodEnum<{
|
|
111
|
-
none: "none";
|
|
112
|
-
fade: "fade";
|
|
113
|
-
crossfade: "crossfade";
|
|
114
|
-
wipe: "wipe";
|
|
115
|
-
whipPan: "whipPan";
|
|
116
|
-
dipToBlack: "dipToBlack";
|
|
117
|
-
dipToWhite: "dipToWhite";
|
|
118
|
-
cut: "cut";
|
|
119
|
-
}>>;
|
|
120
|
-
estimatedCredits: z.ZodNumber;
|
|
121
|
-
avatarFaceUrl: z.ZodOptional<z.ZodString>;
|
|
122
|
-
}, z.core.$strip>>;
|
|
123
|
-
music: z.ZodOptional<z.ZodObject<{
|
|
124
|
-
strategy: z.ZodEnum<{
|
|
125
|
-
none: "none";
|
|
126
|
-
"stock-track": "stock-track";
|
|
127
|
-
generated: "generated";
|
|
128
|
-
}>;
|
|
129
|
-
query: z.ZodOptional<z.ZodString>;
|
|
130
|
-
moodTag: z.ZodOptional<z.ZodString>;
|
|
131
|
-
bpm: z.ZodOptional<z.ZodNumber>;
|
|
132
|
-
url: z.ZodOptional<z.ZodString>;
|
|
133
|
-
durationSec: z.ZodOptional<z.ZodNumber>;
|
|
134
|
-
source: z.ZodOptional<z.ZodString>;
|
|
135
|
-
attribution: z.ZodOptional<z.ZodString>;
|
|
136
|
-
onsets: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
137
|
-
}, z.core.$strip>>;
|
|
138
|
-
voiceId: z.ZodOptional<z.ZodString>;
|
|
139
|
-
notes: z.ZodOptional<z.ZodString>;
|
|
140
|
-
}, z.core.$strip>;
|
|
141
|
-
export type VideoPlan = z.infer<typeof VideoPlanSchema>;
|
|
142
|
-
export type PlannedScene = z.infer<typeof PlannedSceneSchema>;
|
|
143
|
-
export type SceneAssetStrategy = z.infer<typeof SceneAssetStrategySchema>;
|
|
144
|
-
export type TransitionKind = z.infer<typeof TransitionKindSchema>;
|
|
145
|
-
//# sourceMappingURL=videoPlan.schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"videoPlan.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/videoPlan.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;GAOG;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;EASnC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;EAS/B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0B7B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAoD1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VideoPlanSchema = exports.PlannedSceneSchema = exports.TransitionKindSchema = exports.SceneAssetStrategySchema = void 0;
|
|
4
|
-
const zod_1 = require("zod");
|
|
5
|
-
const agentPersona_schema_1 = require("./agentPersona.schema");
|
|
6
|
-
const project_schema_1 = require("./project.schema");
|
|
7
|
-
/**
|
|
8
|
-
* VideoPlan — the planner LLM's structured output. Reviewed by the user as a
|
|
9
|
-
* storyboard BEFORE any generation spend. Once approved, the executor walks
|
|
10
|
-
* the scenes in order and runs the prescribed tools per scene.
|
|
11
|
-
*
|
|
12
|
-
* Validated against this Zod schema; if validation fails, the planner is
|
|
13
|
-
* retried up to N=2 with the validation errors fed back as correction context.
|
|
14
|
-
*/
|
|
15
|
-
exports.SceneAssetStrategySchema = zod_1.z.enum([
|
|
16
|
-
"stock-video",
|
|
17
|
-
"stock-image-ken-burns",
|
|
18
|
-
"ai-image-static",
|
|
19
|
-
"ai-image-motion",
|
|
20
|
-
"ai-image-to-video",
|
|
21
|
-
"ai-text-to-video",
|
|
22
|
-
"user-asset",
|
|
23
|
-
"talking-head-avatar",
|
|
24
|
-
]);
|
|
25
|
-
exports.TransitionKindSchema = zod_1.z.enum([
|
|
26
|
-
"none",
|
|
27
|
-
"cut",
|
|
28
|
-
"fade",
|
|
29
|
-
"crossfade",
|
|
30
|
-
"wipe",
|
|
31
|
-
"whipPan",
|
|
32
|
-
"dipToBlack",
|
|
33
|
-
"dipToWhite",
|
|
34
|
-
]);
|
|
35
|
-
exports.PlannedSceneSchema = zod_1.z.object({
|
|
36
|
-
sceneIndex: zod_1.z.number().int().nonnegative(),
|
|
37
|
-
/** Plain-English description of what this scene shows. */
|
|
38
|
-
intent: zod_1.z.string(),
|
|
39
|
-
/** Asset acquisition strategy for this scene. */
|
|
40
|
-
strategy: exports.SceneAssetStrategySchema,
|
|
41
|
-
/** Tier the planner picked for this scene; usually <= brief.tierBudget. */
|
|
42
|
-
tier: project_schema_1.TierSchema,
|
|
43
|
-
/** Provider key the planner suggests; executor may swap on rate-limit. */
|
|
44
|
-
preferredProvider: zod_1.z.string().optional(),
|
|
45
|
-
/** Suggested model key, if applicable. */
|
|
46
|
-
preferredModel: zod_1.z.string().optional(),
|
|
47
|
-
/** Visual prompt (for AI generation strategies) or stock query terms. */
|
|
48
|
-
prompt: zod_1.z.string(),
|
|
49
|
-
durationMs: zod_1.z.number().positive(),
|
|
50
|
-
voiceoverLine: zod_1.z.string().optional(),
|
|
51
|
-
onScreenText: zod_1.z.string().optional(),
|
|
52
|
-
transitionIn: exports.TransitionKindSchema.default("cut"),
|
|
53
|
-
/** Up-front estimated credit cost for this scene. */
|
|
54
|
-
estimatedCredits: zod_1.z.number().nonnegative(),
|
|
55
|
-
/**
|
|
56
|
-
* Required only when strategy = "talking-head-avatar". URL of the presenter
|
|
57
|
-
* face still the avatar pipeline animates. Planner sources from
|
|
58
|
-
* brandKit.presenterFaceUrl; if absent, planner must NOT pick this strategy.
|
|
59
|
-
*/
|
|
60
|
-
avatarFaceUrl: zod_1.z.string().url().optional(),
|
|
61
|
-
});
|
|
62
|
-
exports.VideoPlanSchema = zod_1.z.object({
|
|
63
|
-
briefId: zod_1.z.string().optional(),
|
|
64
|
-
/** Persona the router selected (UGC ad / faceless YT / etc.). */
|
|
65
|
-
persona: agentPersona_schema_1.AgentPersonaSchema,
|
|
66
|
-
aspect: project_schema_1.AspectSchema,
|
|
67
|
-
totalDurationMs: zod_1.z.number().positive(),
|
|
68
|
-
totalEstimatedCredits: zod_1.z.number().nonnegative(),
|
|
69
|
-
/** Scene list, in render order. */
|
|
70
|
-
scenes: zod_1.z.array(exports.PlannedSceneSchema).min(1),
|
|
71
|
-
/** Music recommendation for the whole video. */
|
|
72
|
-
music: zod_1.z
|
|
73
|
-
.object({
|
|
74
|
-
strategy: zod_1.z.enum(["stock-track", "generated", "none"]),
|
|
75
|
-
query: zod_1.z.string().optional(),
|
|
76
|
-
moodTag: zod_1.z.string().optional(),
|
|
77
|
-
/**
|
|
78
|
-
* Beats-per-minute of the chosen / target track. Drives the beat-snap
|
|
79
|
-
* pass so scene cuts land on bar boundaries. Optional: when absent the
|
|
80
|
-
* snap pass falls back to a persona default (or no-ops for cinematic
|
|
81
|
-
* personas where free-form pacing reads better).
|
|
82
|
-
*/
|
|
83
|
-
bpm: zod_1.z.number().int().positive().optional(),
|
|
84
|
-
/**
|
|
85
|
-
* URL of the chosen music track. Set by the post-planner music selection
|
|
86
|
-
* step (selectMusicForPlan) when strategy = "stock-track" / "generated"
|
|
87
|
-
* and a provider returns a hit.
|
|
88
|
-
*/
|
|
89
|
-
url: zod_1.z.string().url().optional(),
|
|
90
|
-
/** Track length in seconds, when known. */
|
|
91
|
-
durationSec: zod_1.z.number().positive().optional(),
|
|
92
|
-
/** Source label for attribution / debugging ("curated", "jamendo", "mubert"). */
|
|
93
|
-
source: zod_1.z.string().optional(),
|
|
94
|
-
/** Best-effort attribution text; surface in UI when present. */
|
|
95
|
-
attribution: zod_1.z.string().optional(),
|
|
96
|
-
/**
|
|
97
|
-
* Onset timestamps (seconds) from essentia.js RhythmExtractor2013.
|
|
98
|
-
* When present, the snap pass aligns scene cuts to the nearest onset
|
|
99
|
-
* instead of the uniform BPM grid — cuts land on actual transients
|
|
100
|
-
* (kicks / snares / vocal entries) rather than mathematical bars.
|
|
101
|
-
*/
|
|
102
|
-
onsets: zod_1.z.array(zod_1.z.number().nonnegative()).optional(),
|
|
103
|
-
})
|
|
104
|
-
.optional(),
|
|
105
|
-
/** Voice id to use across all VO scenes. */
|
|
106
|
-
voiceId: zod_1.z.string().optional(),
|
|
107
|
-
/** Free-form planner notes — e.g. why a particular tier mix was chosen. */
|
|
108
|
-
notes: zod_1.z.string().optional(),
|
|
109
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { VideoPlan } from "../../schemas/videoPlan.schema";
|
|
2
|
-
export interface SnapOptions {
|
|
3
|
-
/** Used only when neither plan.music.bpm nor the persona default exists. */
|
|
4
|
-
fallbackBpm?: number;
|
|
5
|
-
/** Override beats-per-bar (default 4 — cut on whole bars, not individual beats). */
|
|
6
|
-
beatsPerBar?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function resolveBpm(plan: VideoPlan, opts?: SnapOptions): number | undefined;
|
|
9
|
-
export declare function snapPlanToBeats(plan: VideoPlan, opts?: SnapOptions): VideoPlan;
|
|
10
|
-
//# sourceMappingURL=beatSnap.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"beatSnap.d.ts","sourceRoot":"","sources":["../../../src/services/agent/beatSnap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,SAAS,EAAE,MAAM,gCAAgC,CAAC;AA+BzE,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAE,WAAgB,GAAG,MAAM,GAAG,SAAS,CAKtF;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,IAAI,GAAE,WAAgB,GAAG,SAAS,CAMlF"}
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveBpm = resolveBpm;
|
|
4
|
-
exports.snapPlanToBeats = snapPlanToBeats;
|
|
5
|
-
const personas_1 = require("./personas");
|
|
6
|
-
/**
|
|
7
|
-
* Beat-snap pass — adjusts each scene's durationMs so cuts land on bar
|
|
8
|
-
* boundaries of the chosen music. Cuts that land on bars feel produced;
|
|
9
|
-
* arbitrary durations feel like a slideshow with music laid over the top.
|
|
10
|
-
*
|
|
11
|
-
* Two modes, picked automatically:
|
|
12
|
-
*
|
|
13
|
-
* 1. ONSET MODE (preferred). When plan.music.onsets is populated by
|
|
14
|
-
* detectOnsets() (essentia.js), each scene's cumulative end time snaps
|
|
15
|
-
* to the nearest detected onset — cuts land on actual transients
|
|
16
|
-
* (kicks / snares / vocal entries), not a uniform grid. This is what
|
|
17
|
-
* a human editor does.
|
|
18
|
-
*
|
|
19
|
-
* 2. BPM MODE (fallback). When no onsets are available we fall back to
|
|
20
|
-
* uniform bar math at the resolved BPM:
|
|
21
|
-
* - plan.music.bpm → PERSONA_PACKS[plan.persona].defaultBpm
|
|
22
|
-
* → opts.fallbackBpm → no-op
|
|
23
|
-
* Each scene rounds to the nearest barMs (4 beats by default).
|
|
24
|
-
*
|
|
25
|
-
* Both modes:
|
|
26
|
-
* - never go below 1 bar of duration
|
|
27
|
-
* - never go shorter than the voiceover line needs (~3 wps), rounded up
|
|
28
|
-
* - recompute plan.totalDurationMs from the snapped sum
|
|
29
|
-
*/
|
|
30
|
-
const BEATS_PER_BAR = 4;
|
|
31
|
-
const ESTIMATED_WORDS_PER_SECOND = 3;
|
|
32
|
-
function resolveBpm(plan, opts = {}) {
|
|
33
|
-
if (plan.music?.bpm)
|
|
34
|
-
return plan.music.bpm;
|
|
35
|
-
const personaDefault = personas_1.PERSONA_PACKS[plan.persona]?.defaultBpm;
|
|
36
|
-
if (personaDefault)
|
|
37
|
-
return personaDefault;
|
|
38
|
-
return opts.fallbackBpm;
|
|
39
|
-
}
|
|
40
|
-
function snapPlanToBeats(plan, opts = {}) {
|
|
41
|
-
const onsets = plan.music?.onsets;
|
|
42
|
-
if (onsets && onsets.length >= plan.scenes.length) {
|
|
43
|
-
return snapToOnsets(plan, onsets);
|
|
44
|
-
}
|
|
45
|
-
return snapToBpmGrid(plan, opts);
|
|
46
|
-
}
|
|
47
|
-
function snapToOnsets(plan, onsets) {
|
|
48
|
-
// Build cumulative target end-times then snap each to the nearest onset.
|
|
49
|
-
// Scenes flow sequentially, so the second scene's start = first scene's end.
|
|
50
|
-
const sortedOnsets = [...onsets].sort((a, b) => a - b);
|
|
51
|
-
const snappedScenes = [];
|
|
52
|
-
let cumulativeMs = 0;
|
|
53
|
-
for (const scene of plan.scenes) {
|
|
54
|
-
const minDurMs = sceneMinMs(scene);
|
|
55
|
-
const targetEndMs = cumulativeMs + Math.max(scene.durationMs, minDurMs);
|
|
56
|
-
const snappedEndMs = Math.max(cumulativeMs + minDurMs, nearestOnsetMs(targetEndMs, sortedOnsets, cumulativeMs + minDurMs));
|
|
57
|
-
const newDurationMs = snappedEndMs - cumulativeMs;
|
|
58
|
-
snappedScenes.push(newDurationMs === scene.durationMs ? scene : { ...scene, durationMs: newDurationMs });
|
|
59
|
-
cumulativeMs = snappedEndMs;
|
|
60
|
-
}
|
|
61
|
-
return {
|
|
62
|
-
...plan,
|
|
63
|
-
scenes: snappedScenes,
|
|
64
|
-
totalDurationMs: cumulativeMs,
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
function snapToBpmGrid(plan, opts) {
|
|
68
|
-
const bpm = resolveBpm(plan, opts);
|
|
69
|
-
if (!bpm)
|
|
70
|
-
return plan;
|
|
71
|
-
const beatsPerBar = opts.beatsPerBar ?? BEATS_PER_BAR;
|
|
72
|
-
const barMs = (60000 / bpm) * beatsPerBar;
|
|
73
|
-
const snappedScenes = plan.scenes.map((scene) => snapScene(scene, barMs));
|
|
74
|
-
const totalDurationMs = snappedScenes.reduce((sum, s) => sum + s.durationMs, 0);
|
|
75
|
-
return {
|
|
76
|
-
...plan,
|
|
77
|
-
music: {
|
|
78
|
-
strategy: plan.music?.strategy ?? "stock-track",
|
|
79
|
-
...plan.music,
|
|
80
|
-
bpm,
|
|
81
|
-
},
|
|
82
|
-
scenes: snappedScenes,
|
|
83
|
-
totalDurationMs,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function snapScene(scene, barMs) {
|
|
87
|
-
const minMs = Math.max(barMs, ceilToBar(sceneMinMs(scene), barMs));
|
|
88
|
-
const snapped = Math.max(minMs, roundToBar(scene.durationMs, barMs));
|
|
89
|
-
return snapped === scene.durationMs ? scene : { ...scene, durationMs: snapped };
|
|
90
|
-
}
|
|
91
|
-
function sceneMinMs(scene) {
|
|
92
|
-
return scene.voiceoverLine ? estimateVoMs(scene.voiceoverLine) : 0;
|
|
93
|
-
}
|
|
94
|
-
function nearestOnsetMs(targetMs, onsetsSec, minMs) {
|
|
95
|
-
// Binary search would be faster but onsets list is short (1 per beat for a
|
|
96
|
-
// 3-min track at 120bpm = ~360 entries) and snap runs once per plan.
|
|
97
|
-
let bestMs = targetMs;
|
|
98
|
-
let bestDiff = Infinity;
|
|
99
|
-
for (const sec of onsetsSec) {
|
|
100
|
-
const ms = sec * 1000;
|
|
101
|
-
if (ms < minMs)
|
|
102
|
-
continue;
|
|
103
|
-
const diff = Math.abs(ms - targetMs);
|
|
104
|
-
if (diff < bestDiff) {
|
|
105
|
-
bestDiff = diff;
|
|
106
|
-
bestMs = ms;
|
|
107
|
-
}
|
|
108
|
-
else if (ms > targetMs && diff > bestDiff) {
|
|
109
|
-
// Past the target — onsets are sorted, so no closer match ahead.
|
|
110
|
-
break;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
return bestMs;
|
|
114
|
-
}
|
|
115
|
-
function roundToBar(ms, barMs) {
|
|
116
|
-
return Math.max(barMs, Math.round(ms / barMs) * barMs);
|
|
117
|
-
}
|
|
118
|
-
function ceilToBar(ms, barMs) {
|
|
119
|
-
if (ms <= 0)
|
|
120
|
-
return 0;
|
|
121
|
-
return Math.ceil(ms / barMs) * barMs;
|
|
122
|
-
}
|
|
123
|
-
function estimateVoMs(line) {
|
|
124
|
-
const words = line.trim().split(/\s+/).filter(Boolean).length;
|
|
125
|
-
if (words === 0)
|
|
126
|
-
return 0;
|
|
127
|
-
return Math.ceil((words / ESTIMATED_WORDS_PER_SECOND) * 1000);
|
|
128
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Project, Tier } from "../../schemas/project.schema";
|
|
2
|
-
import { VideoPlan } from "../../schemas/videoPlan.schema";
|
|
3
|
-
export interface CostBreakdown {
|
|
4
|
-
totalCredits: number;
|
|
5
|
-
byTier: Record<Tier, number>;
|
|
6
|
-
perClip: Array<{
|
|
7
|
-
clipId: string;
|
|
8
|
-
tier?: Tier;
|
|
9
|
-
credits: number;
|
|
10
|
-
estimated: boolean;
|
|
11
|
-
}>;
|
|
12
|
-
}
|
|
13
|
-
export declare function estimateProjectCost(project: Project): CostBreakdown;
|
|
14
|
-
/**
|
|
15
|
-
* Plan-side estimate (pre-execution). The planner already writes
|
|
16
|
-
* `estimatedCredits` per scene + a `totalEstimatedCredits` rollup, so this
|
|
17
|
-
* mostly trusts those values and re-aggregates by tier for the UI chip.
|
|
18
|
-
* Falls back to the same per-second tier curve as `estimateProjectCost`
|
|
19
|
-
* when a scene omits its own estimate.
|
|
20
|
-
*/
|
|
21
|
-
export declare function estimatePlanCost(plan: VideoPlan): CostBreakdown;
|
|
22
|
-
//# sourceMappingURL=costPreflight.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"costPreflight.d.ts","sourceRoot":"","sources":["../../../src/services/agent/costPreflight.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAqB3D,MAAM,WAAW,aAAa;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC7B,OAAO,EAAE,KAAK,CAAC;QACb,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,IAAI,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC,CAAC;CACJ;AAKD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,aAAa,CAuBnE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAuB/D"}
|