storyforge 0.14.1 → 0.16.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() {
|
|
@@ -5647,7 +5647,12 @@ var renderGeminiRemotion = async (shot, ctx) => {
|
|
|
5647
5647
|
fps: ctx.fps,
|
|
5648
5648
|
intent: shot.intent ?? "",
|
|
5649
5649
|
...shot.citationUrl ? { citationUrl: shot.citationUrl } : {},
|
|
5650
|
-
...shot.quotedPhrase ? { quotedPhrase: shot.quotedPhrase } : {}
|
|
5650
|
+
...shot.quotedPhrase ? { quotedPhrase: shot.quotedPhrase } : {},
|
|
5651
|
+
...shot.textPosition ? { textPosition: shot.textPosition } : {},
|
|
5652
|
+
...shot.textAnimation ? { textAnimation: shot.textAnimation } : {},
|
|
5653
|
+
...shot.textAccent ? { textAccent: shot.textAccent } : {},
|
|
5654
|
+
...shot.textAccentColor ? { textAccentColor: shot.textAccentColor } : {},
|
|
5655
|
+
...shot.textColor ? { textColor: shot.textColor } : {}
|
|
5651
5656
|
},
|
|
5652
5657
|
null,
|
|
5653
5658
|
2
|
|
@@ -7732,6 +7737,7 @@ function abortedSkeleton(spec) {
|
|
|
7732
7737
|
}
|
|
7733
7738
|
|
|
7734
7739
|
// src/bridge-poller.ts
|
|
7740
|
+
import * as path16 from "path";
|
|
7735
7741
|
var HEARTBEAT_INTERVAL_MS = 6e4;
|
|
7736
7742
|
var POLL_INTERVAL_MS = 8e3;
|
|
7737
7743
|
var CANCEL_POLL_INTERVAL_MS = 5e3;
|
|
@@ -7795,8 +7801,8 @@ var BridgePoller = class {
|
|
|
7795
7801
|
if (!/^[a-z][a-z0-9-]*$/i.test(name)) return { available: false, path: null };
|
|
7796
7802
|
const r = spawnSync("which", [name], { encoding: "utf-8", timeout: 2e3 });
|
|
7797
7803
|
if (r.status !== 0) return { available: false, path: null };
|
|
7798
|
-
const
|
|
7799
|
-
return { available: !!
|
|
7804
|
+
const path17 = (r.stdout ?? "").trim();
|
|
7805
|
+
return { available: !!path17, path: path17 || null };
|
|
7800
7806
|
}
|
|
7801
7807
|
async heartbeat() {
|
|
7802
7808
|
if (this.stopped) return;
|
|
@@ -8011,6 +8017,26 @@ var BridgePoller = class {
|
|
|
8011
8017
|
void this.postRenderProgress(jobId, payload.projectId, event);
|
|
8012
8018
|
};
|
|
8013
8019
|
try {
|
|
8020
|
+
const os2 = await import("os");
|
|
8021
|
+
const audioStageDir = path16.join(os2.tmpdir(), "forge-audio");
|
|
8022
|
+
await fs18.promises.mkdir(audioStageDir, { recursive: true });
|
|
8023
|
+
await Promise.all(
|
|
8024
|
+
payload.specs.map(async (spec) => {
|
|
8025
|
+
if (spec.audioPath) return;
|
|
8026
|
+
const url = spec.audioStorjUrl;
|
|
8027
|
+
if (!url) return;
|
|
8028
|
+
const localPath = path16.join(audioStageDir, `${spec.chunkId}.mp3`);
|
|
8029
|
+
try {
|
|
8030
|
+
const resp = await fetch(url);
|
|
8031
|
+
if (!resp.ok) throw new Error(`HTTP ${resp.status}`);
|
|
8032
|
+
const buf = Buffer.from(await resp.arrayBuffer());
|
|
8033
|
+
await fs18.promises.writeFile(localPath, buf);
|
|
8034
|
+
spec.audioPath = localPath;
|
|
8035
|
+
} catch (err) {
|
|
8036
|
+
log.info(`[bridge] audio download failed for chunk ${spec.chunkId}: ${err.message} \u2014 rendering silent clip`);
|
|
8037
|
+
}
|
|
8038
|
+
})
|
|
8039
|
+
);
|
|
8014
8040
|
const result = await renderChunksParallel(payload.specs, {
|
|
8015
8041
|
concurrency: payload.options?.concurrency,
|
|
8016
8042
|
failFast: payload.options?.failFast,
|
|
@@ -8241,9 +8267,9 @@ var BridgePoller = class {
|
|
|
8241
8267
|
error: `stitch-final job requires @forge/pipeline/stitch (not installed): ${err.message}`
|
|
8242
8268
|
};
|
|
8243
8269
|
}
|
|
8244
|
-
const
|
|
8245
|
-
const projectRoot =
|
|
8246
|
-
const clipsDir =
|
|
8270
|
+
const path17 = await import("path");
|
|
8271
|
+
const projectRoot = path17.resolve(process.cwd(), "forge-renders", payload.projectSlug);
|
|
8272
|
+
const clipsDir = path17.join(projectRoot, "clips");
|
|
8247
8273
|
const publish = async (phase, eventPayload) => {
|
|
8248
8274
|
try {
|
|
8249
8275
|
await fetch(`${this.baseUrl}/api/cli-bridge/stitch-event`, {
|
|
@@ -8269,7 +8295,7 @@ var BridgePoller = class {
|
|
|
8269
8295
|
projectSlug: payload.projectSlug,
|
|
8270
8296
|
clipsDir,
|
|
8271
8297
|
chunkOrder: payload.chunkOrder ?? [],
|
|
8272
|
-
masterAudioPath:
|
|
8298
|
+
masterAudioPath: path17.isAbsolute(masterAudioRel) ? masterAudioRel : path17.join(projectRoot, masterAudioRel),
|
|
8273
8299
|
outputDir: projectRoot,
|
|
8274
8300
|
aspect: payload.aspect,
|
|
8275
8301
|
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-NDX5EL7P.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.16.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.16.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": {
|