mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:50:43 +00:00
QA: drop dead qa-lab-runtime shim
Remove the old qa-lab-runtime shim now that qa-runtime is the only live consumer seam. This leaves one tiny shared runtime facade instead of two parallel names for the same private helper surface.
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
import { loadBundledPluginPublicSurfaceModuleSync } from "./facade-runtime.js";
|
||||
|
||||
type QaLabRuntimeSurface = {
|
||||
defaultQaRuntimeModelForMode: (
|
||||
mode: string,
|
||||
options?: {
|
||||
alternate?: boolean;
|
||||
preferredLiveModel?: string;
|
||||
},
|
||||
) => string;
|
||||
startQaLiveLaneGateway: (...args: unknown[]) => Promise<unknown>;
|
||||
};
|
||||
|
||||
function isMissingQaLabRuntimeError(error: unknown) {
|
||||
return (
|
||||
error instanceof Error &&
|
||||
(error.message === "Unable to resolve bundled plugin public surface qa-lab/runtime-api.js" ||
|
||||
error.message.startsWith("Unable to open bundled plugin public surface "))
|
||||
);
|
||||
}
|
||||
|
||||
export function loadQaLabRuntimeModule(): QaLabRuntimeSurface {
|
||||
return loadBundledPluginPublicSurfaceModuleSync<QaLabRuntimeSurface>({
|
||||
dirName: "qa-lab",
|
||||
artifactBasename: "runtime-api.js",
|
||||
});
|
||||
}
|
||||
|
||||
export function isQaLabRuntimeAvailable(): boolean {
|
||||
try {
|
||||
loadQaLabRuntimeModule();
|
||||
return true;
|
||||
} catch (error) {
|
||||
if (isMissingQaLabRuntimeError(error)) {
|
||||
return false;
|
||||
}
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user