fix: harden stream readiness and build output (#2317)

Integrated into release/v3.8.0 — fixes stream readiness detection for OpenAI Responses API lifecycle events, GLM timeout, Provider Limits UI, and build output cleanup.
This commit is contained in:
Raxxoor
2026-05-17 01:47:40 +01:00
committed by GitHub
parent 7e9efe7cb0
commit 5a7df8ac29
18 changed files with 655 additions and 79 deletions

View File

@@ -1,7 +1,8 @@
import { existsSync, mkdirSync, readdirSync, writeFileSync } from "node:fs";
import { join } from "node:path";
import { join, resolve } from "node:path";
import { homedir } from "node:os";
import { execSync } from "node:child_process";
import { pathToFileURL } from "node:url";
import { validateBinaryMagic, platformBinaryLabel } from "./magicBytes.mjs";
const RUNTIME_DIR = join(homedir(), ".omniroute", "runtime");
@@ -73,7 +74,9 @@ async function tryLoadBundled() {
}
async function tryLoadRuntimeInstalled() {
const pkgRoot = join(RUNTIME_DIR, "node_modules", "better-sqlite3");
const runtimeNodeModules = resolve(RUNTIME_DIR, "node_modules");
const pkgRoot = resolve(runtimeNodeModules, "better-sqlite3");
if (!pkgRoot.startsWith(`${runtimeNodeModules}/`)) return null;
if (!existsSync(join(pkgRoot, "package.json"))) return null;
const buildDir = join(pkgRoot, "build", "Release");
@@ -92,7 +95,7 @@ async function tryLoadRuntimeInstalled() {
}
try {
const mod = await import(pkgRoot);
const mod = await import(/* webpackIgnore: true */ pathToFileURL(pkgRoot).href);
return { kind: "better-sqlite3", Database: mod.default ?? mod };
} catch {
return null;