fix: restore plugin sdk runtime barrels

This commit is contained in:
Peter Steinberger
2026-03-20 16:45:35 +00:00
parent cb89325cd8
commit 18fa2992f9
25 changed files with 114 additions and 41 deletions

View File

@@ -62,6 +62,14 @@ function resolveControlCommandGate(params) {
return { commandAuthorized, shouldBlock };
}
function onDiagnosticEvent(listener) {
const monolithic = loadMonolithicSdk();
if (!monolithic || typeof monolithic.onDiagnosticEvent !== "function") {
throw new Error("openclaw/plugin-sdk root alias could not resolve onDiagnosticEvent");
}
return monolithic.onDiagnosticEvent(listener);
}
function getPackageRoot() {
return path.resolve(__dirname, "..", "..");
}
@@ -152,6 +160,7 @@ function tryLoadMonolithicSdk() {
const fastExports = {
emptyPluginConfigSchema,
onDiagnosticEvent,
resolveControlCommandGate,
};