storyforge 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -620,8 +620,8 @@ function getErrorMap() {
|
|
|
620
620
|
|
|
621
621
|
// ../../node_modules/zod/v3/helpers/parseUtil.js
|
|
622
622
|
var makeIssue = (params) => {
|
|
623
|
-
const { data, path:
|
|
624
|
-
const fullPath = [...
|
|
623
|
+
const { data, path: path17, errorMaps, issueData } = params;
|
|
624
|
+
const fullPath = [...path17, ...issueData.path || []];
|
|
625
625
|
const fullIssue = {
|
|
626
626
|
...issueData,
|
|
627
627
|
path: fullPath
|
|
@@ -737,11 +737,11 @@ var errorUtil;
|
|
|
737
737
|
|
|
738
738
|
// ../../node_modules/zod/v3/types.js
|
|
739
739
|
var ParseInputLazyPath = class {
|
|
740
|
-
constructor(parent, value,
|
|
740
|
+
constructor(parent, value, path17, key) {
|
|
741
741
|
this._cachedPath = [];
|
|
742
742
|
this.parent = parent;
|
|
743
743
|
this.data = value;
|
|
744
|
-
this._path =
|
|
744
|
+
this._path = path17;
|
|
745
745
|
this._key = key;
|
|
746
746
|
}
|
|
747
747
|
get path() {
|
|
@@ -5511,10 +5511,22 @@ var renderGeminiManimRemotion = async (shot, ctx) => {
|
|
|
5511
5511
|
if (ctx.signal?.aborted) throw new Error("aborted");
|
|
5512
5512
|
ctx.progress.emit({ phase: "compositing", shotId: shot.id });
|
|
5513
5513
|
const remotion = requireRemotionRoot();
|
|
5514
|
-
const
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5514
|
+
const imagePublicRel = path3.posix.join(
|
|
5515
|
+
"clip-render-cache",
|
|
5516
|
+
ctx.chunkId,
|
|
5517
|
+
`${shot.id}${path3.extname(localImage) || ".png"}`
|
|
5518
|
+
);
|
|
5519
|
+
const imagePublicAbs = path3.join(remotion.cwd, "public", imagePublicRel);
|
|
5520
|
+
fs3.mkdirSync(path3.dirname(imagePublicAbs), { recursive: true });
|
|
5521
|
+
fs3.copyFileSync(localImage, imagePublicAbs);
|
|
5522
|
+
const manimPublicRel = path3.posix.join(
|
|
5523
|
+
"clip-render-cache",
|
|
5524
|
+
ctx.chunkId,
|
|
5525
|
+
`${shot.id}-manim.mp4`
|
|
5526
|
+
);
|
|
5527
|
+
const manimPublicAbs = path3.join(remotion.cwd, "public", manimPublicRel);
|
|
5528
|
+
fs3.mkdirSync(path3.dirname(manimPublicAbs), { recursive: true });
|
|
5529
|
+
fs3.copyFileSync(manimSceneOut, manimPublicAbs);
|
|
5518
5530
|
const overlayText = (shot.overlayText ?? "").trim();
|
|
5519
5531
|
const dims = ctx.aspect === "9:16" ? { width: 1080, height: 1920 } : { width: 1920, height: 1080 };
|
|
5520
5532
|
const overlays = overlayText ? [
|
|
@@ -5536,14 +5548,16 @@ var renderGeminiManimRemotion = async (shot, ctx) => {
|
|
|
5536
5548
|
propsPath,
|
|
5537
5549
|
JSON.stringify(
|
|
5538
5550
|
{
|
|
5539
|
-
|
|
5540
|
-
|
|
5551
|
+
imagePath: imagePublicRel,
|
|
5552
|
+
manimSrc: manimPublicRel,
|
|
5553
|
+
overlayText: shot.overlayText ?? "",
|
|
5554
|
+
intent: shot.intent ?? ""
|
|
5541
5555
|
},
|
|
5542
5556
|
null,
|
|
5543
5557
|
2
|
|
5544
5558
|
)
|
|
5545
5559
|
);
|
|
5546
|
-
const compId = ctx.aspect === "9:16" ? "
|
|
5560
|
+
const compId = ctx.aspect === "9:16" ? "GeminiManimOverlayVertical" : "GeminiManimOverlay";
|
|
5547
5561
|
const r = await runCmd(
|
|
5548
5562
|
"npx",
|
|
5549
5563
|
[
|
|
@@ -5633,7 +5647,8 @@ var renderGeminiRemotion = async (shot, ctx) => {
|
|
|
5633
5647
|
fps: ctx.fps,
|
|
5634
5648
|
intent: shot.intent ?? "",
|
|
5635
5649
|
...shot.citationUrl ? { citationUrl: shot.citationUrl } : {},
|
|
5636
|
-
...shot.quotedPhrase ? { quotedPhrase: shot.quotedPhrase } : {}
|
|
5650
|
+
...shot.quotedPhrase ? { quotedPhrase: shot.quotedPhrase } : {},
|
|
5651
|
+
...shot.textPosition ? { textPosition: shot.textPosition } : {}
|
|
5637
5652
|
},
|
|
5638
5653
|
null,
|
|
5639
5654
|
2
|
|
@@ -7718,6 +7733,7 @@ function abortedSkeleton(spec) {
|
|
|
7718
7733
|
}
|
|
7719
7734
|
|
|
7720
7735
|
// src/bridge-poller.ts
|
|
7736
|
+
import * as path16 from "path";
|
|
7721
7737
|
var HEARTBEAT_INTERVAL_MS = 6e4;
|
|
7722
7738
|
var POLL_INTERVAL_MS = 8e3;
|
|
7723
7739
|
var CANCEL_POLL_INTERVAL_MS = 5e3;
|
|
@@ -7781,8 +7797,8 @@ var BridgePoller = class {
|
|
|
7781
7797
|
if (!/^[a-z][a-z0-9-]*$/i.test(name)) return { available: false, path: null };
|
|
7782
7798
|
const r = spawnSync("which", [name], { encoding: "utf-8", timeout: 2e3 });
|
|
7783
7799
|
if (r.status !== 0) return { available: false, path: null };
|
|
7784
|
-
const
|
|
7785
|
-
return { available: !!
|
|
7800
|
+
const path17 = (r.stdout ?? "").trim();
|
|
7801
|
+
return { available: !!path17, path: path17 || null };
|
|
7786
7802
|
}
|
|
7787
7803
|
async heartbeat() {
|
|
7788
7804
|
if (this.stopped) return;
|
|
@@ -7997,6 +8013,26 @@ var BridgePoller = class {
|
|
|
7997
8013
|
void this.postRenderProgress(jobId, payload.projectId, event);
|
|
7998
8014
|
};
|
|
7999
8015
|
try {
|
|
8016
|
+
const os2 = await import("os");
|
|
8017
|
+
const audioStageDir = path16.join(os2.tmpdir(), "forge-audio");
|
|
8018
|
+
await fs18.promises.mkdir(audioStageDir, { recursive: true });
|
|
8019
|
+
await Promise.all(
|
|
8020
|
+
payload.specs.map(async (spec) => {
|
|
8021
|
+
if (spec.audioPath) return;
|
|
8022
|
+
const url = spec.audioStorjUrl;
|
|
8023
|
+
if (!url) return;
|
|
8024
|
+
const localPath = path16.join(audioStageDir, `${spec.chunkId}.mp3`);
|
|
8025
|
+
try {
|
|
8026
|
+
const resp = await fetch(url);
|
|
8027
|
+
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
|
|
8028
|
+
const buf = Buffer.from(await resp.arrayBuffer());
|
|
8029
|
+
await fs18.promises.writeFile(localPath, buf);
|
|
8030
|
+
spec.audioPath = localPath;
|
|
8031
|
+
} catch (err) {
|
|
8032
|
+
log.info(`[bridge] audio download failed for chunk ${spec.chunkId}: ${err.message} \u2014 rendering silent clip`);
|
|
8033
|
+
}
|
|
8034
|
+
})
|
|
8035
|
+
);
|
|
8000
8036
|
const result = await renderChunksParallel(payload.specs, {
|
|
8001
8037
|
concurrency: payload.options?.concurrency,
|
|
8002
8038
|
failFast: payload.options?.failFast,
|
|
@@ -8227,9 +8263,9 @@ var BridgePoller = class {
|
|
|
8227
8263
|
error: `stitch-final job requires @forge/pipeline/stitch (not installed): ${err.message}`
|
|
8228
8264
|
};
|
|
8229
8265
|
}
|
|
8230
|
-
const
|
|
8231
|
-
const projectRoot =
|
|
8232
|
-
const clipsDir =
|
|
8266
|
+
const path17 = await import("path");
|
|
8267
|
+
const projectRoot = path17.resolve(process.cwd(), "forge-renders", payload.projectSlug);
|
|
8268
|
+
const clipsDir = path17.join(projectRoot, "clips");
|
|
8233
8269
|
const publish = async (phase, eventPayload) => {
|
|
8234
8270
|
try {
|
|
8235
8271
|
await fetch(`${this.baseUrl}/api/cli-bridge/stitch-event`, {
|
|
@@ -8255,7 +8291,7 @@ var BridgePoller = class {
|
|
|
8255
8291
|
projectSlug: payload.projectSlug,
|
|
8256
8292
|
clipsDir,
|
|
8257
8293
|
chunkOrder: payload.chunkOrder ?? [],
|
|
8258
|
-
masterAudioPath:
|
|
8294
|
+
masterAudioPath: path17.isAbsolute(masterAudioRel) ? masterAudioRel : path17.join(projectRoot, masterAudioRel),
|
|
8259
8295
|
outputDir: projectRoot,
|
|
8260
8296
|
aspect: payload.aspect,
|
|
8261
8297
|
skipTransitions: payload.skipTransitions,
|
package/dist/index.js
CHANGED
|
@@ -1689,7 +1689,7 @@ Return ONLY the complete updated TSX. No markdown fences, no explanation.`;
|
|
|
1689
1689
|
return "0.0.0";
|
|
1690
1690
|
})();
|
|
1691
1691
|
void (async () => {
|
|
1692
|
-
const { BridgePoller } = await import("./bridge-poller-
|
|
1692
|
+
const { BridgePoller } = await import("./bridge-poller-NOG4WB3K.js");
|
|
1693
1693
|
const poller = new BridgePoller({ baseUrl: bridgeUrl, token: bridgeToken2, clientVersion: `storyforge ${pkgVersion}` });
|
|
1694
1694
|
poller.start();
|
|
1695
1695
|
})();
|
|
@@ -2512,7 +2512,7 @@ function resolveBridgeToken2(explicit) {
|
|
|
2512
2512
|
// package.json
|
|
2513
2513
|
var package_default = {
|
|
2514
2514
|
name: "storyforge",
|
|
2515
|
-
version: "0.
|
|
2515
|
+
version: "0.15.0",
|
|
2516
2516
|
description: "StoryForge \u2014 local bridge for the Forge video production web app. Parallel clip-render orchestrator (Remotion 4 + Manim + HyperFrames + ffmpeg) + final video stitcher + dependency doctor.",
|
|
2517
2517
|
type: "module",
|
|
2518
2518
|
bin: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storyforge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"description": "StoryForge — local bridge for the Forge video production web app. Parallel clip-render orchestrator (Remotion 4 + Manim + HyperFrames + ffmpeg) + final video stitcher + dependency doctor.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|