fix: align runtime startup and model events

This commit is contained in:
Wenxin Duan
2026-09-08 10:47:42 +08:00
parent 89ce7973c3
commit da7558ab49
8 changed files with 79 additions and 18 deletions
+3 -3
View File
@@ -1,6 +1,6 @@
import { mkdir } from "node:fs/promises";
import { join, resolve } from "node:path";
import { pathToFileURL } from "node:url";
import { dirname, join, resolve } from "node:path";
import { fileURLToPath, pathToFileURL } from "node:url";
import {
FileAttachmentStore,
HarnessSession,
@@ -22,7 +22,7 @@ import { loadServerConfig } from "./config.js";
export async function buildDefaultApp(environment: NodeJS.ProcessEnv = process.env) {
const config = loadServerConfig(environment);
const projectRoot = process.cwd();
const projectRoot = resolve(dirname(fileURLToPath(import.meta.url)), "../../..");
const sessionsRoot = resolve(projectRoot, config.sessionsRoot);
const agentDir = resolve(projectRoot, config.agentDir);
await mkdir(sessionsRoot, { recursive: true, mode: 0o700 });