vidspotai-shared 1.0.136 → 1.0.138
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/globals/aiModels/enums.d.ts +2 -0
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +7 -0
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +2 -0
- package/lib/globals/film/filmCatalog.d.ts +88 -0
- package/lib/globals/film/filmCatalog.d.ts.map +1 -0
- package/lib/globals/film/filmCatalog.js +218 -0
- package/lib/globals/index.d.ts +2 -0
- package/lib/globals/index.d.ts.map +1 -1
- package/lib/globals/index.js +2 -0
- package/lib/globals/reelRemake.d.ts +116 -0
- package/lib/globals/reelRemake.d.ts.map +1 -0
- package/lib/globals/reelRemake.js +142 -0
- package/lib/globals/types.d.ts +15 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +16 -0
- package/lib/libs/storage/cdnUrl.d.ts +1 -3
- package/lib/libs/storage/cdnUrl.d.ts.map +1 -1
- package/lib/libs/storage/cdnUrl.js +8 -6
- package/lib/models/filmProject.model.d.ts +424 -0
- package/lib/models/filmProject.model.d.ts.map +1 -0
- package/lib/models/filmProject.model.js +14 -0
- package/lib/models/image.model.d.ts +3 -0
- package/lib/models/image.model.d.ts.map +1 -1
- package/lib/models/index.d.ts +2 -0
- package/lib/models/index.d.ts.map +1 -1
- package/lib/models/index.js +2 -0
- package/lib/models/reelRemake.model.d.ts +222 -0
- package/lib/models/reelRemake.model.d.ts.map +1 -0
- package/lib/models/reelRemake.model.js +2 -0
- package/lib/models/video.model.d.ts +5 -0
- package/lib/models/video.model.d.ts.map +1 -1
- package/lib/schemas/film.schema.d.ts +500 -0
- package/lib/schemas/film.schema.d.ts.map +1 -0
- package/lib/schemas/film.schema.js +201 -0
- package/lib/schemas/index.d.ts +1 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +1 -0
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +13 -0
- package/lib/services/agent/tools/generateVideo.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/generateVideo.tool.js +2 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +4 -0
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +17 -0
- package/lib/services/aiGen/providers/fal/index.d.ts +1 -0
- package/lib/services/aiGen/providers/fal/index.d.ts.map +1 -1
- package/lib/services/aiGen/providers/fal/index.js +1 -0
- package/lib/services/aiGen/providers/kling/klingRequests.d.ts.map +1 -1
- package/lib/services/aiGen/providers/kling/klingRequests.js +3 -0
- package/lib/services/aiGen/providers/types.d.ts +6 -0
- package/lib/services/aiGen/providers/types.d.ts.map +1 -1
- package/lib/services/film/compileShotPrompt.d.ts +16 -0
- package/lib/services/film/compileShotPrompt.d.ts.map +1 -0
- package/lib/services/film/compileShotPrompt.js +152 -0
- package/lib/services/film/filmAssets.d.ts +73 -0
- package/lib/services/film/filmAssets.d.ts.map +1 -0
- package/lib/services/film/filmAssets.js +341 -0
- package/lib/services/film/filmCut.d.ts +159 -0
- package/lib/services/film/filmCut.d.ts.map +1 -0
- package/lib/services/film/filmCut.js +616 -0
- package/lib/services/film/filmPublic.d.ts +9 -0
- package/lib/services/film/filmPublic.d.ts.map +1 -0
- package/lib/services/film/filmPublic.js +39 -0
- package/lib/services/film/filmTakes.d.ts +65 -0
- package/lib/services/film/filmTakes.d.ts.map +1 -0
- package/lib/services/film/filmTakes.js +168 -0
- package/lib/services/film/writersRoom.d.ts +276 -0
- package/lib/services/film/writersRoom.d.ts.map +1 -0
- package/lib/services/film/writersRoom.js +431 -0
- package/lib/services/firestore.service.d.ts +7 -0
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +15 -0
- package/lib/services/index.d.ts +12 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +12 -0
- package/lib/services/providerHealth.service.d.ts +12 -0
- package/lib/services/providerHealth.service.d.ts.map +1 -0
- package/lib/services/providerHealth.service.js +75 -0
- package/lib/services/reelRemake/castDetection.d.ts +56 -0
- package/lib/services/reelRemake/castDetection.d.ts.map +1 -0
- package/lib/services/reelRemake/castDetection.js +146 -0
- package/lib/services/reelRemake/castSuggestion.d.ts +43 -0
- package/lib/services/reelRemake/castSuggestion.d.ts.map +1 -0
- package/lib/services/reelRemake/castSuggestion.js +99 -0
- package/lib/services/reelRemake/keyframeSwap.d.ts +44 -0
- package/lib/services/reelRemake/keyframeSwap.d.ts.map +1 -0
- package/lib/services/reelRemake/keyframeSwap.js +139 -0
- package/lib/services/reelRemake/shootPlan.d.ts +65 -0
- package/lib/services/reelRemake/shootPlan.d.ts.map +1 -0
- package/lib/services/reelRemake/shootPlan.js +193 -0
- package/lib/services/reelRemake/stopWork.d.ts +54 -0
- package/lib/services/reelRemake/stopWork.d.ts.map +1 -0
- package/lib/services/reelRemake/stopWork.js +91 -0
- package/lib/services/translation/translation.service.d.ts +10 -1
- package/lib/services/translation/translation.service.d.ts.map +1 -1
- package/lib/services/translation/translation.service.js +34 -1
- package/lib/utils/errors.d.ts +3 -0
- package/lib/utils/errors.d.ts.map +1 -1
- package/lib/utils/errors.js +6 -0
- package/lib/utils/helpers.d.ts +1 -1
- package/lib/utils/helpers.d.ts.map +1 -1
- package/lib/utils/helpers.js +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { FilmAspectRatio, FilmShotAsset, FilmVideoModel, FilmVideoTarget, IFilmProjectModel, IFilmShotModel } from "../../models/filmProject.model";
|
|
2
|
+
import { type CompileShotInput } from "./compileShotPrompt";
|
|
3
|
+
/** A queued take older than this stops blocking a reshoot (the reaper fails the job itself). */
|
|
4
|
+
export declare const FILM_TAKE_STALE_MS: number;
|
|
5
|
+
/** Takes kept per shot. The picked take and a live take are never trimmed. */
|
|
6
|
+
export declare const FILM_MAX_TAKES = 8;
|
|
7
|
+
/** Draft is cheaper (Seedance 480p, Kling std); final is the delivery quality (720p, Kling pro). */
|
|
8
|
+
export type FilmTakeQuality = "draft" | "final";
|
|
9
|
+
export interface FilmTakeRequest {
|
|
10
|
+
modelKey: FilmVideoModel;
|
|
11
|
+
prompt: string;
|
|
12
|
+
durationSec: number;
|
|
13
|
+
aspectRatio: FilmAspectRatio;
|
|
14
|
+
/** Set only for models that voice dialogue themselves. */
|
|
15
|
+
audio?: true;
|
|
16
|
+
/** Seedance quality axis. */
|
|
17
|
+
resolution?: "480p" | "720p";
|
|
18
|
+
/** Kling quality axis. */
|
|
19
|
+
mode?: "std" | "pro";
|
|
20
|
+
/** The shot's keyframe, used as the first frame. */
|
|
21
|
+
inputImageUrl?: string;
|
|
22
|
+
referenceImageUrls: string[];
|
|
23
|
+
warnings: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The video request for one take. Starts on the shot's keyframe when it has
|
|
27
|
+
* one; cast portraits/sheets and the location plate ride along as references.
|
|
28
|
+
*
|
|
29
|
+
* Seedance can't combine a first frame with reference images (they are
|
|
30
|
+
* separate request scenarios), so with references the keyframe becomes
|
|
31
|
+
* reference image 1 and the prompt names it as the opening frame, the
|
|
32
|
+
* provider's documented workaround. Kling takes both natively. Either way the
|
|
33
|
+
* keyframe counts toward the model's image cap.
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildTakeRequest(project: Pick<IFilmProjectModel, "look" | "cast" | "locations" | "videoModel" | "aspectRatio">, shot: CompileShotInput & Pick<IFilmShotModel, "keyframe">, opts?: {
|
|
36
|
+
videoModel?: FilmVideoModel;
|
|
37
|
+
quality?: FilmTakeQuality;
|
|
38
|
+
note?: string;
|
|
39
|
+
}): FilmTakeRequest;
|
|
40
|
+
export declare function isTakeLive(take: FilmShotAsset | undefined, now?: number): boolean;
|
|
41
|
+
export declare function liveTake(shot: Pick<IFilmShotModel, "takes">, now?: number): FilmShotAsset | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Put a "pending" take at the head of the list, unless the shot is already
|
|
44
|
+
* shooting. The controller then swaps in the real video job id with
|
|
45
|
+
* `settlePendingTake`. False when the shot is gone or busy.
|
|
46
|
+
*/
|
|
47
|
+
export declare function reserveTake(shotId: string, pending: FilmShotAsset): Promise<boolean>;
|
|
48
|
+
/** Replace the "pending" take with `next`, or drop it (`null`) when the enqueue never happened. */
|
|
49
|
+
export declare function settlePendingTake(shotId: string, next: FilmShotAsset | null): Promise<boolean>;
|
|
50
|
+
/**
|
|
51
|
+
* Video worker / reaper / watermark hook: write a finished take onto its shot.
|
|
52
|
+
*
|
|
53
|
+
* Matches the take by video job id, or the "pending" entry when the worker beat
|
|
54
|
+
* the controller's id swap. The first success becomes the picked take; a later
|
|
55
|
+
* success for the same job (the watermarked copy) only refreshes the URL. A
|
|
56
|
+
* failure never overwrites a take that already succeeded.
|
|
57
|
+
*/
|
|
58
|
+
export declare function applyFilmVideoResult(videoJobId: string, target: FilmVideoTarget, outcome: {
|
|
59
|
+
url: string;
|
|
60
|
+
} | {
|
|
61
|
+
error: string;
|
|
62
|
+
}): Promise<"applied" | "superseded" | "missing">;
|
|
63
|
+
/** Make an earlier successful take the picked one. */
|
|
64
|
+
export declare function pickTake(shotId: string, videoJobId: string): Promise<FilmShotAsset | null>;
|
|
65
|
+
//# sourceMappingURL=filmTakes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filmTakes.d.ts","sourceRoot":"","sources":["../../../src/services/film/filmTakes.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,cAAc,EACf,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,gGAAgG;AAChG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AAW,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAa1F;AAED,mGAAmG;AACnG,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAWpG;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CACxC,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAC3C,OAAO,CAAC,SAAS,GAAG,YAAY,GAAG,SAAS,CAAC,CAwB/C;AAED,sDAAsD;AACtD,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAShG"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FILM_MAX_TAKES = exports.FILM_TAKE_STALE_MS = void 0;
|
|
4
|
+
exports.buildTakeRequest = buildTakeRequest;
|
|
5
|
+
exports.isTakeLive = isTakeLive;
|
|
6
|
+
exports.liveTake = liveTake;
|
|
7
|
+
exports.reserveTake = reserveTake;
|
|
8
|
+
exports.settlePendingTake = settlePendingTake;
|
|
9
|
+
exports.applyFilmVideoResult = applyFilmVideoResult;
|
|
10
|
+
exports.pickTake = pickTake;
|
|
11
|
+
/**
|
|
12
|
+
* Film Studio takes (Stage 5): one video per shot.
|
|
13
|
+
*
|
|
14
|
+
* A take is an ordinary video job (same billing, refunds, reconcile, library
|
|
15
|
+
* entry and provider fallback as a manual generation) stamped with
|
|
16
|
+
* `filmTarget`. This module builds the shot's video request and writes the
|
|
17
|
+
* finished job back onto `filmShots/{id}.takes`, called from the video worker,
|
|
18
|
+
* the stuck-job reaper and the watermark worker.
|
|
19
|
+
*
|
|
20
|
+
* A shot keeps every take (newest first, capped) so the user can compare and
|
|
21
|
+
* pick. A new successful take becomes the picked one; picking an older take
|
|
22
|
+
* switches back. Only one take per shot shoots at a time.
|
|
23
|
+
*/
|
|
24
|
+
const filmCatalog_1 = require("../../globals/film/filmCatalog");
|
|
25
|
+
const firestore_service_1 = require("../firestore.service");
|
|
26
|
+
const compileShotPrompt_1 = require("./compileShotPrompt");
|
|
27
|
+
/** A queued take older than this stops blocking a reshoot (the reaper fails the job itself). */
|
|
28
|
+
exports.FILM_TAKE_STALE_MS = 60 * 60000;
|
|
29
|
+
/** Takes kept per shot. The picked take and a live take are never trimmed. */
|
|
30
|
+
exports.FILM_MAX_TAKES = 8;
|
|
31
|
+
const isSeedance = (model) => model.startsWith("bytedance-");
|
|
32
|
+
/**
|
|
33
|
+
* The video request for one take. Starts on the shot's keyframe when it has
|
|
34
|
+
* one; cast portraits/sheets and the location plate ride along as references.
|
|
35
|
+
*
|
|
36
|
+
* Seedance can't combine a first frame with reference images (they are
|
|
37
|
+
* separate request scenarios), so with references the keyframe becomes
|
|
38
|
+
* reference image 1 and the prompt names it as the opening frame, the
|
|
39
|
+
* provider's documented workaround. Kling takes both natively. Either way the
|
|
40
|
+
* keyframe counts toward the model's image cap.
|
|
41
|
+
*/
|
|
42
|
+
function buildTakeRequest(project, shot, opts = {}) {
|
|
43
|
+
const modelKey = opts.videoModel ?? project.videoModel;
|
|
44
|
+
const spec = (0, filmCatalog_1.getFilmVideoModelSpec)(modelKey);
|
|
45
|
+
const compiled = (0, compileShotPrompt_1.compileShotPrompt)({ ...project, videoModel: modelKey }, shot);
|
|
46
|
+
const frame = shot.keyframe?.url;
|
|
47
|
+
const refs = frame ? compiled.referenceImageUrls.slice(0, spec.maxRefImages - 1) : compiled.referenceImageUrls;
|
|
48
|
+
const parts = [];
|
|
49
|
+
if (frame && refs.length && isSeedance(modelKey)) {
|
|
50
|
+
parts.push("@Image1 is the opening frame of this shot: start exactly on it. The other images are character and set references.");
|
|
51
|
+
}
|
|
52
|
+
parts.push(compiled.prompt);
|
|
53
|
+
const note = opts.note?.trim();
|
|
54
|
+
if (note)
|
|
55
|
+
parts.push(`Direction: ${note.replace(/[.!?]*$/, "")}.`);
|
|
56
|
+
const final = (opts.quality ?? "final") === "final";
|
|
57
|
+
return {
|
|
58
|
+
modelKey,
|
|
59
|
+
prompt: parts.join(" "),
|
|
60
|
+
durationSec: compiled.durationSec,
|
|
61
|
+
aspectRatio: project.aspectRatio,
|
|
62
|
+
...(spec.nativeAudio ? { audio: true } : {}),
|
|
63
|
+
...(isSeedance(modelKey) ? { resolution: final ? "720p" : "480p" } : { mode: final ? "pro" : "std" }),
|
|
64
|
+
...(frame ? { inputImageUrl: frame } : {}),
|
|
65
|
+
referenceImageUrls: refs,
|
|
66
|
+
warnings: compiled.warnings,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
function isTakeLive(take, now = Date.now()) {
|
|
70
|
+
return Boolean(take && take.status === "queued" && now - Date.parse(take.createdAt ?? "") < exports.FILM_TAKE_STALE_MS);
|
|
71
|
+
}
|
|
72
|
+
function liveTake(shot, now = Date.now()) {
|
|
73
|
+
return shot.takes?.find((t) => isTakeLive(t, now));
|
|
74
|
+
}
|
|
75
|
+
/** Newest first, capped, but never dropping the picked or a live take. */
|
|
76
|
+
function trimTakes(takes, pickedJobId) {
|
|
77
|
+
const now = Date.now();
|
|
78
|
+
return takes.filter((t, i) => i < exports.FILM_MAX_TAKES || t.jobId === pickedJobId || isTakeLive(t, now));
|
|
79
|
+
}
|
|
80
|
+
function withoutError(take) {
|
|
81
|
+
const copy = { ...take };
|
|
82
|
+
delete copy.error;
|
|
83
|
+
return copy;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Put a "pending" take at the head of the list, unless the shot is already
|
|
87
|
+
* shooting. The controller then swaps in the real video job id with
|
|
88
|
+
* `settlePendingTake`. False when the shot is gone or busy.
|
|
89
|
+
*/
|
|
90
|
+
async function reserveTake(shotId, pending) {
|
|
91
|
+
const ref = firestore_service_1.FirestoreService.filmShotsCol.doc(shotId);
|
|
92
|
+
return ref.firestore.runTransaction(async (tx) => {
|
|
93
|
+
const shot = (await tx.get(ref)).data();
|
|
94
|
+
if (!shot || liveTake(shot))
|
|
95
|
+
return false;
|
|
96
|
+
// A stale "pending" entry can never resolve (its request died), and would make the new one ambiguous.
|
|
97
|
+
const rest = (shot.takes ?? []).filter((t) => t.jobId !== "pending");
|
|
98
|
+
tx.update(ref, {
|
|
99
|
+
takes: trimTakes([{ ...pending, jobId: "pending" }, ...rest], shot.take?.jobId),
|
|
100
|
+
updatedAt: new Date().toISOString(),
|
|
101
|
+
});
|
|
102
|
+
return true;
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/** Replace the "pending" take with `next`, or drop it (`null`) when the enqueue never happened. */
|
|
106
|
+
async function settlePendingTake(shotId, next) {
|
|
107
|
+
const ref = firestore_service_1.FirestoreService.filmShotsCol.doc(shotId);
|
|
108
|
+
return ref.firestore.runTransaction(async (tx) => {
|
|
109
|
+
const shot = (await tx.get(ref)).data();
|
|
110
|
+
const takes = shot?.takes ?? [];
|
|
111
|
+
const i = takes.findIndex((t) => t.jobId === "pending");
|
|
112
|
+
if (!shot || i < 0)
|
|
113
|
+
return false;
|
|
114
|
+
const updated = next ? takes.map((t, j) => (j === i ? next : t)) : takes.filter((_, j) => j !== i);
|
|
115
|
+
tx.update(ref, { takes: updated, updatedAt: new Date().toISOString() });
|
|
116
|
+
return true;
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Video worker / reaper / watermark hook: write a finished take onto its shot.
|
|
121
|
+
*
|
|
122
|
+
* Matches the take by video job id, or the "pending" entry when the worker beat
|
|
123
|
+
* the controller's id swap. The first success becomes the picked take; a later
|
|
124
|
+
* success for the same job (the watermarked copy) only refreshes the URL. A
|
|
125
|
+
* failure never overwrites a take that already succeeded.
|
|
126
|
+
*/
|
|
127
|
+
async function applyFilmVideoResult(videoJobId, target, outcome) {
|
|
128
|
+
const ref = firestore_service_1.FirestoreService.filmShotsCol.doc(target.shotId);
|
|
129
|
+
return ref.firestore.runTransaction(async (tx) => {
|
|
130
|
+
const shot = (await tx.get(ref)).data();
|
|
131
|
+
if (!shot || shot.projectId !== target.projectId)
|
|
132
|
+
return "missing";
|
|
133
|
+
const takes = shot.takes ?? [];
|
|
134
|
+
let i = takes.findIndex((t) => t.jobId === videoJobId);
|
|
135
|
+
if (i < 0)
|
|
136
|
+
i = takes.findIndex((t) => t.jobId === "pending");
|
|
137
|
+
const current = takes[i];
|
|
138
|
+
if (!current)
|
|
139
|
+
return "superseded";
|
|
140
|
+
const patch = { updatedAt: new Date().toISOString() };
|
|
141
|
+
let updated;
|
|
142
|
+
if ("url" in outcome) {
|
|
143
|
+
updated = { ...withoutError(current), jobId: videoJobId, status: "succeeded", url: outcome.url };
|
|
144
|
+
if (current.status !== "succeeded" || shot.take?.jobId === videoJobId)
|
|
145
|
+
patch.take = updated;
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
if (current.status === "succeeded")
|
|
149
|
+
return "superseded";
|
|
150
|
+
updated = { ...current, jobId: videoJobId, status: "failed", error: outcome.error };
|
|
151
|
+
}
|
|
152
|
+
patch.takes = takes.map((t, j) => (j === i ? updated : t));
|
|
153
|
+
tx.update(ref, patch);
|
|
154
|
+
return "applied";
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
/** Make an earlier successful take the picked one. */
|
|
158
|
+
async function pickTake(shotId, videoJobId) {
|
|
159
|
+
const ref = firestore_service_1.FirestoreService.filmShotsCol.doc(shotId);
|
|
160
|
+
return ref.firestore.runTransaction(async (tx) => {
|
|
161
|
+
const shot = (await tx.get(ref)).data();
|
|
162
|
+
const take = shot?.takes?.find((t) => t.jobId === videoJobId && t.status === "succeeded" && t.url);
|
|
163
|
+
if (!shot || !take)
|
|
164
|
+
return null;
|
|
165
|
+
tx.update(ref, { take, updatedAt: new Date().toISOString() });
|
|
166
|
+
return take;
|
|
167
|
+
});
|
|
168
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { type FilmVideoModelSpec } from "../../globals/film/filmCatalog";
|
|
3
|
+
import type { FilmCastMember, FilmEpisode, FilmFormat, FilmLocation, FilmLook, FilmScene, FilmVideoModel, IFilmProjectModel, IFilmShotModel } from "../../models/filmProject.model";
|
|
4
|
+
import type { LlmCaller } from "../agent/llmCaller";
|
|
5
|
+
import { ModelRouter } from "../agent/modelRouter";
|
|
6
|
+
export declare const FilmBibleDraftSchema: z.ZodObject<{
|
|
7
|
+
title: z.ZodString;
|
|
8
|
+
logline: z.ZodString;
|
|
9
|
+
synopsis: z.ZodString;
|
|
10
|
+
look: z.ZodObject<{
|
|
11
|
+
genre: z.ZodNullable<z.ZodEnum<{
|
|
12
|
+
[x: string]: string;
|
|
13
|
+
}>>;
|
|
14
|
+
era: z.ZodNullable<z.ZodEnum<{
|
|
15
|
+
[x: string]: string;
|
|
16
|
+
}>>;
|
|
17
|
+
tempo: z.ZodNullable<z.ZodEnum<{
|
|
18
|
+
[x: string]: string;
|
|
19
|
+
}>>;
|
|
20
|
+
cameraBody: z.ZodNullable<z.ZodEnum<{
|
|
21
|
+
[x: string]: string;
|
|
22
|
+
}>>;
|
|
23
|
+
lens: z.ZodNullable<z.ZodEnum<{
|
|
24
|
+
[x: string]: string;
|
|
25
|
+
}>>;
|
|
26
|
+
focalLength: z.ZodNullable<z.ZodEnum<{
|
|
27
|
+
[x: string]: string;
|
|
28
|
+
}>>;
|
|
29
|
+
aperture: z.ZodNullable<z.ZodEnum<{
|
|
30
|
+
[x: string]: string;
|
|
31
|
+
}>>;
|
|
32
|
+
palette: z.ZodNullable<z.ZodEnum<{
|
|
33
|
+
[x: string]: string;
|
|
34
|
+
}>>;
|
|
35
|
+
lighting: z.ZodNullable<z.ZodEnum<{
|
|
36
|
+
[x: string]: string;
|
|
37
|
+
}>>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
cast: z.ZodArray<z.ZodObject<{
|
|
40
|
+
name: z.ZodString;
|
|
41
|
+
role: z.ZodEnum<{
|
|
42
|
+
extra: "extra";
|
|
43
|
+
lead: "lead";
|
|
44
|
+
supporting: "supporting";
|
|
45
|
+
}>;
|
|
46
|
+
description: z.ZodString;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
locations: z.ZodArray<z.ZodObject<{
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
description: z.ZodString;
|
|
51
|
+
}, z.core.$strip>>;
|
|
52
|
+
episodes: z.ZodArray<z.ZodObject<{
|
|
53
|
+
title: z.ZodString;
|
|
54
|
+
synopsis: z.ZodString;
|
|
55
|
+
cliffhanger: z.ZodNullable<z.ZodString>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export type FilmBibleDraft = z.infer<typeof FilmBibleDraftSchema>;
|
|
59
|
+
declare const ShotDraftSchema: z.ZodObject<{
|
|
60
|
+
shotType: z.ZodEnum<{
|
|
61
|
+
[x: string]: string;
|
|
62
|
+
}>;
|
|
63
|
+
cameraMoves: z.ZodArray<z.ZodEnum<{
|
|
64
|
+
[x: string]: string;
|
|
65
|
+
}>>;
|
|
66
|
+
durationSec: z.ZodNumber;
|
|
67
|
+
action: z.ZodString;
|
|
68
|
+
cast: z.ZodArray<z.ZodString>;
|
|
69
|
+
dialogue: z.ZodArray<z.ZodObject<{
|
|
70
|
+
speaker: z.ZodString;
|
|
71
|
+
line: z.ZodString;
|
|
72
|
+
delivery: z.ZodNullable<z.ZodString>;
|
|
73
|
+
}, z.core.$strip>>;
|
|
74
|
+
sfx: z.ZodNullable<z.ZodString>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
export type FilmShotDraft = z.infer<typeof ShotDraftSchema>;
|
|
77
|
+
declare const SceneDraftSchema: z.ZodObject<{
|
|
78
|
+
heading: z.ZodString;
|
|
79
|
+
summary: z.ZodString;
|
|
80
|
+
location: z.ZodNullable<z.ZodString>;
|
|
81
|
+
shots: z.ZodArray<z.ZodObject<{
|
|
82
|
+
shotType: z.ZodEnum<{
|
|
83
|
+
[x: string]: string;
|
|
84
|
+
}>;
|
|
85
|
+
cameraMoves: z.ZodArray<z.ZodEnum<{
|
|
86
|
+
[x: string]: string;
|
|
87
|
+
}>>;
|
|
88
|
+
durationSec: z.ZodNumber;
|
|
89
|
+
action: z.ZodString;
|
|
90
|
+
cast: z.ZodArray<z.ZodString>;
|
|
91
|
+
dialogue: z.ZodArray<z.ZodObject<{
|
|
92
|
+
speaker: z.ZodString;
|
|
93
|
+
line: z.ZodString;
|
|
94
|
+
delivery: z.ZodNullable<z.ZodString>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
sfx: z.ZodNullable<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>>;
|
|
98
|
+
}, z.core.$strip>;
|
|
99
|
+
export type FilmSceneDraft = z.infer<typeof SceneDraftSchema>;
|
|
100
|
+
export declare const FilmEpisodeDraftSchema: z.ZodObject<{
|
|
101
|
+
scenes: z.ZodArray<z.ZodObject<{
|
|
102
|
+
heading: z.ZodString;
|
|
103
|
+
summary: z.ZodString;
|
|
104
|
+
location: z.ZodNullable<z.ZodString>;
|
|
105
|
+
shots: z.ZodArray<z.ZodObject<{
|
|
106
|
+
shotType: z.ZodEnum<{
|
|
107
|
+
[x: string]: string;
|
|
108
|
+
}>;
|
|
109
|
+
cameraMoves: z.ZodArray<z.ZodEnum<{
|
|
110
|
+
[x: string]: string;
|
|
111
|
+
}>>;
|
|
112
|
+
durationSec: z.ZodNumber;
|
|
113
|
+
action: z.ZodString;
|
|
114
|
+
cast: z.ZodArray<z.ZodString>;
|
|
115
|
+
dialogue: z.ZodArray<z.ZodObject<{
|
|
116
|
+
speaker: z.ZodString;
|
|
117
|
+
line: z.ZodString;
|
|
118
|
+
delivery: z.ZodNullable<z.ZodString>;
|
|
119
|
+
}, z.core.$strip>>;
|
|
120
|
+
sfx: z.ZodNullable<z.ZodString>;
|
|
121
|
+
}, z.core.$strip>>;
|
|
122
|
+
}, z.core.$strip>>;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
export type FilmEpisodeDraft = z.infer<typeof FilmEpisodeDraftSchema>;
|
|
125
|
+
export declare const FilmSceneShotsDraftSchema: z.ZodObject<{
|
|
126
|
+
summary: z.ZodString;
|
|
127
|
+
shots: z.ZodArray<z.ZodObject<{
|
|
128
|
+
shotType: z.ZodEnum<{
|
|
129
|
+
[x: string]: string;
|
|
130
|
+
}>;
|
|
131
|
+
cameraMoves: z.ZodArray<z.ZodEnum<{
|
|
132
|
+
[x: string]: string;
|
|
133
|
+
}>>;
|
|
134
|
+
durationSec: z.ZodNumber;
|
|
135
|
+
action: z.ZodString;
|
|
136
|
+
cast: z.ZodArray<z.ZodString>;
|
|
137
|
+
dialogue: z.ZodArray<z.ZodObject<{
|
|
138
|
+
speaker: z.ZodString;
|
|
139
|
+
line: z.ZodString;
|
|
140
|
+
delivery: z.ZodNullable<z.ZodString>;
|
|
141
|
+
}, z.core.$strip>>;
|
|
142
|
+
sfx: z.ZodNullable<z.ZodString>;
|
|
143
|
+
}, z.core.$strip>>;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type FilmSceneShotsDraft = z.infer<typeof FilmSceneShotsDraftSchema>;
|
|
146
|
+
export declare const FilmSingleShotDraftSchema: z.ZodObject<{
|
|
147
|
+
shot: z.ZodObject<{
|
|
148
|
+
shotType: z.ZodEnum<{
|
|
149
|
+
[x: string]: string;
|
|
150
|
+
}>;
|
|
151
|
+
cameraMoves: z.ZodArray<z.ZodEnum<{
|
|
152
|
+
[x: string]: string;
|
|
153
|
+
}>>;
|
|
154
|
+
durationSec: z.ZodNumber;
|
|
155
|
+
action: z.ZodString;
|
|
156
|
+
cast: z.ZodArray<z.ZodString>;
|
|
157
|
+
dialogue: z.ZodArray<z.ZodObject<{
|
|
158
|
+
speaker: z.ZodString;
|
|
159
|
+
line: z.ZodString;
|
|
160
|
+
delivery: z.ZodNullable<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>>;
|
|
162
|
+
sfx: z.ZodNullable<z.ZodString>;
|
|
163
|
+
}, z.core.$strip>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export declare const FILM_WRITE_DEFAULTS: {
|
|
166
|
+
/** Whole-film runtime target. */
|
|
167
|
+
readonly filmSeconds: 90;
|
|
168
|
+
/** Per-episode runtime target for a reel drama. */
|
|
169
|
+
readonly episodeSeconds: 60;
|
|
170
|
+
readonly episodeCount: 5;
|
|
171
|
+
readonly minSeconds: 15;
|
|
172
|
+
readonly maxSeconds: 600;
|
|
173
|
+
};
|
|
174
|
+
export declare function resolveTargetSeconds(format: FilmFormat, requested?: number): number;
|
|
175
|
+
/** Story context every shot-level prompt needs. */
|
|
176
|
+
export interface FilmStoryContext {
|
|
177
|
+
format: FilmFormat;
|
|
178
|
+
title: string;
|
|
179
|
+
logline?: string;
|
|
180
|
+
synopsis?: string;
|
|
181
|
+
cast: Pick<FilmCastMember, "name" | "role" | "description">[];
|
|
182
|
+
locations: Pick<FilmLocation, "name" | "description">[];
|
|
183
|
+
}
|
|
184
|
+
export interface WritersRoomDeps {
|
|
185
|
+
llm: LlmCaller;
|
|
186
|
+
router?: ModelRouter;
|
|
187
|
+
}
|
|
188
|
+
export declare function draftFilmBible(deps: WritersRoomDeps, input: {
|
|
189
|
+
format: FilmFormat;
|
|
190
|
+
videoModel: FilmVideoModel;
|
|
191
|
+
premise: string;
|
|
192
|
+
title?: string;
|
|
193
|
+
episodeCount: number;
|
|
194
|
+
targetSeconds: number;
|
|
195
|
+
/** Look fields the user already chose; the bible keeps them. */
|
|
196
|
+
lockedLook: FilmLook;
|
|
197
|
+
}): Promise<FilmBibleDraft>;
|
|
198
|
+
export declare function draftFilmEpisode(deps: WritersRoomDeps, input: {
|
|
199
|
+
story: FilmStoryContext;
|
|
200
|
+
videoModel: FilmVideoModel;
|
|
201
|
+
episode: {
|
|
202
|
+
index: number;
|
|
203
|
+
title: string;
|
|
204
|
+
synopsis?: string;
|
|
205
|
+
cliffhanger?: string;
|
|
206
|
+
};
|
|
207
|
+
/** Neighbouring episode synopses, for continuity. */
|
|
208
|
+
previousSynopsis?: string;
|
|
209
|
+
nextSynopsis?: string;
|
|
210
|
+
targetSeconds: number;
|
|
211
|
+
note?: string;
|
|
212
|
+
}): Promise<FilmEpisodeDraft>;
|
|
213
|
+
export declare function draftFilmScene(deps: WritersRoomDeps, input: {
|
|
214
|
+
story: FilmStoryContext;
|
|
215
|
+
videoModel: FilmVideoModel;
|
|
216
|
+
episodeSynopsis?: string;
|
|
217
|
+
scene: {
|
|
218
|
+
heading: string;
|
|
219
|
+
summary?: string;
|
|
220
|
+
location?: string;
|
|
221
|
+
};
|
|
222
|
+
previousScene?: string;
|
|
223
|
+
nextScene?: string;
|
|
224
|
+
targetSeconds: number;
|
|
225
|
+
note?: string;
|
|
226
|
+
}): Promise<FilmSceneShotsDraft>;
|
|
227
|
+
export declare function draftFilmShot(deps: WritersRoomDeps, input: {
|
|
228
|
+
story: FilmStoryContext;
|
|
229
|
+
videoModel: FilmVideoModel;
|
|
230
|
+
scene: {
|
|
231
|
+
heading: string;
|
|
232
|
+
summary?: string;
|
|
233
|
+
location?: string;
|
|
234
|
+
};
|
|
235
|
+
current: string;
|
|
236
|
+
previousShot?: string;
|
|
237
|
+
nextShot?: string;
|
|
238
|
+
note?: string;
|
|
239
|
+
}): Promise<FilmShotDraft>;
|
|
240
|
+
export interface MaterializedBible {
|
|
241
|
+
title: string;
|
|
242
|
+
logline: string;
|
|
243
|
+
synopsis: string;
|
|
244
|
+
look: FilmLook;
|
|
245
|
+
cast: FilmCastMember[];
|
|
246
|
+
locations: FilmLocation[];
|
|
247
|
+
/** Scenes are filled by the episode pass. */
|
|
248
|
+
episodes: FilmEpisode[];
|
|
249
|
+
}
|
|
250
|
+
export declare function materializeBible(draft: FilmBibleDraft, opts: {
|
|
251
|
+
format: FilmFormat;
|
|
252
|
+
episodeCount: number;
|
|
253
|
+
lockedLook: FilmLook;
|
|
254
|
+
fallbackTitle: string;
|
|
255
|
+
}): MaterializedBible;
|
|
256
|
+
/** Editable shot fields produced from a draft (no ids, order or ownership yet). */
|
|
257
|
+
export type MaterializedShotFields = Pick<IFilmShotModel, "shotType" | "cameraMoves" | "durationSec" | "action" | "castIds" | "locationId" | "dialogue" | "sfx">;
|
|
258
|
+
export declare function materializeShot(draft: FilmShotDraft, ctx: {
|
|
259
|
+
cast: FilmCastMember[];
|
|
260
|
+
locationId?: string;
|
|
261
|
+
spec: FilmVideoModelSpec;
|
|
262
|
+
}): MaterializedShotFields;
|
|
263
|
+
export interface MaterializedScene {
|
|
264
|
+
scene: FilmScene;
|
|
265
|
+
shots: MaterializedShotFields[];
|
|
266
|
+
}
|
|
267
|
+
export declare function materializeEpisode(draft: FilmEpisodeDraft, ctx: {
|
|
268
|
+
cast: FilmCastMember[];
|
|
269
|
+
locations: FilmLocation[];
|
|
270
|
+
videoModel: FilmVideoModel;
|
|
271
|
+
}): MaterializedScene[];
|
|
272
|
+
/** One-line description of a stored shot, for neighbour context in rewrites. */
|
|
273
|
+
export declare function describeShot(shot: Pick<IFilmShotModel, "shotType" | "action" | "castIds" | "dialogue">, cast: FilmCastMember[]): string;
|
|
274
|
+
export declare function storyContextOf(project: IFilmProjectModel): FilmStoryContext;
|
|
275
|
+
export {};
|
|
276
|
+
//# sourceMappingURL=writersRoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writersRoom.d.ts","sourceRoot":"","sources":["../../../src/services/film/writersRoom.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAOL,KAAK,kBAAkB,EACxB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EACV,cAA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