feat: centralize runtime directories behind GHBOT_RUNTIME_DIR (D-13)

This commit is contained in:
wdawdwa committed 2026-08-23 11:26:48 +08:00
1 parent 941e1d2681
commit d9666c94a7
7 files changed
+64 -6

No files matched your search

+2 -1
View File
@@ -7,6 +7,7 @@ import process from "node:process";
import { config } from "../config.js";
import { logger } from "../logger.js";
import { startOneRunApiProxy } from "./apiProxy.js";
import { tempRootDirectory } from "../runtimePaths.js";
const GOOSE_RUN_TIMEOUT_MS = 10 * 60 * 1000;
const GOOSE_DOCKER_IMAGE = "node:24-bookworm";
@@ -56,7 +57,7 @@ export async function runGoosePrompt(
throw new Error("GOOSE_API_KEY is required when running a goose prompt.");
}
const tempRoot = path.join(process.cwd(), ".ghbot-tmp");
const tempRoot = tempRootDirectory();
await fs.mkdir(tempRoot, { recursive: true });
const tempDir = await fs.mkdtemp(path.join(tempRoot, "goose-"));
const workingDirectory = options.workingDirectory