vidspotai-shared 1.0.130 → 1.0.132
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 +6 -0
- package/lib/globals/aiModels/enums.d.ts.map +1 -1
- package/lib/globals/aiModels/enums.js +31 -1
- package/lib/globals/aiModels/index.d.ts.map +1 -1
- package/lib/globals/aiModels/index.js +2 -0
- package/lib/globals/aiModels/providers/bytedance.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/bytedance.js +4 -0
- package/lib/globals/aiModels/providers/fal.d.ts +20 -0
- package/lib/globals/aiModels/providers/fal.d.ts.map +1 -0
- package/lib/globals/aiModels/providers/fal.js +100 -0
- package/lib/globals/aiModels/providers/google.d.ts.map +1 -1
- package/lib/globals/aiModels/providers/google.js +229 -177
- package/lib/globals/aiModels/tierHelpers.d.ts +3 -1
- package/lib/globals/aiModels/tierHelpers.d.ts.map +1 -1
- package/lib/globals/aiModels/tierHelpers.js +7 -1
- package/lib/globals/aiModels/types.d.ts +10 -1
- package/lib/globals/aiModels/types.d.ts.map +1 -1
- package/lib/globals/creditUnit.d.ts +9 -0
- package/lib/globals/creditUnit.d.ts.map +1 -1
- package/lib/globals/creditUnit.js +10 -1
- 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/posterExport.d.ts +34 -0
- package/lib/globals/posterExport.d.ts.map +1 -0
- package/lib/globals/posterExport.js +50 -0
- package/lib/globals/types.d.ts +9 -1
- package/lib/globals/types.d.ts.map +1 -1
- package/lib/globals/types.js +9 -0
- package/lib/globals/videoTools.d.ts +24 -0
- package/lib/globals/videoTools.d.ts.map +1 -0
- package/lib/globals/videoTools.js +31 -0
- package/lib/libs/storage/MediaStorage.d.ts.map +1 -1
- package/lib/libs/storage/MediaStorage.js +37 -10
- package/lib/libs/storage/cdnUrl.d.ts +7 -0
- package/lib/libs/storage/cdnUrl.d.ts.map +1 -1
- package/lib/libs/storage/cdnUrl.js +26 -0
- 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/organization.model.d.ts +23 -0
- package/lib/models/organization.model.d.ts.map +1 -1
- package/lib/models/organization.model.js +17 -0
- package/lib/models/posterExport.model.d.ts +29 -0
- package/lib/models/posterExport.model.d.ts.map +1 -0
- package/lib/models/posterExport.model.js +2 -0
- package/lib/models/videoTool.model.d.ts +59 -0
- package/lib/models/videoTool.model.d.ts.map +1 -0
- package/lib/models/videoTool.model.js +2 -0
- package/lib/services/agent/planner/Planner.d.ts.map +1 -1
- package/lib/services/agent/planner/Planner.js +9 -0
- package/lib/services/agent/planner/structuralRules.js +2 -2
- package/lib/services/agent/planner/validators.js +1 -1
- package/lib/services/agent/providerFallback/chains.d.ts.map +1 -1
- package/lib/services/agent/providerFallback/chains.js +18 -5
- package/lib/services/agent/tools/animateImage.tool.js +1 -1
- package/lib/services/agent/tools/generateVideo.tool.js +3 -3
- package/lib/services/agent/tools/searchUserLibrary.tool.d.ts.map +1 -1
- package/lib/services/agent/tools/searchUserLibrary.tool.js +7 -1
- package/lib/services/aiGen/aiGenFactory.service.d.ts.map +1 -1
- package/lib/services/aiGen/aiGenFactory.service.js +6 -0
- package/lib/services/aiGen/helpers.d.ts.map +1 -1
- package/lib/services/aiGen/helpers.js +5 -0
- package/lib/services/aiGen/providers/alibaba/alibaba.d.ts.map +1 -1
- package/lib/services/aiGen/providers/alibaba/alibaba.js +27 -0
- package/lib/services/aiGen/providers/bytedance/bytedance.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/bytedance/bytedance.service.js +6 -0
- package/lib/services/aiGen/providers/fal/falImageTools.service.d.ts +37 -0
- package/lib/services/aiGen/providers/fal/falImageTools.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/fal/falImageTools.service.js +278 -0
- package/lib/services/aiGen/providers/fal/falUpscale.service.d.ts +8 -0
- package/lib/services/aiGen/providers/fal/falUpscale.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/fal/falUpscale.service.js +1 -0
- package/lib/services/aiGen/providers/fal/falVideoMatting.service.d.ts +36 -0
- package/lib/services/aiGen/providers/fal/falVideoMatting.service.d.ts.map +1 -0
- package/lib/services/aiGen/providers/fal/falVideoMatting.service.js +119 -0
- package/lib/services/aiGen/providers/fal/index.d.ts +2 -0
- package/lib/services/aiGen/providers/fal/index.d.ts.map +1 -1
- package/lib/services/aiGen/providers/fal/index.js +2 -0
- package/lib/services/aiGen/providers/google/googleMusic.d.ts.map +1 -1
- package/lib/services/aiGen/providers/google/googleMusic.js +14 -1
- package/lib/services/aiGen/providers/runway/runway.service.d.ts +2 -2
- package/lib/services/aiGen/providers/runway/runway.service.d.ts.map +1 -1
- package/lib/services/aiGen/providers/runway/runway.service.js +81 -3
- package/lib/services/aiGen/textFallback.d.ts +19 -0
- package/lib/services/aiGen/textFallback.d.ts.map +1 -0
- package/lib/services/aiGen/textFallback.js +76 -0
- package/lib/services/brandKit.service.d.ts +22 -0
- package/lib/services/brandKit.service.d.ts.map +1 -0
- package/lib/services/brandKit.service.js +59 -0
- package/lib/services/bullmq.service.d.ts +11 -0
- package/lib/services/bullmq.service.d.ts.map +1 -1
- package/lib/services/bullmq.service.js +79 -18
- package/lib/services/firestore.service.d.ts +7 -1
- package/lib/services/firestore.service.d.ts.map +1 -1
- package/lib/services/firestore.service.js +10 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/index.d.ts.map +1 -1
- package/lib/services/index.js +1 -0
- package/lib/services/translation/index.d.ts +1 -1
- package/lib/services/translation/index.d.ts.map +1 -1
- package/lib/services/translation/index.js +2 -1
- package/lib/services/translation/outputLanguage.d.ts +9 -0
- package/lib/services/translation/outputLanguage.d.ts.map +1 -1
- package/lib/services/translation/outputLanguage.js +53 -1
- package/lib/services/translation/translation.service.d.ts +16 -0
- package/lib/services/translation/translation.service.d.ts.map +1 -1
- package/lib/services/translation/translation.service.js +60 -2
- package/lib/utils/errors.d.ts +11 -0
- package/lib/utils/errors.d.ts.map +1 -1
- package/lib/utils/errors.js +29 -0
- package/lib/utils/helpers.d.ts.map +1 -1
- package/lib/utils/helpers.js +7 -4
- package/package.json +1 -1
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.POSTER_EXPORT_EXTENSIONS = exports.POSTER_EXPORT_CONTENT_TYPES = exports.POSTER_EXPORT_LIMITS = exports.POSTER_EXPORT_FORMATS = exports.POSTER_ANIMATED_FORMATS = exports.POSTER_STILL_FORMATS = void 0;
|
|
4
|
+
exports.isPosterStillFormat = isPosterStillFormat;
|
|
5
|
+
/**
|
|
6
|
+
* Poster Studio export — server-side Remotion render of the poster's Project
|
|
7
|
+
* JSON (the same `ProjectComposition` the editor preview uses, so the file
|
|
8
|
+
* matches the canvas pixel-for-pixel). Stills go through `renderStill`;
|
|
9
|
+
* animated formats through `renderMedia`. Rides RENDER_JOBS with
|
|
10
|
+
* `kind: "poster-export"` so it shares the render worker's concurrency and
|
|
11
|
+
* memory caps.
|
|
12
|
+
*/
|
|
13
|
+
exports.POSTER_STILL_FORMATS = ["png", "jpeg", "webp", "pdf"];
|
|
14
|
+
exports.POSTER_ANIMATED_FORMATS = ["mp4", "gif"];
|
|
15
|
+
exports.POSTER_EXPORT_FORMATS = [...exports.POSTER_STILL_FORMATS, ...exports.POSTER_ANIMATED_FORMATS];
|
|
16
|
+
function isPosterStillFormat(format) {
|
|
17
|
+
return exports.POSTER_STILL_FORMATS.includes(format);
|
|
18
|
+
}
|
|
19
|
+
exports.POSTER_EXPORT_LIMITS = {
|
|
20
|
+
/** Animated exports are trimmed to this many seconds. */
|
|
21
|
+
maxAnimatedSec: 30,
|
|
22
|
+
/** GIFs are capped harder — every frame is a full palette image. */
|
|
23
|
+
maxGifSec: 10,
|
|
24
|
+
/** Longest edge of a GIF (px); larger canvases are scaled down. */
|
|
25
|
+
gifMaxEdgePx: 720,
|
|
26
|
+
/** GIF frame rate divisor (30 fps project → 15 fps GIF). */
|
|
27
|
+
gifEveryNthFrame: 2,
|
|
28
|
+
/** Longest edge of an MP4 (px); print-size canvases are scaled to 4K. */
|
|
29
|
+
mp4MaxEdgePx: 3840,
|
|
30
|
+
/** In-flight exports per user before new ones are refused (429). */
|
|
31
|
+
maxInFlightPerUser: 2,
|
|
32
|
+
/** A queued/in-progress export older than this no longer counts as in flight. */
|
|
33
|
+
staleAfterMs: 15 * 60 * 1000,
|
|
34
|
+
};
|
|
35
|
+
exports.POSTER_EXPORT_CONTENT_TYPES = {
|
|
36
|
+
png: "image/png",
|
|
37
|
+
jpeg: "image/jpeg",
|
|
38
|
+
webp: "image/webp",
|
|
39
|
+
pdf: "application/pdf",
|
|
40
|
+
mp4: "video/mp4",
|
|
41
|
+
gif: "image/gif",
|
|
42
|
+
};
|
|
43
|
+
exports.POSTER_EXPORT_EXTENSIONS = {
|
|
44
|
+
png: "png",
|
|
45
|
+
jpeg: "jpg",
|
|
46
|
+
webp: "webp",
|
|
47
|
+
pdf: "pdf",
|
|
48
|
+
mp4: "mp4",
|
|
49
|
+
gif: "gif",
|
|
50
|
+
};
|
package/lib/globals/types.d.ts
CHANGED
|
@@ -183,7 +183,15 @@ export declare enum ERedisQueues {
|
|
|
183
183
|
* `assetType` branch inside one processor, matching every other
|
|
184
184
|
* generation-type split in this enum (VIDEO_JOBS vs IMAGE_JOBS, etc.).
|
|
185
185
|
*/
|
|
186
|
-
UPSCALE_VIDEO_JOBS = "upscale-video-job-queue"
|
|
186
|
+
UPSCALE_VIDEO_JOBS = "upscale-video-job-queue",
|
|
187
|
+
/**
|
|
188
|
+
* Video photo-tools — background removal on a clip (fal BiRefNet v2 video)
|
|
189
|
+
* plus an optional ffmpeg composite onto a colour/image/blur backdrop. One
|
|
190
|
+
* job per `/v1/video-tools/remove-background` call. Minutes-long provider
|
|
191
|
+
* wait + a local ffmpeg pass, so it gets its own queue (and sits with the
|
|
192
|
+
* heavy queues in workerRoles).
|
|
193
|
+
*/
|
|
194
|
+
VIDEO_TOOL_JOBS = "video-tool-job-queue"
|
|
187
195
|
}
|
|
188
196
|
export declare const REDIS_QUEUES: ERedisQueues[];
|
|
189
197
|
/** X8 Social Suite — connected social platforms. Value = stable storage key. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/globals/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,CAAC,MAAM,KAAK,CAAC;AAEpB,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,cAAc,CAAC;QACrB,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,EAAE,CAAC;IACJ,MAAM,EAAE,GAAG,EAAE,CAAC;CACf;AAED,oBAAY,eAAe;IACzB,MAAM,WAAW,CAAE,wCAAwC;IAC3D,WAAW,eAAe,CAAE,2DAA2D;IAGvF,SAAS,cAAc,CAAE,8CAA8C;IACvE,MAAM,WAAW,CAAE,+BAA+B;IAClD,mBAAmB,uBAAuB,CAAE,oEAAoE;IAChH,SAAS,cAAc;CACxB;AAED,oBAAY,iBAAiB;IAC3B,WAAW,eAAe,CAAE,qFAAqF;IACjH,SAAS,cAAc,CAAE,2FAA2F;IACpH,OAAO,YAAY,CAAE,kKAAkK;IACvL,MAAM,WAAW,CAAE,kEAAkE;IACrF,SAAS,cAAc,CAAE,sCAAsC;IAC/D;;;;;OAKG;IACH,SAAS,aAAa;IACtB;;;;;;OAMG;IACH,SAAS,cAAc;CACxB;AAMD,oBAAY,YAAY;IACtB,UAAU,oBAAoB;IAC9B,iJAAiJ;IACjJ,eAAe,yBAAyB;IACxC,6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IACX,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,IAAI,OAAO;IACX,UAAU,OAAO;CAClB;AAED,MAAM,WAAW,uBAAuB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,GAAG,SAAS;IACzE,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,CAAC,CAAC;CACf;AAED,eAAO,MAAM,oBAAoB;;;;iBAQ/B,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,eAAO,MAAM,iBAAiB;;;;iBAQ5B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;iBAiB5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,yBAAyB;;;;iBAapC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;iBAEhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|
package/lib/globals/types.js
CHANGED
|
@@ -185,6 +185,14 @@ var ERedisQueues;
|
|
|
185
185
|
* generation-type split in this enum (VIDEO_JOBS vs IMAGE_JOBS, etc.).
|
|
186
186
|
*/
|
|
187
187
|
ERedisQueues["UPSCALE_VIDEO_JOBS"] = "upscale-video-job-queue";
|
|
188
|
+
/**
|
|
189
|
+
* Video photo-tools — background removal on a clip (fal BiRefNet v2 video)
|
|
190
|
+
* plus an optional ffmpeg composite onto a colour/image/blur backdrop. One
|
|
191
|
+
* job per `/v1/video-tools/remove-background` call. Minutes-long provider
|
|
192
|
+
* wait + a local ffmpeg pass, so it gets its own queue (and sits with the
|
|
193
|
+
* heavy queues in workerRoles).
|
|
194
|
+
*/
|
|
195
|
+
ERedisQueues["VIDEO_TOOL_JOBS"] = "video-tool-job-queue";
|
|
188
196
|
})(ERedisQueues || (exports.ERedisQueues = ERedisQueues = {}));
|
|
189
197
|
exports.REDIS_QUEUES = [
|
|
190
198
|
ERedisQueues.VIDEO_JOBS,
|
|
@@ -208,6 +216,7 @@ exports.REDIS_QUEUES = [
|
|
|
208
216
|
ERedisQueues.MEDIA_MIRROR_JOBS,
|
|
209
217
|
ERedisQueues.UPSCALE_IMAGE_JOBS,
|
|
210
218
|
ERedisQueues.UPSCALE_VIDEO_JOBS,
|
|
219
|
+
ERedisQueues.VIDEO_TOOL_JOBS,
|
|
211
220
|
];
|
|
212
221
|
/** X8 Social Suite — connected social platforms. Value = stable storage key. */
|
|
213
222
|
var ESocialProvider;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Video photo-tools (background removal on clips) — fal BiRefNet v2 video.
|
|
3
|
+
*
|
|
4
|
+
* fal bills compute-seconds ($0.000575/s, verified 2026-10-21 against
|
|
5
|
+
* https://api.fal.ai/v1/models/pricing). Measured on a 6.5 s 1280×720 clip at
|
|
6
|
+
* "General Use (Light)" @ 1024²: 76.4 s inference → $0.044 ≈ $0.0068 per
|
|
7
|
+
* second of video. The per-second rates below carry ~1.75× headroom over that
|
|
8
|
+
* (and a heavier model for "high"), so billing never undercuts the provider.
|
|
9
|
+
*/
|
|
10
|
+
export declare const VIDEO_BG_REMOVAL: {
|
|
11
|
+
readonly appId: "fal-ai/birefnet/v2/video";
|
|
12
|
+
/** Longest clip accepted. Billing and the worker's ffprobe check both cap here. */
|
|
13
|
+
readonly maxDurationSec: 60;
|
|
14
|
+
/** Largest source file accepted (bytes). */
|
|
15
|
+
readonly maxBytes: number;
|
|
16
|
+
readonly usdPerSecond: {
|
|
17
|
+
readonly standard: 0.012;
|
|
18
|
+
readonly high: 0.025;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export type VideoBgRemovalQuality = keyof typeof VIDEO_BG_REMOVAL.usdPerSecond;
|
|
22
|
+
/** Credits for `durationSec` of video at `quality`, floored at one utility op. */
|
|
23
|
+
export declare function videoBgRemovalCredits(durationSec: number, quality?: VideoBgRemovalQuality): number;
|
|
24
|
+
//# sourceMappingURL=videoTools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoTools.d.ts","sourceRoot":"","sources":["../../src/globals/videoTools.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB;;IAE3B,mFAAmF;;IAEnF,4CAA4C;;;;;;CAMpC,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAAG,MAAM,OAAO,gBAAgB,CAAC,YAAY,CAAC;AAE/E,kFAAkF;AAClF,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,MAAM,EACnB,OAAO,GAAE,qBAAkC,GAC1C,MAAM,CAOR"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VIDEO_BG_REMOVAL = void 0;
|
|
4
|
+
exports.videoBgRemovalCredits = videoBgRemovalCredits;
|
|
5
|
+
const helpers_1 = require("../utils/helpers");
|
|
6
|
+
const creditUnit_1 = require("./creditUnit");
|
|
7
|
+
/**
|
|
8
|
+
* Video photo-tools (background removal on clips) — fal BiRefNet v2 video.
|
|
9
|
+
*
|
|
10
|
+
* fal bills compute-seconds ($0.000575/s, verified 2026-10-21 against
|
|
11
|
+
* https://api.fal.ai/v1/models/pricing). Measured on a 6.5 s 1280×720 clip at
|
|
12
|
+
* "General Use (Light)" @ 1024²: 76.4 s inference → $0.044 ≈ $0.0068 per
|
|
13
|
+
* second of video. The per-second rates below carry ~1.75× headroom over that
|
|
14
|
+
* (and a heavier model for "high"), so billing never undercuts the provider.
|
|
15
|
+
*/
|
|
16
|
+
exports.VIDEO_BG_REMOVAL = {
|
|
17
|
+
appId: "fal-ai/birefnet/v2/video",
|
|
18
|
+
/** Longest clip accepted. Billing and the worker's ffprobe check both cap here. */
|
|
19
|
+
maxDurationSec: 60,
|
|
20
|
+
/** Largest source file accepted (bytes). */
|
|
21
|
+
maxBytes: 200 * 1024 * 1024,
|
|
22
|
+
usdPerSecond: {
|
|
23
|
+
standard: 0.012,
|
|
24
|
+
high: 0.025,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
/** Credits for `durationSec` of video at `quality`, floored at one utility op. */
|
|
28
|
+
function videoBgRemovalCredits(durationSec, quality = "standard") {
|
|
29
|
+
const seconds = Math.min(Math.max(Math.ceil(durationSec), 1), exports.VIDEO_BG_REMOVAL.maxDurationSec);
|
|
30
|
+
return (0, helpers_1.getCreditsFromCost)(seconds * exports.VIDEO_BG_REMOVAL.usdPerSecond[quality], true, creditUnit_1.MIN_CREDITS_PER_UTILITY_OP);
|
|
31
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MediaStorage.d.ts","sourceRoot":"","sources":["../../../src/libs/storage/MediaStorage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyDG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAIxD;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,qBAAa,YAAY;IACvB,iEAAiE;IACjE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;IACxC,0EAA0E;IAC1E,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAkB;gBAEhC,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,eAAe;IAK9D;;;;;;OAMG;IACG,GAAG,CACP,U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AE,eAAe;IAK9D;;;;;;OAMG;IACG,GAAG,CACP,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC;IAKlB;;;;;OAKG;IACG,WAAW,CACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAMzC;;;;;;;OAOG;IACG,WAAW,CACf,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,MAAM,EACZ,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;OAKG;IACG,cAAc,CAClB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC;IAQhB;;;;;;OAMG;IACG,kBAAkB,CACtB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,QAAQ,EAChB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC;IAWhB;;;;;;;;;;;;OAYG;IACG,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAIxD;;;;;;;;OAQG;IACG,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI/C;;;;;OAKG;YACW,gBAAgB;CAuC/B;AAED,8EAA8E;AAC9E,eAAO,MAAM,YAAY,cAAsD,CAAC"}
|
|
@@ -77,7 +77,9 @@ class MediaStorage {
|
|
|
77
77
|
return;
|
|
78
78
|
if (!this.bytes.writeFromReadable)
|
|
79
79
|
return;
|
|
80
|
-
await this.bestEffortMirror(() => this.bytes.writeFromReadable(objectPath, stream, contentType, size), objectPath
|
|
80
|
+
await this.bestEffortMirror(() => this.bytes.writeFromReadable(objectPath, stream, contentType, size), objectPath,
|
|
81
|
+
// A consumed stream can't be replayed — single attempt.
|
|
82
|
+
false);
|
|
81
83
|
}
|
|
82
84
|
/**
|
|
83
85
|
* Delivery URL for an object already stored — ALWAYS the CDN form
|
|
@@ -113,16 +115,41 @@ class MediaStorage {
|
|
|
113
115
|
* mirrorBytes/mirrorFromFile/mirrorFromReadable above, never by
|
|
114
116
|
* put/putFromFile/delete (those need R2 to actually succeed).
|
|
115
117
|
*/
|
|
116
|
-
async bestEffortMirror(op, objectPath) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
118
|
+
async bestEffortMirror(op, objectPath, retryable = true) {
|
|
119
|
+
// 2026-10-23: one retry — prod paged on a single R2 connect ETIMEDOUT
|
|
120
|
+
// (AggregateError from internalConnectMultiple) that a second attempt
|
|
121
|
+
// would have absorbed. A miss that survives the retry still pages: the
|
|
122
|
+
// object is then absent from R2 and needs a backfill.
|
|
123
|
+
const maxAttempts = retryable ? 2 : 1;
|
|
124
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt++) {
|
|
125
|
+
try {
|
|
126
|
+
await op();
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
catch (err) {
|
|
130
|
+
if (attempt < maxAttempts) {
|
|
131
|
+
logger_1.logger.warn("MediaStorage: R2 mirror failed — retrying once", {
|
|
132
|
+
objectPath,
|
|
133
|
+
err: err instanceof Error ? err.message : String(err),
|
|
134
|
+
});
|
|
135
|
+
await new Promise((r) => setTimeout(r, 2000));
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
logger_1.logger.error("MediaStorage: R2 mirror failed (GCS write stands)", {
|
|
139
|
+
objectPath,
|
|
140
|
+
err: err instanceof Error ? err.stack ?? err.message : String(err),
|
|
141
|
+
});
|
|
142
|
+
}
|
|
125
143
|
}
|
|
144
|
+
// REMOVED FOR v1 — kept for reference: single-attempt mirror.
|
|
145
|
+
/* try {
|
|
146
|
+
await op();
|
|
147
|
+
} catch (err: unknown) {
|
|
148
|
+
logger.error("MediaStorage: R2 mirror failed (GCS write stands)", {
|
|
149
|
+
objectPath,
|
|
150
|
+
err: err instanceof Error ? err.stack ?? err.message : String(err),
|
|
151
|
+
});
|
|
152
|
+
} */
|
|
126
153
|
}
|
|
127
154
|
}
|
|
128
155
|
exports.MediaStorage = MediaStorage;
|
|
@@ -83,4 +83,11 @@ export declare function fetchOwnMedia(url: string, init?: RequestInit): Promise<
|
|
|
83
83
|
* and 404s against GCS, which no longer holds the bytes.
|
|
84
84
|
*/
|
|
85
85
|
export declare function publicCdnUrl(objectPath: string): string;
|
|
86
|
+
/**
|
|
87
|
+
* True when `url` points at OUR media (CDN host, or a Firebase/GCS URL for one
|
|
88
|
+
* of our `vidspot*` buckets). Gate for endpoints that make a server fetch a
|
|
89
|
+
* caller-supplied URL (format conversion etc.) — keeps them from being used as
|
|
90
|
+
* an open proxy / SSRF primitive.
|
|
91
|
+
*/
|
|
92
|
+
export declare function isOwnMediaUrl(url: string): boolean;
|
|
86
93
|
//# sourceMappingURL=cdnUrl.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cdnUrl.d.ts","sourceRoot":"","sources":["../../../src/libs/storage/cdnUrl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAeH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEnD;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE;IAAE,UAAU,CAAC,EAAE,eAAe,CAAA;CAAE,GACtC,MAAM,CAeR;AAQD;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAC7B,KAAK,EAAE,CAAC,EACR,IAAI,GAAE;IAAE,UAAU,CAAC,EAAE,eAAe,CAAA;CAA8B,GACjE,CAAC,C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AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAalD"}
|
|
@@ -18,6 +18,7 @@ exports.toCdnUrlsDeep = toCdnUrlsDeep;
|
|
|
18
18
|
exports.toCdnUrlsInText = toCdnUrlsInText;
|
|
19
19
|
exports.fetchOwnMedia = fetchOwnMedia;
|
|
20
20
|
exports.publicCdnUrl = publicCdnUrl;
|
|
21
|
+
exports.isOwnMediaUrl = isOwnMediaUrl;
|
|
21
22
|
const FIREBASE_STORAGE_HOST = "https://firebasestorage.googleapis.com";
|
|
22
23
|
const GCS_HOST = "https://storage.googleapis.com";
|
|
23
24
|
const BUCKET = "vidspot-firebase.firebasestorage.app";
|
|
@@ -132,3 +133,28 @@ function publicCdnUrl(objectPath) {
|
|
|
132
133
|
const encoded = objectPath.split("/").map(encodeURIComponent).join("/");
|
|
133
134
|
return `${cdnBase()}/gcs-pub/${BUCKET}/${encoded}`;
|
|
134
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* True when `url` points at OUR media (CDN host, or a Firebase/GCS URL for one
|
|
138
|
+
* of our `vidspot*` buckets). Gate for endpoints that make a server fetch a
|
|
139
|
+
* caller-supplied URL (format conversion etc.) — keeps them from being used as
|
|
140
|
+
* an open proxy / SSRF primitive.
|
|
141
|
+
*/
|
|
142
|
+
function isOwnMediaUrl(url) {
|
|
143
|
+
let parsed;
|
|
144
|
+
try {
|
|
145
|
+
parsed = new URL(url);
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return false;
|
|
149
|
+
}
|
|
150
|
+
if (parsed.protocol !== "https:")
|
|
151
|
+
return false;
|
|
152
|
+
const origin = parsed.origin;
|
|
153
|
+
if (origin === new URL(cdnBase()).origin)
|
|
154
|
+
return true;
|
|
155
|
+
if (origin === FIREBASE_STORAGE_HOST)
|
|
156
|
+
return /^\/v0\/b\/vidspot[\w.-]*\//.test(parsed.pathname);
|
|
157
|
+
if (origin === GCS_HOST)
|
|
158
|
+
return /^\/vidspot[\w.-]*\//.test(parsed.pathname);
|
|
159
|
+
return false;
|
|
160
|
+
}
|
package/lib/models/index.d.ts
CHANGED
|
@@ -22,4 +22,6 @@ export * from "./assetPool.model";
|
|
|
22
22
|
export * from "./posterProject.model";
|
|
23
23
|
export * from "./upscale.model";
|
|
24
24
|
export * from "./klingElement.model";
|
|
25
|
+
export * from "./videoTool.model";
|
|
26
|
+
export * from "./posterExport.model";
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
package/lib/models/index.js
CHANGED
|
@@ -38,3 +38,5 @@ __exportStar(require("./assetPool.model"), exports);
|
|
|
38
38
|
__exportStar(require("./posterProject.model"), exports);
|
|
39
39
|
__exportStar(require("./upscale.model"), exports);
|
|
40
40
|
__exportStar(require("./klingElement.model"), exports);
|
|
41
|
+
__exportStar(require("./videoTool.model"), exports);
|
|
42
|
+
__exportStar(require("./posterExport.model"), exports);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { FieldValue } from "firebase-admin/firestore";
|
|
2
|
+
import type { IBrandKitModel } from "./agent.model";
|
|
2
3
|
/**
|
|
3
4
|
* Enterprise: Organizations & Team Members.
|
|
4
5
|
*
|
|
@@ -69,4 +70,26 @@ export interface IOrganizationCreditLedgerEntry {
|
|
|
69
70
|
balanceAfter: number;
|
|
70
71
|
createdAt: FieldValue;
|
|
71
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Brand-kit fields a team shares. Presenter face + trained avatar replicas
|
|
75
|
+
* are a person's likeness, so they always stay on the member's personal kit
|
|
76
|
+
* (`/brandKits/{uid}`) and never move into the org kit.
|
|
77
|
+
*/
|
|
78
|
+
export declare const ORG_BRAND_KIT_FIELDS: readonly ["brandName", "logoUrl", "primaryColorHex", "secondaryColorHex", "fontFamily", "voiceId", "musicMoods", "bannedClaims", "preferredClaims"];
|
|
79
|
+
export type TOrgBrandKitField = (typeof ORG_BRAND_KIT_FIELDS)[number];
|
|
80
|
+
/**
|
|
81
|
+
* Shared team brand kit — one doc per org at /organizationBrandKits/{orgId}.
|
|
82
|
+
* Owners/admins edit it through /v1/organizations/:orgId/brand-kit; every
|
|
83
|
+
* member reads it (Firestore rules allow member reads so the Brand Kit page
|
|
84
|
+
* can live-update via onSnapshot). While an org is a member's ACTIVE org,
|
|
85
|
+
* these fields override the same fields on their personal kit everywhere a
|
|
86
|
+
* brand kit is applied (agent planning, poster agent, poster studio).
|
|
87
|
+
*/
|
|
88
|
+
export type IOrganizationBrandKitModel = Partial<Pick<IBrandKitModel, TOrgBrandKitField>> & {
|
|
89
|
+
orgId: string;
|
|
90
|
+
updatedByUid: string;
|
|
91
|
+
updatedByEmail?: string;
|
|
92
|
+
createdAt: string;
|
|
93
|
+
updatedAt: string;
|
|
94
|
+
};
|
|
72
95
|
//# sourceMappingURL=organization.model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.model.d.ts","sourceRoot":"","sources":["../../src/models/organization.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"organization.model.d.ts","sourceRoot":"","sources":["../../src/models/organization.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;I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;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;IAC9D,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,UAAU,CAAC;CACvB;AAED;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,qJAUvB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,MAAM,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,iBAAiB,CAAC,CAAC,GAAG;IAC1F,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ORG_BRAND_KIT_FIELDS = void 0;
|
|
3
4
|
exports.organizationMemberDocId = organizationMemberDocId;
|
|
4
5
|
function organizationMemberDocId(orgId, uid) {
|
|
5
6
|
return `${orgId}__${uid}`;
|
|
6
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Brand-kit fields a team shares. Presenter face + trained avatar replicas
|
|
10
|
+
* are a person's likeness, so they always stay on the member's personal kit
|
|
11
|
+
* (`/brandKits/{uid}`) and never move into the org kit.
|
|
12
|
+
*/
|
|
13
|
+
exports.ORG_BRAND_KIT_FIELDS = [
|
|
14
|
+
"brandName",
|
|
15
|
+
"logoUrl",
|
|
16
|
+
"primaryColorHex",
|
|
17
|
+
"secondaryColorHex",
|
|
18
|
+
"fontFamily",
|
|
19
|
+
"voiceId",
|
|
20
|
+
"musicMoods",
|
|
21
|
+
"bannedClaims",
|
|
22
|
+
"preferredClaims",
|
|
23
|
+
];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FieldValue } from "firebase-admin/firestore";
|
|
2
|
+
import { EImageJobStatus } from "../globals/types";
|
|
3
|
+
import { PosterExportFormat } from "../globals/posterExport";
|
|
4
|
+
/**
|
|
5
|
+
* Status record for a Poster Studio export (POST /v1/poster/export). The
|
|
6
|
+
* Project JSON itself only travels in the RENDER_JOBS payload — it isn't
|
|
7
|
+
* persisted here (a busy design can approach Firestore's 1 MiB doc cap).
|
|
8
|
+
* Status values reuse EImageJobStatus so clients share one normaliser.
|
|
9
|
+
*/
|
|
10
|
+
export interface IPosterExportJobModel {
|
|
11
|
+
userId: string;
|
|
12
|
+
format: PosterExportFormat;
|
|
13
|
+
status: EImageJobStatus;
|
|
14
|
+
/** The saved posterProjects doc this export came from, when there is one. */
|
|
15
|
+
posterProjectId?: string;
|
|
16
|
+
/** Canvas size requested (the output may be scaled for GIF/MP4). */
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
outputUrl?: string;
|
|
20
|
+
outputWidth?: number;
|
|
21
|
+
outputHeight?: number;
|
|
22
|
+
/** Seconds rendered, for animated formats. */
|
|
23
|
+
outputDurationSec?: number;
|
|
24
|
+
renderMs?: number;
|
|
25
|
+
errorMessage?: string;
|
|
26
|
+
createdAt: FieldValue;
|
|
27
|
+
updatedAt: FieldValue;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=posterExport.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"posterExport.model.d.ts","sourceRoot":"","sources":["../../src/models/posterExport.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EAAE,eAAe,CAAC;IACxB,6EAA6E;IAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IAGf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8CAA8C;IAC9C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB,SAAS,EAAE,UAAU,CAAC;IACtB,SAAS,EAAE,UAAU,CAAC;CACvB"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { FieldValue } from "firebase-admin/firestore";
|
|
2
|
+
import { EImageJobStatus } from "../globals/types";
|
|
3
|
+
import { VideoBgRemovalQuality } from "../globals/videoTools";
|
|
4
|
+
/** Backdrop composited behind the matted subject. Absent = keep transparency. */
|
|
5
|
+
export type VideoToolBackground = {
|
|
6
|
+
kind: "color";
|
|
7
|
+
color: string;
|
|
8
|
+
} | {
|
|
9
|
+
kind: "image";
|
|
10
|
+
imageUrl: string;
|
|
11
|
+
} | {
|
|
12
|
+
kind: "blur";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Container for the result. Transparent outputs are "webm" (VP9 + alpha —
|
|
16
|
+
* plays in Chrome/Firefox/Edge, imports into most editors) or "mov" (ProRes
|
|
17
|
+
* 4444 + alpha — Final Cut / Premiere / DaVinci). Any output with a
|
|
18
|
+
* `background` is flattened, so it is always an H.264 "mp4".
|
|
19
|
+
*/
|
|
20
|
+
export type VideoToolOutputFormat = "webm" | "mov" | "mp4";
|
|
21
|
+
/**
|
|
22
|
+
* Persistent record for an async video tool job (background removal on a
|
|
23
|
+
* clip). Created by the Cloud Function controller, finalized by the
|
|
24
|
+
* VIDEO_TOOL_JOBS worker. Status values reuse EImageJobStatus so the client
|
|
25
|
+
* normaliser is shared with image jobs.
|
|
26
|
+
*/
|
|
27
|
+
export interface IVideoToolJobModel {
|
|
28
|
+
userId: string;
|
|
29
|
+
tool: "remove-background";
|
|
30
|
+
status: EImageJobStatus;
|
|
31
|
+
inputVideoUrl: string;
|
|
32
|
+
quality: VideoBgRemovalQuality;
|
|
33
|
+
outputFormat: VideoToolOutputFormat;
|
|
34
|
+
background?: VideoToolBackground;
|
|
35
|
+
/** Client-reported duration the upfront estimate was billed on. */
|
|
36
|
+
declaredDurationSec: number;
|
|
37
|
+
sourceMeta?: {
|
|
38
|
+
width: number;
|
|
39
|
+
height: number;
|
|
40
|
+
durationSec: number;
|
|
41
|
+
hasAudio: boolean;
|
|
42
|
+
};
|
|
43
|
+
providerRequestId?: string;
|
|
44
|
+
/** "matting" → fal is working; "compositing" → our ffmpeg pass. */
|
|
45
|
+
stage?: "probing" | "matting" | "compositing" | "uploading";
|
|
46
|
+
outputVideoUrl?: string;
|
|
47
|
+
outputWidth?: number;
|
|
48
|
+
outputHeight?: number;
|
|
49
|
+
outputDurationSec?: number;
|
|
50
|
+
estimatedCredits?: number;
|
|
51
|
+
totalCreditsUsed?: number;
|
|
52
|
+
errorMessage?: string;
|
|
53
|
+
lastHeartbeatAt?: FieldValue;
|
|
54
|
+
creditReconciliationStatus?: "completed" | "pending";
|
|
55
|
+
creditReconciliationError?: string;
|
|
56
|
+
createdAt: FieldValue;
|
|
57
|
+
updatedAt: FieldValue;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=videoTool.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"videoTool.model.d.ts","sourceRoot":"","sources":["../../src/models/videoTool.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA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AAG,MAAM,CAAC;KAC9B,GACL,OAAO,CAAC,SAAS,CAAC;IA8RrB;;;;;;;;;;;OAWG;IACH,UAAU,CACR,KAAK,EAAE,UAAU,EACjB,IAAI,GAAE;QACJ,OAAO,CAAC,EAAE,YAAY,CAAC;QACvB,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;QACjC,WAAW,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;QACvC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;KAC5B,GACL;QAAE,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;QAAC,MAAM,EAAE,OAAO,CAAC,SAAS,CAAC,CAAA;KAAE;IAuEhE;;;;;;;;;;;;;;;;OAgBG;IACG,0BAA0B,CAC9B,KAAK,EAAE,YAAY,EACnB,KAAK,EAAE,UAAU,EACjB,IAAI,GAAE;QACJ,OAAO,CAAC,EAAE,YAAY,CAAC;QACvB,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;QACjC,KAAK,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;QAChC,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,0EAA0E;QAC1E,WAAW,CAAC,EAAE,MAAM,CAAC;KACjB,GACL,OAAO,CAAC,WAAW,EAAE,CAAC;CAQ1B"}
|
|
@@ -249,6 +249,12 @@ class Planner {
|
|
|
249
249
|
// TTS language and the caption ASR hint, so it must survive even when
|
|
250
250
|
// the LLM omits it (it's marked ORCHESTRATOR-ONLY in the schema).
|
|
251
251
|
reparsed.data.outputLanguage = brief.outputLanguage;
|
|
252
|
+
// The aspect the user picked is a hard constraint, not a hint: the
|
|
253
|
+
// executor renders every scene and the final cut at plan.aspect, so an
|
|
254
|
+
// LLM that drifts to its landscape habit would ship a 16:9 video for a
|
|
255
|
+
// 9:16 request. Overlay deterministically, same as outputLanguage.
|
|
256
|
+
if (brief.aspect)
|
|
257
|
+
reparsed.data.aspect = brief.aspect;
|
|
252
258
|
// Soft-validation pass: vo-clip (if we downgraded after maxRetries)
|
|
253
259
|
// + trailing-silence. These ship with the plan; the UI surfaces them.
|
|
254
260
|
reparsed.data.warnings = (0, validators_1.collectPlanWarnings)(reparsed.data);
|
|
@@ -336,6 +342,9 @@ class Planner {
|
|
|
336
342
|
if (reparsed.success) {
|
|
337
343
|
// Stream path skipped the validators loop; still attach soft warnings.
|
|
338
344
|
reparsed.data.warnings = (0, validators_1.collectPlanWarnings)(reparsed.data);
|
|
345
|
+
// Requested aspect is a hard constraint — see plan().
|
|
346
|
+
if (brief.aspect)
|
|
347
|
+
reparsed.data.aspect = brief.aspect;
|
|
339
348
|
return reparsed.data;
|
|
340
349
|
}
|
|
341
350
|
// Validation tripped on a streamed payload — fall back to retry pass.
|
|
@@ -136,7 +136,7 @@ function buildStructuralRulesSection(brief) {
|
|
|
136
136
|
// The catalog above lists each model's "dur:..." constraint — match scene
|
|
137
137
|
// durations to it. Pacing target can still be honoured by varying scene COUNT
|
|
138
138
|
// (e.g. a 10s UGC at fast pacing = 2 scenes × 5s on pixverse, NOT 6 × 1.7s).
|
|
139
|
-
lines.push(" - Provider duration floor: every scene with strategy=ai-image-to-video or ai-text-to-video MUST have durationMs/1000 in its preferredModel's allowed durations (shown as `dur:` in the catalog). Hard universal floor is 2s — no provider accepts sub-2s clips. If a desired scene is shorter than the floor, MERGE it with the next scene instead of generating a too-short clip. For sub-5s scenes, pick from: bytedance-seedance-1.0-pro / -pro-fast (2-12s), runway-gen4.5 / runway-gen4-turbo (2-10s), kling-v3.0 (3-15s), google-
|
|
139
|
+
lines.push(" - Provider duration floor: every scene with strategy=ai-image-to-video or ai-text-to-video MUST have durationMs/1000 in its preferredModel's allowed durations (shown as `dur:` in the catalog). Hard universal floor is 2s — no provider accepts sub-2s clips. If a desired scene is shorter than the floor, MERGE it with the next scene instead of generating a too-short clip. For sub-5s scenes, pick from: bytedance-seedance-1.0-pro / -pro-fast (2-12s), runway-gen4.5 / runway-gen4-turbo (2-10s), kling-v3.0 (3-15s), google-gemini-omni-flash (3-10s). Picking minimax-hailuo for a <6s scene is a HARD ERROR.");
|
|
140
140
|
// AG-28: voiceover-vs-scene duration budget. Without this, the planner
|
|
141
141
|
// picks scene.durationMs based on visual pacing and the TTS that comes
|
|
142
142
|
// out is consistently 1-2s longer per scene → voice clipped mid-sentence.
|
|
@@ -190,7 +190,7 @@ function buildStructuralRulesSection(brief) {
|
|
|
190
190
|
// Only meaningful on ai-image-to-video scenes whose preferredModel is
|
|
191
191
|
// FLF-capable; the executor silently ignores it otherwise, so the rule is
|
|
192
192
|
// additive and safe to skip when no scene needs directed two-anchor motion.
|
|
193
|
-
lines.push(" - First-last-frame (FLF) interpolation: for a scene with strategy=ai-image-to-video where the motion goes between TWO distinct, specific compositions (wide establishing shot → product close-up; closed door → open door; ingredient on counter → finished plated dish; logo small → logo filling frame), set scene.lastFramePrompt to a COMPLETE image prompt describing the END frame. scene.prompt is the START frame; the model interpolates between them for reliable directed motion instead of guessing from a single image + motion words. Rules: (1) lastFramePrompt is a full visual description of the final composition, NOT a motion verb (GOOD: \"extreme close-up of the bottle label, soft studio light\"; BAD: \"zoom into the label\"). (2) Keep subject/lighting/style consistent with scene.prompt so the interpolation reads as one continuous shot — re-state shared identity descriptors verbatim. (3) ONLY set it when preferredModel is FLF-capable: google-
|
|
193
|
+
lines.push(" - First-last-frame (FLF) interpolation: for a scene with strategy=ai-image-to-video where the motion goes between TWO distinct, specific compositions (wide establishing shot → product close-up; closed door → open door; ingredient on counter → finished plated dish; logo small → logo filling frame), set scene.lastFramePrompt to a COMPLETE image prompt describing the END frame. scene.prompt is the START frame; the model interpolates between them for reliable directed motion instead of guessing from a single image + motion words. Rules: (1) lastFramePrompt is a full visual description of the final composition, NOT a motion verb (GOOD: \"extreme close-up of the bottle label, soft studio light\"; BAD: \"zoom into the label\"). (2) Keep subject/lighting/style consistent with scene.prompt so the interpolation reads as one continuous shot — re-state shared identity descriptors verbatim. (3) ONLY set it when preferredModel is FLF-capable: google-gemini-omni-flash, kling-v2.6 / -v2.5-turbo / -v3.0, alibaba-wan (NOT Runway — its models take a first frame only). On any other model it is ignored. (4) Use sparingly — only when a scene genuinely has two anchor compositions; ordinary single-image motion needs no lastFramePrompt. It costs one extra (cheap) image generation per FLF scene.");
|
|
194
194
|
// Camera move as a structured field. The executor sends it to the video
|
|
195
195
|
// model as cameraControl; applyCameraDirection writes it in the syntax that
|
|
196
196
|
// model documents (MiniMax [Pan left] commands, a camera sentence, etc.).
|
|
@@ -214,7 +214,7 @@ function checkSceneDurationCapability(plan) {
|
|
|
214
214
|
return (`AG-15 duration-capability mismatch: ${details}. ` +
|
|
215
215
|
`Fix BY EITHER: (a) merging too-short scenes into a single ≥${offending[0].allowed[0]}s clip so the cut count drops but the total duration stays the same, OR ` +
|
|
216
216
|
`(b) re-picking preferredModel from a provider whose dur: range INCLUDES the scene's duration. ` +
|
|
217
|
-
`Short-duration capable models: bytedance-seedance-1.0-pro-fast (2-12s), bytedance-seedance-1.0-pro (2-12s), runway-gen4.5 (2-10s), kling-v3.0 (3-15s), google-
|
|
217
|
+
`Short-duration capable models: bytedance-seedance-1.0-pro-fast (2-12s), bytedance-seedance-1.0-pro (2-12s), runway-gen4.5 (2-10s), kling-v3.0 (3-15s), google-gemini-omni-flash (3-10s). ` +
|
|
218
218
|
`Do NOT pick minimax-hailuo for any scene shorter than 6s.`);
|
|
219
219
|
}
|
|
220
220
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/providerFallback/chains.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,eAAe,EACf,aAAa,
|
|
1
|
+
{"version":3,"file":"chains.d.ts","sourceRoot":"","sources":["../../../../src/services/agent/providerFallback/chains.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,eAAe,EACf,aAAa,EAGb,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAGn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