storyforge 0.4.8 → 0.4.10
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.
|
@@ -8,7 +8,7 @@ import { spawn, spawnSync } from "child_process";
|
|
|
8
8
|
import * as crypto from "crypto";
|
|
9
9
|
var HEARTBEAT_INTERVAL_MS = 3e4;
|
|
10
10
|
var POLL_INTERVAL_MS = 3e3;
|
|
11
|
-
var CLI_TIMEOUT_MS =
|
|
11
|
+
var CLI_TIMEOUT_MS = Number(process.env.SCRIPT_GEN_TIMEOUT_MS) || 20 * 60 * 1e3;
|
|
12
12
|
var BridgePoller = class {
|
|
13
13
|
baseUrl;
|
|
14
14
|
token;
|
package/dist/index.js
CHANGED
|
@@ -681,6 +681,7 @@ async function findOrCreateProject(dir) {
|
|
|
681
681
|
}
|
|
682
682
|
const meta = {
|
|
683
683
|
projectId: project.id,
|
|
684
|
+
projectSlug: project.slug,
|
|
684
685
|
channelId: channel.id,
|
|
685
686
|
title: project.title,
|
|
686
687
|
channelName: channel.name,
|
|
@@ -1026,8 +1027,9 @@ async function devCommand(options) {
|
|
|
1026
1027
|
try {
|
|
1027
1028
|
log.info(`[script-gen] Generating via ${cli} CLI \xB7 model=${model}`);
|
|
1028
1029
|
const args = cli === "codex" ? ["exec", "-", "--model", model] : ["-p", "--model", model, "--no-session-persistence"];
|
|
1030
|
+
const timeoutMs = Number(process.env.SCRIPT_GEN_TIMEOUT_MS) || 12e5;
|
|
1029
1031
|
const { stdout, code, stderr } = await runCliPipingStdin(cli, args, prompt2, {
|
|
1030
|
-
timeoutMs
|
|
1032
|
+
timeoutMs,
|
|
1031
1033
|
maxBufferMB: 16
|
|
1032
1034
|
});
|
|
1033
1035
|
if (code !== 0) {
|
|
@@ -1468,7 +1470,8 @@ Return ONLY the complete updated TSX. No markdown fences, no explanation.`;
|
|
|
1468
1470
|
res.end(JSON.stringify({ error: "Not found" }));
|
|
1469
1471
|
});
|
|
1470
1472
|
server.listen(port, () => {
|
|
1471
|
-
const
|
|
1473
|
+
const webFragment = meta.projectSlug ?? meta.projectId;
|
|
1474
|
+
const webUrl = `${WEB_URL}/forge/p/${webFragment}/pipeline`;
|
|
1472
1475
|
console.log("");
|
|
1473
1476
|
log.success("Running");
|
|
1474
1477
|
console.log("");
|
|
@@ -1535,7 +1538,7 @@ Return ONLY the complete updated TSX. No markdown fences, no explanation.`;
|
|
|
1535
1538
|
return "0.0.0";
|
|
1536
1539
|
})();
|
|
1537
1540
|
void (async () => {
|
|
1538
|
-
const { BridgePoller } = await import("./bridge-poller-
|
|
1541
|
+
const { BridgePoller } = await import("./bridge-poller-IRROEZID.js");
|
|
1539
1542
|
const poller = new BridgePoller({ baseUrl: bridgeUrl, token: bridgeToken, clientVersion: `storyforge ${pkgVersion}` });
|
|
1540
1543
|
poller.start();
|
|
1541
1544
|
})();
|