From 4491bdad7618693d0f43f99c594aaba22c7cb614 Mon Sep 17 00:00:00 2001 From: Gustavo Madeira Santana Date: Tue, 14 Apr 2026 18:53:36 -0400 Subject: [PATCH] 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. --- src/plugin-sdk/qa-lab-runtime.ts | 39 -------------------------------- 1 file changed, 39 deletions(-) delete mode 100644 src/plugin-sdk/qa-lab-runtime.ts diff --git a/src/plugin-sdk/qa-lab-runtime.ts b/src/plugin-sdk/qa-lab-runtime.ts deleted file mode 100644 index 6b003f3e1ca..00000000000 --- a/src/plugin-sdk/qa-lab-runtime.ts +++ /dev/null @@ -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; -}; - -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({ - dirName: "qa-lab", - artifactBasename: "runtime-api.js", - }); -} - -export function isQaLabRuntimeAvailable(): boolean { - try { - loadQaLabRuntimeModule(); - return true; - } catch (error) { - if (isMissingQaLabRuntimeError(error)) { - return false; - } - throw error; - } -}